M5Unit-RF433 0.2.0 git rev:ed9ef39
Loading...
Searching...
No Matches
m5::unit::UnitSYN531R Class Reference

SYN531R unit. More...

#include <unit_SYN531R.hpp>

Inheritance diagram for m5::unit::UnitSYN531R:

Classes

struct  config_t
 Settings for begin. More...
 

Public Types

using container_type = rf433::container_type
 

Public Member Functions

virtual bool begin () override
 Initialize the receiver unit.
 
virtual void update (const bool force=false) override
 Update the receiver unit.
 
rf433::ProtocolCodec & codec ()
 Get codec (for codec-specific configuration)
 
const rf433::ProtocolCodec & codec () const
 Get codec (for codec-specific configuration)
 
void setCodec (rf433::ProtocolCodec &codec)
 Set protocol codec.
 
void resetCodec ()
 Reset to default M5Codec.
 
Configuration for begin
config_t config ()
 Gets the configuration.
 
void config (const config_t &cfg)
 Set the configuration.
 
Data
size_t available () const
 Gets the number of stored data.
 
bool empty () const
 Is empty stored data?
 
uint8_t oldest () const
 Retrieve oldest stored data.
 
uint8_t latest () const
 Retrieve latest stored data.
 
void discard ()
 Discard the oldest data accumulated.
 
void flush ()
 Discard all data.
 
const container_type & container () const
 Gets the received container reference.
 

Protected Member Functions

bool read_data ()
 

Detailed Description

SYN531R unit.

RF433 Receiver

Member Function Documentation

◆ codec() [1/2]

rf433::ProtocolCodec & m5::unit::UnitSYN531R::codec ( )
inline

Get codec (for codec-specific configuration)

Returns
The codec set by setCodec(), or the built-in M5Codec if none is set

◆ codec() [2/2]

const rf433::ProtocolCodec & m5::unit::UnitSYN531R::codec ( ) const
inline

Get codec (for codec-specific configuration)

Returns
The codec set by setCodec(), or the built-in M5Codec if none is set

◆ setCodec()

void m5::unit::UnitSYN531R::setCodec ( rf433::ProtocolCodec & codec)
inline

Set protocol codec.

Parameters
codecCodec to use. Passing the unit's own built-in codec is the same as resetCodec()
Warning
Caller must ensure the codec outlives this unit