public BidibCommand createVendorGet(String name) { BidibCommand bidibCommand = new VendorGetMessage(name); bidibCommand = initializeCommand(bidibCommand); return bidibCommand; }
public BidibCommand createCommandStationAccessory( int address, AddressTypeEnum addressType, TimingControlEnum timingControl, ActivateCoilEnum activateCoil, int aspect, TimeBaseUnitEnum timeBaseUnit, int time) { BidibCommand bidibCommand = new CommandStationAccessoryMessage(address, addressType, timingControl, activateCoil, aspect, timeBaseUnit, time); return initializeCommand(bidibCommand); }
public BidibCommand createSysMagic() { BidibCommand bidibCommand = new SysMagicMessage(); return initializeCommand(bidibCommand); }
/** * Create a new instance of MessageReceiver. * * @param nodeRegistry * the node registry * @param checkCRC * flag if we must check the CRC */ public NetMessageReceiver(NodeRegistry nodeFactory, boolean checkCRC) { super(nodeFactory, new BidibResponseFactory(), checkCRC); }
@Override public boolean equals(Object obj) { if (obj instanceof BidibCommandMessage) { BidibCommandMessage other = (BidibCommandMessage) obj; if (other.getType() == getType() && other.getNum() == getNum() && Arrays.equals(other.getAddr(), getAddr()) && Arrays.equals(other.getData(), getData())) { return true; } } return super.equals(obj); } }
public BidibCommand createAccessoryGet(int accessoryNumber) { BidibCommand bidibCommand = new AccessoryGetMessage(accessoryNumber); return initializeCommand(bidibCommand); } }
public BidibCommand createFeatureSet(int number, int value) { BidibCommand bidibCommand = new FeatureSetMessage(number, value); return initializeCommand(bidibCommand); }
public BidibCommand createFeatureGet(int number) { BidibCommand bidibCommand = new FeatureGetMessage(number); return initializeCommand(bidibCommand); }
public BidibCommand createFeatureGetNext() { BidibCommand bidibCommand = new FeatureGetNextMessage(); return initializeCommand(bidibCommand); }
public BidibCommand createSysDisable() { BidibCommand bidibCommand = new SysDisableMessage(); return initializeCommand(bidibCommand); }
public BidibCommand createNodeTabGetAll() { BidibCommand bidibCommand = new NodeTabGetAllMessage(); return initializeCommand(bidibCommand); }
public BidibCommand createPortQueryAll(int portTypeMask, int rangeFrom, int rangeTo) { BidibCommand bidibCommand = new LcPortQueryAllMessage(portTypeMask, rangeFrom, rangeTo); return initializeCommand(bidibCommand); }
public BidibCommand createNodeTabGetNext() { BidibCommand bidibCommand = new NodeTabGetNextMessage(); return initializeCommand(bidibCommand); }
public BidibCommand createLcConfigXGetAll() { BidibCommand bidibCommand = new LcConfigXGetAllMessage(); return initializeCommand(bidibCommand); }
public BidibCommand createLcKey(int portId) { BidibCommand bidibCommand = new LcKeyMessage(portId); return initializeCommand(bidibCommand); }
public BidibCommand createFeatureGetAll() { BidibCommand bidibCommand = new FeatureGetAllMessage(); return initializeCommand(bidibCommand); }
public BidibCommand createLcMacroParaGet(int macroNumber, int parameter) { BidibCommand bidibCommand = new LcMacroParaGetMessage(macroNumber, parameter); return initializeCommand(bidibCommand); }
public BidibCommand createSysEnable() { BidibCommand bidibCommand = new SysEnableMessage(); return initializeCommand(bidibCommand); }
public FeedbackDynStateResponse(byte[] addr, int num, int detectorNumber, AddressData addressData, byte dynNumber, byte dynValue) throws ProtocolException { this(addr, num, BidibLibrary.MSG_BM_DYN_STATE, prepareDynamicStateData(detectorNumber, addressData, dynNumber, dynValue)); }
private byte getValue(int type) { byte result = 0; byte[] data = getData(); for (int index = 0; index < data.length - 1; index += 2) { if (data[index] == type) { result = data[index + 1]; break; } } return result; }