LocationAPI_TypesAndValues.ttcn 11.6 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
1
2
module LocationAPI_TypesAndValues {
  
Yann Garcia's avatar
Yann Garcia committed
3
4
5
  // JSON
  import from JSON all;
  
Yann Garcia's avatar
Yann Garcia committed
6
7
  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
Yann Garcia's avatar
Yann Garcia committed
8
9
10
11
12
13

  /**
   * @desc
   * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   */
Yann Garcia's avatar
Yann Garcia committed
14
15
16
17
18
  type record TimeStamp {
    UInt32 seconds,
    UInt32 nanoSeconds
  }
  
Yann Garcia's avatar
Yann Garcia committed
19
20
21
22
23
24
25
26
  /**
   * @desc A type containing list of users.
   * @member user Collection of the zone information list.
   * @member resourceURL Self referring URL.
   */
  type record of UserInfo UserInfos;
  type record UserList {
    UserInfos user optional,
Yann Garcia's avatar
Yann Garcia committed
27
    ResourceURL resourceURL
Yann Garcia's avatar
Yann Garcia committed
28
  }
Yann Garcia's avatar
Yann Garcia committed
29
30
31
  
  /**
   * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.
Yann Garcia's avatar
Yann Garcia committed
32
33
34
35
   * @member latitude
   * @member longitude
   * @member altitude
   * @member accuracy
Yann Garcia's avatar
Yann Garcia committed
36
37
   */
  type record LocationInfo {
Yann Garcia's avatar
Yann Garcia committed
38
39
40
    JSON.Number latitude,
    JSON.Number longitude,
    JSON.Number altitude optional,
Yann Garcia's avatar
Yann Garcia committed
41
    UInt32 accuracy
Yann Garcia's avatar
Yann Garcia committed
42
43
44
45
  } // End of type LocationInfo
  
  /**
   * @desc A type containing zone information.
Yann Garcia's avatar
Yann Garcia committed
46
47
48
49
50
   * @member zoneId Identifier of zone
   * @member numberOfAccessPoints The number of access points within the zone
   * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone.
   * @member numberOfUsers The number of users currently on the access point.
   * @member resourceURL Self referring URL.
Yann Garcia's avatar
Yann Garcia committed
51
52
   */
  type record ZoneInfo {
Yann Garcia's avatar
Yann Garcia committed
53
54
55
56
57
    ZoneId zoneId,
    NumberOfAccessPoints numberOfAccessPoints,
    NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints,
    NumberOfUsers numberOfUsers,
    ResourceURL resourceURL
Yann Garcia's avatar
Yann Garcia committed
58
  }
Yann Garcia's avatar
Yann Garcia committed
59
60
61
62
63
64
65
66
67

  /**
   * @desc Collection of the zone information list.
   * @member zone Collection of the zone information list.
   * @member resourceURL Self referring URL.
   */
  type record of ZoneInfo ZoneInfos;
  type record ZoneList {
    ZoneInfos zone optional,
Yann Garcia's avatar
Yann Garcia committed
68
69
70
71
72
73
    ResourceURL resourceURL
  }

  /**
   * @desc Identifier of access point, <E-CGI><Cell Portion ID> (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element
   */
YannGarcia's avatar
YannGarcia committed
74
  type JSON.String AccessPointId;
Yann Garcia's avatar
Yann Garcia committed
75
76
77
78
79
80
81
82
83
84
85
  
  /**
   * @desc A type containing access point information.
   * @member accessPointId
   * @member connectionType The connection type for the access poin
   * @member operationStatus The operation status of the access point
   * @member numberOfUsers The number of users currently on the access point.
   * @member resourceURL Self referring URL.
   */
  type record AccessPointInfo {
    AccessPointId accessPointId,
Yann Garcia's avatar
Yann Garcia committed
86
    LocationInfo locationInfo optional,
Yann Garcia's avatar
Yann Garcia committed
87
88
    ConnectionType connectionType,
    OperationStatus operationStatus,
Yann Garcia's avatar
Yann Garcia committed
89
90
    NumberOfUsers numberOfUsers,
    InterestRealm interestRealm,
Yann Garcia's avatar
Yann Garcia committed
91
92
    ResourceURL resourceURL
  }
Yann Garcia's avatar
Yann Garcia committed
93
  type record of AccessPointInfo AccessPointInfos;
Yann Garcia's avatar
Yann Garcia committed
94
95
96
97
98
99
100
101
102

  /**
   * @desc A type containing list of access points.
   * @member zoneId 
   * @member accessPoint Collection of the access point information list.
   * @member resourceURL 
   */
  type record AccessPointList {
    ZoneId zoneId,
Yann Garcia's avatar
Yann Garcia committed
103
    AccessPointInfos accessPoint optional,
Yann Garcia's avatar
Yann Garcia committed
104
105
106
107
108
109
    ResourceURL resourceURL
  }

  /**
   * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI).
   */
YannGarcia's avatar
YannGarcia committed
110
  type JSON.String Address
Yann Garcia's avatar
Yann Garcia committed
111
112
113
114

  /**
   * @desc Reserved for future use.
   */
YannGarcia's avatar
YannGarcia committed
115
  type JSON.String AncillaryInfo;
Yann Garcia's avatar
Yann Garcia committed
116
117
118
119
120

  /**
   * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\
REST_NetAPI_Common].
   */
Yann Garcia's avatar
Yann Garcia committed
121
  type JSON.String CallbackData;
Yann Garcia's avatar
Yann Garcia committed
122
123
124
125
126
127
128

  /**
   * @desc Notification callback definition.
   * @member notifyURL 
   */
  type record CallbackReference {
    NotifyURL notifyURL
Yann Garcia's avatar
Yann Garcia committed
129
130
131
  }

  /**
Yann Garcia's avatar
Yann Garcia committed
132
133
   * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription.
   */
YannGarcia's avatar
YannGarcia committed
134
  type JSON.String ClientCorrelator;
Yann Garcia's avatar
Yann Garcia committed
135
136
137

  /**
   * @desc The connection type for the access point
Yann Garcia's avatar
Yann Garcia committed
138
139
   */
  type enumerated ConnectionType {
Yann Garcia's avatar
Yann Garcia committed
140
141
142
143
144
145
146
147
148
149
    Femto,
    LTE_femto,
    Smallcell,
    LTE_smallcell,
    Wifi,
    Pico,
    Micro,
    Macro,
    Wimax,
    Unknown
Yann Garcia's avatar
Yann Garcia committed
150
151
  }

Yann Garcia's avatar
Yann Garcia committed
152
153
154
  /**
   * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.)
   */
YannGarcia's avatar
YannGarcia committed
155
  type JSON.String ContextLocationInfo;
Yann Garcia's avatar
Yann Garcia committed
156
157
158
159

  /**
   * @desc Zone ID
   */
YannGarcia's avatar
YannGarcia committed
160
  type JSON.String CurrentAccessPointId;
Yann Garcia's avatar
Yann Garcia committed
161
162
163
164

  /**
   * @desc Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid.
   */
Yann Garcia's avatar
Yann Garcia committed
165
  type JSON.Date Duration;
Yann Garcia's avatar
Yann Garcia committed
166
167
168
169

  /**
   * @desc Interest realm of access point (e.g. geographical area, a type of industry etc.).
   */
Yann Garcia's avatar
Yann Garcia committed
170
  type JSON.String InterestRealm;
Yann Garcia's avatar
Yann Garcia committed
171
172
173
174
175
176
177

  /**
   * @desc Link to other resources
   * @member rel Describes the relationship between the URI and the resource.
   * @member href UTI
   */
  type record Link {
YannGarcia's avatar
YannGarcia committed
178
179
    JSON.String rel,
    JSON.String href
Yann Garcia's avatar
Yann Garcia committed
180
181
182
183
184
  }

  /**
   * @desc The URL of your own listener application.
   */
YannGarcia's avatar
YannGarcia committed
185
  type JSON.String NotifyURL;
Yann Garcia's avatar
Yann Garcia committed
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

  /**
   * @desc The number of access points within the zone
   */
  type UInt32 NumberOfAccessPoints;

  /**
   * @desc Number of inoperable access points within the zone.
   */
  type UInt32 NumberOfUnserviceableAccessPoints;

  /**
   * @desc The number of users currently on the access point.
   */
  type UInt32 NumberOfUsers;

  /**
   * @desc Threshold number of users in an access point which if crossed shall cause a notification.
   */
  type UInt32 NumberOfUsersAPThreshold;

  /**
   * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription.
   */
  type UInt32 NumberOfUsersInAP;

  /**
   * @desc Threshold number of users in a zone which if crossed shall cause a notification.
   */
  type UInt32 NumberOfUsersInZone;

  /**
   * @desc Threshold number of users in a zone which if crossed shall cause a notification.
   */
  type UInt32 NumberOfUsersZoneThreshold;

Yann Garcia's avatar
Yann Garcia committed
222
223
224
225
  /**
   * @desc The operation status of the access point
   */
  type enumerated OperationStatus {
Yann Garcia's avatar
Yann Garcia committed
226
227
228
    Serviceable,
    Unserviceable,
    Unknown
Yann Garcia's avatar
Yann Garcia committed
229
  }
Yann Garcia's avatar
Yann Garcia committed
230

Yann Garcia's avatar
Yann Garcia committed
231
  /**
Yann Garcia's avatar
Yann Garcia committed
232
233
   * @desc Zone ID
   */
YannGarcia's avatar
YannGarcia committed
234
  type JSON.String PreviousAccessPointId;
Yann Garcia's avatar
Yann Garcia committed
235
236
237
238

  /**
   * @desc Self referring URL
   */
YannGarcia's avatar
YannGarcia committed
239
  type JSON.AnyURI ResourceURL;
Yann Garcia's avatar
Yann Garcia committed
240
241
242
243

  /**
   * @desc Indicates the time of day for zonal presence notification.
   */
YannGarcia's avatar
YannGarcia committed
244
  type JSON.String Timestamp;
Yann Garcia's avatar
Yann Garcia committed
245
246
247
248

  /**
   * @desc Time zone of access point
   */
YannGarcia's avatar
YannGarcia committed
249
  type JSON.String Timezone;
Yann Garcia's avatar
Yann Garcia committed
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269

  /**
   * @desc User event
   */
  type enumerated UserEventType {
    Entering,
    Leaving,
    Transferring
  }

  /**
   * @desc List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event.
   */
  type record of UserEventType UserEventCriteria;

  /**
   * @desc A type containing user information.
   * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI).
   * @member accessPointId Identifier of access point, <E-CGI><Cell Portion ID> (reference ETSI TS 129 171).
   * @member zoneId Identifier of zone
Yann Garcia's avatar
Yann Garcia committed
270
   * @member resourceURL Self referring URL.
Yann Garcia's avatar
Yann Garcia committed
271
272
273
   * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.
   * @member contextLocationInfo 
   * @member ancillaryInfo 
Yann Garcia's avatar
Yann Garcia committed
274
   */
Yann Garcia's avatar
Yann Garcia committed
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
  type record UserInfo {
    Address address_,
    AccessPointId accessPointId,
    ZoneId zoneId,
    ResourceURL resourceURL,
    LocationInfo locationInfo optional,
    ContextLocationInfo contextLocationInfo optional,
    AncillaryInfo ancillaryInfo optional
  } with {
    variant (address_) "name as 'address'";
  } // End of type UserInfo

  /**
   * @desc A type containing user tracking subscription.
   * @member 
   */
  type record UserTrackingSubscription {
    ClientCorrelator clientCorrelator optional,
    CallbackReference callbackReference,
    Address address_,
    UserEventCriteria userEventCriteria optional,
    ResourceURL resourceURL optional
  } with {
    variant (address_) "name as 'address'";
  }

  /**
   * @desc A type containing zonal presence notification
   * @member 
   * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification.
   */
  type record ZonalPresenceNotification {
    CallbackReference callbackReference optional,
    ZoneId zoneId,
    Address address_,
    InterestRealm interestRealm optional,
    UserEventType userEventType,
    CurrentAccessPointId currentAccessPointId,
    PreviousAccessPointId previousAccessPointId optional,
    Timestamp timestamp_,
    Link link optional
  } with {
    variant (address_) "name as 'address'";
    variant (timestamp_) "name as 'timestamp'";
  }

  /**
   * @desc A type containing zonal traffic subscription
   * @member
   * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.).
   * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event.
   * @member resourceURL 
   */
  type record ZonalTrafficSubscription {
    ClientCorrelator clientCorrelator optional,
    CallbackReference callbackReference,
    ZoneId zoneId,
    InterestRealm interestRealm optional,
    UserEventCriteria userEventCriteria optional,
    Duration duration optional,
    ResourceURL resourceURL optional
  }

  /**
   * @desc Identifier of zone
   */
YannGarcia's avatar
YannGarcia committed
341
  type JSON.String ZoneId;
Yann Garcia's avatar
Yann Garcia committed
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

  /**
   * @desc A type containing zone status notification.
   * @member zoneId 
   * @member 
   */
  type record ZoneStatusNotification {
    CallbackData callbackData optional,
    ZoneId zoneId,
    AccessPointId accessPointId optional,
    NumberOfUsersInZone numberOfUsersInZone optional,
    NumberOfUsersInAP numberOfUsersInAP optional,
    OperationStatus operationStatus optional,
    Timestamp timestamp_,
    Link link
  } with {
    variant (timestamp_) "name as 'timestamp'";
  }

  /**
   * @desc A type containing zone status subscription.
   * @member zoneId
   * @member
   * @member
   * @member
   * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone).
   */
  type record ZoneStatusSubscription {
    ClientCorrelator clientCorrelator optional,
    ResourceURL resourceURL optional,
    CallbackReference callbackReference,
    ZoneId zoneId,
    NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional,
    NumberOfUsersAPThreshold numberOfUsersAPThreshold optional,
    OperationStatus operationStatus optional
Yann Garcia's avatar
Yann Garcia committed
377
  }
Yann Garcia's avatar
Yann Garcia committed
378
379
380
381
  
} with {
  encode "JSON"
}