summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm/tests/VariousTopicsEvent/Base/VTopic_Base.idl
blob: 2963487e229575b3e14b7857e18afc92e3d86c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// $Id$

/**
 * @file   VTopic_Base.idl
 * @author Marijke Hengstmengel <mhengstmengel@remedy.nl>
 */

#ifndef VTOPIC_BASE_IDL
#define VTOPIC_BASE_IDL

#pragma ndds typesupport "Base/VTopic_BaseSupport.h"

// Plain topic
struct TestTopic {
  string key; //@key
  long x;
};

// String
struct TopicString {
  string key; //@key
  string x_str;
};

// Arrays
struct TopicArray {
  string key; //@key
  octet x_array[5];
 };

// Unions
union X_Union switch (short) {
    case 0:
      string x_test;
    case 1:
      long   x_long;
};

struct TopicUnion {
  string key; //@key
  X_Union x_uni;

};

// Sequence
struct test {
  short x_test;
  string x_teststr;
};
typedef sequence<test> test_seq;

struct TopicSeq {
  string key; //@key
  test_seq x_seq;
};

// ValueType
valuetype X_Valuetype {
  public string type;
  public long x_long;
};

struct TopicValuetype {
  string key; //@key
  X_Valuetype x_vt;
};

// Sequences
typedef sequence<TestTopic> TestTopic_Seq;
typedef sequence<TopicString> TopicString_Seq;
typedef sequence<TopicArray> TopicArray_Seq;
typedef sequence<TopicUnion> TopicUnion_Seq;
typedef sequence<TopicSeq> TopicSeq_Seq;
typedef sequence<TopicValuetype> TopicValuetype_Seq;

#endif