LocationAPI_Templates.ttcn 18.5 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
1
2
module LocationAPI_Templates {
  
YannGarcia's avatar
YannGarcia committed
3
4
5
  // JSON
  import from JSON all;
  
Yann Garcia's avatar
Yann Garcia committed
6
7
8
9
10
11
12
13
  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
  
  // LibMec/LocationAPI
  import from LocationAPI_TypesAndValues all;
  import from LocationAPI_Pixits all;
  
  template (value) UserInfo m_user_info(
Yann Garcia's avatar
Yann Garcia committed
14
15
16
17
                                        in Address p_address := PX_USER,
                                        in AccessPointId p_access_point_id := PX_ACCESS_POINT_ID,
                                        in ZoneId p_zone_id := PX_ZONE_ID,
                                        in ResourceURL p_resource_url := PX_RESOURCE_URL
Yann Garcia's avatar
Yann Garcia committed
18
19
  ) := {
    address_            := p_address,
Yann Garcia's avatar
Yann Garcia committed
20
21
22
    accessPointId       := p_access_point_id,
    zoneId              := p_zone_id,
    resourceURL         := p_resource_url,
Yann Garcia's avatar
Yann Garcia committed
23
24
25
26
27
28
    locationInfo        := omit,
    contextLocationInfo := omit,
    ancillaryInfo       := omit
  } // End of template m_user_info
  
  template (present) UserInfo mw_user_info(
Yann Garcia's avatar
Yann Garcia committed
29
30
31
                                           template (present) Address p_address := ?,
                                           template (present) AccessPointId p_access_point_id := ?,
                                           template (present) ZoneId p_zone_id := ?,
YannGarcia's avatar
YannGarcia committed
32
                                           template (present) ResourceURL p_resource_url := ?
Yann Garcia's avatar
Yann Garcia committed
33
34
  ) := {
    address_            := p_address,
Yann Garcia's avatar
Yann Garcia committed
35
36
37
    accessPointId       := p_access_point_id,
    zoneId              := p_zone_id,
    resourceURL         := p_resource_url,
Yann Garcia's avatar
Yann Garcia committed
38
39
40
41
    locationInfo        := *,
    contextLocationInfo := *,
    ancillaryInfo       := *
  } // End of template mw_user_info
Yann Garcia's avatar
Yann Garcia committed
42
43
44

  template (omit) UserList m_user_list(
                                       in template (omit) UserInfos p_userInfo := omit,
Yann Garcia's avatar
Yann Garcia committed
45
                                       in ResourceURL p_resource_url
Yann Garcia's avatar
Yann Garcia committed
46
47
48
49
50
51
52
                                       ) := {
    user        := p_userInfo,
    resourceURL := p_resource_url
  } // End of template m_user_list
  
  template UserList mw_user_list(
                                 template UserInfos p_userInfo := *,
Yann Garcia's avatar
Yann Garcia committed
53
                                 template (present) ResourceURL p_resource_url := ?
Yann Garcia's avatar
Yann Garcia committed
54
55
56
57
                                 ) := {
    user        := p_userInfo,
    resourceURL := p_resource_url
  } // End of template mw_user_list
Yann Garcia's avatar
Yann Garcia committed
58
59
  
  template (value) LocationInfo m_location_info(
YannGarcia's avatar
YannGarcia committed
60
61
                                                in JSON.Number p_latitude,
                                                in JSON.Number p_longitude,
62
63
                                                in Shape p_shape := POLYGON,
                                                in VelocityType p_velocityType := HORIZONTAL_VERTICAL_UNCERT
Yann Garcia's avatar
Yann Garcia committed
64
  ) := {
65
66
67
68
69
70
71
72
73
74
75
76
77
78
    latitude             := p_latitude,
    longitude            := p_longitude,
    altitude             := omit,
    accuracy             := omit,
    accuracySemiMinor    := omit,
    accuracyAltitude     := omit,
    orientationMajorAxis := omit,
    confidence           := omit,
    innerRadius          := omit,
    uncertaintyRadius    := omit,
    offsetAngle          := omit,
    includedAngle        := omit,
    shape                := p_shape,
    velocity             := omit
Yann Garcia's avatar
Yann Garcia committed
79
80
81
  } // End of template m_location_info
  
  template (present) LocationInfo mw_location_info(
YannGarcia's avatar
YannGarcia committed
82
83
                                                   template (present) JSON.Number p_latitude := ?,
                                                   template (present) JSON.Number p_longitude := ?,
84
                                                   template (present) Shape p_shape := ?
Yann Garcia's avatar
Yann Garcia committed
85
  ) := {
86
87
88
89
90
91
92
93
94
95
96
97
98
99
    latitude             := p_latitude,
    longitude            := p_longitude,
    altitude             := *,
    accuracy             := *,
    accuracySemiMinor    := *,
    accuracyAltitude     := *,
    orientationMajorAxis := *,
    confidence           := *,
    innerRadius          := *,
    uncertaintyRadius    := *,
    offsetAngle          := *,
    includedAngle        := *,
    shape                := p_shape,
    velocity             := *
Yann Garcia's avatar
Yann Garcia committed
100
101
102
  } // End of template mw_location_info
  
  template (value) ZoneInfo m_zone_info(
Yann Garcia's avatar
Yann Garcia committed
103
104
105
106
107
                                        in ZoneId p_zone_id := PX_ZONE_ID,
                                        in NumberOfAccessPoints p_number_of_access_points := PX_NB_ACCESS_POINTS,
                                        in NumberOfUnserviceableAccessPoints p_number_of_unservicable_access_points := PX_NB_UNSERVICABLEL_ACCESS_POINTS,
                                        in NumberOfUsers p_number_of_users := PX_NB_USERS,
                                        in ResourceURL p_resource_url := PX_RESOURCE_URL
Yann Garcia's avatar
Yann Garcia committed
108
                                        ) := {
Yann Garcia's avatar
Yann Garcia committed
109
110
111
112
113
    zoneId                           := p_zone_id,
    numberOfAccessPoints             := p_number_of_access_points,
    numberOfUnservicableAccessPoints := p_number_of_unservicable_access_points,
    numberOfUsers                    := p_number_of_users,
    resourceURL                      := p_resource_url
Yann Garcia's avatar
Yann Garcia committed
114
115
116
  } // End of template m_zone_info
  
  template (present) ZoneInfo mw_zone_info(
Yann Garcia's avatar
Yann Garcia committed
117
118
119
120
121
                                           template (present) ZoneId p_zone_id := ?,
                                           template (present) NumberOfAccessPoints p_number_of_access_points := ?,
                                           template (present) NumberOfUnserviceableAccessPoints p_number_of_unservicable_access_points := ?,
                                           template (present) NumberOfUsers p_number_of_users := ?,
                                           template (present) ResourceURL p_resource_url := ?
Yann Garcia's avatar
Yann Garcia committed
122
                                           ) := {
Yann Garcia's avatar
Yann Garcia committed
123
124
125
126
127
    zoneId                           := p_zone_id,
    numberOfAccessPoints             := p_number_of_access_points,
    numberOfUnservicableAccessPoints := p_number_of_unservicable_access_points,
    numberOfUsers                    := p_number_of_users,
    resourceURL                      := p_resource_url
Yann Garcia's avatar
Yann Garcia committed
128
129
  } // End of template mw_zone_info
  
Yann Garcia's avatar
Yann Garcia committed
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
  template (omit) AccessPointList m_access_point_list(
                                                      in ZoneId p_zoneId := PX_ZONE_ID,
                                                      in ResourceURL p_resourceURL,
                                                      in template (omit) AccessPointInfos p_accessPoint := omit
                                                      ) := {
    zoneId      := p_zoneId,
    accessPoint := p_accessPoint,
    resourceURL := p_resourceURL
  } // End of template m_access_point_list
  
  template AccessPointList mw_access_point_list(
                                                template (present) ZoneId p_zoneId := ?,
                                                template (present) ResourceURL p_resourceURL := ?,
                                                template AccessPointInfos p_accessPoint := *
                                                ) := {
    zoneId      := p_zoneId,
    accessPoint := p_accessPoint,
    resourceURL := p_resourceURL
  } // End of template mw_access_point_list
  
YannGarcia's avatar
YannGarcia committed
150
151
152
153
154
155
156
157
158
159
160
161
162
  template (value) UserTrackingSubscription m_user_tracking_subscription(
                                                                         in ClientCorrelator p_clientCorrelator,
                                                                         in CallbackReference p_callbackReference,
                                                                         in Address p_address := PX_USER,
                                                                         in UserEventCriteria p_userEventCriteria := { Transferring }
                                                                         ) := {
    clientCorrelator  := p_clientCorrelator,
    callbackReference := p_callbackReference,
    address_          := p_address,
    userEventCriteria := p_userEventCriteria,
    resourceURL       := omit
  } // End of template m_user_tracking_subscription
  
163
164
165
166
167
168
169
  template (present) UserTrackingSubscription mw_user_tracking_subscription(
                                                                            template (present) ClientCorrelator p_clientCorrelator := ?,
                                                                            template (present) CallbackReference p_callbackReference := ?,
                                                                            template (present) Address p_address := PX_USER,
                                                                            template (present) UserEventCriteria p_userEventCriteria := { Transferring },
                                                                            template (present) ResourceURL p_resourceURL := ?
                                                                            ) := {
YannGarcia's avatar
YannGarcia committed
170
171
172
173
174
175
176
    clientCorrelator  := p_clientCorrelator,
    callbackReference := p_callbackReference,
    address_          := p_address,
    userEventCriteria := p_userEventCriteria,
    resourceURL       := p_resourceURL
  } // End of template mw_user_tracking_subscription
  
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
  template (value) ZonalTrafficSubscription m_zonal_traffic_subscription(
                                                                         in ClientCorrelator p_client_correlator,
                                                                         in CallbackReference p_callback_reference,
                                                                         in ZoneId p_zone_id
  ) := {
    clientCorrelator  := p_client_correlator,
    callbackReference := p_callback_reference,
    zoneId            := p_zone_id,
    interestRealm     := omit,
    userEventCriteria := omit,
    duration          := omit,
    resourceURL       := omit
  } // End of template m_zonal_traffic_subscription
  
  template (present) ZonalTrafficSubscription mw_zonal_traffic_subscription(
                                                                            template (present) ClientCorrelator p_client_correlator := ?,
                                                                            template (present) CallbackReference p_callback_reference := ?,
                                                                            template (present) ZoneId p_zone_id := ?
  ) := {
    clientCorrelator  := p_client_correlator,
    callbackReference := p_callback_reference,
    zoneId            := p_zone_id,
    interestRealm     := *,
    userEventCriteria := *,
    duration          := *,
    resourceURL       := *
  } // End of template mw_zonal_traffic_subscription
  
205
206
207
  template (omit) CircleNotificationSubscription m_circle_notification_subscription(
                                                                                    in template (omit) ClientCorrelator p_clientCorrelator := omit,
                                                                                    in template (value) CallbackReference p_callbackReference,
Yann Garcia's avatar
Yann Garcia committed
208
209
210
211
212
213
214
215
216
217
                                                                                    in template (value) Addresses p_address,
                                                                                    in template (value) JSON.Number p_latitude := PX_UE_COORD_LAT,
                                                                                    in template (value) JSON.Number p_longitude := PX_UE_COORD_LONG,
                                                                                    in template (value) JSON.Number p_radius := 10.0,
                                                                                    in template (value) JSON.Number p_trackingAccuracy := 10.0,
                                                                                    in template (value) EnteringLeavingCriteria p_enteringLeavingCriteria := Entering,
                                                                                    in template (value) JSON.Bool p_checkImmediate := true,
                                                                                    in template (value) JSON.Number p_frequency := 10.0,
                                                                                    in template (omit) ResourceURL p_resourceURL := omit
 ) := {
218
219
    clientCorrelator  := p_clientCorrelator,
    resourceURL       := p_resourceURL,
Yann Garcia's avatar
Yann Garcia committed
220
221
222
223
224
225
226
227
228
229
230
231
232
233
    link              := omit,
    callbackReference := p_callbackReference,
    requester         := omit,
    address_          := p_address,
    latitude          := p_latitude,
    longitude         := p_longitude,
    radius            := p_radius,
    trackingAccuracy  := p_trackingAccuracy,
    enteringLeavingCriteria := p_enteringLeavingCriteria,
    checkImmediate    := p_checkImmediate,
    frequency         := p_frequency,
    duration          := omit,
    count             := omit
    
234
235
236
237
238
  } // End of template m_circle_notification_subscription
  
  template CircleNotificationSubscription mw_circle_notification_subscription(
                                                                              template ClientCorrelator p_clientCorrelator := *,
                                                                              template (present) CallbackReference p_callbackReference := ?,
Yann Garcia's avatar
Yann Garcia committed
239
240
241
242
243
244
245
246
247
                                                                              template (present) Addresses p_address := ?,
                                                                              template (present) JSON.Number p_latitude := ?,
                                                                              template (present) JSON.Number p_longitude := ?,
                                                                              template (present) JSON.Number p_radius := ?,
                                                                              template (present) JSON.Number p_trackingAccuracy := ?,
                                                                              template (present) EnteringLeavingCriteria p_enteringLeavingCriteria := ?,
                                                                              template (present) JSON.Bool p_checkImmediate := ?,
                                                                              template (present) JSON.Number p_frequency := ?,
                                                                              template ResourceURL p_resourceURL := *
248
249
250
  ) := {
    clientCorrelator  := p_clientCorrelator,
    resourceURL       := p_resourceURL,
Yann Garcia's avatar
Yann Garcia committed
251
    link              := *,
252
    callbackReference := p_callbackReference,
Yann Garcia's avatar
Yann Garcia committed
253
254
255
256
257
258
259
260
261
262
263
    requester         := *,
    address_          := p_address,
    latitude          := p_latitude,
    longitude         := p_longitude,
    radius            := p_radius,
    trackingAccuracy  := p_trackingAccuracy,
    enteringLeavingCriteria := p_enteringLeavingCriteria,
    checkImmediate    := p_checkImmediate,
    frequency         := p_frequency,
    duration          := *,
    count             := *
264
265
266
  } // End of template m_wcircle_notification_subscription
  
  template (value) TerminalDistance m_terminal_distance(in JSON.Number p_distance) := {
Yann Garcia's avatar
Yann Garcia committed
267
268
269
    distance  := p_distance,
    accuracy  := omit,
    timestamp := omit
270
271
272
  } // End of template m_terminal_distance
  
  template (present) TerminalDistance mw_terminal_distance(template (present) JSON.Number p_distance := ?) := {
Yann Garcia's avatar
Yann Garcia committed
273
274
275
    distance := p_distance,
    accuracy  := *,
    timestamp := *
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
  } // End of template mw_terminal_distance
  
  template (omit) DistanceNotificationSubscription m_distance_notification_subscription(
                                                                                        in template (omit) ClientCorrelator p_clientCorrelator := omit,
                                                                                        in template (value) CallbackReference p_callbackReference,
                                                                                        in template (omit) ResourceURL p_resourceURL  := omit,
                                                                                        in template (omit) Address p_address := omit
  ) := {
    clientCorrelator := p_clientCorrelator,
    resourceURL := p_resourceURL,
    callbackReference := p_callbackReference,
    address_ := p_address
  } // End of template m_distance_notification_subscription
  
  template DistanceNotificationSubscription mw_distance_notification_subscription(
                                                                                  template ClientCorrelator p_clientCorrelator := *,
                                                                                  template (present) CallbackReference p_callbackReference := ?,
                                                                                  template ResourceURL p_resourceURL  := *,
                                                                                  template Address p_address := *
  ) := {
    clientCorrelator := p_clientCorrelator,
    resourceURL := p_resourceURL,
    callbackReference := p_callbackReference,
    address_ := p_address
  } // End of template mw_distance_notification_subscription
  
  template (omit) PeriodicNotificationSubscription m_periodic_notification_subscription(
                                                                                        in template (omit) ClientCorrelator p_clientCorrelator := omit,
                                                                                        in template (value) CallbackReference p_callbackReference,
                                                                                        in template (omit) ResourceURL p_resourceURL  := omit,
                                                                                        in template (omit) Address p_address := omit
  ) := {
    clientCorrelator := p_clientCorrelator,
    resourceURL := p_resourceURL,
    callbackReference := p_callbackReference,
    address_ := p_address
  } // End of template m_periodic_notification_subscription
  
  template PeriodicNotificationSubscription mw_periodic_notification_subscription(
                                                                                  template ClientCorrelator p_clientCorrelator := *,
                                                                                  template (present) CallbackReference p_callbackReference := ?,
                                                                                  template ResourceURL p_resourceURL  := *,
                                                                                  template Address p_address := *
  ) := {
    clientCorrelator := p_clientCorrelator,
    resourceURL := p_resourceURL,
    callbackReference := p_callbackReference,
    address_ := p_address
  } // End of template mw_periodic_notification_subscription
  
Yann Garcia's avatar
Yann Garcia committed
326
} // End of module LocationAPI_Templates