|
| 1 | +@startuml |
| 2 | + |
| 3 | +abstract class NFCNDEFCapable { |
| 4 | + +{abstract} bool is_ndef_supported() const |
| 5 | + |
| 6 | + #void parse_ndef_message(const ac_buffer_t& buffer) |
| 7 | + #void build_ndef_message(ac_buffer_builder_t& buffer_builder) |
| 8 | + #ndef_msg_t* ndef_message() |
| 9 | + #{abstract} NFCNDEFCapable::Delegate* ndef_capable_delegate() |
| 10 | +} |
| 11 | + |
| 12 | +abstract class NFCNDEFCapable::Delegate { |
| 13 | + +{abstract} void parse_ndef_message(const Span<const uint8_t> &buffer) |
| 14 | + +{abstract} size_t build_ndef_message(const Span<uint8_t> &buffer) |
| 15 | +} |
| 16 | + |
| 17 | +abstract class NFCRemoteEndpoint { |
| 18 | + +{abstract} bool is_connected() const |
| 19 | + +{abstract} bool is_disconnected() const |
| 20 | + +{abstract} nfc_rf_protocols_bitmask_t rf_protocols() const |
| 21 | + +{abstract} nfc_err_t connect() |
| 22 | + +{abstract} nfc_err_t disconnect() |
| 23 | +} |
| 24 | + |
| 25 | +abstract class NFCRemoteEndpoint::Delegate { |
| 26 | + +{abstract} void on_connected() |
| 27 | + +{abstract} void on_disconnected() |
| 28 | +} |
| 29 | + |
| 30 | +abstract class NFCTarget { |
| 31 | + +void write_ndef_message() |
| 32 | + +void erase_ndef_message() |
| 33 | + +void read_ndef_message() |
| 34 | +} |
| 35 | + |
| 36 | +abstract class NFCTarget::Delegate { |
| 37 | + +{abstract} void on_ndef_message_written(nfc_err_t result) |
| 38 | + +{abstract} void on_ndef_message_erased(nfc_err_t result) |
| 39 | + +{abstract} void on_ndef_message_read(nfc_err_t result) |
| 40 | +} |
| 41 | + |
| 42 | +NFCNDEFCapable <-- NFCTarget |
| 43 | +NFCNDEFCapable::Delegate <-- NFCTarget::Delegate |
| 44 | + |
| 45 | +class NFCEEPROM { |
| 46 | + +nfc_err_t initialize() |
| 47 | + +void set_delegate(NFCEEPROM::Delegate* delegate) |
| 48 | +} |
| 49 | + |
| 50 | +abstract class NFCEEPROM::Delegate { |
| 51 | + |
| 52 | +} |
| 53 | + |
| 54 | +abstract class NFCEEPROMDriver { |
| 55 | + +void set_delegate(Delegate* delegate) |
| 56 | + +void set_event_queue(events::EventQueue* queue) |
| 57 | + |
| 58 | + +{abstract} void reset() |
| 59 | + +{abstract} size_t get_max_size() |
| 60 | + +{abstract} void start_session(bool force = true) |
| 61 | + +{abstract} void end_session() |
| 62 | + +{abstract} void read_bytes(uint32_t address, size_t count) |
| 63 | + +{abstract} void write_bytes(uint32_t address, const uint8_t* bytes, size_t count) |
| 64 | + +{abstract} void write_size(size_t count) |
| 65 | + +{abstract} void read_size() |
| 66 | + +{abstract} void erase_bytes(uint32_t address, size_t size) |
| 67 | + #NFCEEPROMDriver::Delegate *delegate() |
| 68 | + #events::EventQueue *event_queue() |
| 69 | +} |
| 70 | + |
| 71 | +abstract class NFCEEPROMDriver::Delegate { |
| 72 | + +{abstract} void on_session_started(bool success) |
| 73 | + +{abstract} void on_session_ended(bool success) |
| 74 | + +{abstract} void on_bytes_read(size_t count) |
| 75 | + +{abstract} void on_bytes_written(size_t count) |
| 76 | + +{abstract} void on_size_read(bool success, size_t size) |
| 77 | + +{abstract} void on_size_written(bool success) |
| 78 | + +{abstract} void on_bytes_erased(size_t count) |
| 79 | +} |
| 80 | + |
| 81 | +NFCTarget <-- NFCEEPROM |
| 82 | +NFCTarget::Delegate <-- NFCEEPROM::Delegate |
| 83 | +NFCEEPROM o-- NFCEEPROM::Delegate |
| 84 | +NFCEEPROM o-- NFCEEPROMDriver |
| 85 | +NFCEEPROMDriver o-- NFCEEPROMDriver::Delegate |
| 86 | +NFCEEPROMDriver::Delegate <-- NFCEEPROM |
| 87 | + |
| 88 | +class NFCRemoteInitiator { |
| 89 | + +void set_delegate(NFCRemoteInitiator::Delegate* delegate) |
| 90 | + |
| 91 | + +{abstract}bool is_iso7816_supported() const |
| 92 | + +{abstract}void add_iso7816_application(nfc_tech_iso7816_app_t *application) |
| 93 | + |
| 94 | + +{abstract} nfc_tag_type_t nfc_tag_type() |
| 95 | + +{abstract} bool is_ndef_supported() |
| 96 | +} |
| 97 | + |
| 98 | +abstract class NFCRemoteInitiator::Delegate { |
| 99 | + |
| 100 | +} |
| 101 | + |
| 102 | +NFCNDEFCapable <-- NFCRemoteInitiator |
| 103 | +NFCRemoteEndpoint <-- NFCRemoteInitiator |
| 104 | +NFCRemoteEndpoint::Delegate <-- NFCRemoteInitiator::Delegate |
| 105 | +NFCNDEFCapable::Delegate <-- NFCRemoteInitiator::Delegate |
| 106 | +NFCRemoteInitiator o-- NFCRemoteInitiator::Delegate |
| 107 | + |
| 108 | +@enduml |
0 commit comments