LcNotAvailableResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 2 /* !(data.length == 2 || data.length == 3) */) { throw new ProtocolException("No valid MSG_LC_NA received."); } }
VendorResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 1) { throw new ProtocolException("No valid MSG_VENDOR received."); } }
FeedbackPositionResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); // len == 1 if no sensor time is delivered if (data == null || (data.length < 5)) { throw new ProtocolException("No valid MSG_BM_POSITION received."); } }
SysUniqueIdResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 7) { throw new ProtocolException("No valid MSG_SYS_UNIQUE_ID received."); } }
AccessoryNotifyResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 5) { throw new ProtocolException("No valid MSG_ACCESSORY_NOTIFY received"); } }
FeedbackFreeResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); // len == 1 if no sensor time is delivered if (data == null || (data.length < 1 /* && data.length != 3 && data.length != 5 */)) { throw new ProtocolException("No valid MSG_BM_FREE received."); } }
VendorAckResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 1) { throw new ProtocolException("No valid MSG_VENDOR_ACK received."); } }
FeedbackXPomResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 10) { throw new ProtocolException("No valid MSG_BM_XPOM received."); } }
LcConfigResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 6) { throw new ProtocolException("No valid MSG_LC_CONFIG received."); } }
SysSwVersionResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 3) { throw new ProtocolException("No valid MSG_SYS_SW_VERSION received."); } }
FeedbackCurrentResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 1) { throw new ProtocolException("No valid MSG_BM_CURRENT received."); } }
FeedbackOccupiedResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); // len == 1 if no sensor time is delivered if (data == null || (data.length < 1 /* && data.length != 3 && data.length != 5 */)) { throw new ProtocolException("No valid MSG_BM_OCC received."); } }
LcMacroParaResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 3) { throw new ProtocolException("No valid MSG_LC_MACRO_PARA received."); } }
LcKeyResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 2) { throw new ProtocolException("No valid MSG_LC_KEY received."); } }
CommandStationDriveStateResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 4) { throw new ProtocolException("No valid MSG_CS_DRIVE_STATE received. Expected more than length: " + (data != null ? data.length : "0")); } LOGGER.debug("Received response, speed: {}", getSpeed()); }
StallResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data != null && data.length < 1) { throw new ProtocolException("No valid MSG_STALL received: " + ByteUtils.bytesToHex(data)); } }
CommandStationDriveEventResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 3) { throw new ProtocolException("No valid MSG_CS_DRIVE_EVENT received."); } LOGGER.debug("Received response, event: {}", getEvent()); }
CommandStationDriveAcknowledgeResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 3) { throw new ProtocolException("No valid MSG_CS_DRIVE_ACK received"); } LOGGER.debug("Received response, status: {}", getState()); }
NodeTabCountResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 1) { throw new ProtocolException("No valid MSG_NODETAB_COUNT received."); } LOGGER.debug("Number of nodes in system: {}", getCount()); }
CommandStationDriveManualResponse(byte[] addr, int num, int type, byte... data) throws ProtocolException { super(addr, num, type, data); if (data == null || data.length < 9) { throw new ProtocolException("No valid MSG_CS_DRIVE_MANUAL received."); } LOGGER.debug("Received response, speed: {}", getSpeed()); }