#if !defined(monitoring_resource_included) #define monitoring_resource_included #include "monitoring_annotations.idl" @autoid @default_nested(TRUE) @observable_name("") module monitoring { // Match DDS GUID_t typedef octet ResourceGUID[16]; typedef sequence ResourceGUIDSequence; typedef octet UserGUID[16]; const int32 OBSERVABLE_ELEMENT_NAME_LENGTH_MAX = 255; typedef string ObservableElementName; typedef uint32 ObservableElementId; typedef sequence ObservableElementIdSequence; typedef uint32 ResourceClassId; typedef sequence ResourceClassIdSequence; const int32 RESOURCE_NAME_LENGTH_MAX = 255; typedef string ResourceName; const int32 RESOURCE_CLASSNAME_LENGTH_MAX = 63; typedef string ResourceClassName; const int32 RESOURCE_NAMESPACE_LENGTH_MAX = 63; typedef string ResourceNamespace; // Match DDS-XTYPES 1.3 CompleteTypeObject (7.3.4.3) using XCDRv2 Little Endian (7.3.4.5) typedef sequence TypeObjectSerialized; typedef sequence TypeObjectSerializedSequence; typedef sequence TypeIdentifierSerialized; typedef sequence TypeIdentifierSequence; @appendable struct EventInfo { ResourceGUID root_resource_guid; uint64 epoch_resource; uint64 epoch_observable_unit; boolean is_snapshot; }; @appendable struct ResourceClass { ResourceClassId class_id; ResourceClassName class_name; string namespace; TypeIdentifierSerialized type_id; }; @appendable struct ResourceMutableState { sequence used_resources; sequence active_obsevable_element_ids; }; @appendable struct ResourceInmutableState { ResourceClassId class_id; ResourceName name; ResourceGUID owner_resource; UserGUID user_guid; }; @final struct Resource { ResourceGUID guid; @observable_name("") ResourceMutableState mutable_state; @observable_name("") ResourceInmutableState inmutable_state; }; typedef @external Resource ResourceReference; typedef sequence ResourceList; @final struct ResourceStateUpdate { ResourceGUID guid; @observable_name("") ResourceMutableState mutable_state; }; typedef @external ResourceStateUpdate ResourceStateUpdateReference; typedef sequence ResourceStateUpdateList; // Used to notify of changes to the Resource registry @mutable @nested @autoid struct RegistryEvent { // Full list of resources in the registry @optional ResourceList resource_snapshot; /* first element root */ @optional ResourceList created_resources; @optional sequence deleted_resources; @optional ResourceStateUpdateList updated_resources; }; @mutable struct RegistryPeriodic { }; @appendable struct TypeDefinition { TypeIdentifierSerialized type_id; TypeObjectSerialized type_object_serialized; }; typedef sequence TypeDefinitionSequence; // Resource type: Registry, distribution: ON_CHANGE @mutable @nested @autoid struct TypeEvent { @optional sequence type_definitions; @optional TypeIdentifierSequence dependent_type_ids; /* Nested hash types */ }; // Resource type: Registry, distribution: PERIODIC @mutable struct TypePeriodic { }; const ResourceClassName INVALID_RESOURCE_CLASS_NAME = "invalid" const ResourceClassId INVALID_RESOURCE_CLASS_ID = 70114302; // hashid("invalid") const ResourceClassName REGISTRY_RESOURCE_CLASS_NAME = "registry" const ResourceClassId REGISTRY_RESOURCE_CLASS_ID = 257761449; // hashid("registry") const ResourceClassName TYPE_RESOURCE_CLASS_NAME = "type"; const ResourceClassId TYPE_RESOURCE_CLASS_ID = 46964057; // hashid("type") @appendable @nested union EventUnionBase switch (ResourceClassId) { case REGISTRY_RESOURCE_CLASS_ID: RegistryEvent registry; case TYPE_RESOURCE_CLASS_ID: TypeEvent type; }; @appendable @nested union PeriodicUnionBase switch (ResourceClassId) { case REGISTRY_RESOURCE_CLASS_ID: RegistryPeriodic registry; case TYPE_RESOURCE_CLASS_ID: TypePeriodic type; }; }; // End of module monitoring #endif /* monitoring_resource_included */