flux sdk  v01.05.00-6-g190c94c
Embedded C++ SDK
Loading...
Searching...
No Matches
flxOptExtSerial Class Reference

#include <flxOptExtSerial.h>

Inheritance diagram for flxOptExtSerial:
flxActionType< flxOptExtSerial > flxAction flxOperation flxObject _flxParameterContainer flxPersist _flxPropertyContainer flxDescriptor

Public Member Functions

 flxOptExtSerial ()
 Default constructor for the flxDevSerial class. More...
 
 ~flxOptExtSerial ()
 
 flxOptExtSerial (uint8_t pinRX, uint8_t pinTX)
 Parameterized constructor for the flxDevSerial class. More...
 
bool begin (void)
 Method called to initialize the class. More...
 
void reset (void)
 
- Public Member Functions inherited from flxActionType< flxOptExtSerial >
flxTypeID getType (void)
 
- Public Member Functions inherited from flxAction
virtual bool initialize (void)
 
- Public Member Functions inherited from flxOperation
virtual flxTypeID getType (void)
 
virtual bool execute (void)
 Virtual method called to run the operation - called before data is retrieved. More...
 
virtual bool onSave (flxStorageBlock *stBlk)
 
virtual bool onRestore (flxStorageBlock *stBlk)
 
- Public Member Functions inherited from flxObject
 flxObject ()
 
virtual ~flxObject ()
 
virtual size_t n_children (void)
 
void setParent (flxObject *parent)
 
void setParent (flxObject &parent)
 
flxObjectparent ()
 
void setHidden (bool bHide=true)
 
bool hidden ()
 
void setIsDirty (bool bDirty=true)
 
bool isDirty (void)
 
virtual bool onSave (flxStorageBlock *stBlk)
 
virtual bool save (flxStorage *pStorage)
 
virtual void restoreComplete (void)
 
virtual bool onRestore (flxStorageBlock *stBlk)
 
virtual bool restore (flxStorage *pStorage)
 
virtual flxTypeID getType (void)
 
virtual bool save (flxStorage *)=0
 
virtual bool restore (flxStorage *)=0
 
- Public Member Functions inherited from _flxPropertyContainer
 _flxPropertyContainer ()
 
void addProperty (flxProperty *newProperty)
 
void addProperty (flxProperty &newProperty)
 
void removeProperty (flxProperty *rmProp)
 
bool containsProperty (flxProperty *prop)
 
void removeProperty (flxProperty &rmProp)
 
flxPropertyListgetProperties (void)
 
uint nProperties (void)
 
bool saveProperties (flxStorageBlock *stBlk)
 
bool restoreProperties (flxStorageBlock *stBlk)
 
size_t propertySaveSize ()
 
void hideProperty (flxProperty &theProp)
 
- Public Member Functions inherited from flxDescriptor
 flxDescriptor ()
 
void setName (const char *new_name)
 Set the Name object - storing the pointer to the provided string No allocation is performed. If the previous name was allocated, it is freed. More...
 
void setName (const char *new_name, const char *new_desc)
 Set the Name object and the Description for the object. Both strings are constants. More...
 
void setName (char *new_name)
 Set the Name object, but makes a copy of the input string since the input is not const. If the previous name was allocated, it is freed. More...
 
const char * name ()
 Return a const char pointer to the name of the object. More...
 
std::string name_ (void)
 Returns a std::string of the name of the object. More...
 
void setDescription (const char *new_desc)
 Set the Description object - the input value is constant and not copied. If the previous description was allocated, it is freed. More...
 
void setDescription (char *new_desc)
 Set the Description object - the input value is not constant and is copied. If the previous description was allocated, it is freed. More...
 
const char * description ()
 Return the constant C string pointer to the description of the object. More...
 
std::string description_ (void)
 Return the description of the object as a std::string. More...
 
void setTitle (const char *title)
 Set the Title object - the title is optional and is used mostly for UX or organizational purposes. The input value is constant and not copied. If the previous title was allocated, it is freed. More...
 
void setTitleAlloc (char *new_title)
 Set the Title of the object , but make an explict copy of the provided string. More...
 
const char * title (void)
 Return the C constant string pointer to the title of the object. More...
 
- Public Member Functions inherited from _flxParameterContainer
void addParameter (flxParameterIn *newParam, bool head=false)
 
void addParameter (flxParameterIn &newParam, bool head=false)
 
void removeParameter (flxParameterIn *rmParam)
 
void removeParameter (flxParameterIn &rmParam)
 
size_t nInputParameters ()
 
void addParameter (flxParameterOut *newParam, bool head=false)
 
void addParameter (flxParameterOut &newParam, bool head=false)
 
void removeParameter (flxParameterOut *rmParam)
 
void removeParameter (flxParameterOut &rmParam)
 
size_t nOutputParameters ()
 
flxParameterOutListgetOutputParameters (void)
 
flxParameterInListgetInputParameters (void)
 

Public Attributes

flxPropertyRWUInt8< flxOptExtSerial, &flxOptExtSerial::get_rx_pin, &flxOptExtSerial::set_rx_pin > rxPin
 
flxPropertyRWUInt8< flxOptExtSerial, &flxOptExtSerial::get_tx_pin, &flxOptExtSerial::set_tx_pin > txPin
 
flxPropertyRWBool< flxOptExtSerial, &flxOptExtSerial::get_enable_serialdevice, &flxOptExtSerial::set_enable_serialdevice > serialDeviceEnabled = {false}
 
flxPropertyRWUInt32< flxOptExtSerial, &flxOptExtSerial::get_baud_rate, &flxOptExtSerial::set_baud_rate > serialBaudRate = {1200, 500000}
 

Additional Inherited Members

- Static Public Member Functions inherited from flxActionType< flxOptExtSerial >
static flxTypeID type (void)
 
- Static Public Member Functions inherited from flxObject
static flxTypeID type (void)
 
- Protected Attributes inherited from flxDescriptor
const char * _name
 
bool _nameAlloc
 
const char * _desc
 
bool _descAlloc
 
const char * _title
 
bool _titleAlloc
 

Detailed Description

This class provides methods to initialize the sensor, read moisture values, and calibrate the sensor for dry and wet states. It also includes properties to enable the sensor, set the GPIO pins, and retrieve the moisture values.

Constructor & Destructor Documentation

◆ flxOptExtSerial() [1/2]

flxOptExtSerial::flxOptExtSerial ( )

Default constructor for the flxDevSerial class.

◆ ~flxOptExtSerial()

flxOptExtSerial::~flxOptExtSerial ( )
inline

◆ flxOptExtSerial() [2/2]

flxOptExtSerial::flxOptExtSerial ( uint8_t  pinRX,
uint8_t  pinTX 
)
inline

Parameterized constructor for the flxDevSerial class.

Parameters
pinRXThe GPIO pin connected to the RX of the serial connection
pinTXThe GPIO pin connected to the TX of the serial connection

Member Function Documentation

◆ begin()

bool flxOptExtSerial::begin ( void  )

Method called to initialize the class.

Returns
True if initialization is successful, false otherwise.

◆ reset()

void flxOptExtSerial::reset ( void  )
inline

Member Data Documentation

◆ rxPin

flxPropertyRWUInt8<flxOptExtSerial, &flxOptExtSerial::get_rx_pin, &flxOptExtSerial::set_rx_pin> flxOptExtSerial::rxPin

◆ serialBaudRate

flxPropertyRWUInt32<flxOptExtSerial, &flxOptExtSerial::get_baud_rate, &flxOptExtSerial::set_baud_rate> flxOptExtSerial::serialBaudRate = {1200, 500000}

◆ serialDeviceEnabled

flxPropertyRWBool<flxOptExtSerial, &flxOptExtSerial::get_enable_serialdevice, &flxOptExtSerial::set_enable_serialdevice> flxOptExtSerial::serialDeviceEnabled = {false}

◆ txPin

flxPropertyRWUInt8<flxOptExtSerial, &flxOptExtSerial::get_tx_pin, &flxOptExtSerial::set_tx_pin> flxOptExtSerial::txPin

The documentation for this class was generated from the following files: