Fork of my original MQTTGateway

Dependencies:   mbed-http

Embed: (wiki syntax)

« Back to documentation index

IOSampleDM Class Reference

IOSampleDM Class Reference

Class to handle the incoming IO Data Samples in ZigBee modules. More...

#include <IOSampleDM.h>

Public Member Functions

 IOSampleDM (const uint8_t *const raw_data=NULL, size_t size=0)
 Class constructor.
 ~IOSampleDM ()
 Class destructor.
RadioStatus get_dio (XBeeDM::IoLine line, DioVal *const dio_value) const
 get_dio - read the value of a DIO configured as digital input
RadioStatus get_adc (XBeeDM::IoLine line, uint16_t *const val) const
 get_adc - read the value of the espcified ADC line
bool is_valid ()
 is_valid - checks if the IOSampleDM object has at least one DIO or ADC sample.

Detailed Description

Class to handle the incoming IO Data Samples in ZigBee modules.

Definition at line 21 of file IOSampleDM.h.


Constructor & Destructor Documentation

IOSampleDM ( const uint8_t *const   raw_data = NULL,
size_t  size = 0 
)

Class constructor.

Parameters:
raw_dataThe IO Sample data, as returned by an "IS" command response or in the IoSampleRxZBDM (0x92) frames
sizesize (in bytes) of raw_data.

Definition at line 20 of file IOSampleDM.cpp.

~IOSampleDM (  )

Class destructor.

Definition at line 36 of file IOSampleDM.cpp.


Member Function Documentation

RadioStatus get_adc ( XBeeDM::IoLine  line,
uint16_t *const   val 
) const

get_adc - read the value of the espcified ADC line

Parameters:
lineADC line being read
valpointer where the value read from the ADC will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 53 of file IOSampleDM.cpp.

RadioStatus get_dio ( XBeeDM::IoLine  line,
DioVal *const   dio_value 
) const

get_dio - read the value of a DIO configured as digital input

Parameters:
lineDIO line being read
valpointer where the DIO value read will be stored
Returns:
Success if the operation was successful, Failure otherwise

Definition at line 41 of file IOSampleDM.cpp.

bool is_valid (  )

is_valid - checks if the IOSampleDM object has at least one DIO or ADC sample.

Returns:
true if valid, false otherwise

Definition at line 55 of file IOSampleDM.h.