source: trunk/FACT++/scripts/doc/Event.js@ 18514

Last change on this file since 18514 was 14675, checked in by tbretz, 12 years ago
Made sure that nobody tried to start a docu script.
File size: 3.2 KB
Line 
1throw new Error("Description for built in functions. Must not be included!");
2/**
3 * @fileOverview
4 * Documentation of the Event object returned by Subscription.get()
5 */
6
7/**
8 * @class
9 *
10 * The object returned by Subscription.get(). It contains
11 * all data received with the event.
12 *
13 */
14function Event()
15{
16 /**
17 * The name of the Subscription this event belongs to.
18 *
19 * @type String
20 * @constant
21 */
22 this.name = name;
23
24 /**
25 * The format string corresponding to this event.
26 *
27 * @see <A HREF="dim.cern.ch">DIM</A> for more details
28 * @type String
29 * @constant
30 */
31 this.format = format;
32
33 /**
34 * The Quality-of-Service transmitted by this event.
35 *
36 * @type Integer
37 * @constant
38 */
39 this.qos = qos;
40
41 /**
42 * The size in bytes of the event received
43 *
44 * @type Integer
45 * @constant
46 */
47 this.size = size;
48
49 /**
50 * An counter of events received since the Subscription has
51 * been created. The first event received is 1. 0 corresponds
52 * to no event received yet.
53 *
54 * @type Integer
55 * @constant
56 */
57 this.counter = counter;
58
59 /**
60 * The time transmitted with this event, if transmitted. If nonw
61 * was transmitted, this might just be the time the event was
62 * received.
63 *
64 * @type Date
65 * @constant
66 */
67 this.time = time;
68
69 /**
70 * Array with the data received.
71 *
72 * The contents of the array are sorted in the order of the event format
73 * string. The contents of the array can be all kind of objects
74 * defined by the format string. If a format described several entries
75 * (e.g. I:5) and array will be added.<P>
76 *
77 * In the special case that the format string contains only a single
78 * format, e.g. "I", "F:5" or "C", data will not be an array,
79 * but contain the object data (or the array) directly.
80 *
81 * If valid data was received, but the size was zero, then
82 * null is returned as data
83 *
84 * <li> data===undefined: no data received (no connection)
85 * <li> data===null: an event was received, but it was empty
86 * <li> data.length>0: an event was received and it contains data
87 *
88 * @type Array
89 * @constant
90 *
91 */
92 this.data = [ ];
93
94 /**
95 * Object with the data received.
96 *
97 * The object contains essentially the same information than the
98 * data memeber, but the received data are added as properties
99 * instead of enumerable lements. This allows to access
100 * the received data by names as specified by the SERVICE_DESC
101 * service.<P>
102 *
103 * If an empty event was received, but names are available,
104 * the object will be empty. Otherwise 'obj' will be undefined.
105 *
106 * <li> obj===undefined: no names are available
107 * <li> obj!==undefined, length==0: names are available, but no data (no connection)
108 * <li> obj!==undefined, length>0: names are available, data has been received
109 *
110 * <P>
111 * Note that to get the number of properties (length) you have to call
112 * Object.keys(obj).length;
113 *
114 * @type Object
115 * @constant
116 *
117 */
118 this.obj = { };
119}
Note: See TracBrowser for help on using the repository browser.