46 internal static LocalStatus ParseData(ReadOnlySpan<byte> data)
48 var dataArray = data.ToArray();
49 if (dataArray.Length < 2)
51 throw new Exception(
"Invalid size for the data");
55 Convert.ToBoolean(dataArray[0]), Convert.ToBoolean(dataArray[1]));
60 Tamper ? (byte)0x01 : (byte)0x00,
66 var build =
new StringBuilder();
67 build.AppendLine($
" Tamper: {Tamper}");
68 build.AppendLine($
"Power Failure: {PowerFailure}");
70 return build.ToString();
Contains standard Security Control Block data that can be used when building messages.
Base class representing a payload an OSDP message.
override byte[] BuildData()
override ReadOnlySpan< byte > SecurityControlBlock()
LocalStatus(bool tamper, bool powerFailure)
Initializes a new instance of LocalStatus class.
bool PowerFailure
Gets a value indicating whether this PD is experiencing a power failure.
bool Tamper
Gets a value indicating whether this PD is tamper.
override byte[]? PowerFailure(byte) 0x01 override string ToString()
ReplyType
Identifies the type of OSDP protocol reply (PD -> ACU) message.