Waiting

The following functions allow to wait for a certain value of an item:

nxLibWaitForChange

void nxLibWaitForChange(int32_t *result, const char *itemPath)

Wait for any change to the specified item, i.e. a change of value or item type.

Parameters
  • result – A pointer to a variable for the return code of the operation. The following function specific return codes can occur:

    • NxLibInvalidParameters - One, multiple, or a combination of parameters are invalid.

    • NxLibItemInexistent - The item at the given path does not exist. Or it has been deleted during the wait operation.

    • NxLibItemPathInvalid - The given path contains forbidden characters.

    • NxLibItemTypeNotCompatible - The item type you tried to read is of another type than you specified or the item you tried to write cannot be overwritten with the type you specified because its structure is locked.

  • itemPath – The path of the item to wait for.

nxLibWaitForType

void nxLibWaitForType(int32_t *result, const char *itemPath, int32_t nxLibItemType, int32_t waitForEqual)

Wait for a type change to the specified item. When the condition to wait for is already satisfied initially, the function returns immediately.

Parameters
  • result – A pointer to a variable for the return code of the operation. The following function specific return codes can occur:

    • NxLibInvalidParameters - One, multiple, or a combination of parameters are invalid.

    • NxLibItemInexistent - The item at the given path does not exist. Or it has been deleted during the wait operation.

    • NxLibItemPathInvalid - The given path contains forbidden characters.

    • NxLibItemTypeNotCompatible - The item type you tried to read is of another type than you specified or the item you tried to write cannot be overwritten with the type you specified because its structure is locked.

  • itemPath – The path of the item to wait for.

  • nxLibItemType – The constant corresponding to the type to wait for. See also nxLibGetType().

  • waitForEqual – When true, the function waits until the item has the specified type, otherwise it waits until the item has a different type than the one specified.

nxLibWaitForStringValue

void nxLibWaitForStringValue(int32_t *result, const char *itemPath, const char *value, int32_t waitForEqual)

Wait for specific string value of an item. When the condition to wait for is already satisfied initially, the function returns immediately.

Parameters
  • result – A pointer to a variable for the return code of the operation. The following function specific return codes can occur:

    • NxLibInvalidParameters - One, multiple, or a combination of parameters are invalid.

    • NxLibItemInexistent - The item at the given path does not exist. Or it has been deleted during the wait operation.

    • NxLibItemPathInvalid - The given path contains forbidden characters.

    • NxLibItemTypeNotCompatible - The item type you tried to read is of another type than you specified or the item you tried to write cannot be overwritten with the type you specified because its structure is locked.

  • itemPath – The path of the item to wait for.

  • value – The value to wait for.

  • waitForEqual – When true, the function waits until the item has the specified value, otherwise it waits until the item has a different value than the one specified.

nxLibWaitForIntValue

void nxLibWaitForIntValue(int32_t *result, const char *itemPath, int32_t value, int32_t waitForEqual)

Wait for specific integer value of an item. When the condition to wait for is already satisfied initially, the function returns immediately.

Note

According to the behavior of nxLibGetInt() the comparison for this condition is done with the rounded item value.

Parameters
  • result – A pointer to a variable for the return code of the operation. The following function specific return codes can occur:

    • NxLibInvalidParameters - One, multiple, or a combination of parameters are invalid.

    • NxLibItemInexistent - The item at the given path does not exist. Or it has been deleted during the wait operation.

    • NxLibItemPathInvalid - The given path contains forbidden characters.

    • NxLibItemTypeNotCompatible - The item type you tried to read is of another type than you specified or the item you tried to write cannot be overwritten with the type you specified because its structure is locked.

  • itemPath – The path of the item to wait for.

  • value – The value to wait for.

  • waitForEqual – When true, the function waits until the item has the specified value, otherwise it waits until the item has a different value than the one specified.

nxLibWaitForDoubleValue

void nxLibWaitForDoubleValue(int32_t *result, const char *itemPath, double value, int32_t waitForEqual)

Wait for specific double value of an item. When the condition to wait for is already satisfied initially, the function returns immediately.

Parameters
  • result – A pointer to a variable for the return code of the operation. The following function specific return codes can occur:

    • NxLibInvalidParameters - One, multiple, or a combination of parameters are invalid.

    • NxLibItemInexistent - The item at the given path does not exist. Or it has been deleted during the wait operation.

    • NxLibItemPathInvalid - The given path contains forbidden characters.

    • NxLibItemTypeNotCompatible - The item type you tried to read is of another type than you specified or the item you tried to write cannot be overwritten with the type you specified because its structure is locked.

  • itemPath – The path of the item to wait for.

  • value – The value to wait for.

  • waitForEqual – When true, the function waits until the item has the specified value, otherwise it waits until the item has a different value than the one specified.

nxLibWaitForBoolValue

void nxLibWaitForBoolValue(int32_t *result, const char *itemPath, int32_t value, int32_t waitForEqual)

Wait for specific boolean value of an item. When the condition to wait for is already satisfied initially, the function returns immediately.

Parameters
  • result – A pointer to a variable for the return code of the operation. The following function specific return codes can occur:

    • NxLibInvalidParameters - One, multiple, or a combination of parameters are invalid.

    • NxLibItemInexistent - The item at the given path does not exist. Or it has been deleted during the wait operation.

    • NxLibItemPathInvalid - The given path contains forbidden characters.

    • NxLibItemTypeNotCompatible - The item type you tried to read is of another type than you specified or the item you tried to write cannot be overwritten with the type you specified because its structure is locked.

  • itemPath – The path of the item to wait for.

  • value – The value to wait for.

  • waitForEqual – When true, the function waits until the item has the specified value, otherwise it waits until the item has a different value than the one specified.