void stop_reader (DDS_DomainParticipant part, Topic *tp) { tp->active = 0; printf ("* Stop monitoring (%s/%s)\r\n", tp->topic_name, tp->type_name); DDS_Subscriber_delete_datareader (tp->sub, tp->reader); DDS_DomainParticipant_delete_topic (part, tp->topic); DDS_DynamicTypeBuilderFactory_delete_type (tp->dtype); }
void test_dyn_array1 (void) { DDS_DynamicTypeSupport ts; DDS_DynamicTypeBuilder sb, abc20; DDS_TypeDescriptor *desc; DDS_MemberDescriptor *md; DDS_DynamicType s, ac20; DDS_BoundSeq bounds; DDS_DynamicData dd, dda, dd2; DDS_ReturnCode_t rc; unsigned i; v_printf ("test_dyn_array1 - "); /* 1. Create the type. */ desc = DDS_TypeDescriptor__alloc (); fail_unless (desc != NULL); desc->kind = DDS_STRUCTURE_TYPE; desc->name = "dstruct1"; sb = DDS_DynamicTypeBuilderFactory_create_type (desc); fail_unless (sb != NULL); md = DDS_MemberDescriptor__alloc (); fail_unless (md != NULL); DDS_SEQ_INIT (bounds); dds_seq_require (&bounds, 1); DDS_SEQ_LENGTH (bounds) = 1; DDS_SEQ_ITEM (bounds, 0) = 20; abc20 = DDS_DynamicTypeBuilderFactory_create_array_type ( DDS_DynamicTypeBuilderFactory_get_primitive_type (DDS_CHAR_8_TYPE), &bounds); fail_unless (abc20 != NULL); dds_seq_cleanup (&bounds); ac20 = DDS_DynamicTypeBuilder_build (abc20); fail_unless (ac20 != NULL); DDS_DynamicTypeBuilderFactory_delete_type (abc20); md->name = "char_a"; md->index = md->id = 0; md->type = ac20; rc = DDS_DynamicTypeBuilder_add_member (sb, md); fail_unless (rc == DDS_RETCODE_OK); s = DDS_DynamicTypeBuilder_build (sb); fail_unless (s != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb); ts = DDS_DynamicTypeSupport_create_type_support (s); fail_unless (ts != NULL); DDS_TypeDescriptor__free (desc); DDS_MemberDescriptor__free (md); /* 2. Create a Dynamic Data item for this type. */ dd = DDS_DynamicDataFactory_create_data (s); fail_unless (dd != NULL); dda = DDS_DynamicDataFactory_create_data (ac20); fail_unless (dda != NULL); for (i = 0; i < 20; i++) { SET_FIELD (dda, i, char8, i + '0'); } SET_FIELD (dd, 0, complex, dda); marshallDynamic (dd, &dd2, ts); DDS_DynamicDataFactory_delete_data (dd); DDS_DynamicDataFactory_delete_data (dda); DDS_DynamicTypeBuilderFactory_delete_type (ac20); DDS_DynamicTypeBuilderFactory_delete_type (s); DDS_DynamicTypeSupport_delete_type_support (ts); v_printf ("success!\r\n"); }
void test_dyn_oseq (void) { DDS_DynamicTypeSupport ts; DDS_DynamicTypeBuilder sb, oseqb; DDS_TypeDescriptor *desc; DDS_MemberDescriptor *md; DDS_DynamicType s, oseq; DDS_DynamicData dd, dda, dd2; DDS_ReturnCode_t rc; DDS_ByteSeq values; unsigned i; v_printf ("test_dyn_oseq - "); /* 1. Create the type. */ desc = DDS_TypeDescriptor__alloc (); fail_unless (desc != NULL); desc->kind = DDS_STRUCTURE_TYPE; desc->name = "dstruct3"; sb = DDS_DynamicTypeBuilderFactory_create_type (desc); fail_unless (sb != NULL); md = DDS_MemberDescriptor__alloc (); fail_unless (md != NULL); ADD_FIELD (sb, md, "anuint", 0, 0, DDS_UINT_32_TYPE); oseqb = DDS_DynamicTypeBuilderFactory_create_sequence_type ( DDS_DynamicTypeBuilderFactory_get_primitive_type (DDS_BYTE_TYPE), 0); fail_unless (oseqb != NULL); oseq = DDS_DynamicTypeBuilder_build (oseqb); fail_unless (oseq != NULL); DDS_DynamicTypeBuilderFactory_delete_type (oseqb); md->name = "oseq"; md->index = md->id = 1; md->type = oseq; rc = DDS_DynamicTypeBuilder_add_member (sb, md); fail_unless (rc == DDS_RETCODE_OK); ADD_FIELD (sb, md, "ch", 2, 2, DDS_CHAR_8_TYPE); s = DDS_DynamicTypeBuilder_build (sb); fail_unless (s != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb); ts = DDS_DynamicTypeSupport_create_type_support (s); fail_unless (ts != NULL); DDS_TypeDescriptor__free (desc); DDS_MemberDescriptor__free (md); /* 2. Create a Dynamic Data item for this type. */ dd = DDS_DynamicDataFactory_create_data (s); fail_unless (dd != NULL); dda = DDS_DynamicDataFactory_create_data (oseq); fail_unless (dda != NULL); SET_FIELD (dd, 0, uint32, 1000); DDS_SEQ_INIT (values); rc = dds_seq_require (&values, 21); fail_unless (rc == DDS_RETCODE_OK); for (i = 0; i < 21; i++) DDS_SEQ_ITEM (values, i) = i + '0'; rc = DDS_DynamicData_set_byte_values (dda, 0, &values); fail_unless (rc == DDS_RETCODE_OK); SET_FIELD (dd, 1, complex, dda); SET_FIELD (dd, 2, char8, 'X'); marshallDynamic (dd, &dd2, ts); DDS_DynamicDataFactory_delete_data (dd); DDS_DynamicDataFactory_delete_data (dda); DDS_DynamicTypeBuilderFactory_delete_type (oseq); DDS_DynamicTypeBuilderFactory_delete_type (s); DDS_DynamicTypeSupport_delete_type_support (ts); v_printf ("success!\r\n"); }
void test_dyn_array2 (void) { DDS_DynamicTypeSupport ts; DDS_DynamicTypeBuilder sb1, sb1a, abi64, abs1a; DDS_DynamicType s1, s1a, ai64, as1a; DDS_TypeDescriptor *desc; DDS_MemberDescriptor *md; DDS_DynamicData dd, dds, dda, ddas, dd2; DDS_ReturnCode_t rc; DDS_BoundSeq bounds; unsigned i, j; v_printf ("test_dyn_array2 - "); /* 1. Create the type. */ desc = DDS_TypeDescriptor__alloc (); fail_unless (desc != NULL); desc->kind = DDS_STRUCTURE_TYPE; desc->name = "dstruct2a"; sb1a = DDS_DynamicTypeBuilderFactory_create_type (desc); fail_unless (sb1a != NULL); md = DDS_MemberDescriptor__alloc (); fail_unless (md != NULL); DDS_SEQ_INIT (bounds); dds_seq_require (&bounds, 1); DDS_SEQ_LENGTH (bounds) = 1; DDS_SEQ_ITEM (bounds, 0) = 5; abi64 = DDS_DynamicTypeBuilderFactory_create_array_type ( DDS_DynamicTypeBuilderFactory_get_primitive_type (DDS_INT_64_TYPE), &bounds); fail_unless (abi64 != NULL); ai64 = DDS_DynamicTypeBuilder_build (abi64); fail_unless (ai64 != NULL); DDS_DynamicTypeBuilderFactory_delete_type (abi64); md->name = "i64"; md->index = md->id = 0; md->type = ai64; rc = DDS_DynamicTypeBuilder_add_member (sb1a, md); fail_unless (rc == DDS_RETCODE_OK); ADD_FIELD (sb1a, md, "ch", 1, 1, DDS_CHAR_8_TYPE); s1a = DDS_DynamicTypeBuilder_build (sb1a); fail_unless (s1a != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb1a); DDS_SEQ_ITEM (bounds, 0) = 7; abs1a = DDS_DynamicTypeBuilderFactory_create_array_type (s1a, &bounds); fail_unless (abs1a != NULL); dds_seq_cleanup (&bounds); as1a = DDS_DynamicTypeBuilder_build (abs1a); fail_unless (as1a != NULL); DDS_DynamicTypeBuilderFactory_delete_type (abs1a); desc->kind = DDS_STRUCTURE_TYPE; desc->name = "dstruct2"; sb1 = DDS_DynamicTypeBuilderFactory_create_type (desc); fail_unless (sb1 != NULL); ADD_FIELD (sb1, md, "c", 0, 0, DDS_CHAR_8_TYPE); md->name = "str2"; md->index = md->id = 1; md->type = as1a; rc = DDS_DynamicTypeBuilder_add_member (sb1, md); fail_unless (rc == DDS_RETCODE_OK); ADD_FIELD (sb1, md, "u16", 2, 2, DDS_UINT_16_TYPE); s1 = DDS_DynamicTypeBuilder_build (sb1); fail_unless (s1 != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb1); ts = DDS_DynamicTypeSupport_create_type_support (s1); fail_unless (ts != NULL); DDS_TypeDescriptor__free (desc); DDS_MemberDescriptor__free (md); /* 2. Create a Dynamic Data item for this type. */ dd = DDS_DynamicDataFactory_create_data (s1); fail_unless (dd != NULL); ddas = DDS_DynamicDataFactory_create_data (as1a); fail_unless (ddas != NULL); SET_FIELD (dd, 0, char8, 'A'); for (i = 0; i < 7; i++) { dds = DDS_DynamicDataFactory_create_data (s1a); fail_unless (dds != NULL); dda = DDS_DynamicDataFactory_create_data (ai64); fail_unless (dda != NULL); for (j = 0; j < 5; j++) { SET_FIELD (dda, j, int64, ((i + 6) * j) << i); } SET_FIELD (dds, 0, complex, dda); DDS_DynamicDataFactory_delete_data (dda); SET_FIELD (dds, 1, char8, i + 0x30); SET_FIELD (ddas, i, complex, dds); DDS_DynamicDataFactory_delete_data (dds); } SET_FIELD (dd, 1, complex, ddas); DDS_DynamicDataFactory_delete_data (ddas); SET_FIELD (dd, 2, uint16, 1366); marshallDynamic (dd, &dd2, ts); DDS_DynamicDataFactory_delete_data (dd); DDS_DynamicTypeBuilderFactory_delete_type (s1); DDS_DynamicTypeBuilderFactory_delete_type (as1a); DDS_DynamicTypeBuilderFactory_delete_type (s1a); DDS_DynamicTypeBuilderFactory_delete_type (ai64); DDS_DynamicTypeSupport_delete_type_support (ts); v_printf ("success!\r\n"); }
void test_dyn_map1 (void) { DDS_DynamicTypeSupport ts; DDS_DynamicTypeBuilder sb1, mb, sb; DDS_DynamicType s1, s, m; DDS_TypeDescriptor *desc; DDS_MemberDescriptor *md; DDS_DynamicData dd, dd2, ddm; DDS_ReturnCode_t rc; v_printf ("test_dyn_map1 - "); /* 1. Create the type. */ desc = DDS_TypeDescriptor__alloc (); fail_unless (desc != NULL); md = DDS_MemberDescriptor__alloc (); fail_unless (md != NULL); sb = DDS_DynamicTypeBuilderFactory_create_string_type (50); fail_unless (sb != NULL); s = DDS_DynamicTypeBuilder_build (sb); fail_unless (s != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb); mb = DDS_DynamicTypeBuilderFactory_create_map_type ( DDS_DynamicTypeBuilderFactory_get_primitive_type (DDS_INT_32_TYPE), s, DDS_UNBOUNDED_COLLECTION); fail_unless (mb != NULL); m = DDS_DynamicTypeBuilder_build (mb); fail_unless (m != NULL); DDS_DynamicTypeBuilderFactory_delete_type (mb); desc->kind = DDS_STRUCTURE_TYPE; desc->name = "dmap1"; sb1 = DDS_DynamicTypeBuilderFactory_create_type (desc); fail_unless (sb1 != NULL); md->name = "m"; md->id = 0; md->type = m; md->index = 0; fail_unless (md->type != NULL); rc = DDS_DynamicTypeBuilder_add_member (sb1, md); fail_unless (rc == DDS_RETCODE_OK); md->name = "b"; md->id = 1; md->type = DDS_DynamicTypeBuilderFactory_get_primitive_type (DDS_INT_64_TYPE); md->index = 1; fail_unless (md->type != NULL); rc = DDS_DynamicTypeBuilder_add_member (sb1, md); fail_unless (rc == DDS_RETCODE_OK); s1 = DDS_DynamicTypeBuilder_build (sb1); fail_unless (s1 != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb1); ts = DDS_DynamicTypeSupport_create_type_support (s1); fail_unless (ts != NULL); DDS_TypeDescriptor__free (desc); DDS_MemberDescriptor__free (md); DDS_TypeSupport_dump_type (0, (DDS_TypeSupport) ts, 15); /* 2. Create a Dynamic data item for this type. */ ddm = DDS_DynamicDataFactory_create_data (m); md->name = "key"; md->id = DDS_DynamicData_get_member_id_by_name (ddm, "alfa"); md->type = DDS_DynamicTypeBuilderFactory_get_primitive_type (DDS_INT_32_TYPE); md->default_value = "0"; md->index = 0; md->default_label = 0; dd = DDS_DynamicDataFactory_create_data (s1); fail_unless (dd != NULL); rc = DDS_DynamicData_set_int32_value (dd, 0, 0xCAFEBABE); fail_unless (rc == DDS_RETCODE_OK); rc = DDS_DynamicData_set_int64_value (dd, 1, -1); fail_unless (rc == DDS_RETCODE_OK); marshallDynamic (dd, &dd2, ts); DDS_DynamicDataFactory_delete_data (dd); DDS_DynamicTypeBuilderFactory_delete_type (s1); DDS_DynamicTypeSupport_delete_type_support (ts); v_printf ("success!\r\n"); }
void start_reader (DDS_DomainParticipant part, Topic *tp) { Endpoint *wp; DDS_DynamicTypeBuilder tb; DDS_TypeObject tobj; DDS_TopicDescription td; DDS_DataReaderQos rqos; static DDS_Subscriber sub = NULL; wp = tp->writers; if (!wp) return; printf ("* Monitor (%s/%s)\r\n", tp->topic_name, tp->type_name); if (!tp->ts) { tobj = DDS_TypeObject_create_from_key (part, &wp->data.participant_key, &wp->data.key); if (!tobj) { printf ("No type information available for %s!\r\n", tp->type_name); return; } tb = DDS_DynamicTypeBuilderFactory_create_type_w_type_object (tobj); if (!tb) fatal ("Can't get Type from Type object for %s!", tp->type_name); DDS_TypeObject_delete (tobj); tp->dtype = DDS_DynamicTypeBuilder_build (tb); if (!tp->dtype) fatal ("Can't get build Type from Type builder for %s!", tp->type_name); DDS_DynamicTypeBuilderFactory_delete_type (tb); tp->ts = DDS_DynamicTypeSupport_create_type_support (tp->dtype); if (!tp->ts) fatal ("Can't get TypeSupport from Type for %s!", tp->type_name); if (DDS_DynamicTypeSupport_register_type (tp->ts, part, tp->type_name)) fatal ("Can't register TypeSupport in domain for %s!", tp->topic_name); } if (!sub) { sub = DDS_DomainParticipant_create_subscriber (part, NULL, NULL, 0); if (!sub) fatal ("Can't create subscriber!"); } tp->topic = DDS_DomainParticipant_create_topic (part, tp->topic_name, tp->type_name, NULL, NULL, 0); if (!tp->topic) fatal ("Can't create topic!"); td = DDS_DomainParticipant_lookup_topicdescription (part, tp->topic_name); if (!td) fatal ("Can't create topic description!"); DDS_Subscriber_get_default_datareader_qos (sub, &rqos); if (wp->data.durability.kind >= DDS_TRANSIENT_LOCAL_DURABILITY_QOS) rqos.durability.kind = DDS_TRANSIENT_LOCAL_DURABILITY_QOS; rqos.reliability = wp->data.reliability; listener.cookie = tp; tp->sub = sub; tp->reader = DDS_Subscriber_create_datareader (sub, td, &rqos, &listener, DDS_DATA_AVAILABLE_STATUS); tp->active = 1; }
void test_dyn_mutable2 (void) { DDS_DynamicTypeSupport ts; DDS_DynamicTypeBuilder sb2, stb, sstb; DDS_DynamicType s2, st, sst; DDS_TypeDescriptor *desc; DDS_MemberDescriptor *md; DDS_DynamicData dd, dd2, dds; DDS_ReturnCode_t rc; DDS_StringSeq ss; unsigned n; char *strings [] = { "Hi there", "blabla", "\0", NULL, "got here", "not yet done", "", "num8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "done :)" }; v_printf ("test_mutable2 - "); /* 1. Create the type. */ desc = DDS_TypeDescriptor__alloc (); fail_unless (desc != NULL); desc->kind = DDS_STRUCTURE_TYPE; desc->name = "dstruct2m"; sb2 = DDS_DynamicTypeBuilderFactory_create_type (desc); fail_unless (sb2 != NULL); md = DDS_MemberDescriptor__alloc (); fail_unless (md != NULL); ADD_FIELD (sb2, md, "u16", 0, 5, DDS_UINT_16_TYPE); set_key_annotation (sb2, "u16"); stb = DDS_DynamicTypeBuilderFactory_create_string_type (DDS_UNBOUNDED_COLLECTION); fail_unless (stb != NULL); st = DDS_DynamicTypeBuilder_build (stb); fail_unless (st != NULL); DDS_DynamicTypeBuilderFactory_delete_type (stb); sstb = DDS_DynamicTypeBuilderFactory_create_sequence_type (st, DDS_UNBOUNDED_COLLECTION); fail_unless (sstb != NULL); sst = DDS_DynamicTypeBuilder_build (sstb); fail_unless (sst != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sstb); md->name = "s"; md->index = 1; md->id = 6; md->type = sst; rc = DDS_DynamicTypeBuilder_add_member (sb2, md); fail_unless (rc == DDS_RETCODE_OK); set_ext_annotation (sb2, "MUTABLE_EXTENSIBILITY"); s2 = DDS_DynamicTypeBuilder_build (sb2); fail_unless (s2 != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb2); ts = DDS_DynamicTypeSupport_create_type_support (s2); fail_unless (ts != NULL); DDS_TypeDescriptor__free (desc); DDS_MemberDescriptor__free (md); /* 2. Create a Dynamic data item for this type. */ DDS_SEQ_INIT (ss); dds_seq_from_array (&ss, strings, sizeof (strings) / sizeof (char *)); for (n = 0; n <= DDS_SEQ_MAXIMUM (ss); n++) { dd = DDS_DynamicDataFactory_create_data (s2); fail_unless (dd != NULL); SET_FIELD (dd, 5, uint16, n); dds = DDS_DynamicDataFactory_create_data (sst); fail_unless (dds != NULL); DDS_SEQ_LENGTH (ss) = n; rc = DDS_DynamicData_set_string_values (dds, 0, &ss); fail_unless (rc == DDS_RETCODE_OK); SET_FIELD (dd, 6, complex, dds); marshallDynamic (dd, &dd2, ts); DDS_DynamicDataFactory_delete_data (dd); DDS_DynamicDataFactory_delete_data (dds); if (n > 2) { n += 3; if (n == 18) n++; } } dds_seq_cleanup (&ss); DDS_DynamicTypeBuilderFactory_delete_type (s2); DDS_DynamicTypeBuilderFactory_delete_type (sst); DDS_DynamicTypeBuilderFactory_delete_type (st); DDS_DynamicTypeSupport_delete_type_support (ts); set_key_annotation (NULL, NULL); set_ext_annotation (NULL, NULL); v_printf ("success!\r\n"); }
void test_dyn_mutable1 (void) { DDS_DynamicTypeSupport ts; DDS_DynamicTypeBuilder sb2, ostb; DDS_DynamicType s2, ot, ost; DDS_TypeDescriptor *desc; DDS_MemberDescriptor *md; DDS_DynamicData dd, dd2, dds; DDS_ReturnCode_t rc; DDS_ByteSeq bseq; unsigned char values [] = { 0x22, 0x33, 0x4f, 0x5e, 0x6d, 0x7c, 0x8b }; v_printf ("test_mutable1 - "); /* 1. Create the type. */ desc = DDS_TypeDescriptor__alloc (); fail_unless (desc != NULL); desc->kind = DDS_STRUCTURE_TYPE; desc->name = "dstruct1m"; sb2 = DDS_DynamicTypeBuilderFactory_create_type (desc); fail_unless (sb2 != NULL); md = DDS_MemberDescriptor__alloc (); fail_unless (md != NULL); ADD_FIELD (sb2, md, "i16", 0, 99, DDS_INT_16_TYPE); set_id_annotation (sb2, "i16", 20); ADD_FIELD (sb2, md, "u32", 1, 2, DDS_UINT_32_TYPE); set_key_annotation (sb2, "u32"); ADD_FIELD (sb2, md, "i32", 2, 100, DDS_INT_32_TYPE); set_id_annotation (sb2, "i32", 50); ADD_FIELD (sb2, md, "u16", 0, DDS_MEMBER_ID_INVALID, DDS_UINT_16_TYPE); set_id_annotation (sb2, "u16", 10); set_key_annotation (sb2, "u16"); ADD_FIELD (sb2, md, "u64", 5, 51, DDS_UINT_64_TYPE); ADD_FIELD (sb2, md, "i64", 5, DDS_MEMBER_ID_INVALID, DDS_INT_64_TYPE); ADD_FIELD (sb2, md, "fl", 6, 53, DDS_FLOAT_32_TYPE); ADD_FIELD (sb2, md, "d", 7, 54, DDS_FLOAT_64_TYPE); ADD_FIELD (sb2, md, "ch", 8, 55, DDS_CHAR_8_TYPE); set_id_annotation (sb2, "ch", 5); set_key_annotation (sb2, "ch"); set_id_annotation (sb2, "fl", 4); ot = DDS_DynamicTypeBuilderFactory_get_primitive_type (DDS_BYTE_TYPE); fail_unless (ot != NULL); ostb = DDS_DynamicTypeBuilderFactory_create_sequence_type (ot, DDS_UNBOUNDED_COLLECTION); fail_unless (ostb != NULL); ost = DDS_DynamicTypeBuilder_build (ostb); fail_unless (ost != NULL); DDS_DynamicTypeBuilderFactory_delete_type (ostb); md->name = "s"; md->index = 9; md->id = 9; md->type = ost; rc = DDS_DynamicTypeBuilder_add_member (sb2, md); fail_unless (rc == DDS_RETCODE_OK); set_ext_annotation (sb2, "MUTABLE_EXTENSIBILITY"); s2 = DDS_DynamicTypeBuilder_build (sb2); fail_unless (s2 != NULL); DDS_DynamicTypeBuilderFactory_delete_type (sb2); ts = DDS_DynamicTypeSupport_create_type_support (s2); fail_unless (ts != NULL); DDS_TypeDescriptor__free (desc); DDS_MemberDescriptor__free (md); /* 2. Create a Dynamic data item for this type. */ dd = DDS_DynamicDataFactory_create_data (s2); fail_unless (dd != NULL); SET_FIELD (dd, 50, int32, -5); SET_FIELD (dd, 10, uint16, 0xDEAD); SET_FIELD (dd, 20, int16, INT16_MIN); SET_FIELD (dd, 2, uint32, UINT32_MAX); SET_FIELD (dd, 52, int64, 100); SET_FIELD (dd, 4, float32, 0.5f); SET_FIELD (dd, 54, float64, 100e-5); SET_FIELD (dd, 5, char8, 'd'); SET_FIELD (dd, 51, uint64, 5010000); dds = DDS_DynamicDataFactory_create_data (ost); fail_unless (dds != NULL); DDS_SEQ_INIT (bseq); dds_seq_from_array (&bseq, values, sizeof (values)); rc = DDS_DynamicData_set_byte_values (dds, 0, &bseq); dds_seq_cleanup (&bseq); fail_unless (rc == DDS_RETCODE_OK); SET_FIELD (dd, 9, complex, dds); marshallDynamic (dd, &dd2, ts); DDS_DynamicDataFactory_delete_data (dd); DDS_DynamicDataFactory_delete_data (dds); DDS_DynamicTypeBuilderFactory_delete_type (s2); DDS_DynamicTypeBuilderFactory_delete_type (ost); DDS_DynamicTypeSupport_delete_type_support (ts); set_id_annotation (NULL, NULL, 0); set_key_annotation (NULL, NULL); set_ext_annotation (NULL, NULL); v_printf ("success!\r\n"); }