|
M5Unit-RF433 0.1.0 git rev:5415b86
|
Abstract base class for RF433 protocol encoding/decoding. More...
#include <protocol_codec.hpp>
Public Member Functions | |
| ProtocolCodec (CodecType t) | |
| CodecType | type () const |
| Get codec type for safe downcasting. | |
TX | |
| virtual item_container_type | encode (const uint8_t *payload, uint32_t payload_len)=0 |
| Encode payload into a complete RMT frame (preamble + SOF + header + data + EOF) | |
RX | |
| virtual bool | decode (const gpio::m5_rmt_item_t *items, uint32_t num, uint8_t *work_buf, uint16_t work_buf_size, DecodeResult &result)=0 |
| Try to decode a valid frame from RMT items. | |
Properties | |
| virtual uint8_t | overhead () const =0 |
| Maximum protocol overhead in bytes (excluding payload) | |
Abstract base class for RF433 protocol encoding/decoding.
|
pure virtual |
Try to decode a valid frame from RMT items.
| items | RMT items from receiver | |
| num | Number of items | |
| work_buf | Working buffer for Manchester decoding | |
| work_buf_size | Size of working buffer | |
| [out] | result | Decoded frame result |
Implemented in m5::unit::rf433::M5Codec.
|
pure virtual |
Encode payload into a complete RMT frame (preamble + SOF + header + data + EOF)
| payload | Payload data |
| payload_len | Payload length in bytes |
Implemented in m5::unit::rf433::M5Codec.
|
pure virtual |
Maximum protocol overhead in bytes (excluding payload)
Implemented in m5::unit::rf433::M5Codec.