public DeviceAction(byte[] array, int startIndex = 0) { var stack = new SimpleStack(array, startIndex); _device = stack.PopName(); _action = stack.PopString(); _values = stack.PopArray(); }
public DeviceEvent(byte[] array, int startIndex = 0) { if (array != null) { var stack = new SimpleStack(array, startIndex); _device = stack.PopName(); _event = stack.PopString(); _status = stack.PopString(); _time = stack.PopUInt32(); _values = stack.PopArray(); } else { _device = string.Empty; _event = string.Empty; _status = string.Empty; _time = 0; _values = null; } }