Pointer Entity

group PointerEntity

Access 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 reflex 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 and incrementing pointer.

void pointer_getOffset(unsigned int *id, struct Result *result, int pointerNum)

Get the offset of the pointer

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the enable status or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

void pointer_setOffset(unsigned int *id, struct Result *result, int pointerNum, int value)

Set the offset of the pointer

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • value: Offset value to be set.

void pointer_getMode(unsigned int *id, struct Result *result, int pointerNum)

Get the mode of the pointer

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the currently set mode or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

void pointer_setMode(unsigned int *id, struct Result *result, int pointerNum, int mode)

Set the mode of the pointer

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • mode: The mode to be set: aPOINTER_MODE_STATIC or aPOINTER_MODE_AUTO_INCREMENT.

void pointer_getTransferStore(unsigned int *id, struct Result *result, int pointerNum)

Get the handle to the store.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the handle to the current store or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

void pointer_setTransferStore(unsigned int *id, struct Result *result, int pointerNum, int handle)

Set the handle to the store.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • handle: Handle of the store to be used by the Pointer entity.

void pointer_initiateTransferToStore(unsigned int *id, struct Result *result, int pointerNum, int length)

Transfer data to the store.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • length: Length of data to be transfered.

void pointer_initiateTransferFromStore(unsigned int *id, struct Result *result, int pointerNum, int length)

Transfer data from the store.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • length: Length of data to be transfered.

void pointer_getChar(unsigned int *id, struct Result *result, int pointerNum)

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

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and requested char value or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

void pointer_setChar(unsigned int *id, struct Result *result, int pointerNum, int value)

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

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • value: The char/value to be set.

void pointer_getShort(unsigned int *id, struct Result *result, int pointerNum)

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

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and requested short value or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

void pointer_setShort(unsigned int *id, struct Result *result, int pointerNum, int value)

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

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • value: The short/value to be set.

void pointer_getInt(unsigned int *id, struct Result *result, int pointerNum)

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

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and requested int value or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

void pointer_setInt(unsigned int *id, struct Result *result, int pointerNum, int value)

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

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • pointerNum: The index of the Pointer entity.

  • value: The int/value to be set.