Ensenso::NxLibItem

class Ensenso::NxLibItem

Ensenso::NxLibItem. This class simplifies the concatenation of string and integer constants to an NxLib compatible item path specification via its operator[]. Assignment and comparison operators simplify the usage of NxLib tree items, almost as if using local variables.

Note

In contrast to the C++ implementation of NxLibItem the C# version does not supply assignment and comparison operators because of operator overloading restrictions in C#.

Public Functions

NxLibItem()

Constructor. Will reference to the root of the tree.

NxLibItem(char const *path)

Constructor. Will reference to the root of the tree.

Parameters
  • path: The path to a node of the tree, which is going to be referenced.

NxLibItem(String path)

Constructor. Will reference to the root of the tree.

Parameters
  • path: The path to a node of the tree, which is going to be referenced.

NxLibItem(::NxLibItem const &item)

Constructor. Will reference to the root of the tree.

Parameters
  • item: The NxLibItem, which is going to be referenced.

~NxLibItem()

Ensenso::NxLibItem Destructor. Calls its Finalizer.

int Compare(int value)

Compare the item’s value to an int constant.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

Exceptions

int Compare(int returnCode, int value)

Compare the item’s value to an int constant.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

  • returnCode: Return code of operation.

int Compare(double value)

Compare the item’s value to a double constant.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

Exceptions

int Compare(int returnCode, double value)

Compare the item’s value to a double constant.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

  • returnCode: Return code of operation.

int Compare(bool value)

Compare the item’s value to a boolean.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

Exceptions

int Compare(int returnCode, bool value)

Compare the item’s value to a boolean.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

  • returnCode: The error code of operation.

int Compare(String value)

Compare the item’s value to a string.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

int Compare(int returnCode, String value)

Compare the item’s value to a string.

Return

-1: If the item’s value is smaller than the constant.

0: If the values are equal.

1: If the item’s value is larger than the constant.

Parameters
  • value: The value to compare the item’s value with.

  • returnCode: The error code of operation.

void Set(int value)

Set the item’s value to an int value.

Parameters
  • value: The value to set.

Exceptions

void Set(double value)

Set the item’s value to a double constant.

Parameters
  • value: The value to set.

Exceptions

void Set(bool value)

Set the item’s value to a bool value.

Parameters
  • value: The value to set.

Exceptions

void Set(String value)

Set the item’s value to a String value.

Parameters
  • value: The value to set.

Exceptions

void Set(int returnCode, int value)

Set the item’s value to an int value.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to set.

void Set(int returnCode, double value)

Set the item’s value to a double constant.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to set.

void Set(int returnCode, bool value)

Set the item’s value to a bool value.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to set.

void Set(int returnCode, String value)

Set the item’s value to a String value.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The vale to set.

void SetNull()

Set the item’s value to Null.

Exceptions

void SetNull(int returnCode)

Set the item’s value to Null.

Parameters
  • returnCode: The error code returned when accessing the item.

void SetJson(String value, bool onlyWriteableNodes)

Sets the item’s value to a new value specified as JSON string. This might also be representation of an entire subtree.

Parameters
  • value: The value to set.

  • onlyWriteableNodes: See the corresponding parameter of nxLibSetJson()

Exceptions

void SetJson(int returnCode, String value, bool onlyWriteableNodes)

Sets the item’s value to a new value specified as JSON string. This might also be representation of an entire subtree.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to set.

  • onlyWriteableNodes: See the corresponding parameter of nxLibSetJson()

bool IsNumber()

Returns whether the item is of type Number or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Exceptions

bool IsNumber(int returnCode)

Returns whether the item is of type Number or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Parameters
  • returnCode: The error code when accessing the item.

bool IsString()

Returns whether the item is of type String or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Exceptions

bool IsString(int returnCode)

Returns whether the item is of type String or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Parameters
  • returnCode: The error code when accessing the item.

bool IsBool()

Returns whether the item is of type Bool or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Exceptions

bool IsBool(int returnCode)

Returns whether the item is of type Bool or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Parameters
  • returnCode: The error code when accessing the item.

bool IsNull()

Returns whether the item is of type NULL or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Exceptions

bool IsNull(int returnCode)

Returns whether the item is of type NULL or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Parameters
  • returnCode: The error code returned when accessing the item.

bool IsArray()

Returns whether the item is of type Array or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Exceptions

bool IsArray(int returnCode)

Returns whether the item is of type Array or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Parameters
  • returnCode: The error code returned when accessing the item.

bool IsObject()

Returns whether the item is of type Object or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Exceptions

bool IsObject(int returnCode)

Returns whether the item is of type Object or not.

Return

true if the item was of the corresponding JSON type, otherwise false.

Parameters
  • returnCode: The error code returned when accessing the item.

String AsString()

Try to read a string from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Exceptions

String AsString(int returnCode)

Try to read a string from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Parameters
  • returnCode: The error code returned when accessing the item.

int AsInt()

Try to read an integer number from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Exceptions

int AsInt(int returnCode)

Try to read an integer number from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Parameters
  • returnCode: The error code returned when accessing the item.

double AsDouble()

Try to read an double value from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Exceptions

double AsDouble(int returnCode)

Try to read an double value from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Parameters
  • returnCode: The error code returned when accessing the item.

bool AsBool()

Try to read a boolean value from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Exceptions

bool AsBool(int returnCode)

Try to read a boolean value from this tree item.

Return

The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.

Parameters
  • returnCode: The error code returned when accessing the item.

String AsJson()

Try to read this tree item and return its JSON representation.

Return

The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!

Exceptions

String AsJson(bool prettyPrint)

Try to read this tree item and return its JSON representation.

Return

The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!

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

Exceptions

String AsJson(bool prettyPrint, int numberPrecision)

Try to read this tree item and return its JSON representation.

Return

The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!

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

  • numberPrecision: Specifies the accuracy of numbers.

Exceptions

String AsJson(bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Try to read this tree item and return its JSON representation.

Return

The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!

Parameters
  • 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.

Exceptions

String AsJson(int returnCode, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Try to read this tree item and return its JSON representation.

Return

The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!

Parameters
  • returnCode: The error code when accessing the item.

  • 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.

String AsJsonMeta()

Retrieves an item value or an entire subtree in JSON representation including item metadata (protection, extended type, internal flags). This function is only intended to be used by NxTreeEdit to visualize the entire tree state.

Return

The item value as JSON string with meta data, if the item exists.

Exceptions

String AsJsonMeta(int numLevels)

Retrieves an item value or an entire subtree in JSON representation including item metadata (protection, extended type, internal flags). This function is only intended to be used by NxTreeEdit to visualize the entire tree state.

Return

The item value as JSON string with meta data, if the item exists.

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

Exceptions

String AsJsonMeta(int numLevels, bool prettyPrint)

Retrieves an item value or an entire subtree in JSON representation including item metadata (protection, extended type, internal flags). This function is only intended to be used by NxTreeEdit to visualize the entire tree state.

Return

The item value as JSON string with meta data, if the item exists.

Parameters
  • numLevels: The depth of the returned subtree.

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

Exceptions

String AsJsonMeta(int numLevels, bool prettyPrint, int numberPrecision)

Retrieves an item value or an entire subtree in JSON representation including item metadata (protection, extended type, internal flags). This function is only intended to be used by NxTreeEdit to visualize the entire tree state.

Return

The item value as JSON string with meta data, if the item exists.

Parameters
  • numLevels: The depth of the returned subtree.

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

  • numberPrecision: Specifies the accuracy of numbers.

Exceptions

String AsJsonMeta(int numLevels, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Retrieves an item value or an entire subtree in JSON representation including item metadata (protection, extended type, internal flags). This function is only intended to be used by NxTreeEdit to visualize the entire tree state.

Return

The item value as JSON string with meta data, if the item exists.

Parameters
  • numLevels: The depth of the returned subtree.

  • 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.

Exceptions

String AsJsonMeta(int returnCode, int numLevels, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)

Retrieves an item value or an entire subtree in JSON representation including item metadata (protection, extended type, internal flags). This function is only intended to be used by NxTreeEdit to visualize the entire tree state.

Return

The item value as JSON string with meta data, if the item exists.

Parameters
  • returnCode: The error code when accessing the item.

  • numLevels: The depth of the returned subtree.

  • 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.

int Type()

Returns the type of the Ensenso::NxLibItem.

Return

The enum type of this item.

Exceptions

int Type(int returnCode)

Returns the type of the Ensenso::NxLibItem.

Return

The enum type of this item.

Parameters
  • returnCode: The error code return when accessing the item.

bool Exists()

Check whether an item with the corresponding path exists in the tree.

Return

true, if the item exists, false otherwise.

Exceptions

bool Exists(int returnCode)

Check whether an item with the corresponding path exists in the tree.

Return

true, if the item exists, false otherwise.

Parameters
  • returnCode: The error code returned when acessing the item.

void Erase()

Deletes the item or subtree.

Exceptions

void Erase(int returnCode)

Deletes the item or subtree.

Parameters
  • returnCode: The error code when accessing the item.

String Name()

Retrieves the item’s name.

Return

The item’s name.

Exceptions

String Name(int returnCode)

Retrieves the item’s name.

Return

The item’s name.

Parameters
  • returnCode: The error code returned when accessing the item.

int Count()

Retrieves the number of subitems of an Object or Array. Calling the function on scalar nodes will return an error.

Note

Note: Calling this function on a Binary node will retrieve the binary data size in bytes, but it is recommended to use getBinaryDataInfo instead to get and verify all format properties of the binary blob before retrieving it.

Return

The number of subitems.

Exceptions

int Count(int returnCode)

Retrieves the number of subitems of an Object or Array. Calling the function on scalar nodes will return an error.

Note

Note: Calling this function on a Binary node will retrieve the binary data size in bytes, but it is recommended to use getBinaryDataInfo instead to get and verify all format properties of the binary blob before retrieving it.

Return

The number of subitems.

Parameters
  • returnCode: The error code returned when accessing the item.

void GetBinaryDataInfo(int width, int height, int channels, int bytesPerElement, bool isFloat, double timestamp)

Read the properties of a Binary node.

Parameters
  • width: Width of the image.

  • height: Height of the image.

  • channels: Number of channels, i.e. elements per pixels.

  • bytesPerElement: Size of each element.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

  • timestamp: Timestamp when the binary blob was generated.

Exceptions

void GetBinaryDataInfo(int returnCode, int width, int height, int channels, int bytesPerElement, bool isFloat, double timestamp)

Read the properties of a Binary node.

Parameters
  • returnCode: The error code returned when accessing the item.

  • width: Width of the image.

  • height: Height of the image.

  • channels: Number of channels, i.e. elements per pixels.

  • bytesPerElement: Size of each element.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

  • timestamp: Timestamp when the binary blob was generated.

template<typename T>
void GetBinaryData(array<T> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

Exceptions

void GetBinaryDataByte(array<unsigned char> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

Exceptions

void GetBinaryDataShort(array<short> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

Exceptions

void GetBinaryDataFloat(array<float> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

Exceptions

template<typename T>
void GetBinaryData(int returnCode, array<T> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • returnCode: The error code returned when accessing the item.

  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataByte(int returnCode, array<unsigned char> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • returnCode: The error code returned when accessing the item.

  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataShort(int returnCode, array<short> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • returnCode: The error code returned when accessing the item.

  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataFloat(int returnCode, array<float> destinationBuffer, int numBytesCopied, double timestamp)

Retrieves data of a Binary item.

Note

This function returns the binary item data in an array. The array object will automatically be resized to fit the data. If the binary data size is not divisible the the vector element size an error will be returned.

Parameters
  • returnCode: The error code returned when accessing the item.

  • destinationBuffer: The array where the binary data will be copied to. The function will take care of allocating an array object of sufficient size.

  • numBytesCopied: 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: Timestamp when the binary blob was generated. This pointer can be set to zero when the time stamp should not be retrieved.

template<typename T>
void SetBinaryData(array<T> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

Exceptions

void SetBinaryDataByte(array<unsigned char> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

Exceptions

void SetBinaryDataShort(array<short> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

Exceptions

void SetBinaryDataFloat(array<float> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

Exceptions

template<typename T>
void SetBinaryData(int returnCode, array<T> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

void SetBinaryDataByte(int returnCode, array<unsigned char> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

void SetBinaryDataShort(int returnCode, array<short> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

void SetBinaryDataFloat(int returnCode, array<float> buffer)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

template<typename T>
void SetBinaryData(array<T> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

  • width: Width of the Image.

  • height: Height of the Image.

  • channelCount: Amount of Channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

Exceptions

void SetBinaryDataByte(array<unsigned char> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

  • width: Width of the Image.

  • height: Height of the Image.

  • channelCount: Amount of Channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

Exceptions

void SetBinaryDataShort(array<short> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

  • width: Width of the Image.

  • height: Height of the Image.

  • channelCount: Amount of Channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

Exceptions

void SetBinaryDataFloat(array<float> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • buffer: An array from which the binary data should be copied.

  • width: Width of the Image.

  • height: Height of the Image.

  • channelCount: Amount of Channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

Exceptions

template<typename T>
void SetBinaryData(int returnCode, array<T> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

  • width: Width of the image.

  • height: Height of the image.

  • channelCount: Amount of channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

void SetBinaryDataByte(int returnCode, array<unsigned char> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

  • width: Width of the image.

  • height: Height of the image.

  • channelCount: Amount of channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

void SetBinaryDataShort(int returnCode, array<short> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

  • width: Width of the image.

  • height: Height of the image.

  • channelCount: Amount of channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

void SetBinaryDataFloat(int returnCode, array<float> buffer, int width, int height, int channelCount, bool isFloat)

Sets data of a Binary item. The data format must be identical to the current format of the binary node. The current format can be queried using GetBinaryDataInfo. The time stamp of the node will be set to the current UTC time.

Parameters
  • returnCode: The error code returned when accessing the item.

  • buffer: An array from which the binary data should be copied.

  • width: Width of the image.

  • height: Height of the image.

  • channelCount: Amount of channels.

  • isFloat: Indicates whether elements are an IEEE float type of the corresponding size.

void WaitForChange()

Block until the item’s value changes.

Exceptions

void WaitForChange(int returnCode)

Block until the item’s value changes.

Parameters
  • returnCode: The error code returned when accessing the item.

void WaitForType(int type, bool waitForEqual)

Waits until the item has a specific type.

Parameters
  • type: The type constant to wait for. See nxLibGetType() for valid types.

  • waitForEqual: Indicates whether to wait until the item has the indicated type, or whether to wait until the item has a type other than the specified one.

Exceptions

void WaitForType(int returnCode, int type, bool waitForEqual)

Waits until the item has a specific type.

Parameters
  • returnCode: The error code returned when accessing the item.

  • type: The type constant to wait for. See nxLibGetType() for valid types.

  • waitForEqual: Indicates whether to wait until the item has the indicated type, or whether to wait until the item has a type other than the specified one.

void WaitForValue(int value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

Exceptions

void WaitForValue(int returnCode, int value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

void WaitForValue(double value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

Exceptions

void WaitForValue(int returnCode, double value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

void WaitForValue(bool value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

Exceptions

void WaitForValue(int returnCode, bool value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

void WaitForValue(String value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

Exceptions

void WaitForValue(int returnCode, String value, bool waitForEqual)

Waits until the item has a specific value.

Parameters
  • returnCode: The error code returned when accessing the item.

  • value: The value to wait for.

  • waitForEqual: Indicates whether to wait until the item has the given value, or whether to wait until the item has a value different than the specified one.

NxLibItem MakeUniqueItem(String itemName)

Checks whether the item name is taken. If yes, the item gets a new unique name. Usually used to create a temporary unique Ensenso::NxLibItem as slot for an Ensenso::NxLibCommand.

Return

A unique Ensenso::NxLibItem.

Parameters
  • itemName: The base name of the item. Defaults to Temporary if left empty.

Exceptions

NxLibItem MakeUniqueItem(int returnCode, String itemName)

Return

A unique Ensenso::NxLibItem.

Parameters
  • returnCode: The error code of operation.

  • itemName: The base name of the item.