Pointer Class

class PointerClass : public Acroname::BrainStem::EntityClass

PointerClass: Allows access to the reflex scratchpad from a host computer.

The Pointers access the pad which is a shared memory area on a BrainStem module. The interface allows the use of the BrainStem scratchpad from the host, and provides a mechanism for allowing the host application and BrainStem relexes to communicate.

The Pointer allows access to the pad in a similar manner as a file pointer accesses the underlying file. The cursor position can be set via setOffset. A read of a character short or int can be made from that cursor position. In addition the mode of the pointer can be set so that the cursor position automatically increments or set so that it does not this allows for multiple reads of the same pad value, or reads of multi-record values, via an incrementing pointer.

Public Functions

PointerClass(void)

Constructor.

~PointerClass(void)

Destructor.

void init(Module *pModule, const uint8_t index)

Initialize the class.

Parameters:
  • pModule – The module to which this entity belongs.

  • index – The index the pointer element index.

aErr getOffset(uint16_t *offset)

Get the offset of the pointer

Parameters:

offset – The value of the offset.

Returns:

All possible standard UEI return values.

aErr setOffset(uint16_t offset)

Set the offset of the pointer

Parameters:

offset – The value of the offset.

Returns:

All possible standard UEI return values.

aErr getMode(uint8_t *mode)

Get the mode of the pointer

Parameters:

mode – The mode: aPOINTER_MODE_STATIC or aPOINTER_MODE_AUTO_INCREMENT.

Returns:

All possible standard UEI return values.

aErr setMode(uint8_t mode)

Set the mode of the pointer

Parameters:

mode – The mode: aPOINTER_MODE_STATIC or aPOINTER_MODE_AUTO_INCREMENT.

Returns:

All possible standard UEI return values.

aErr getTransferStore(uint8_t *handle)

Get the handle to the store.

Parameters:

handle – The handle of the store.

Returns:

All possible standard UEI return handles.

aErr setTransferStore(uint8_t handle)

Set the handle to the store.

Parameters:

handle – The handle of the store.

Returns:

All possible standard UEI return handles.

aErr initiateTransferToStore(uint8_t transferLength)

Transfer data to the store.

Parameters:

transferLength – The length of the data transfer.

Returns:

All possible standard UEI return values.

aErr initiateTransferFromStore(uint8_t transferLength)

Transfer data from the store.

Parameters:

transferLength – The length of the data transfer.

Returns:

All possible standard UEI return values.

aErr getChar(uint8_t *value)

Get a char (1 byte) value from the pointer at this object’s index, where elements are 1 byte long.

Parameters:

value – The value of a single character (1 byte) stored in the pointer.

Returns:

All possible standard UEI return values.

aErr setChar(const uint8_t value)

Set a char (1 byte) value to the pointer at this object’s element index, where elements are 1 byte long.

Parameters:

value – The single char (1 byte) value to be stored in the pointer.

Returns:

All possible standard UEI return values.

aErr getShort(uint16_t *value)

Get a short (2 byte) value from the pointer at this objects index, where elements are 2 bytes long

Parameters:

value – The value of a single short (2 byte) stored in the pointer.

Returns:

All possible standard UEI return values.

aErr setShort(const uint16_t value)

Set a short (2 bytes) value to the pointer at this object’s element index, where elements are 2 bytes long.

Parameters:

value – The single short (2 byte) value to be set in the pointer.

Returns:

All possible standard UEI return values.

aErr getInt(uint32_t *value)

Get an int (4 bytes) value from the pointer at this objects index, where elements are 4 bytes long

Parameters:

value – The value of a single int (4 byte) stored in the pointer.

Returns:

All possible standard UEI return values.

aErr setInt(const uint32_t value)

Set an int (4 bytes) value from the pointer at this objects index, where elements are 4 bytes long

Parameters:

value – The single int (4 byte) value to be stored in the pointer.

Returns:

All possible standard UEI return values.