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;
312 struct RT_ComponentFactoryProperty
323 #define RT_ComponentFactoryProperty_INITIALIZER \
332 struct RT_ComponentFactoryListener
340 #define RT_ComponentFactoryListener_INITIALIZER \
354 FUNCTION_MUST_TYPEDEF(
355 struct RT_ComponentFactory*
356 (*RT_ComponentFactory_initializeFactoryFunc)(
357 struct RT_ComponentFactoryProperty *property,
358 struct RT_ComponentFactoryListener *listener)
370 (*RT_ComponentFactory_finalizeFactoryFunc)(
struct RT_ComponentFactory *factory,
371 struct RT_ComponentFactoryProperty **property,
372 struct RT_ComponentFactoryListener **listener);
384 FUNCTION_MUST_TYPEDEF(
386 (*RT_ComponentFactory_createFunc)(
struct RT_ComponentFactory *factory,
387 struct RT_ComponentProperty *property,
388 struct RT_ComponentListener *listener)
401 (*RT_ComponentFactory_deleteFunc)(
struct RT_ComponentFactory *factory,
402 RT_Component_T* component);
412 FUNCTION_MUST_TYPEDEF(
413 struct RT_ComponentI*
414 (*RT_ComponentFactory_get_ifFunc)(
struct RT_ComponentFactory *factory)
420 #define RT_COMPONENT_FACTORY_ID_DEFAULT (0)
425 struct RT_ComponentFactoryI
435 RT_ComponentFactory_initializeFactoryFunc initialize;
440 RT_ComponentFactory_finalizeFactoryFunc finalize;
445 RT_ComponentFactory_createFunc create_component;
450 RT_ComponentFactory_deleteFunc delete_component;
455 RT_ComponentFactory_get_ifFunc get_if;
462 #define RT_MAX_FACTORY_NAME 7
469 #pragma warning(push)
470 #pragma warning(disable: 4522)
472 union DDSCPPDllExport RT_ComponentFactoryId
476 char _name[RT_MAX_FACTORY_NAME+1];
487 RT_ComponentFactoryId();
488 bool set_name(
const char *
const name);
494 RT_ComponentFactoryId& operator=(
const char *
const name);
495 RT_ComponentFactoryId& operator=(
const RT_ComponentFactoryId& from);
496 const RT_ComponentFactoryId& operator=(
const RT_ComponentFactoryId& from)
const;
497 bool operator==(
const RT_ComponentFactoryId& other)
const;
498 bool operator==(
const char *
const name)
const;
499 bool operator!=(
const RT_ComponentFactoryId& other)
const;
500 bool operator!=(
const char *
const name)
const;
510 typedef union RT_ComponentFactoryId RT_ComponentFactoryId_T;
512 #define RT_ComponentFactoryId_INITIALIZER \
523 RT_ComponentFactoryId_clear(
union RT_ComponentFactoryId *
id);
529 struct RT_ComponentFactory
534 struct RT_ComponentFactoryI *intf;
539 struct RT_ComponentFactory *_factory;
544 union RT_ComponentFactoryId _id;
550 #define RT_ComponentFactory_INITIALIZER \
560 typedef struct RT_ComponentFactory RT_ComponentFactory_T;
565 struct RT_RegistryProperty
570 RTI_SIZE_T max_factories;
581 #define RT_RegistryProperty_INITIALIZER \
590 extern RTDllVariable
struct RT_RegistryProperty
591 RTCOMPONENTFACTORY_REGISTRY_PROPERTY_DEFAULT;
599 typedef struct RT_Registry RT_Registry_T;
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);