flux sdk  v01.02.02-3-g292b3a7
Embedded C++ SDK
Loading...
Searching...
No Matches
flxDevAS7265X Class Reference

#include <flxDevAS7265x.h>

Inheritance diagram for flxDevAS7265X:
flxDeviceI2CType< flxDevAS7265X > flxDevice flxOperation flxObject _flxParameterContainer flxPersist _flxPropertyContainer flxDescriptor

Public Member Functions

 flxDevAS7265X ()
 Constructor. More...
 
bool onInitialize (TwoWire &)
 Called during the startup/initialization of the driver (after the constructor is called). More...
 
bool execute (void)
 Called right before data parameters are read - take measurements called. More...
 
- Public Member Functions inherited from flxDeviceI2CType< flxDevAS7265X >
virtual uint8_t getDefaultAddress (void)
 
bool initialize (TwoWire &wirePort)
 
bool initialize (flxBusI2C &i2cDriver)
 
bool initialize (void)
 
bool initialize (uint8_t address)
 
virtual bool onInitialize (TwoWire &)
 
flxTypeID getType (void)
 
bool isType (flxTypeID type)
 
flxDeviceKind_t getKind (void)
 
- Public Member Functions inherited from flxDevice
 flxDevice ()
 
virtual ~flxDevice ()
 
virtual bool execute (void)
 Virtual method called to run the operation - called before data is retrieved. More...
 
bool initialize ()
 
virtual bool initialize (flxBusI2C &)
 
virtual bool initialize (flxBusSPI &)
 
bool autoload (void)
 
void setAutoload ()
 
void setAddress (uint8_t address)
 
uint8_t address (void)
 
void addAddressToName ()
 
void setIsInitialized (bool isInit)
 
bool isInitialized (void)
 
virtual flxDeviceKind_t getKind (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 ()
 
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 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)
 
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)
 

Static Public Member Functions

static bool isConnected (flxBusI2C &i2cDriver, uint8_t address)
 Static method called to determine if device is connected. More...
 
static flxDeviceConfidence_t connectedConfidence (void)
 
static const char * getDeviceName ()
 
static const uint8_t * getDefaultAddresses ()
 
- Static Public Member Functions inherited from flxDeviceI2CType< flxDevAS7265X >
static flxTypeID type (void)
 
static flxDeviceKind_t kind (void)
 
- Static Public Member Functions inherited from flxObject
static flxTypeID type (void)
 

Public Attributes

flxPropertyBool< flxDevAS7265XreadWithLED = {false}
 
flxPropertyRWBool< flxDevAS7265X, &flxDevAS7265X::get_indicator, &flxDevAS7265X::set_indicator > enableIndicator
 
flxPropertyBool< flxDevAS7265XoutputCal = {true}
 
flxPropertyRWUInt8< flxDevAS7265X, &flxDevAS7265X::get_gain, &flxDevAS7265X::set_gain > sensorGain
 
flxPropertyRWUInt8< flxDevAS7265X, &flxDevAS7265X::get_mmode, &flxDevAS7265X::set_mmode > measureMode
 
flxPropertyRWUInt8< flxDevAS7265X, &flxDevAS7265X::get_icycles, &flxDevAS7265X::set_icycles > intCycles
 
flxPropertyRWUInt8< flxDevAS7265X, &flxDevAS7265X::get_ind_current, &flxDevAS7265X::set_ind_current > indicatorCurrent
 
flxPropertyRWUInt8< flxDevAS7265X, &flxDevAS7265X::get_white_current, &flxDevAS7265X::set_white_current > whiteCurrent
 
flxPropertyRWUInt8< flxDevAS7265X, &flxDevAS7265X::get_ir_current, &flxDevAS7265X::set_ir_current > irCurrent
 
flxParameterOutBool< flxDevAS7265X, &flxDevAS7265X::read_output_type > outputType
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_A > outA
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_B > outB
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_C > outC
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_D > outD
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_E > outE
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_F > outF
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_G > outG
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_H > outH
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_I > outI
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_J > outJ
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_K > outK
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_L > outL
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_R > outR
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_S > outS
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_T > outT
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_U > outU
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_V > outV
 
flxParameterOutFloat< flxDevAS7265X, &flxDevAS7265X::read_W > outW
 
- Public Attributes inherited from flxDevice
flxParameterInVoid< flxDevice, &flxDevice::disable_all_parameters > disableAllParameters
 
flxParameterInVoid< flxDevice, &flxDevice::enable_all_parameters > enableAllParameters
 

Static Public Attributes

static uint8_t defaultDeviceAddress [] = {AS7265X_ADDR, kSparkDeviceAddressNull}
 

Additional Inherited Members

- Protected Attributes inherited from flxDescriptor
const char * _name
 
bool _nameAlloc
 
const char * _desc
 
bool _descAlloc
 
const char * _title
 
bool _titleAlloc
 

Constructor & Destructor Documentation

◆ flxDevAS7265X()

flxDevAS7265X::flxDevAS7265X ( )

Constructor.

Member Function Documentation

◆ connectedConfidence()

static flxDeviceConfidence_t flxDevAS7265X::connectedConfidence ( void  )
inlinestatic

◆ execute()

bool flxDevAS7265X::execute ( void  )
virtual

Called right before data parameters are read - take measurements called.

Reimplemented from flxDevice.

◆ getDefaultAddresses()

static const uint8_t * flxDevAS7265X::getDefaultAddresses ( )
inlinestatic

◆ getDeviceName()

static const char * flxDevAS7265X::getDeviceName ( )
inlinestatic

◆ isConnected()

bool flxDevAS7265X::isConnected ( flxBusI2C i2cDriver,
uint8_t  address 
)
static

Static method called to determine if device is connected.

Parameters
i2cDriver- Framework i2c bus driver
address- The address to check
Returns
true if the device is connected

◆ onInitialize()

bool flxDevAS7265X::onInitialize ( TwoWire &  wirePort)
virtual

Called during the startup/initialization of the driver (after the constructor is called).

Parameters
wirePort- The Arduino wire port for the I2C bus
Returns
true on success

Reimplemented from flxDeviceI2CType< flxDevAS7265X >.

Member Data Documentation

◆ defaultDeviceAddress

uint8_t flxDevAS7265X::defaultDeviceAddress = {AS7265X_ADDR, kSparkDeviceAddressNull}
static

◆ enableIndicator

flxPropertyRWBool<flxDevAS7265X, &flxDevAS7265X::get_indicator, &flxDevAS7265X::set_indicator> flxDevAS7265X::enableIndicator
Initial value:
= {
true}

◆ indicatorCurrent

flxPropertyRWUInt8<flxDevAS7265X, &flxDevAS7265X::get_ind_current, &flxDevAS7265X::set_ind_current> flxDevAS7265X::indicatorCurrent
Initial value:
= {AS7265X_INDICATOR_CURRENT_LIMIT_8MA,
{{"1 ma", AS7265X_INDICATOR_CURRENT_LIMIT_1MA},
{"2 ma", AS7265X_INDICATOR_CURRENT_LIMIT_2MA},
{"4 ma", AS7265X_INDICATOR_CURRENT_LIMIT_4MA},
{"8 ma", AS7265X_INDICATOR_CURRENT_LIMIT_8MA}}}

◆ intCycles

flxPropertyRWUInt8<flxDevAS7265X, &flxDevAS7265X::get_icycles, &flxDevAS7265X::set_icycles> flxDevAS7265X::intCycles
Initial value:
= {
#define kAS7265xDefaultIntCycles
Definition: flxDevAS7265x.h:26

◆ irCurrent

flxPropertyRWUInt8<flxDevAS7265X, &flxDevAS7265X::get_ir_current, &flxDevAS7265X::set_ir_current> flxDevAS7265X::irCurrent
Initial value:
= {
AS7265X_LED_CURRENT_LIMIT_12_5MA,
{{"12.5 ma", AS7265X_LED_CURRENT_LIMIT_12_5MA},
{"25 ma", AS7265X_LED_CURRENT_LIMIT_25MA},
{"50 ma", AS7265X_LED_CURRENT_LIMIT_50MA}}}

◆ measureMode

flxPropertyRWUInt8<flxDevAS7265X, &flxDevAS7265X::get_mmode, &flxDevAS7265X::set_mmode> flxDevAS7265X::measureMode
Initial value:
= {
AS7265X_MEASUREMENT_MODE_6CHAN_ONE_SHOT,
{{"STUV Channels", AS7265X_MEASUREMENT_MODE_4CHAN},
{"RTUW Channels", AS7265X_MEASUREMENT_MODE_4CHAN_2},
{"6 Channel Continuous", AS7265X_MEASUREMENT_MODE_6CHAN_CONTINUOUS},
{"6 Channel 1 Shot", AS7265X_MEASUREMENT_MODE_6CHAN_ONE_SHOT}}}

◆ outA

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_A> flxDevAS7265X::outA

◆ outB

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_B> flxDevAS7265X::outB

◆ outC

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_C> flxDevAS7265X::outC

◆ outD

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_D> flxDevAS7265X::outD

◆ outE

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_E> flxDevAS7265X::outE

◆ outF

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_F> flxDevAS7265X::outF

◆ outG

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_G> flxDevAS7265X::outG

◆ outH

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_H> flxDevAS7265X::outH

◆ outI

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_I> flxDevAS7265X::outI

◆ outJ

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_J> flxDevAS7265X::outJ

◆ outK

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_K> flxDevAS7265X::outK

◆ outL

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_L> flxDevAS7265X::outL

◆ outputCal

flxPropertyBool<flxDevAS7265X> flxDevAS7265X::outputCal = {true}

◆ outputType

flxParameterOutBool<flxDevAS7265X, &flxDevAS7265X::read_output_type> flxDevAS7265X::outputType

◆ outR

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_R> flxDevAS7265X::outR

◆ outS

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_S> flxDevAS7265X::outS

◆ outT

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_T> flxDevAS7265X::outT

◆ outU

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_U> flxDevAS7265X::outU

◆ outV

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_V> flxDevAS7265X::outV

◆ outW

flxParameterOutFloat<flxDevAS7265X, &flxDevAS7265X::read_W> flxDevAS7265X::outW

◆ readWithLED

flxPropertyBool<flxDevAS7265X> flxDevAS7265X::readWithLED = {false}

◆ sensorGain

flxPropertyRWUInt8<flxDevAS7265X, &flxDevAS7265X::get_gain, &flxDevAS7265X::set_gain> flxDevAS7265X::sensorGain
Initial value:
= {
AS7265X_GAIN_16X,
{{"1X", AS7265X_GAIN_1X}, {"3.7X", AS7265X_GAIN_37X}, {"16X", AS7265X_GAIN_16X}, {"64X", AS7265X_GAIN_64X}}}

◆ whiteCurrent

flxPropertyRWUInt8<flxDevAS7265X, &flxDevAS7265X::get_white_current, &flxDevAS7265X::set_white_current> flxDevAS7265X::whiteCurrent
Initial value:
= {AS7265X_LED_CURRENT_LIMIT_12_5MA,
{{"12.5 ma", AS7265X_LED_CURRENT_LIMIT_12_5MA},
{"25 ma", AS7265X_LED_CURRENT_LIMIT_25MA},
{"50 ma", AS7265X_LED_CURRENT_LIMIT_50MA},
{"100 ma", AS7265X_LED_CURRENT_LIMIT_100MA}}}

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