nfc_payload.cpp
1 #include "nfc_payload.h" 2 3 #include "nfc_log_module.ii" 4 5 namespace nfc 6 { 7 size_t Payload::GetDataLength() const 8 { 9 return dataLength; 10 } 11 12 const uint8_t *Payload::GetData() const 13 { 14 return data; 15 } 16 17 void Payload::SetData(const uint8_t* newData, size_t newDataLength) 18 { 19 ASSERT(writable); 20 ASSERT(newDataLength <= dataLength); 21 ASSERT(writableData != nullptr); 22 23 memcpy(writableData, newData, dataLength); 24 } 25 26 bool Payload::GetUniqueIdBytes(uint8_t* idOutput, size_t* idOutputLength) const 27 { 28 // a payload by default doesn't have a unique id! 29 return false; 30 } 31 } // namespace nfc