Function dds_waitset_get_entities

Function Documentation

dds_return_t dds_waitset_get_entities(dds_entity_t waitset, dds_entity_t *entities, size_t size)

Acquire previously attached entities.

This functions takes a pre-allocated list to put the entities in and will return the number of found entities. It is possible that the given size of the list is not the same as the number of found entities. If less entities are found, then the last few entries in the list are untouched. When more entities are found, then only ‘size’ number of entries are inserted into the list, but still the complete count of the found entities is returned. Which entities are returned in the latter case is undefined.

Parameters
  • waitset[in] Waitset from which to get its attached entities.

  • entities[out] Pre-allocated array to contain the found entities.

  • size[in] Size of the pre-allocated entities’ list.

Return values
  • >=0 – Number of children found (can be larger than ‘size’).

  • DDS_RETCODE_ERROR – An internal error has occurred.

  • DDS_RETCODE_BAD_PARAMETER – The entities parameter is NULL, while a size is provided.

  • 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 with the number of children or an error code.