Entity Class

class EntityClass

Subclassed by Acroname::BrainStem::AnalogClass, Acroname::BrainStem::AppClass, Acroname::BrainStem::ClockClass, Acroname::BrainStem::DigitalClass, Acroname::BrainStem::I2CClass, Acroname::BrainStem::MuxClass, Acroname::BrainStem::PointerClass, Acroname::BrainStem::RailClass, Acroname::BrainStem::RCServoClass, Acroname::BrainStem::RelayClass, Acroname::BrainStem::SignalClass, Acroname::BrainStem::StoreClass, Acroname::BrainStem::SystemClass, Acroname::BrainStem::TemperatureClass, Acroname::BrainStem::TimerClass, Acroname::BrainStem::UARTClass, Acroname::BrainStem::USBClass

Public Functions

EntityClass(void)

Constructor.

virtual ~EntityClass(void)

Destructor.

void init(Module *pModule, const uint8_t command, const uint8_t index)

init.

Initialize the entity class.

Parameters
  • pModule: The BrainStem module object.
  • command: The command of the UEI.
  • index: The index of the UEI entity.

aErr callUEI(const uint8_t option)

A callUEI is a setUEI that has no data length.

Return
Returns common entity return values
Parameters
  • option: An option for the UEI.

aErr setUEI8(const uint8_t option, const uint8_t byteValue)

Set a byte value.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • byteValue: The value.

aErr setUEI8(const uint8_t option, const uint8_t param, const uint8_t byteValue)

Set a byte value with a subindex.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • param: of the option.
  • byteValue: The value.

aErr getUEI8(const uint8_t option, uint8_t *byteValue)

Get a byte value.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • byteValue: The value.

aErr getUEI8(const uint8_t option, const uint8_t param, uint8_t *byteValue)

Get a byte value with a parameter.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • param: The parameter.
  • byteValue: The value.

aErr setUEI16(const uint8_t option, const uint16_t shortValue)

Set a 2-byte value.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • shortValue: The value.

aErr getUEI16(const uint8_t option, uint16_t *shortValue)

Get a 2-byte value.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • shortValue: The value.

aErr getUEI16(const uint8_t option, const uint8_t param, uint16_t *shortValue)

Get a 2-byte value with a parameter.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • param: The parameter.
  • shortValue: The value.

aErr setUEI32(const uint8_t option, const uint32_t intValue)

Set a 4-byte value.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • intValue: The value.

aErr setUEI32(const uint8_t option, const uint8_t subIndex, const uint32_t intValue)

Set a 4-byte value, with a subindex parameter.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • subIndex: The subindex to set.
  • intValue: The value.

aErr getUEI32(const uint8_t option, uint32_t *intValue)

Get a 4-byte value.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • intValue: The 4 byte value

aErr getUEI32(const uint8_t option, const uint8_t param, uint32_t *intValue)

Get a 4-byte value with parameter.

Return
Returns common entity return values
Parameters
  • option: The option for the UEI.
  • param: The parameter.
  • intValue: The 4 byte value

uint8_t getIndex(void) const

Get the UEI entity index.

Return
The 1 byte index of the UEI entity.

aErr drainUEI(const uint8_t option)

Drain all packets matching this UEI from the packet fifo.

This functionality is useful in rare cases where packet synchronization is lost and a valid return packet is not accessible.