ByteStream BaseStation_SetBeacon::buildCommand(uint32 utcTime) { uint32 beaconTime = utcTime; //build the command ByteStream ByteStream cmd; cmd.append_uint16(COMMAND_ID); cmd.append_uint32(beaconTime); return cmd; }
ByteStream BaseStation_RfSweepStart::buildCommand(uint32 min, uint32 max, uint32 interval, uint16 options) { //build the command ByteStream ByteStream cmd; cmd.append_uint8(0xAA); //Start of packet cmd.append_uint8(0x0E); //Delivery Stop Flag cmd.append_uint8(WirelessPacket::packetType_baseCommand); //App Data Type cmd.append_uint16(WirelessProtocol::BASE_STATION_ADDRESS); //Base Station Address cmd.append_uint8(0x10); //Payload length cmd.append_uint16(WirelessProtocol::cmdId_base_rfScan); //Command ID cmd.append_uint16(options); cmd.append_uint32(min); cmd.append_uint32(max); cmd.append_uint32(interval); cmd.append_uint16(cmd.calculateSimpleChecksum(1, 21)); //checksum //return the built command bytes return cmd; }
ByteStream BaseStation_SetBeacon::buildCommand(uint32 utcTime) { uint32 beaconTime = utcTime; //build the command ByteStream ByteStream cmd; cmd.append_uint16(WirelessProtocol::cmdId_base_setBeacon); cmd.append_uint32(beaconTime); return cmd; }
ByteStream BaseStation_SetBeacon_v2::buildCommand(uint32 utcTime) { //build the command ByteStream ByteStream cmd; cmd.append_uint8(0xAA); //Start of packet cmd.append_uint8(0x0E); //Delivery Stop Flag cmd.append_uint8(0x30); //App Data Type cmd.append_uint16(WirelessProtocol::BASE_STATION_ADDRESS); //Base Station Address cmd.append_uint8(0x06); //Payload length cmd.append_uint16(WirelessProtocol::cmdId_base_setBeacon); //Command ID cmd.append_uint32(utcTime); //Timestamp for Beacon cmd.append_uint16(cmd.calculateSimpleChecksum(1, 11)); //checksum //return the built command bytes return cmd; }