HerkuleXLib
1.1
Arduino library to drive HerkuleX DRS-0101 and DRS-0201
|
Class to manage the status of the servos. More...
#include <HkxStatus.h>
Public Member Functions | |
HkxStatus () | |
Default constructor. More... | |
boolean | isError (uint8_t mask) const |
Check for errors. More... | |
boolean | isDetail (uint8_t mask) const |
Check for details. More... | |
void | getRawData (uint8_t statusED[]) const |
Get the status raw data. More... | |
void | setRawData (const uint8_t statusED[]) |
Set the status raw data. More... | |
Private Attributes | |
uint8_t | _statusED [2] |
Class to manage the status of the servos.
This class manages the status of the servos with an explicit syntax.
|
inline |
Default constructor.
Default constructor of HkxStatus.
|
inline |
Get the status raw data.
Get the raw data of the status
[out] | statusED[] | : table of 2 elements to return the raw data of the status. |
|
inline |
Check for details.
Check if the details has an error according to the mask.
[in] | mask | : The mask is defined with the parameters :
|
Example 1 : check if any detail => mask
= HKX_STAT_ALL
.
Example 2 : check if any detail from the checksum or garbage => mask
= HKX_STAT_CKECKSUM
| HKX_STAT_GARBAGE
.
true
if the status contains any detail from to the mask (at least one). false
if the details contains none of detail from the mask.
|
inline |
Check for errors.
Check if the status has an error according to the mask.
[in] | mask | : The mask is defined with the parameters :
|
Example 1 : check if any error => mask
= HKX_STAT_ALL
.
Example 2 : check if any error from the temperature or the voltage => mask
= HKX_STAT_VOLTAGE
| HKX_STAT_TEMPERATURE
.
true
if the status contains any error from to the mask (at least one). false
if the status contains none of error from the mask.
|
inline |
Set the status raw data.
Set the raw data of the status.
[in] | statusED[] | : table of 2 elements to return the raw data of the status. |
|
private |
status table ([0] errors and [1] details)