2.4. EntityId¶
When monitoring a domain (see Initialize a monitor), Fast DDS Statistics Backend labels all the different
discovered entities with an EntityId
identifier that is unique in the context of the StatisticsBackend
instance.
This EntityId
is used by the application, among other things, to query statistical data to the backend (see
Get statistical data).
To ease the use of the Fast DDS Statistics Backend API, EntityId
exposes certain commonly used operations:
2.4.1. EntityId wildcard¶
EntityId
allows for retrieving an ID that represents all the EntityIds:
EntityId all = EntityId::all();
2.4.2. Invalid EntityId¶
EntityId
allows for retrieving an invalid ID:
EntityId invalid = EntityId::invalid();
2.4.3. Invalidate an EntityId¶
It is also possible to invalidate an EntityId
:
EntityId entity_id;
entity_id.invalidate();
2.4.4. Check validity of an EntityId¶
It can be checked whether an EntityId
is valid:
EntityId entity_id;
bool check = entity_id.is_valid();
2.4.5. Check EntityId represents all Entities¶
It can be checked whether an EntityId
represents all the EntityIds:
EntityId entity_id;
bool check = entity_id.is_all();
2.4.6. Check validity and uniqueness of an EntityId¶
It can be checked whether an EntityId
is valid and unique:
EntityId entity_id;
bool check = entity_id.is_valid_and_unique();
2.4.7. Comparison operations¶
EntityIds
can be compared between them:
EntityId entity_id_1;
EntityId entity_id_2;
bool check = entity_id_1 < entity_id_2;
check = entity_id_1 <= entity_id_2;
check = entity_id_1 > entity_id_2;
check = entity_id_1 >= entity_id_2;
check = entity_id_1 == entity_id_2;
check = entity_id_1 != entity_id_2;