46 #ifndef reda_circularlist_h
47 #include "reda/reda_circularlist.h"
51 #include "db/db_api.h"
59 #define NULL ((void*)0)
74 #define RT_MKINTERFACEID(class_,instance_) \
75 ((((class_)<<16)&0xffff0000) | (instance_))
84 #define RT_INTERFACE_CLASS(id_) ((id_) >> 16)
93 #define RT_INTERFACE_INSTANCE(id_) ((id_) & 0xffff)
99 #define RT_COMPONENT_CLASS_UNKNOWN (0x0000)
104 #define RT_COMPONENT_CLASS_DISCOVERY (0x0001)
109 #define RT_COMPONENT_CLASS_WHISTORY (0x0002)
114 #define RT_COMPONENT_CLASS_RHISTORY (0x0003)
119 #define RT_COMPONENT_CLASS_NETIO (0x0004)
126 #define RT_COMPONENT_INSTANCE_DISCOVERY_DPDE (1)
131 #define RT_COMPONENT_INSTANCE_DISCOVERY_DPSE (2)
136 #define RT_COMPONENT_INSTANCE_WHISTORY_SM (1)
141 #define RT_COMPONENT_INSTANCE_RHISTORY_SM (1)
146 #define RT_COMPONENT_INSTANCE_UDP (1)
151 #define RT_COMPONENT_INSTANCE_RTPS (2)
156 #define RT_COMPONENT_INSTANCE_INTRA (3)
161 #define RT_COMPONENT_INSTANCE_DDSWI (4)
166 #define RT_COMPONENT_INSTANCE_DDSRI (5)
171 #define RT_RESOURCE_TABLES_PER_INSTANCE (1)
176 typedef RTI_UINT32 RT_ComponentInterfaceId_t;
186 typedef struct RT_Component RT_Component_T;
195 struct RT_ComponentListener
206 #define RT_ComponentListener_INITIALIZER \
214 struct RT_ComponentProperty
227 #define RT_ComponentProperty_INITIALIZER \
253 struct RT_ComponentI *_intf;
279 RT_Component_initialize(RT_Component_T *c,
280 struct RT_ComponentI *intf,
282 const struct RT_ComponentProperty *
const property,
283 const struct RT_ComponentListener *
const listener);
299 RT_Component_finalize(RT_Component_T *c);
302 #define RT_COMPONENTI_BASE {0}
307 struct RT_ComponentFactory;
315 typedef struct RT_Registry RT_Registry_T;
320 struct RT_ComponentFactoryProperty
325 RT_Registry_T *registry;
331 #define RT_ComponentFactoryProperty_INITIALIZER \
340 struct RT_ComponentFactoryListener
348 #define RT_ComponentFactoryListener_INITIALIZER \
362 FUNCTION_MUST_TYPEDEF(
363 struct RT_ComponentFactory*
364 (*RT_ComponentFactory_initializeFactoryFunc)(
365 struct RT_ComponentFactoryProperty *property,
366 struct RT_ComponentFactoryListener *listener)
378 (*RT_ComponentFactory_finalizeFactoryFunc)(
struct RT_ComponentFactory *factory,
379 struct RT_ComponentFactoryProperty **property,
380 struct RT_ComponentFactoryListener **listener);
392 FUNCTION_MUST_TYPEDEF(
394 (*RT_ComponentFactory_createFunc)(
struct RT_ComponentFactory *factory,
395 struct RT_ComponentProperty *property,
396 struct RT_ComponentListener *listener)
409 (*RT_ComponentFactory_deleteFunc)(
struct RT_ComponentFactory *factory,
410 RT_Component_T* component);
420 FUNCTION_MUST_TYPEDEF(
421 struct RT_ComponentI*
422 (*RT_ComponentFactory_get_ifFunc)(
struct RT_ComponentFactory *factory)
428 #define RT_COMPONENT_FACTORY_ID_DEFAULT (0)
433 struct RT_ComponentFactoryI
443 RT_ComponentFactory_initializeFactoryFunc initialize;
448 RT_ComponentFactory_finalizeFactoryFunc finalize;
453 RT_ComponentFactory_createFunc create_component;
458 RT_ComponentFactory_deleteFunc delete_component;
463 RT_ComponentFactory_get_ifFunc get_if;
470 #define RT_MAX_FACTORY_NAME 7
477 #pragma warning(push)
478 #pragma warning(disable: 4522)
480 union DDSCPPDllExport RT_ComponentFactoryId
484 char _name[RT_MAX_FACTORY_NAME+1];
495 RT_ComponentFactoryId();
496 bool set_name(
const char *
const name);
502 RT_ComponentFactoryId& operator=(
const char *
const name);
503 RT_ComponentFactoryId& operator=(
const RT_ComponentFactoryId& from);
504 const RT_ComponentFactoryId& operator=(
const RT_ComponentFactoryId& from)
const;
505 bool operator==(
const RT_ComponentFactoryId& other)
const;
506 bool operator==(
const char *
const name)
const;
507 bool operator!=(
const RT_ComponentFactoryId& other)
const;
508 bool operator!=(
const char *
const name)
const;
518 typedef union RT_ComponentFactoryId RT_ComponentFactoryId_T;
520 #define RT_ComponentFactoryId_INITIALIZER \
531 RT_ComponentFactoryId_clear(
union RT_ComponentFactoryId *
id);
537 struct RT_ComponentFactory
542 struct RT_ComponentFactoryI *intf;
547 struct RT_ComponentFactory *_factory;
552 union RT_ComponentFactoryId _id;
558 #define RT_ComponentFactory_INITIALIZER \
568 typedef struct RT_ComponentFactory RT_ComponentFactory_T;
573 struct RT_RegistryProperty
578 RTI_SIZE_T max_factories;
589 #define RT_RegistryProperty_INITIALIZER \
598 extern RTDllVariable
const struct RT_RegistryProperty
599 RTCOMPONENTFACTORY_REGISTRY_PROPERTY_DEFAULT;
612 SHOULD_CHECK_RETURN RTDllExport RT_Registry_T*
613 RT_Registry_get_instance(
void);
629 SHOULD_CHECK_RETURN RTDllExport RTI_BOOL
630 RT_Registry_finalize(RT_Registry_T*);
635 MUST_CHECK_RETURN RTDllExport RTI_BOOL
638 struct RT_ComponentFactoryI *intf,
639 struct RT_ComponentFactoryProperty *property,
640 struct RT_ComponentFactoryListener *listener);
644 SHOULD_CHECK_RETURN RTDllExport RTI_BOOL
647 struct RT_ComponentFactoryProperty **property,
648 struct RT_ComponentFactoryListener **listener);
664 MUST_CHECK_RETURN RTDllExport
struct RT_ComponentFactory*
665 RT_Registry_lookup(RT_Registry_T *registry,
const char *name);
684 MUST_CHECK_RETURN RTDllExport
struct RT_ComponentFactory*
685 RT_Registry_lookup_cid(RT_Registry_T *registry,
const char *name,RTI_INT32 cid);
701 MUST_CHECK_RETURN RTDllExport RTI_BOOL
702 RT_Registry_get_property(RT_Registry_T *registry,
703 struct RT_RegistryProperty *property);
720 MUST_CHECK_RETURN RTDllExport RTI_BOOL
721 RT_Registry_set_property(RT_Registry_T *registry,
722 struct RT_RegistryProperty *property);
735 RTDllExport RTI_INT32
736 RT_ComponentFactory_get_id(
struct RT_ComponentFactory *factory);
751 MUST_CHECK_RETURN RTDllExport RTI_BOOL
753 const char *
const name);
766 MUST_CHECK_RETURN RTDllExport
const char*
767 RT_ComponentFactoryId_get_name(
const RT_ComponentFactoryId_T *
const id);
781 MUST_CHECK_RETURN RTDllExport RTI_BOOL
782 RT_ComponentFactoryId_equals(
const RT_ComponentFactoryId_T *
const id,
783 const char *
const name);
799 MUST_CHECK_RETURN RTDllExport RTI_INT32
800 RT_ComponentFactoryId_compare(
const RT_ComponentFactoryId_T *
const id1,
801 const RT_ComponentFactoryId_T *
const id2);