mirror of
https://github.com/Vale54321/schafkopf-bot.git
synced 2025-12-16 03:39:34 +01:00
added arduino nfcReader files (#42)
This commit is contained in:
committed by
GitHub
parent
76cb0eaf1a
commit
6259d0bef3
39
Arduino/nfcReader/NDEF/NdefMessage.h
Normal file
39
Arduino/nfcReader/NDEF/NdefMessage.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef NdefMessage_h
|
||||
#define NdefMessage_h
|
||||
|
||||
#include <Ndef.h>
|
||||
#include <NdefRecord.h>
|
||||
|
||||
#define MAX_NDEF_RECORDS 4
|
||||
|
||||
class NdefMessage
|
||||
{
|
||||
public:
|
||||
NdefMessage(void);
|
||||
NdefMessage(const byte *data, const int numBytes);
|
||||
NdefMessage(const NdefMessage& rhs);
|
||||
~NdefMessage();
|
||||
NdefMessage& operator=(const NdefMessage& rhs);
|
||||
|
||||
int getEncodedSize(); // need so we can pass array to encode
|
||||
void encode(byte *data);
|
||||
|
||||
boolean addRecord(NdefRecord& record);
|
||||
void addMimeMediaRecord(String mimeType, String payload);
|
||||
void addMimeMediaRecord(String mimeType, byte *payload, int payloadLength);
|
||||
void addTextRecord(String text);
|
||||
void addTextRecord(String text, String encoding);
|
||||
void addUriRecord(String uri);
|
||||
void addEmptyRecord();
|
||||
|
||||
unsigned int getRecordCount();
|
||||
NdefRecord getRecord(int index);
|
||||
NdefRecord operator[](int index);
|
||||
|
||||
void print();
|
||||
private:
|
||||
NdefRecord _records[MAX_NDEF_RECORDS];
|
||||
unsigned int _recordCount;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user