void RfidReaderMac::addSelectHeader(PacketPtr packet, NodeId receiverId) const { RfidReaderMacDataPtr macData = RfidReaderMacData::create(); macData->setType(RfidReaderMacData::Types_Select); macData->setSenderId(getNode()->getNodeId()); macData->setReceiverId(receiverId); packet->setDoMaxTxPower(true); packet->addData(Packet::DataTypes_Link, *macData); }
PacketPtr RfidReaderMac::createAckPacket(NodeId destination) const { RfidReaderMacDataPtr macData = RfidReaderMacData::create(); macData->setType(RfidReaderMacData::Types_Ack); macData->setSenderId(getNode()->getNodeId()); macData->setReceiverId(destination); PacketPtr packet = Packet::create(); packet->setDoMaxTxPower(true); packet->addData(Packet::DataTypes_Link, *macData); return packet; }