Read Access

The following functions allow to retrieve actual item values from the tree:

Some functions retrieve item meta information, reveilling hidden information proprietary JSON extensions or general structure information.

GetBinary

template<typename T>
void Ensenso::sealed::GetBinary(int result, String itemPath, array<T> destinationBuffer, int bytesCopied, double timestamp)

Wraps nxLibGetBinary()

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

  • destinationBuffer: A pointer to the memory, where the item content should be copied.

  • bytesCopied: Pointer to an integer, can be 0. If non-zero the value will be set to the number of bytes actually copied to the user’s buffer.

  • timestamp: The timestamp of the binary blob copied to the buffer.

GetBinaryInfo

void Ensenso::sealed::GetBinaryInfo(int result, String itemPath, int width, int height, int channelCount, int bytesPerElement, bool isFloat, double timestamp)

Wraps nxLibGetBinaryInfo()

Note

The entire size of the binary blob is width*height*channelCount*bytesPerElement. A 24bit RGB image of VGA resolution would have width == 640, height == 480, channelCount == 3, bytesPerElement == 1 and isFloat == NXLIBFALSE.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

  • width: The width of the array (consecutive elements in memory).

  • height: The height of the array (number of rows of width*channelCount elements)

  • channelCount: Number of channels for a single item.

  • bytesPerElement: Size in bytes of a single value of an item.

  • isFloat: Specifies whether the element data type is a floating point type.

  • timestamp: The current timestamp of the binary blob queried.

GetBool

bool Ensenso::sealed::GetBool(int result, String itemPath)

Wraps nxLibGetBool()

Return

The boolean value of the item.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

GetCount

int Ensenso::sealed::GetCount(int result, String itemPath)

Wraps nxLibGetCount()

Return

The amount of subitems.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

GetDouble

double Ensenso::sealed::GetDouble(int result, String itemPath)

Wraps nxLibGetDouble()

Return

The double value of the item.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

GetInt

int Ensenso::sealed::GetInt(int result, String itemPath)

Wraps nxLibGetInt()

Return

The integer value of the item.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

GetJson

String Ensenso::sealed::GetJson(int result, String itemPath, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Wraps nxLibGetJson()

Return

A String formatted as Json.

Parameters
  • result: The error code oder operation.

  • itemPath: The path of the item to access.

  • prettyPrint: When true the JSON string will be formatted with line breaks and tabs.

  • numberPrecision: Specifies the accuracy of numbers.

  • scientificNumberFormat: Specifies if the scientific exponential notation should be used.

GetJsonMeta

String Ensenso::sealed::GetJsonMeta(int result, String itemPath, int numLevels, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Wraps nxLibGetJsonMeta()

Return

A String formatted as Json with meta information.

Parameters
  • result: The error code of operation.

  • itemPath: The path of th item to access.

  • numLevels: The depth of the returned subtree. Nodes in lower levels will be omitted.

  • prettyPrint: Specify true here to format the resulting string with line breaks and tabs.

  • numberPrecision: Specifies the accuracy of numbers.

  • scientificNumberFormat: Specifies whether to use scientific notation for all numbers.

GetName

String Ensenso::sealed::GetName(int result, String itemPath)

Wraps nxLibGetName()

Return

The name of the item.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

GetString

String Ensenso::sealed::GetString(int result, String itemPath)

Wraps nxLibGetString()

Return

The string value of the item.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.

GetType

int Ensenso::sealed::GetType(int result, String itemPath)

Wraps nxLibGetType()

Return

The enum value of the item type.

Parameters
  • result: The error code of operation.

  • itemPath: The path of the item to access.