Function dds_waitset_set_trigger

Function Documentation

dds_return_t dds_waitset_set_trigger(dds_entity_t waitset, bool trigger)

Sets the trigger_value associated with a waitset.

When the waitset is attached to itself and the trigger value is set to ‘true’, then the waitset will wake up just like with an other status change of the attached entities.

This can be used to forcefully wake up a waitset, for instance when the application wants to shut down. So, when the trigger value is true, the waitset will wake up or not wait at all.

The trigger value will remain true until the application sets it false again deliberately.

Parameters
  • waitset[in] The waitset to set the trigger value on.

  • trigger[in] The trigger value to set.

Return values
  • DDS_RETCODE_OK – Trigger value set.

  • DDS_RETCODE_ERROR – An internal error has occurred.

  • DDS_RETCODE_BAD_PARAMETER – The given waitset is not valid.

  • DDS_RETCODE_ILLEGAL_OPERATION – The operation is invoked on an inappropriate object.

  • DDS_RETCODE_ALREADY_DELETED – The waitset has already been deleted.

Returns

A dds_return_t indicating success or failure.