summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/sfp.idl
blob: 0a8ab39b6985c1270fd9999afa1fd6bee749ee05 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* -*- C++ -*- */
// $Id$

#ifndef TAO_SFP_IDL
#define TAO_SFP_IDL

#include <ULongSeq.pidl>
#include <OctetSeq.pidl>

module flowProtocol
{
  typedef CORBA::ULongSeq my_seq_ulong;
  enum MsgType
  {
    // The MsgTypes Start and struct Start,StartReply and struct
    // StartReply conflicts.
    // Also there are case-only differences for enumerator Credit and struct credit.
    // We suffix _Msg to all enumerators until the AVStreams RTF fixes these.
    // Messages in the forward direction
    //    Start,
    Start_Msg,
    EndofStream_Msg,
    SimpleFrame_Msg,
    SequencedFrame_Msg,
    Frame_Msg,
    SpecialFrame_Msg,
    // Messages in the reverse direction
    //    StartReply,
    StartReply_Msg,
    Credit_Msg,
    // Addition of type for a fragment.
    Fragment_Msg
  };

  struct frameHeader
  {
    char magic_number[4];
    //    my_seq_char magic_number;
    // '=', 'S', 'F', 'P'
    octet flags;
    // bit 0 = byte order,
    // 1 = fragments, 2-7 always 0
    octet message_type;
    unsigned long message_size;
    // Size following this header
  };

  struct fragment
  {
    //    my_seq_char magic_number;
    char magic_number[4];
    // 'F', 'R', 'A', 'G'
    octet flags;
    // bit 1 = more fragments, %%bit 0 = byteorder
    unsigned long frag_number;
    // 1,..,n
    unsigned long sequence_num;
    unsigned long frag_sz;
    unsigned long source_id;
    // Required for UDP multicast with multiple sources
  };

  struct Start
  {
    char magic_number[4];
    //    my_seq_char magic_number;
    // '=', 'S', 'T', 'A'
    octet major_version;
    octet minor_version;
    octet flags;
    // bit 0 = byte order
  };

  // Acknowledge successful processing of
  // Start

  struct StartReply
  {
    //    my_seq_char magic_number;
    char magic_number[4];
    // "=",'S','T','R'
    octet flags;
    // bit 0 = byte order, 1 = exception
  };

  // If the message_type in frameHeader is sequencedFrame
  // the the frameHeader will be followed by this
  // (See also RTP note)

  struct sequencedFrame
  {
    unsigned long sequence_num;
  };
  // If the message_type is Frame then
  // the frameHeader is followed by this
  // See also RTP note

  struct frame
  {
    unsigned long timestamp;
    unsigned long synchSource;
    my_seq_ulong source_ids;
    unsigned long sequence_num;
  };

  // XXX:The spec hasn't defined frameID.
  typedef unsigned long frameID;
  struct specialFrame
  {
    frameID context_id;
    CORBA::OctetSeq context_data;
  };

  struct credit
  {
    //    my_seq_char magic_number;
    char magic_number[4];
    // "=",'C','R','E'
    unsigned long cred_num;
  };

};

#endif /* TAO_SFP_IDL */