#ifndef HelloWorld_1436885481_h
#define HelloWorld_1436885481_h
#ifndef NDDS_STANDALONE_TYPE
#ifndef ndds_c_h
#include "ndds/ndds_c.h"
#endif
#include "cdr/cdr_typeCode.h"
#else
#include "ndds_standalone_type.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern const char *HelloWorldTYPENAME;
typedef struct HelloWorld
{
DDS_Long data;
} HelloWorld ;
#if defined(NDDS_USER_DLL_EXPORT) && defined(RTI_WIN32)
#undef NDDSUSERDllExport
#define NDDSUSERDllExport __declspec(dllexport)
#endif
#if !defined(RTI_WIN32) && defined(NDDS_USER_SYMBOL_EXPORT)
#undef NDDSUSERDllExport
#define NDDSUSERDllExport __attribute__((visibility("default")))
#endif
#ifndef NDDS_STANDALONE_TYPE
NDDSUSERDllExport DDS_TypeCode * HelloWorld_get_typecode(void);
NDDSUSERDllExport RTIXCdrTypePlugin *HelloWorld_get_type_plugin_info(void);
NDDSUSERDllExport RTIXCdrSampleAccessInfo *HelloWorld_get_sample_access_info(void);
#endif
DDS_SEQUENCE(HelloWorldSeq, HelloWorld);
NDDSUSERDllExport
RTIBool HelloWorld_initialize(
HelloWorld* self);
NDDSUSERDllExport
RTIBool HelloWorld_initialize_ex(
HelloWorld* self,RTIBool allocatePointers,RTIBool allocateMemory);
NDDSUSERDllExport
RTIBool HelloWorld_initialize_w_params(
HelloWorld* self,
const struct DDS_TypeAllocationParams_t * allocParams);
NDDSUSERDllExport
RTIBool HelloWorld_finalize_w_return(
HelloWorld* self);
NDDSUSERDllExport
void HelloWorld_finalize(
HelloWorld* self);
NDDSUSERDllExport
void HelloWorld_finalize_ex(
HelloWorld* self,RTIBool deletePointers);
NDDSUSERDllExport
void HelloWorld_finalize_w_params(
HelloWorld* self,
const struct DDS_TypeDeallocationParams_t * deallocParams);
NDDSUSERDllExport
void HelloWorld_finalize_optional_members(
HelloWorld* self, RTIBool deletePointers);
NDDSUSERDllExport
RTIBool HelloWorld_copy(
HelloWorld* dst,
const HelloWorld* src);
#if defined(NDDS_USER_DLL_EXPORT) || defined(NDDS_USER_SYMBOL_EXPORT)
#undef NDDSUSERDllExport
#define NDDSUSERDllExport
#endif
#ifdef __cplusplus
}
#endif
#endif
#ifndef NDDS_STANDALONE_TYPE
#ifndef ndds_c_h
#include "ndds/ndds_c.h"
#endif
#ifndef dds_c_log_infrastructure_h
#include "dds_c/dds_c_infrastructure_impl.h"
#endif
#ifndef cdr_type_h
#include "cdr/cdr_type.h"
#endif
#include "osapi/osapi_atomic.h"
#else
#include "ndds_standalone_type.h"
#endif
#include "HelloWorld.h"
#ifndef NDDS_STANDALONE_TYPE
#include "HelloWorldPlugin.h"
#endif
const char *HelloWorldTYPENAME = "HelloWorld";
#ifndef NDDS_STANDALONE_TYPE
DDS_TypeCode * HelloWorld_get_typecode(void)
{
static RTI_ATOMIC(RTIBool) is_initialized;
static DDS_TypeCode_Member HelloWorld_g_tc_members[1]=
{
{
(char *)"data",
{
0,
DDS_BOOLEAN_FALSE,
-1,
NULL
},
0,
0,
0,
NULL,
RTI_CDR_REQUIRED_MEMBER,
DDS_PUBLIC_MEMBER,
RTICdrTypeCodeAnnotations_INITIALIZER
}
};
static DDS_TypeCode HelloWorld_g_tc =
{{
DDS_TK_STRUCT,
DDS_BOOLEAN_FALSE,
-1,
(char *)"HelloWorld",
NULL,
0,
0,
NULL,
1,
HelloWorld_g_tc_members,
DDS_VM_NONE,
RTICdrTypeCodeAnnotations_INITIALIZER,
DDS_BOOLEAN_TRUE,
NULL,
NULL
}};
if (RTIOsapiAtomic_load32(&is_initialized, RTI_OSAPI_ATOMIC_MEMORY_ORDER_ACQUIRE)) {
return &HelloWorld_g_tc;
}
HelloWorld_g_tc._data._annotations._allowedDataRepresentationMask = 5;
HelloWorld_g_tc_members[0]._representation._typeCode = (RTICdrTypeCode *)&DDS_g_tc_long;
HelloWorld_g_tc_members[0]._annotations._defaultValue._d = RTI_XCDR_TK_LONG;
HelloWorld_g_tc_members[0]._annotations._defaultValue._u.long_value = 0;
HelloWorld_g_tc_members[0]._annotations._minValue._d = RTI_XCDR_TK_LONG;
HelloWorld_g_tc_members[0]._annotations._minValue._u.long_value = RTIXCdrLong_MIN;
HelloWorld_g_tc_members[0]._annotations._maxValue._d = RTI_XCDR_TK_LONG;
HelloWorld_g_tc_members[0]._annotations._maxValue._u.long_value = RTIXCdrLong_MAX;
HelloWorld_g_tc._data._sampleAccessInfo =
HelloWorld_get_sample_access_info();
HelloWorld_g_tc._data._typePlugin =
HelloWorld_get_type_plugin_info();
RTIOsapiAtomic_store32(
&is_initialized,
RTI_TRUE,
RTI_OSAPI_ATOMIC_MEMORY_ORDER_RELEASE);
return &HelloWorld_g_tc;
}
RTIXCdrSampleAccessInfo *HelloWorld_get_sample_access_info()
{
static RTI_ATOMIC(RTIBool) is_initialized;
static RTIXCdrMemberAccessInfo HelloWorld_g_memberAccessInfos[1] =
{RTIXCdrMemberAccessInfo_INITIALIZER};
static RTIXCdrSampleAccessInfo HelloWorld_g_sampleAccessInfo =
RTIXCdrSampleAccessInfo_INITIALIZER;
if (RTIOsapiAtomic_load32(
&is_initialized,
RTI_OSAPI_ATOMIC_MEMORY_ORDER_ACQUIRE)) {
return (RTIXCdrSampleAccessInfo*) &HelloWorld_g_sampleAccessInfo;
}
HelloWorld_g_memberAccessInfos[0].bindingMemberValueOffset[0] =
offsetof(struct HelloWorld, data);
HelloWorld_g_sampleAccessInfo.memberAccessInfos =
HelloWorld_g_memberAccessInfos;
{
size_t candidateTypeSize = sizeof(HelloWorld);
if (candidateTypeSize > RTIXCdrLong_MAX) {
HelloWorld_g_sampleAccessInfo.typeSize[0] =
RTIXCdrLong_MAX;
} else {
HelloWorld_g_sampleAccessInfo.typeSize[0] =
(RTIXCdrUnsignedLong) candidateTypeSize;
}
}
HelloWorld_g_sampleAccessInfo.languageBinding =
RTI_XCDR_TYPE_BINDING_C ;
RTIOsapiAtomic_store32(
&is_initialized,
RTI_TRUE,
RTI_OSAPI_ATOMIC_MEMORY_ORDER_RELEASE);
return (RTIXCdrSampleAccessInfo*) &HelloWorld_g_sampleAccessInfo;
}
RTIXCdrTypePlugin *HelloWorld_get_type_plugin_info()
{
static RTIXCdrTypePlugin HelloWorld_g_typePlugin =
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
(RTIXCdrTypePluginInitializeSampleFunction)
HelloWorld_initialize_ex,
NULL,
(RTIXCdrTypePluginFinalizeSampleFunction)
HelloWorld_finalize_w_return,
NULL,
NULL
};
return &HelloWorld_g_typePlugin;
}
#endif
RTIBool HelloWorld_initialize(
HelloWorld* sample)
{
return HelloWorld_initialize_ex(
sample,
RTI_TRUE,
RTI_TRUE);
}
RTIBool HelloWorld_initialize_w_params(
HelloWorld *sample,
const struct DDS_TypeAllocationParams_t *allocParams)
{
if (sample == NULL) {
return RTI_FALSE;
}
if (allocParams == NULL) {
return RTI_FALSE;
}
sample->data = 0;
return RTI_TRUE;
}
RTIBool HelloWorld_initialize_ex(
HelloWorld *sample,
RTIBool allocatePointers,
RTIBool allocateMemory)
{
struct DDS_TypeAllocationParams_t allocParams =
DDS_TYPE_ALLOCATION_PARAMS_DEFAULT;
allocParams.allocate_pointers = (DDS_Boolean)allocatePointers;
allocParams.allocate_memory = (DDS_Boolean)allocateMemory;
return HelloWorld_initialize_w_params(
sample,
&allocParams);
}
RTIBool HelloWorld_finalize_w_return(
HelloWorld* sample)
{
HelloWorld_finalize_ex(sample, RTI_TRUE);
return RTI_TRUE;
}
void HelloWorld_finalize(
HelloWorld* sample)
{
HelloWorld_finalize_ex(
sample,
RTI_TRUE);
}
void HelloWorld_finalize_ex(
HelloWorld *sample,
RTIBool deletePointers)
{
struct DDS_TypeDeallocationParams_t deallocParams =
DDS_TYPE_DEALLOCATION_PARAMS_DEFAULT;
if (sample==NULL) {
return;
}
deallocParams.delete_pointers = (DDS_Boolean)deletePointers;
HelloWorld_finalize_w_params(
sample,
&deallocParams);
}
void HelloWorld_finalize_w_params(
HelloWorld *sample,
const struct DDS_TypeDeallocationParams_t *deallocParams)
{
if (sample==NULL) {
return;
}
if (deallocParams == NULL) {
return;
}
}
void HelloWorld_finalize_optional_members(
HelloWorld* sample, RTIBool deletePointers)
{
struct DDS_TypeDeallocationParams_t deallocParamsTmp =
DDS_TYPE_DEALLOCATION_PARAMS_DEFAULT;
struct DDS_TypeDeallocationParams_t * deallocParams =
&deallocParamsTmp;
if (sample==NULL) {
return;
}
RTIOsapiUtility_unusedParameter(deallocParams);
deallocParamsTmp.delete_pointers = (DDS_Boolean)deletePointers;
deallocParamsTmp.delete_optional_members = DDS_BOOLEAN_TRUE;
}
RTIBool HelloWorld_copy(
HelloWorld* dst,
const HelloWorld* src)
{
if (dst == NULL || src == NULL) {
return RTI_FALSE;
}
if (!RTICdrType_copyLong (
&dst->data,
&src->data)) {
return RTI_FALSE;
}
return RTI_TRUE;
}
#define T HelloWorld
#define TSeq HelloWorldSeq
#define T_initialize_w_params HelloWorld_initialize_w_params
#define T_finalize_w_params HelloWorld_finalize_w_params
#define T_copy HelloWorld_copy
#ifndef NDDS_STANDALONE_TYPE
#include "dds_c/generic/dds_c_sequence_TSeq.gen"
#else
#include "dds_c_sequence_TSeq.gen"
#endif
#undef T_copy
#undef T_finalize_w_params
#undef T_initialize_w_params
#undef TSeq
#undef T