Class astutedds::xtypes::TypeLookupService
ClassList > astutedds > xtypes > TypeLookupService
TypeLookup service for remote type discovery. More...
#include <type_lookup_service.hpp>
Public Functions
| Type | Name |
|---|---|
| TypeLookupService (const rtps::GUID_t & participant_guid) Construct TypeLookup service. |
|
| TypeLookupService (const TypeLookupService &) = delete |
|
| void | clear () Clear all registered types. |
| TypeIdentifierSeq | get_all_types () const Get all registered type identifiers. |
| TypeIdentifierSeq | get_dependencies (const TypeIdentifier & type_id) const Get all dependent types for a type. |
| std::future< std::optional< GetTypeDependenciesReply > > | get_type_dependencies (const rtps::GUID_t & remote_guid, const TypeIdentifierSeq & type_ids, const TypeIdentifierSeq & known_types={}, std::chrono::milliseconds timeout=std::chrono::seconds(5)) Request type dependencies from remote participant. |
| std::future< std::optional< GetTypesReply > > | get_types (const rtps::GUID_t & remote_guid, const TypeIdentifierSeq & type_ids, std::chrono::milliseconds timeout=std::chrono::seconds(5)) Request TypeObjects from remote participant. |
| void | get_types_async (const rtps::GUID_t & remote_guid, const TypeIdentifierSeq & type_ids, TypeLookupCallback callback) Asynchronous type lookup with callback. |
| void | handle_reply (const TypeLookupReply & reply) Process incoming reply (called by transport layer) |
| void | handle_request (const TypeLookupRequest & request) Process incoming request (called by transport layer) |
| bool | has_type (const TypeIdentifier & type_id) const Check if a type is available locally. |
| std::optional< TypeObject > | lookup_local (const TypeIdentifier & type_id) const Look up a type locally. |
| TypeLookupService & | operator= (const TypeLookupService &) = delete |
| void | register_type (const TypeIdentifier & type_id, const TypeObject & type_object) Register a TypeObject in the local registry. |
| void | set_request_handler (TypeLookupRequestHandler handler) Set handler for incoming type lookup requests. |
| void | unregister_type (const TypeIdentifier & type_id) Unregister a type from the local registry. |
| ~TypeLookupService () Destroy the service. |
Detailed Description
Provides both client and server functionality for discovering types from remote DDS participants. Uses RTPS request/reply pattern over built-in topics.
Public Functions Documentation
function TypeLookupService [1/2]
Construct TypeLookup service.
explicit astutedds::xtypes::TypeLookupService::TypeLookupService (
const rtps::GUID_t & participant_guid
)
Parameters:
participant_guidGUID of the owning participant
function TypeLookupService [2/2]
astutedds::xtypes::TypeLookupService::TypeLookupService (
const TypeLookupService &
) = delete
function clear
Clear all registered types.
void astutedds::xtypes::TypeLookupService::clear ()
function get_all_types
Get all registered type identifiers.
TypeIdentifierSeq astutedds::xtypes::TypeLookupService::get_all_types () const
Returns:
Vector of all registered type IDs
function get_dependencies
Get all dependent types for a type.
TypeIdentifierSeq astutedds::xtypes::TypeLookupService::get_dependencies (
const TypeIdentifier & type_id
) const
Parameters:
type_idType identifier
Returns:
Vector of dependent type identifiers
function get_type_dependencies
Request type dependencies from remote participant.
std::future< std::optional< GetTypeDependenciesReply > > astutedds::xtypes::TypeLookupService::get_type_dependencies (
const rtps::GUID_t & remote_guid,
const TypeIdentifierSeq & type_ids,
const TypeIdentifierSeq & known_types={},
std::chrono::milliseconds timeout=std::chrono::seconds(5)
)
Parameters:
remote_guidGUID of the remote participanttype_idsType identifiers to get dependencies forknown_typesTypes we already know (to avoid redundant responses)timeoutTimeout for the request
Returns:
Future containing the reply, or empty on timeout
function get_types
Request TypeObjects from remote participant.
std::future< std::optional< GetTypesReply > > astutedds::xtypes::TypeLookupService::get_types (
const rtps::GUID_t & remote_guid,
const TypeIdentifierSeq & type_ids,
std::chrono::milliseconds timeout=std::chrono::seconds(5)
)
Parameters:
remote_guidGUID of the remote participanttype_idsType identifiers to requesttimeoutTimeout for the request
Returns:
Future containing the reply, or empty on timeout
function get_types_async
Asynchronous type lookup with callback.
void astutedds::xtypes::TypeLookupService::get_types_async (
const rtps::GUID_t & remote_guid,
const TypeIdentifierSeq & type_ids,
TypeLookupCallback callback
)
Parameters:
remote_guidGUID of the remote participanttype_idsType identifiers to requestcallbackFunction to call with result
function handle_reply
Process incoming reply (called by transport layer)
void astutedds::xtypes::TypeLookupService::handle_reply (
const TypeLookupReply & reply
)
Parameters:
replyThe incoming reply
function handle_request
Process incoming request (called by transport layer)
void astutedds::xtypes::TypeLookupService::handle_request (
const TypeLookupRequest & request
)
Parameters:
requestThe incoming request
function has_type
Check if a type is available locally.
bool astutedds::xtypes::TypeLookupService::has_type (
const TypeIdentifier & type_id
) const
Parameters:
type_idType identifier
Returns:
true if type is registered
function lookup_local
Look up a type locally.
std::optional< TypeObject > astutedds::xtypes::TypeLookupService::lookup_local (
const TypeIdentifier & type_id
) const
Parameters:
type_idType identifier
Returns:
TypeObject if found, nullopt otherwise
function operator=
TypeLookupService & astutedds::xtypes::TypeLookupService::operator= (
const TypeLookupService &
) = delete
function register_type
Register a TypeObject in the local registry.
void astutedds::xtypes::TypeLookupService::register_type (
const TypeIdentifier & type_id,
const TypeObject & type_object
)
Parameters:
type_idType identifiertype_objectType object to register
function set_request_handler
Set handler for incoming type lookup requests.
void astutedds::xtypes::TypeLookupService::set_request_handler (
TypeLookupRequestHandler handler
)
Parameters:
handlerFunction to handle requests
function unregister_type
Unregister a type from the local registry.
void astutedds::xtypes::TypeLookupService::unregister_type (
const TypeIdentifier & type_id
)
Parameters:
type_idType identifier
function ~TypeLookupService
Destroy the service.
astutedds::xtypes::TypeLookupService::~TypeLookupService ()
The documentation for this class was generated from the following file include/astutedds/xtypes/type_lookup_service.hpp