private BidibCommand initializeCommand(BidibCommand bidibCommand) { MessageType mt = getMessageTypeMap().get(Integer.valueOf(ByteUtils.getInt(bidibCommand.getType()))); if (mt != null) { bidibCommand.setAnswerSize(mt.getAnswerSize()); } else { LOGGER.warn("Unknown command detected, cannot set answer size: {}", bidibCommand); } return bidibCommand; }
byte type = message.getType(); byte[] data = message.getData(); byte[] bytes = null;
protected byte[] prepareResponse(BidibCommand bidibMessage) { byte[] response = null; switch (ByteUtils.getInt(bidibMessage.getType())) { case BidibLibrary.MSG_SYS_GET_MAGIC: response = processSysGetMagicRequest(bidibMessage);