LocationAPI_Templates.ttcn 4.62 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
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
module LocationAPI_Templates {
  
  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
  
  // LibMec/LocationAPI
  import from LocationAPI_TypesAndValues all;
  import from LocationAPI_Pixits all;
  
  template (value) UserInfo m_user_info(
                                        in universal charstring p_address := PX_ADDRESS,
                                        in universal charstring p_accessPointId := PX_ACCESS_POINT_ID,
                                        in universal charstring p_zoneId := PX_ZONE_ID,
                                        in universal charstring p_resourceURL := PX_RESOURCE_URL,
                                        in TimeStamp p_timeStamp := PX_TIME_STAMP
  ) := {
    address_            := p_address,
    accessPointId       := p_accessPointId,
    zoneId              := p_zoneId,
    resourceURL         := p_resourceURL,
    timeStamp           := p_timeStamp,
    locationInfo        := omit,
    contextLocationInfo := omit,
    ancillaryInfo       := omit
  } // End of template m_user_info
  
  template (present) UserInfo mw_user_info(
                                           template (present) universal charstring p_address := ?,
                                           template (present) universal charstring p_accessPointId := ?,
                                           template (present) universal charstring p_zoneId := ?,
                                           template (present) universal charstring p_resourceURL := ?,
                                           template (present) TimeStamp p_timeStamp := ?
  ) := {
    address_            := p_address,
    accessPointId       := p_accessPointId,
    zoneId              := p_zoneId,
    resourceURL         := p_resourceURL,
    timeStamp           := p_timeStamp,
    locationInfo        := *,
    contextLocationInfo := *,
    ancillaryInfo       := *
  } // End of template mw_user_info
  
  template (value) LocationInfo m_location_info(
                                                in float p_latitude,
                                                in float p_longitude,
                                                in integer p_accuracy
  ) := {
    latitude  := p_latitude,
    longitude := p_longitude,
    altitude  := omit,
    accuracy  := p_accuracy
  } // End of template m_location_info
  
  template (present) LocationInfo mw_location_info(
                                                   template (present) float p_latitude := ?,
                                                   template (present) float p_longitude := ?,
                                                   template (present) integer p_accuracy := ?
  ) := {
    latitude  := p_latitude,
    longitude := p_longitude,
    altitude  := *,
    accuracy  := p_accuracy
  } // End of template mw_location_info
  
  template (value) ZoneInfo m_zone_info(
                                        in universal charstring p_zoneId := PX_ZONE_ID,
                                        in UInt32 p_numberOfAccessPoints := PX_NB_ACCESS_POINTS,
                                        in UInt32 p_numberOfUnservicableAccessPoints := PX_NB_UNSERVICABLEL_ACCESS_POINTS,
                                        in UInt32 p_numberOfUsers := PX_NB_USERS,
                                        in universal charstring p_resourceURL := PX_RESOURCE_URL
                                        ) := {
    zoneId                           := p_zoneId,
    numberOfAccessPoints             := p_numberOfAccessPoints,
    numberOfUnservicableAccessPoints := p_numberOfUnservicableAccessPoints,
    numberOfUsers                    := p_numberOfUsers,
    resourceURL                      := p_resourceURL
  } // End of template m_zone_info
  
  template (present) ZoneInfo mw_zone_info(
                                           template (present) universal charstring p_zoneId := ?,
                                           template (present) UInt32 p_numberOfAccessPoints := ?,
                                           template (present) UInt32 p_numberOfUnservicableAccessPoints := ?,
                                           template (present) UInt32 p_numberOfUsers := ?,
                                           template (present) universal charstring p_resourceURL := ?
                                           ) := {
    zoneId                           := p_zoneId,
    numberOfAccessPoints             := p_numberOfAccessPoints,
    numberOfUnservicableAccessPoints := p_numberOfUnservicableAccessPoints,
    numberOfUsers                    := p_numberOfUsers,
    resourceURL                      := p_resourceURL
  } // End of template mw_zone_info
  
} // End of module LocationAPI_Templates