zomg 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Manifest.txt +237 -0
- data/README.txt +59 -0
- data/Rakefile +34 -0
- data/bin/omfg +56 -0
- data/lib/scanner.rex +169 -0
- data/lib/yacc.y +861 -0
- data/lib/zomg.rb +22 -0
- data/lib/zomg/idl.rb +14 -0
- data/lib/zomg/idl/lexer.rb +2151 -0
- data/lib/zomg/idl/nodes/attribute.rb +15 -0
- data/lib/zomg/idl/nodes/binary.rb +19 -0
- data/lib/zomg/idl/nodes/constant.rb +15 -0
- data/lib/zomg/idl/nodes/interface.rb +13 -0
- data/lib/zomg/idl/nodes/interface_header.rb +14 -0
- data/lib/zomg/idl/nodes/member.rb +14 -0
- data/lib/zomg/idl/nodes/node.rb +52 -0
- data/lib/zomg/idl/nodes/operation.rb +17 -0
- data/lib/zomg/idl/nodes/parameter.rb +18 -0
- data/lib/zomg/idl/nodes/typedef.rb +13 -0
- data/lib/zomg/idl/nodes/union.rb +14 -0
- data/lib/zomg/idl/parser.rb +54 -0
- data/lib/zomg/idl/scanner.rb +367 -0
- data/lib/zomg/idl/visitable.rb +15 -0
- data/lib/zomg/idl/visitors/duhr.rb +24 -0
- data/lib/zomg/idl/visitors/ruby_sexp.rb +173 -0
- data/lib/zomg/idl/visitors/sexp.rb +274 -0
- data/lib/zomg/version.rb +3 -0
- data/test/assets/array/array1.idl +60 -0
- data/test/assets/array/array2.idl +38 -0
- data/test/assets/array/array3.idl +8 -0
- data/test/assets/array/array4.idl +7 -0
- data/test/assets/array/array5.idl +80 -0
- data/test/assets/attribute/grid_0attribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_0methods.idl +19 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_1methods.idl +19 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_2methods.idl +17 -0
- data/test/assets/attribute/grid_1ROattribs_1methods.idl +16 -0
- data/test/assets/attribute/grid_1ROattribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_1attribs_1methods.idl +17 -0
- data/test/assets/attribute/grid_1attribs_2methods.idl +17 -0
- data/test/assets/attribute/grid_2ROattribs_0methods.idl +16 -0
- data/test/assets/attribute/grid_2ROattribs_1methods.idl +16 -0
- data/test/assets/attribute/grid_2ROattribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_2attribs_0methods.idl +19 -0
- data/test/assets/attribute/grid_2attribs_1methods.idl +19 -0
- data/test/assets/attribute/grid_2attribs_2methods.idl +19 -0
- data/test/assets/comment/c_style_comments.idl +63 -0
- data/test/assets/comment/comment1.idl +57 -0
- data/test/assets/comment/cpp_style_comments.idl +168 -0
- data/test/assets/comment/shortform.idl +0 -0
- data/test/assets/complex/TestCodeSets.idl +10 -0
- data/test/assets/complex/TestIntfContext.idl +13 -0
- data/test/assets/complex/TestIntfLongLong.idl +51 -0
- data/test/assets/complex/TestIntfWChar.idl +52 -0
- data/test/assets/complex/any1.idl +22 -0
- data/test/assets/complex/complex1.idl +495 -0
- data/test/assets/complex/complex2.idl +730 -0
- data/test/assets/complex/complex3.idl +181 -0
- data/test/assets/complex/complex4.idl +181 -0
- data/test/assets/complex/interop_wchar.idl +60 -0
- data/test/assets/constant/constant1.idl +37 -0
- data/test/assets/constant/constant2.idl +29 -0
- data/test/assets/constant/constant3.idl +50 -0
- data/test/assets/constant/constant4.idl +21 -0
- data/test/assets/constant/constant5.idl +65 -0
- data/test/assets/constant/constant6.idl +144 -0
- data/test/assets/constant/constant7.idl +30 -0
- data/test/assets/enum/enum1.idl +13 -0
- data/test/assets/exception/TestIntfExceptions.idl +69 -0
- data/test/assets/exception/TestIntfExceptionsExt_2_0.idl +34 -0
- data/test/assets/exception/TestIntfExceptionsExt_2_3.idl +24 -0
- data/test/assets/exception/ex1.idl +6 -0
- data/test/assets/exception/ex2.idl +18 -0
- data/test/assets/exception/ex3.idl +10 -0
- data/test/assets/exception/ex4.idl +20 -0
- data/test/assets/exception/sc.idl +0 -0
- data/test/assets/exception/simple1.idl +18 -0
- data/test/assets/exception/simple2.idl +25 -0
- data/test/assets/factory/factory1.idl +77 -0
- data/test/assets/factory/objref.idl +25 -0
- data/test/assets/forward/forward.idl +15 -0
- data/test/assets/forward/forward1.idl +13 -0
- data/test/assets/forward/fwd_incl1.idl +6 -0
- data/test/assets/forward/fwd_incl2.idl +7 -0
- data/test/assets/include/a.idl +23 -0
- data/test/assets/include/b.idl +16 -0
- data/test/assets/include/employee.idl +12 -0
- data/test/assets/include/include1.idl +10 -0
- data/test/assets/include/include2.idl +5 -0
- data/test/assets/include/manager.idl +10 -0
- data/test/assets/include/pragma.idl +41 -0
- data/test/assets/include/rookie.idl +13 -0
- data/test/assets/include/rookiemanager.idl +15 -0
- data/test/assets/include/sample.idl +58 -0
- data/test/assets/include/sample_incl.idl +406 -0
- data/test/assets/inherit/IDL1.idl +18 -0
- data/test/assets/inherit/IDL2.idl +18 -0
- data/test/assets/inherit/IDL3.idl +18 -0
- data/test/assets/inherit/IDL4.idl +17 -0
- data/test/assets/inherit/diamond_inheritance.idl +31 -0
- data/test/assets/inherit/inherit.idl +27 -0
- data/test/assets/limit/longidentifiers.idl +25 -0
- data/test/assets/limit/namelens.idl +26 -0
- data/test/assets/limit/tpztest.idl +21 -0
- data/test/assets/module/module1.idl +29 -0
- data/test/assets/module/module2.idl +34 -0
- data/test/assets/module/module3.idl +20 -0
- data/test/assets/module/module4.idl +15 -0
- data/test/assets/nested/nested1.idl +5 -0
- data/test/assets/nested/nested2.idl +11 -0
- data/test/assets/operations/Benchmark.idl +331 -0
- data/test/assets/operations/CCS.idl +82 -0
- data/test/assets/operations/TestIntf.idl +40 -0
- data/test/assets/operations/TestIntfBasic.idl +653 -0
- data/test/assets/operations/atomic.idl +40 -0
- data/test/assets/operations/dif2.idl +48 -0
- data/test/assets/operations/interface1.idl +16 -0
- data/test/assets/operations/parameters.idl +111 -0
- data/test/assets/operations/perf.idl +84 -0
- data/test/assets/operations/timer.idl +104 -0
- data/test/assets/preprocess/base_for_diamond_inheritance_with_macros.idl +17 -0
- data/test/assets/preprocess/basic_macro_marshalling.idl +54 -0
- data/test/assets/preprocess/diamond_inheritance_with_macros.idl +74 -0
- data/test/assets/preprocess/macro1.idl +52 -0
- data/test/assets/preprocess/preprocess1.idl +246 -0
- data/test/assets/preprocess/preprocess2.idl +3 -0
- data/test/assets/recursion/loop.idl +28 -0
- data/test/assets/recursion/recursion1.idl +47 -0
- data/test/assets/recursion/recursion2.idl +74 -0
- data/test/assets/scenarios/filestat.idl +69 -0
- data/test/assets/scenarios/gateway.idl +176 -0
- data/test/assets/scenarios/library.idl +20 -0
- data/test/assets/scenarios/phone.idl +24 -0
- data/test/assets/scenarios/ticketservice.idl +118 -0
- data/test/assets/scope/scope01.idl +58 -0
- data/test/assets/scope/scope02.idl +25 -0
- data/test/assets/scope/scope03.idl +22 -0
- data/test/assets/scope/scope04.idl +27 -0
- data/test/assets/scope/scope05.idl +30 -0
- data/test/assets/scope/scope06.idl +51 -0
- data/test/assets/scope/scope07.idl +20 -0
- data/test/assets/scope/scope08.idl +88 -0
- data/test/assets/scope/scope09.idl +21 -0
- data/test/assets/scope/scope10.idl +95 -0
- data/test/assets/scope/scope11.idl +62 -0
- data/test/assets/scope/scope12.idl +117 -0
- data/test/assets/scope/scope13.idl +117 -0
- data/test/assets/scope/scope14.idl +117 -0
- data/test/assets/scope/scope15.idl +117 -0
- data/test/assets/scope/scope16.idl +117 -0
- data/test/assets/scope/scope17.idl +117 -0
- data/test/assets/scope/scope18.idl +117 -0
- data/test/assets/scope/scope19.idl +117 -0
- data/test/assets/scope/scope20.idl +215 -0
- data/test/assets/scope/scope21.idl +215 -0
- data/test/assets/scope/scope22.idl +205 -0
- data/test/assets/scope/scope23.idl +261 -0
- data/test/assets/scope/scope24.idl +376 -0
- data/test/assets/scope/scope25.idl +266 -0
- data/test/assets/scope/scope26.idl +180 -0
- data/test/assets/scope/scope27.idl +184 -0
- data/test/assets/scope/scope28.idl +182 -0
- data/test/assets/scope/scope29.idl +182 -0
- data/test/assets/scope/scope30.idl +40 -0
- data/test/assets/scope/scope31.idl +33 -0
- data/test/assets/scope/scope32.idl +37 -0
- data/test/assets/scope/scope33.idl +50 -0
- data/test/assets/scope/scope34.idl +97 -0
- data/test/assets/scope/scope35.idl +72 -0
- data/test/assets/scope/scope36.idl +167 -0
- data/test/assets/scope/scope37.idl +57 -0
- data/test/assets/scope/scope38.idl +38 -0
- data/test/assets/scope/scope39.idl +38 -0
- data/test/assets/scope/scope40.idl +38 -0
- data/test/assets/scope/scope41.idl +24 -0
- data/test/assets/scope/scope42.idl +64 -0
- data/test/assets/scope/scope43.idl +66 -0
- data/test/assets/scope/scope44.idl +52 -0
- data/test/assets/sequence/sequence1.idl +24 -0
- data/test/assets/sequence/sequence2.idl +9 -0
- data/test/assets/simple/basictypes1.idl +80 -0
- data/test/assets/simple/basictypes2.idl +197 -0
- data/test/assets/simple/basictypes3.idl +23 -0
- data/test/assets/simple/basictypes4.idl +73 -0
- data/test/assets/simple/basictypes5.idl +29 -0
- data/test/assets/simple/basictypes6.idl +63 -0
- data/test/assets/simple/simple1.idl +45 -0
- data/test/assets/simple/simple2.idl +61 -0
- data/test/assets/simple/simple3.idl +36 -0
- data/test/assets/string/string1.idl +11 -0
- data/test/assets/string/string2.idl +29 -0
- data/test/assets/struct/struct1.idl +20 -0
- data/test/assets/struct/struct2.idl +21 -0
- data/test/assets/struct/struct3.idl +42 -0
- data/test/assets/struct/struct4.idl +57 -0
- data/test/assets/struct/struct5.idl +71 -0
- data/test/assets/typecode/orb.idl +0 -0
- data/test/assets/typecode/pseudo.idl +25 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideIF.idl +17 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideIF_noMO.idl +16 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideMO.idl +17 -0
- data/test/assets/typedef/shorthand_typedef_struct_outsideMO.idl +17 -0
- data/test/assets/typedef/typedef1.idl +8 -0
- data/test/assets/typedef/typedef2.idl +22 -0
- data/test/assets/typedef/typedef_struct_insideIF.idl +18 -0
- data/test/assets/typedef/typedef_struct_insideMO.idl +18 -0
- data/test/assets/typedef/typedef_struct_outsideMO.idl +18 -0
- data/test/assets/union/union1.idl +31 -0
- data/test/assets/union/union2.idl +22 -0
- data/test/assets/union/union3.idl +26 -0
- data/test/conversions/test_attribute.rb +30 -0
- data/test/conversions/test_enum.rb +25 -0
- data/test/conversions/test_exception.rb +24 -0
- data/test/conversions/test_forward_declaration.rb +22 -0
- data/test/conversions/test_interface.rb +30 -0
- data/test/conversions/test_module.rb +24 -0
- data/test/conversions/test_struct.rb +25 -0
- data/test/conversions/test_typedef.rb +22 -0
- data/test/conversions/test_union.rb +27 -0
- data/test/conversions/test_value_box_dcl.rb +22 -0
- data/test/helper.rb +23 -0
- data/test/simple/test_basictypes1.rb +87 -0
- data/test/simple/test_basictypes2.rb +18 -0
- data/test/simple/test_basictypes3.rb +32 -0
- data/test/simple/test_basictypes4.rb +25 -0
- data/test/simple/test_basictypes5.rb +17 -0
- data/test/simple/test_basictypes6.rb +19 -0
- data/test/simple/test_simple1.rb +40 -0
- data/test/simple/test_simple2.rb +48 -0
- data/test/simple/test_simple3.rb +20 -0
- data/test/test_array.rb +22 -0
- data/test/test_assets.rb +33 -0
- data/test/test_complex.rb +17 -0
- data/test/test_node.rb +15 -0
- data/test/test_parser.rb +17 -0
- data/test/test_scanner.rb +234 -0
- metadata +336 -0
@@ -0,0 +1,74 @@
|
|
1
|
+
struct ta {
|
2
|
+
struct tb {
|
3
|
+
long a;
|
4
|
+
double b;
|
5
|
+
short c;
|
6
|
+
} a;
|
7
|
+
|
8
|
+
struct tc {
|
9
|
+
char a;
|
10
|
+
string b;
|
11
|
+
#ifndef OPENORB
|
12
|
+
sequence<tc> c;
|
13
|
+
#endif
|
14
|
+
} b;
|
15
|
+
struct td {
|
16
|
+
tb a;
|
17
|
+
struct te {
|
18
|
+
char a;
|
19
|
+
char b;
|
20
|
+
char c;
|
21
|
+
char d;
|
22
|
+
#ifndef OPENORB
|
23
|
+
tdSeq e;
|
24
|
+
#endif
|
25
|
+
} b;
|
26
|
+
} c;
|
27
|
+
sequence<ta> next;
|
28
|
+
tb d;
|
29
|
+
tc e;
|
30
|
+
td f;
|
31
|
+
};
|
32
|
+
|
33
|
+
struct tb {
|
34
|
+
ta::tb a;
|
35
|
+
ta::td b;
|
36
|
+
sequence<ta::td> c;
|
37
|
+
sequence<tb> d;
|
38
|
+
};
|
39
|
+
|
40
|
+
enum tc_enum { NORTH, EAST, WEST, SOUTH, DOWN };
|
41
|
+
|
42
|
+
union td_union switch (long) {
|
43
|
+
case 1:
|
44
|
+
ta one;
|
45
|
+
case 2:
|
46
|
+
tb two;
|
47
|
+
case 3:
|
48
|
+
union te switch (tc_enum) {
|
49
|
+
case NORTH: long x;
|
50
|
+
case EAST: double y;
|
51
|
+
case WEST: boolean z;
|
52
|
+
case SOUTH: tb s;
|
53
|
+
#ifndef OPENORB
|
54
|
+
case DOWN:
|
55
|
+
union tu switch (boolean) {
|
56
|
+
case TRUE: sequence<td,1> next;
|
57
|
+
} u;
|
58
|
+
#endif
|
59
|
+
} three;
|
60
|
+
default:sequence<td_union> again;
|
61
|
+
};
|
62
|
+
|
63
|
+
interface obj {
|
64
|
+
|
65
|
+
attribute long my_attr;
|
66
|
+
|
67
|
+
typedef obj my_obj;
|
68
|
+
|
69
|
+
my_obj get_server();
|
70
|
+
void set_server(in my_obj srvr);
|
71
|
+
|
72
|
+
td_union convert(inout ta a1, in tb b1, out tc_enum c1);
|
73
|
+
|
74
|
+
};
|
@@ -0,0 +1,69 @@
|
|
1
|
+
#define _my_ST_FSTYPSZ 16
|
2
|
+
|
3
|
+
typedef unsigned long my_ulong_t;
|
4
|
+
|
5
|
+
typedef my_ulong_t my_dev_t;
|
6
|
+
typedef my_ulong_t my_ino_t;
|
7
|
+
typedef my_ulong_t my_mode_t;
|
8
|
+
typedef my_ulong_t my_nlink_t;
|
9
|
+
typedef long my_uid_t;
|
10
|
+
typedef my_uid_t my_gid_t;
|
11
|
+
typedef long my_off_t;
|
12
|
+
typedef long my_time_t;
|
13
|
+
|
14
|
+
struct my_timespec { /* definition per POSIX.4 */
|
15
|
+
my_time_t my_tv_sec; /* seconds */
|
16
|
+
long my_tv_nsec; /* and nanoseconds */
|
17
|
+
};
|
18
|
+
|
19
|
+
typedef my_timespec my_timestruc_t; /* definition per SVr4 */
|
20
|
+
|
21
|
+
interface test {
|
22
|
+
struct my_stat {
|
23
|
+
my_dev_t st_dev;
|
24
|
+
long st_pad1[3]; /* reserve for dev expansion, */
|
25
|
+
/* sysid definition */
|
26
|
+
my_ino_t st_ino;
|
27
|
+
my_mode_t st_mode;
|
28
|
+
my_nlink_t st_nlink;
|
29
|
+
my_uid_t st_uid;
|
30
|
+
my_gid_t st_gid;
|
31
|
+
my_dev_t st_rdev;
|
32
|
+
long st_pad2[2];
|
33
|
+
my_off_t st_size;
|
34
|
+
long st_pad3; /* reserve pad for future off_t expansion */
|
35
|
+
my_timestruc_t st_atime;
|
36
|
+
my_timestruc_t st_mtime;
|
37
|
+
my_timestruc_t st_ctime;
|
38
|
+
long st_blksize;
|
39
|
+
long st_blocks;
|
40
|
+
char st_fstype[_my_ST_FSTYPSZ];
|
41
|
+
long st_pad4[8]; /* expansion area */
|
42
|
+
};
|
43
|
+
|
44
|
+
struct entry {
|
45
|
+
string<255> filename;
|
46
|
+
my_stat info;
|
47
|
+
};
|
48
|
+
|
49
|
+
struct inner {
|
50
|
+
long a;
|
51
|
+
long b;
|
52
|
+
};
|
53
|
+
|
54
|
+
struct outer {
|
55
|
+
inner a;
|
56
|
+
inner b;
|
57
|
+
};
|
58
|
+
|
59
|
+
typedef sequence<entry> directory;
|
60
|
+
typedef sequence<long> longlist;
|
61
|
+
typedef sequence<outer> structlist;
|
62
|
+
|
63
|
+
long dir(in directory entries);
|
64
|
+
long lng(in longlist entries);
|
65
|
+
long strct(in structlist entries);
|
66
|
+
};
|
67
|
+
|
68
|
+
/* End of file. */
|
69
|
+
|
@@ -0,0 +1,176 @@
|
|
1
|
+
module TOR
|
2
|
+
{
|
3
|
+
|
4
|
+
// Status flag
|
5
|
+
|
6
|
+
enum GWStatus
|
7
|
+
{
|
8
|
+
GWOK,
|
9
|
+
GWNotOK
|
10
|
+
};
|
11
|
+
|
12
|
+
//------------------
|
13
|
+
// Gateway messages |
|
14
|
+
//------------------
|
15
|
+
|
16
|
+
// Format of the messages
|
17
|
+
|
18
|
+
enum GWMsgContentType
|
19
|
+
{
|
20
|
+
Parameters,
|
21
|
+
// Used by request-related msg with parameters
|
22
|
+
IsVoid,
|
23
|
+
// Used by request-related msg without parameter
|
24
|
+
ReturnValue,
|
25
|
+
// Used by reply-related msg with only return result (incl. void)
|
26
|
+
ReturnAndParameters,
|
27
|
+
// Used by reply-related msg with return result (incl. void) and parameters
|
28
|
+
IsException
|
29
|
+
// Used by raise-related msg with exception
|
30
|
+
};
|
31
|
+
|
32
|
+
typedef any GWElem;
|
33
|
+
|
34
|
+
typedef sequence<GWElem> GWParamList;
|
35
|
+
|
36
|
+
struct GWMsgContent
|
37
|
+
{
|
38
|
+
GWParamList paramList;
|
39
|
+
GWElem returnValue;
|
40
|
+
GWElem except;
|
41
|
+
};
|
42
|
+
|
43
|
+
struct GWMessage
|
44
|
+
{
|
45
|
+
string objectName;
|
46
|
+
string operationName;
|
47
|
+
GWMsgContentType cntType;
|
48
|
+
GWMsgContent content;
|
49
|
+
};
|
50
|
+
|
51
|
+
|
52
|
+
// Flag for messages
|
53
|
+
|
54
|
+
enum GWMsgFlag
|
55
|
+
{
|
56
|
+
MsgReady,
|
57
|
+
MsgNotReady
|
58
|
+
};
|
59
|
+
|
60
|
+
// Message queue
|
61
|
+
|
62
|
+
struct GWQElem
|
63
|
+
{
|
64
|
+
GWMsgFlag flag;
|
65
|
+
GWMessage message;
|
66
|
+
};
|
67
|
+
|
68
|
+
typedef sequence<GWQElem> GWMsgQueue;
|
69
|
+
|
70
|
+
//---------------------------------
|
71
|
+
// Test configuration information |
|
72
|
+
//---------------------------------
|
73
|
+
|
74
|
+
// Type of connection via PCO or CP
|
75
|
+
|
76
|
+
enum GWConnType
|
77
|
+
{
|
78
|
+
PCOtoSUTServer,
|
79
|
+
PCOtoSUTClient,
|
80
|
+
CPtoTestComponent
|
81
|
+
};
|
82
|
+
|
83
|
+
// Information about an object
|
84
|
+
|
85
|
+
struct GWObjInfo
|
86
|
+
{
|
87
|
+
string objName;
|
88
|
+
// Object name
|
89
|
+
Object objRef;
|
90
|
+
// Object reference if available
|
91
|
+
};
|
92
|
+
|
93
|
+
// Information about a connection
|
94
|
+
|
95
|
+
struct GWConnInfo
|
96
|
+
{
|
97
|
+
GWConnType connType;
|
98
|
+
// Type of connection via PCO or CP
|
99
|
+
string pName;
|
100
|
+
// PCO or CP name
|
101
|
+
GWObjInfo objInfo;
|
102
|
+
// Information of the object
|
103
|
+
};
|
104
|
+
|
105
|
+
typedef sequence<GWConnInfo> GWConnections;
|
106
|
+
|
107
|
+
// Configuration information of a test component
|
108
|
+
|
109
|
+
struct GWComponentConfig
|
110
|
+
{
|
111
|
+
string componentID;
|
112
|
+
// ID of the test component
|
113
|
+
GWConnections connections;
|
114
|
+
// Information about the connections
|
115
|
+
};
|
116
|
+
|
117
|
+
//-------------------------
|
118
|
+
// Interface GatewayClient |
|
119
|
+
//-------------------------
|
120
|
+
|
121
|
+
interface GatewayClient
|
122
|
+
{
|
123
|
+
GWStatus sendOutMsg(in GWMessage msg);
|
124
|
+
GWMsgFlag getInMsg(out GWMessage msg);
|
125
|
+
|
126
|
+
}; // End of interface GatewayClient
|
127
|
+
|
128
|
+
//-------------------------
|
129
|
+
// Interface GatewayServer |
|
130
|
+
//-------------------------
|
131
|
+
|
132
|
+
interface GatewayServer
|
133
|
+
{
|
134
|
+
GWStatus sendOutMsg(in GWMessage msg);
|
135
|
+
GWMsgFlag getInMsg(out GWMessage msg);
|
136
|
+
|
137
|
+
}; // End of interface GatewayServer
|
138
|
+
|
139
|
+
//------------------------
|
140
|
+
// Interface GatewayMain |
|
141
|
+
//------------------------
|
142
|
+
|
143
|
+
interface GatewayMain
|
144
|
+
{
|
145
|
+
//
|
146
|
+
// Operations public for TTCN-based test systems
|
147
|
+
//
|
148
|
+
|
149
|
+
// Initialization
|
150
|
+
GWStatus GWInit();
|
151
|
+
|
152
|
+
// Destroy the current instance.
|
153
|
+
void GWDestroy();
|
154
|
+
|
155
|
+
// Pre-configuration for the associated test component.
|
156
|
+
GWStatus GWConfigure (in boolean concurrent, in GWComponentConfig config);
|
157
|
+
|
158
|
+
// Add an individual connection for the associated test component.
|
159
|
+
GWStatus GWAddConnection (in GWConnInfo connInfo);
|
160
|
+
|
161
|
+
// Dispatch a message to the SUT or another test component
|
162
|
+
GWStatus GWSend (in string pcoID, in GWMessage msg);
|
163
|
+
|
164
|
+
// Poll for an incoming message from the SUT or another test component
|
165
|
+
GWMsgFlag GWReceive (out string pcoID, out GWMessage msg);
|
166
|
+
|
167
|
+
//
|
168
|
+
// Operation used by GatewayMain objects to exchange CMs
|
169
|
+
//
|
170
|
+
|
171
|
+
oneway void here_is_a_CM(in GWMessage msg);
|
172
|
+
|
173
|
+
}; // End of interface GatewayMain
|
174
|
+
|
175
|
+
}; // End of module TOR
|
176
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
struct BookInfo
|
2
|
+
{
|
3
|
+
string title;
|
4
|
+
string author;
|
5
|
+
string isbn;
|
6
|
+
};
|
7
|
+
typedef sequence<BookInfo> BookInfoSeq;
|
8
|
+
|
9
|
+
interface Book
|
10
|
+
{
|
11
|
+
readonly attribute BookInfo info;
|
12
|
+
};
|
13
|
+
|
14
|
+
typedef sequence<string> BookTitles;
|
15
|
+
|
16
|
+
interface Library
|
17
|
+
{
|
18
|
+
Book get_book(in string title);
|
19
|
+
BookTitles get_titles();
|
20
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module data {
|
2
|
+
typedef string<200> name;
|
3
|
+
typedef string<20> phone;
|
4
|
+
|
5
|
+
struct entry {
|
6
|
+
name n;
|
7
|
+
phone p;
|
8
|
+
};
|
9
|
+
|
10
|
+
exception duplicate {
|
11
|
+
phone p;
|
12
|
+
};
|
13
|
+
|
14
|
+
exception notfound {};
|
15
|
+
|
16
|
+
interface phonebook {
|
17
|
+
void add(in entry e) raises (duplicate);
|
18
|
+
void remove(in name n) raises (notfound);
|
19
|
+
phone find(in name n) raises (notfound);
|
20
|
+
};
|
21
|
+
};
|
22
|
+
|
23
|
+
/* End of file. */
|
24
|
+
|
@@ -0,0 +1,118 @@
|
|
1
|
+
// Description : Sample SR handling IDL
|
2
|
+
|
3
|
+
module myTroubleTicket
|
4
|
+
{
|
5
|
+
struct ErrorStruct
|
6
|
+
{
|
7
|
+
long code;
|
8
|
+
string description;
|
9
|
+
};
|
10
|
+
enum TicketStatus { New, Open, Resolved, Closed };
|
11
|
+
|
12
|
+
// Timestamp is a number that measures time by the number of
|
13
|
+
// milliseconds from 1/1/1970 GMT. The number is encoded into
|
14
|
+
// a character string.
|
15
|
+
typedef string Timestamp;
|
16
|
+
|
17
|
+
enum ServiceType {ATM, FR};
|
18
|
+
|
19
|
+
enum TicketType {Autodetect, Chronic, Informational, Release, Vendor,
|
20
|
+
Customer, Network, NetworkComplexServices };
|
21
|
+
|
22
|
+
enum ForeignLogType { CustomerLog, EmployeeLog };
|
23
|
+
|
24
|
+
struct TroubleTicketSummary
|
25
|
+
{
|
26
|
+
string troubleTicketId;
|
27
|
+
string circuitId;
|
28
|
+
string circuitSegmentId;
|
29
|
+
string billingAccountNumber;
|
30
|
+
TicketStatus status;
|
31
|
+
Timestamp createDatetime;
|
32
|
+
Timestamp closeDatetime;
|
33
|
+
ServiceType svcType;
|
34
|
+
string customerName;
|
35
|
+
string enterpriseId;
|
36
|
+
TicketType type;
|
37
|
+
};
|
38
|
+
|
39
|
+
struct TroubleTicket
|
40
|
+
{
|
41
|
+
string troubleTicketId;
|
42
|
+
string circuitId;
|
43
|
+
string circuitSegmentId;
|
44
|
+
string billingAccountNumber;
|
45
|
+
TicketStatus status;
|
46
|
+
Timestamp createDatetime;
|
47
|
+
Timestamp closeDatetime;
|
48
|
+
ServiceType svcType;
|
49
|
+
string customerName;
|
50
|
+
string enterpriseId;
|
51
|
+
TicketType type;
|
52
|
+
string reportByName;
|
53
|
+
string reportByPhone;
|
54
|
+
string reportByEmail;
|
55
|
+
string secondaryContactName;
|
56
|
+
string secondaryContactPhone;
|
57
|
+
string secondaryContactEmail;
|
58
|
+
string problemDescription;
|
59
|
+
string submittedBy;
|
60
|
+
string ticketClient;
|
61
|
+
};
|
62
|
+
|
63
|
+
typedef sequence<TroubleTicketSummary> TroubleTicketSummaryList;
|
64
|
+
|
65
|
+
struct TimestampRange
|
66
|
+
{
|
67
|
+
Timestamp startTime;
|
68
|
+
Timestamp endTime;
|
69
|
+
};
|
70
|
+
|
71
|
+
struct TroubleTicketQuery
|
72
|
+
{
|
73
|
+
sequence<string> circuitId;
|
74
|
+
sequence<string> circuitSegmentId;
|
75
|
+
sequence<string> billingAccountNumber;
|
76
|
+
sequence<string> enterpriseId;
|
77
|
+
sequence<string> customerName;
|
78
|
+
TimestampRange createDatetime;
|
79
|
+
TimestampRange closeDatetime;
|
80
|
+
sequence<TicketStatus> status;
|
81
|
+
sequence<ServiceType> svcType;
|
82
|
+
};
|
83
|
+
typedef sequence<TroubleTicketQuery> TTQuerySeq;
|
84
|
+
|
85
|
+
struct SortCriteria
|
86
|
+
{
|
87
|
+
string sortByField;
|
88
|
+
boolean sortAscending;
|
89
|
+
};
|
90
|
+
typedef sequence<SortCriteria> SortSeq;
|
91
|
+
|
92
|
+
interface TicketService
|
93
|
+
{
|
94
|
+
|
95
|
+
void createTicket(
|
96
|
+
inout TroubleTicket inTroubleTicket,
|
97
|
+
out ErrorStruct error );
|
98
|
+
|
99
|
+
void findTicketByTicketId(
|
100
|
+
in string troubleTicketId,
|
101
|
+
out TroubleTicket outTroubleTicket,
|
102
|
+
out ErrorStruct error );
|
103
|
+
|
104
|
+
void findTicketsByTicketQuery(
|
105
|
+
in TTQuerySeq ticketQueryList,
|
106
|
+
in SortSeq sortList,
|
107
|
+
in long fetchLimit,
|
108
|
+
out TroubleTicketSummaryList tickets,
|
109
|
+
out ErrorStruct error );
|
110
|
+
|
111
|
+
// simple oneway method to test passing sequences of structs
|
112
|
+
// to the CORBA adapter
|
113
|
+
oneway void simpleTicketMethod(
|
114
|
+
in TTQuerySeq ticketQueryList );
|
115
|
+
};
|
116
|
+
|
117
|
+
};
|
118
|
+
|