Ensenso::NxLibItem

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

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 (string path = "")

Constructor.

Param path

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

NxLibItem (NxLibItem itm)

Constructor.

Param itm

The NxLibItem, which is going to be referenced.

void checkReturnCode (int returnCode)

Checks the given returnCode and will throw an NxLibException, if its value is not NxLib.OperationSucceeded.

Throws NxLibException.

Param returnCode

The returnCode, which is going to be checked for any error code value.

int Compare (int value)

Compare the item’s value to an int constant.

Throws NxLibException.

Param value

The value to compare the item’s value with.

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.

  • 2 If the item does not exist or the item type is not compatible.

int Compare (out int returnCode, int value)

Compare the item’s value to an int constant.

Param returnCode

Return code of operation.

Param value

The value to compare the item’s value with.

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.

  • 2 If the item does not exist or the item type is not compatible.

int Compare (string value)

Compare the item’s value to a string.

Throws NxLibException.

Param value

The value to compare the item’s value with.

Return

  • 0 If the values are equal.

  • 1 If the values are not equal.

  • 2 If the item does not exist or the item type is not compatible.

int Compare (out int returnCode, string value)

Compare the item’s value to a string.

Param returnCode

Return code of operation.

Param value

The value to compare the item’s value with.

Return

  • 0 If the values are equal.

  • 1 If the values are not equal.

  • 2 If the item does not exist or the item type is not compatible.

int Compare (double value)

Compare the item’s value to a double constant.

Throws NxLibException.

Param value

The value to compare the item’s value with.

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.

  • 2 If the item does not exist or the item type is not compatible.

int Compare (out int returnCode, double value)

Compare the item’s value to a double constant.

Param returnCode

Return code of operation.

Param value

The value to compare the item’s value with.

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.

  • 2 If the item does not exist or the item type is not compatible.

int Compare (bool value)

Compare the item’s value to a boolean.

Throws NxLibException.

Param value

The value to compare the item’s value with.

Return

  • 0 If the values are equal.

  • 1 If the values are not equal.

  • 2 If the item does not exist or the item type is not compatible.

int Compare (out int returnCode, bool value)

Compare the item’s value to a boolean.

Param returnCode

Return code of operation.

Param value

The value to compare the item’s value with.

Return

  • 0 If the values are equal.

  • 1 If the values are not equal.

  • 2 If the item does not exist or the item type is not compatible.

void Set (int value)

Wraps NxLibImport.nxLibSetInt().

Throws NxLibException.

Param value

The value to set.

void Set (out int returnCode, int value)

Wraps NxLibImport.nxLibSetInt().

Param returnCode

Return code of operation.

Param value

The value to set.

void Set (double value)

Wraps NxLibImport.nxLibSetDouble().

Throws NxLibException.

Param value

The value to set.

void Set (out int returnCode, double value)

Wraps NxLibImport.nxLibSetDouble().

Param returnCode

Return code of operation.

Param value

The value to set.

void Set (bool value)

Wraps NxLibImport.nxLibSetBool().

Throws NxLibException.

Param value

The value to set.

void Set (out int returnCode, bool value)

Wraps NxLibImport.nxLibSetBoo().

Param returnCode

Return code of operation.

Param value

The value to set.

void Set (string value)

Wraps NxLibImport.nxLibSetString().

Throws NxLibException.

Param value

The value to set.

void Set (out int returnCode, string value)

Wraps NxLibImport.nxLibSetString().

Param returnCode

Return code of operation.

Param value

The value to set.

void SetNull ()

Wraps NxLibImport.nxLibSetNull()

Throws NxLibException.

void SetNull (out int returnCode)

Wraps NxLibImport.nxLibSetNull().

Param returnCode

Return code of operation.

void SetJson (string value, bool onlyWriteableNodes = false)

Wraps NxLibImport.nxLibSetJson().

Throws NxLibException.

Param value

The value to set.

Param onlyWriteableNodes

See the correspoinding parameter of NxLibImport.nxLibSetJson

void SetJson (out int returnCode, string value, bool onlyWriteableNodes = false)

Wraps NxLibImport.nxLibSetJson().

Param returnCode

Return code of operation.

Param value

The value to set.

Param onlyWriteableNodes

See the correspoinding parameter of NxLibImport.nxLibSetJson

bool IsNull ()

Returns whether the item is of type NULL or not.

Throws NxLibException.

Return

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

bool IsNull (out int returnCode)

Returns whether the item is of type NULL or not.

Param returnCode

Return code of operation.

Return

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

bool IsString ()

Returns whether the item is of type String or not.

Throws NxLibException.

Return

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

bool IsString (out int returnCode)

Returns whether the item is of type String or not.

Param returnCode

Return code of operation.

Return

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

bool IsNumber ()

Returns whether the item is of type Number or not.

Throws NxLibException.

Return

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

bool IsNumber (out int returnCode)

Returns whether the item is of type Number or not.

Param returnCode

Return code of operation.

Return

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

bool IsArray ()

Returns whether the item is of type Array or not.

Throws NxLibException.

Return

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

bool IsArray (out int returnCode)

Returns whether the item is of type Array or not.

Param returnCode

Return code of operation.

Return

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

bool IsObject ()

Returns whether the item is of type Object or not.

Throws NxLibException.

Return

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

bool IsObject (out int returnCode)

Returns whether the item is of type Object or not.

Param returnCode

Return code of operation.

Return

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

string AsString ()

Try to read a string from this tree item.

Throws NxLibException.

Return

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

string AsString (out int returnCode)

Try to read a string from this tree item.

Param returnCode

Return code of operation.

Return

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

int AsInt ()

Try to read an integer number from this tree item.

Throws NxLibException.

Return

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

int AsInt (out int returnCode)

Try to read an integer number from this tree item.

Param returnCode

Return code of operation.

Return

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

double AsDouble ()

Try to read a double value from this tree item.

Throws NxLibException.

Return

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

double AsDouble (out int returnCode)

Try to read a double value from this tree item.

Param returnCode

Return code of operation.

Return

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

bool AsBool ()

Try to read a boolean value from this tree item.

Throws NxLibException.

Return

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

bool AsBool (out int returnCode)

Try to read a boolean value from this tree item.

Param returnCode

Return code of operation.

Return

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

string AsJson ()

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

Throws NxLibException.

string AsJson (bool prettyPrint)

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

Throws NxLibException.

Param prettyPrint

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

string AsJson (bool prettyPrint, int numberPrecision)

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

Throws NxLibException.

Param prettyPrint

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

Param numberPrecision

Specifies the accuracy of numbers.

string AsJson (bool prettyPrint, int numberPrecision, bool allowScientificFormat)

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

Throws NxLibException.

Param prettyPrint

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

Param numberPrecision

Specifies the accuracy of numbers.

Param allowScientificFormat

Specifies whether to allow scientific notation.

Return

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

string AsJson (out int returnCode, bool prettyPrint = false, int numberPrecision = 18, bool allowScientificFormat = false)

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

Param returnCode

The error code when accessing the item.

Param prettyPrint

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

Param numberPrecision

Specifies the accuracy of numbers.

Param allowScientificFormat

Specifies whether to allow scientific notation.

Return

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

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

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.

Throws NxLibException.

Param numLevels

The depth of the returned subtree.

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.

Throws NxLibException.

Param numLevels

The depth of the returned subtree.

Param prettyPrint

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

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.

Throws NxLibException.

Param numLevels

The depth of the returned subtree.

Param prettyPrint

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

Param numberPrecision

Specifies the accuracy of numbers.

string AsJsonMeta (int numLevels, bool prettyPrint, int numberPrecision, bool allowScientificFormat)

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

Param numLevels

The depth of the returned subtree.

Param prettyPrint

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

Param numberPrecision

Specifies the accuracy of numbers.

Param allowScientificFormat

Specifies whether to allow scientific notation.

Return

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

string AsJsonMeta (out int returnCode, int numLevels = -1, bool prettyPrint = false, int numberPrecision = 18, bool allowScientificFormat = true)

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.

Param returnCode

The error code when accessing the item.

Param numLevels

The depth of the returned subtree.

Param prettyPrint

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

Param numberPrecision

Specifies the accuracy of numbers.

Param allowScientificFormat

Specifies whether to allow scientific notation.

Return

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

int Type ()

Warps NxLibImport.nxLibGetType

Throws NxLibException.

Return

The enum type of this item.

int Type (out int returnCode)

Warps NxLibImport.nxLibGetType

Param returnCode

The error code when accessing the item.

Return

The enum type of this item.

bool Exists ()

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

Throws NxLibException.

Return

True, if the item exists, false otherwise.

bool Exists (out int returnCode)

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

Param returnCode

The error code when accessing the item.

Return

True, if the item exists, false otherwise.

void Erase ()

Wraps NxLibImport.nxLibErase().

Throws NxLibException.

void Erase (out int returnCode)

Wraps NxLibImport.nxLibErase()

Param returnCode

The error code when accessing the item.

string Name ()

Wraps NxLibImport.nxLibGetName.

Throws NxLibException.

Return

The item’s name.

string Name (out int returnCode)

Wraps NxLibImport.nxLibGetName().

Param returnCode

The error code when accessing the item.

Return

The item’s name.

int Count ()

Wraps NxLibImport.nxLibGetCount().

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

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

Return

The number of subitems.

int Count (out int returnCode)

Wraps NxLibImport.nxLibGetCount().

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

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.

Param returnCode

The error code when accessing the item.

Return

The number of subitems.

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

Throws NxLibException.

Param width

Width of the image.

Param height

Height of the image.

Param channels

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

Param bytesPerElement

Size of each element.

Param isFloat

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

Param timestamp

Timestamp when the binary blob was generated.

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

Read the properties of a Binary node.

Param returnCode

The error code when accessing the item.

Param width

Width of the image.

Param height

Height of the image.

Param channels

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

Param bytesPerElement

Size of each element.

Param isFloat

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

Param timestamp

Timestamp when the binary blob was generated.

void GetBinaryData<T> (out T[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Throws NxLibException.

Tparam T

Type of the items in the destinationBuffer .

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void GetBinaryData<T> (out int returnCode, out T[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Tparam T

Type of the items in the destinationBuffer .

Param returnCode

The error code when accessing the item.

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataByte (out byte[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Throws NxLibException.

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataShort (out short[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Throws NxLibException.

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataFloat (out float[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Throws NxLibException.

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataByte (out int result, out byte[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Param result

The error code when accessing the item.

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataShort (out int result, out short[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Param result

The error code when accessing the item.

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void GetBinaryDataFloat (out int result, out float[] destinationBuffer, out int numBytesCopied, out double timestamp)

Retrieves data of a Binary item.

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.

Param result

The error code when accessing the item.

Param destinationBuffer

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

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

Param timestamp

Timestamp when the binary blob was generated. Can be set to zero when the time stamp should not be retrieved.

void SetBinaryData<T> (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.

Throws NxLibException.

Tparam T

Type of the items in the buffer .

Param buffer

An array from which the binary data should be copied.

void SetBinaryData<T> (out int returnCode, 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.

Tparam T

Type of the items in the buffer .

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

void SetBinaryDataByte (byte[] 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.

Throws NxLibException.

Param buffer

An array from which the binary data should be copied.

void SetBinaryDataShort (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.

Throws NxLibException.

Param buffer

An array from which the binary data should be copied.

void SetBinaryDataFloat (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.

Throws NxLibException.

Param buffer

An array from which the binary data should be copied.

void SetBinaryDataByte (out int returnCode, byte[] 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.

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

void SetBinaryDataShort (out int returnCode, 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.

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

void SetBinaryDataFloat (out int returnCode, 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.

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

void SetBinaryData<T> (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.

Throws NxLibException.

Tparam T

Type of the items in the buffer .

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void SetBinaryData<T> (out int returnCode, 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.

Tparam T

Type of the items in the buffer .

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void SetBinaryDataByte (byte[] 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.

Throws NxLibException.

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void SetBinaryDataShort (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.

Throws NxLibException.

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void SetBinaryDataFloat (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.

Throws NxLibException.

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void SetBinaryDataByte (out int returnCode, byte[] 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.

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void SetBinaryDataShort (out int returnCode, 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.

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void SetBinaryDataFloat (out int returnCode, 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.

Param returnCode

The error code when accessing the item.

Param buffer

An array from which the binary data should be copied.

Param width

Width of the Image.

Param height

Height of the Image.

Param channelCount

Amount of Channels.

Param isFloat

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

void WaitForChange ()

Block until the item’s value changes.

Throws NxLibException.

void WaitForType (int type, bool waitForEqual)

Wraps NxLibImport.nxLibWaitForType().

Throws NxLibException.

Param type

The type constant to wait for. See NxLibImport.nxLibGetType for valid types.

Param 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 WaitForType (out int returnCode, int type, bool waitForEqual)

Wraps NxLibImport.nxLibWaitForType().

Param returnCode

The error code when accessing the item.

Param type

The type constant to wait for. See NxLibImport.nxLibGetType for valid types.

Param 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)

Wraps NxLibImport.nxLibWaitForIntValue.

Throws NxLibException.

Param value

The value to wait for.

Param 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 (out int returnCode, int value, bool waitForEqual)

Wraps NxLibImport.nxLibWaitForIntValue().

Param returnCode

The error code when accessing the item.

Param value

The value to wait for.

Param 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)

Wraps NxLibImport.nxLibWaitForDoubleValue().

Throws NxLibException.

Param value

The value to wait for.

Param 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 (out int returnCode, double value, bool waitForEqual)

Wraps NxLibImport.nxLibWaitForDoubleValue().

Param returnCode

The error code when accessing the item.

Param value

The value to wait for.

Param 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)

Wraps NxLibImport.nxLibWaitForBoolValue().

Throws NxLibException.

Param value

The value to wait for.

Param 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 (out int returnCode, bool value, bool waitForEqual)

Wraps NxLibImport.nxLibWaitForBoolValue().

Param returnCode

The error code when accessing the item.

Param value

The value to wait for.

Param 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)

Wraps NxLibImport.nxLibWaitForStringValue().

Throws NxLibException.

Param value

The value to wait for.

Param 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 NxLibItem as slot for an NxLibCommand.

Throws NxLibException.

Param itemName

The base name of the item. Defaults to Temporary if left empty.

Return

A unique NxLibItem.

NxLibItem MakeUniqueItem (out int returnCode, 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 NxLibItem as slot for an NxLibCommand.

Param returnCode

The error code when accessing the item.

Param itemName

The base name of the item. Defaults to Temporary if left empty.

Return

A unique NxLibItem.

Properties

NxLibItem this[string subItemName]  { get; set; }

Creates an NxLibItem referencing a subnode of the current item.

Param subItemName

Access a JSON object’s subitem by its name.

Return

An NxLibItem referring to the subitem.

NxLibItem this[int subItemIndex]  { get; set; }

Creates an NxLibItem referencing a subnode of the current item.

Param subItemIndex

Access an element of a JSON Array or a JSON Object subitem by its index.

Return

An NxLibItem referring to the subitem.