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
-
inline NxLibItem()¶
Constructor. Will reference to the root of the tree.
-
inline 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.
-
inline 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.
-
inline NxLibItem(::NxLibItem const &item)¶
Constructor. Will reference to the root of the tree.
- Parameters
item – The NxLibItem, which is going to be referenced.
-
inline ~NxLibItem()¶
Ensenso::NxLibItem Destructor. Calls its Finalizer.
-
inline int Compare(int value)¶
Compare the item’s value to an int constant.
- Parameters
value – The value to compare the item’s value with.
- Throws
Ensenso::NxLibException –
- Returns
-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.
-
inline int Compare(int returnCode, int value)¶
Compare the item’s value to an int constant.
- Parameters
value – The value to compare the item’s value with.
returnCode – Return code of operation.
- Returns
-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.
-
inline int Compare(double value)¶
Compare the item’s value to a double constant.
- Parameters
value – The value to compare the item’s value with.
- Throws
Ensenso::NxLibException –
- Returns
-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.
-
inline int Compare(int returnCode, double value)¶
Compare the item’s value to a double constant.
- Parameters
value – The value to compare the item’s value with.
returnCode – Return code of operation.
- Returns
-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.
-
inline int Compare(bool value)¶
Compare the item’s value to a boolean.
- Parameters
value – The value to compare the item’s value with.
- Throws
Ensenso::NxLibException –
- Returns
-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.
-
inline int Compare(int returnCode, bool value)¶
Compare the item’s value to a boolean.
- Parameters
value – The value to compare the item’s value with.
returnCode – The error code of operation.
- Returns
-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.
-
inline int Compare(String value)¶
Compare the item’s value to a string.
- Parameters
value – The value to compare the item’s value with.
- Returns
-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.
-
inline int Compare(int returnCode, String value)¶
Compare the item’s value to a string.
- Parameters
value – The value to compare the item’s value with.
returnCode – The error code of operation.
- Returns
-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.
-
inline void Set(int value)¶
Set the item’s value to an int value.
- Parameters
value – The value to set.
- Throws
Ensenso::NxLibException –
-
inline void Set(double value)¶
Set the item’s value to a double constant.
- Parameters
value – The value to set.
- Throws
Ensenso::NxLibException –
-
inline void Set(bool value)¶
Set the item’s value to a bool value.
- Parameters
value – The value to set.
- Throws
Ensenso::NxLibException –
-
inline void Set(String value)¶
Set the item’s value to a String value.
- Parameters
value – The value to set.
- Throws
Ensenso::NxLibException –
-
inline 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.
-
inline 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.
-
inline 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.
-
inline 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.
-
inline void SetNull()¶
Set the item’s value to Null.
- Throws
Ensenso::NxLibException –
-
inline void SetNull(int returnCode)¶
Set the item’s value to Null.
- Parameters
returnCode – The error code returned when accessing the item.
-
inline 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()
- Throws
Ensenso::NxLibException –
-
inline 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()
-
inline bool IsNumber()¶
Returns whether the item is of type Number or not.
- Throws
Ensenso::NxLibException –
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsNumber(int returnCode)¶
Returns whether the item is of type Number or not.
- Parameters
returnCode – The error code when accessing the item.
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsString()¶
Returns whether the item is of type String or not.
- Throws
Ensenso::NxLibException –
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsString(int returnCode)¶
Returns whether the item is of type String or not.
- Parameters
returnCode – The error code when accessing the item.
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsBool()¶
Returns whether the item is of type Bool or not.
- Throws
Ensenso::NxLibException –
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsBool(int returnCode)¶
Returns whether the item is of type Bool or not.
- Parameters
returnCode – The error code when accessing the item.
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsNull()¶
Returns whether the item is of type NULL or not.
- Throws
Ensenso::NxLibException –
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsNull(int returnCode)¶
Returns whether the item is of type NULL or not.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsArray()¶
Returns whether the item is of type Array or not.
- Throws
Ensenso::NxLibException –
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsArray(int returnCode)¶
Returns whether the item is of type Array or not.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsObject()¶
Returns whether the item is of type Object or not.
- Throws
Ensenso::NxLibException –
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline bool IsObject(int returnCode)¶
Returns whether the item is of type Object or not.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
true if the item was of the corresponding JSON type, otherwise false.
-
inline String AsString()¶
Try to read a string from this tree item.
- Throws
Ensenso::NxLibException –
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline String AsString(int returnCode)¶
Try to read a string from this tree item.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline int AsInt()¶
Try to read an integer number from this tree item.
- Throws
Ensenso::NxLibException –
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline int AsInt(int returnCode)¶
Try to read an integer number from this tree item.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline double AsDouble()¶
Try to read an double value from this tree item.
- Throws
Ensenso::NxLibException –
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline double AsDouble(int returnCode)¶
Try to read an double value from this tree item.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline bool AsBool()¶
Try to read a boolean value from this tree item.
- Throws
Ensenso::NxLibException –
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline bool AsBool(int returnCode)¶
Try to read a boolean value from this tree item.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
The item value, if the item was of the corresponding JSON type. Otherwise the return value is undefined.
-
inline String AsJson()¶
Try to read this tree item and return its JSON representation.
- Throws
Ensenso::NxLibException –
- Returns
The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!
-
inline String AsJson(bool prettyPrint)¶
Try to read this tree item and return its JSON representation.
- Parameters
prettyPrint – When true the JSON string will be formatted with line breaks and tabs.
- Throws
Ensenso::NxLibException –
- Returns
The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!
-
inline String AsJson(bool prettyPrint, int numberPrecision)¶
Try to read this tree item and return its JSON representation.
- Parameters
prettyPrint – When true the JSON string will be formatted with line breaks and tabs.
numberPrecision – Specifies the accuracy of numbers.
- Throws
Ensenso::NxLibException –
- Returns
The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!
-
inline String AsJson(bool prettyPrint, int numberPrecision, bool scientificNumberFormat)¶
Try to read this tree item and return its 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.
- Throws
Ensenso::NxLibException –
- Returns
The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!
-
inline String AsJson(int returnCode, bool prettyPrint, int numberPrecision, bool scientificNumberFormat)¶
Try to read this tree item and return its 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.
- Returns
The item value as JSON string if the item exists. This might also be an entire subtree in JSON representation!
-
inline 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.
- Throws
Ensenso::NxLibItem –
- Returns
The item value as JSON string with meta data, if the item exists.
-
inline 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.
- Parameters
numLevels – The depth of the returned subtree. Nodes in lower levels will be omitted.
- Throws
Ensenso::NxLibItem –
- Returns
The item value as JSON string with meta data, if the item exists.
-
inline 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.
- Parameters
numLevels – The depth of the returned subtree.
prettyPrint – When true the JSON string will be formatted with line breaks and tabs.
- Throws
Ensenso::NxLibItem –
- Returns
The item value as JSON string with meta data, if the item exists.
-
inline 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.
- 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.
- Throws
Ensenso::NxLibItem –
- Returns
The item value as JSON string with meta data, if the item exists.
-
inline 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.
- 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.
- Throws
Ensenso::NxLibItem –
- Returns
The item value as JSON string with meta data, if the item exists.
-
inline 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.
- 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.
- Returns
The item value as JSON string with meta data, if the item exists.
-
inline int Type()¶
Returns the type of the Ensenso::NxLibItem.
- Throws
Ensenso::NxLibException –
- Returns
The enum type of this item.
-
inline int Type(int returnCode)¶
Returns the type of the Ensenso::NxLibItem.
- Parameters
returnCode – The error code return when accessing the item.
- Returns
The enum type of this item.
-
inline bool Exists()¶
Check whether an item with the corresponding path exists in the tree.
- Throws
Ensenso::NxLibException –
- Returns
true, if the item exists, false otherwise.
-
inline bool Exists(int returnCode)¶
Check whether an item with the corresponding path exists in the tree.
- Parameters
returnCode – The error code returned when acessing the item.
- Returns
true, if the item exists, false otherwise.
-
inline void Erase()¶
Deletes the item or subtree.
- Throws
Ensenso::NxLibException –
-
inline void Erase(int returnCode)¶
Deletes the item or subtree.
- Parameters
returnCode – The error code when accessing the item.
-
inline String Name()¶
Retrieves the item’s name.
- Throws
Ensenso::NxLibException –
- Returns
The item’s name.
-
inline String Name(int returnCode)¶
Retrieves the item’s name.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
The item’s name.
-
inline 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.
- Throws
Ensenso::NxLibException –
- Returns
The number of subitems.
-
inline 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.
- Parameters
returnCode – The error code returned when accessing the item.
- Returns
The number of subitems.
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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>
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
template<typename T>
inline 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.
-
inline 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.
-
inline 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.
-
inline 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>
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
template<typename T>
inline 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.
-
inline 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.
-
inline 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.
-
inline 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>
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
- Throws
Ensenso::NxLibException –
-
template<typename T>
inline 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.
-
inline 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.
-
inline 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.
-
inline 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.
-
inline void WaitForChange()¶
Block until the item’s value changes.
- Throws
Ensenso::NxLibException –
-
inline void WaitForChange(int returnCode)¶
Block until the item’s value changes.
- Parameters
returnCode – The error code returned when accessing the item.
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
-
inline 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.
- Throws
Ensenso::NxLibException –
-
inline 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.
-
inline 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.
- Parameters
itemName – The base name of the item. Defaults to Temporary if left empty.
- Throws
Ensenso::NxLibException –
- Returns
A unique Ensenso::NxLibItem.
-
inline NxLibItem MakeUniqueItem(int returnCode, String itemName)¶
- Parameters
returnCode – The error code of operation.
itemName – The base name of the item.
- Returns
A unique Ensenso::NxLibItem.
-
inline NxLibItem()¶