LocationAPI_Templates.ttcn 6.11 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
1
2
3
4
5
6
7
8
9
10
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(
Yann Garcia's avatar
Yann Garcia committed
11
12
13
14
                                        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
15
16
  ) := {
    address_            := p_address,
Yann Garcia's avatar
Yann Garcia committed
17
18
19
    accessPointId       := p_access_point_id,
    zoneId              := p_zone_id,
    resourceURL         := p_resource_url,
Yann Garcia's avatar
Yann Garcia committed
20
21
22
23
24
25
    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
26
27
28
                                           template (present) Address p_address := ?,
                                           template (present) AccessPointId p_access_point_id := ?,
                                           template (present) ZoneId p_zone_id := ?,
Yann Garcia's avatar
Yann Garcia committed
29
                                           template (present) universal charstring p_resource_url := ?
Yann Garcia's avatar
Yann Garcia committed
30
31
  ) := {
    address_            := p_address,
Yann Garcia's avatar
Yann Garcia committed
32
33
34
    accessPointId       := p_access_point_id,
    zoneId              := p_zone_id,
    resourceURL         := p_resource_url,
Yann Garcia's avatar
Yann Garcia committed
35
36
37
38
    locationInfo        := *,
    contextLocationInfo := *,
    ancillaryInfo       := *
  } // End of template mw_user_info
Yann Garcia's avatar
Yann Garcia committed
39
40
41

  template (omit) UserList m_user_list(
                                       in template (omit) UserInfos p_userInfo := omit,
Yann Garcia's avatar
Yann Garcia committed
42
                                       in ResourceURL p_resource_url
Yann Garcia's avatar
Yann Garcia committed
43
44
45
46
47
48
49
                                       ) := {
    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
50
                                 template (present) ResourceURL p_resource_url := ?
Yann Garcia's avatar
Yann Garcia committed
51
52
53
54
                                 ) := {
    user        := p_userInfo,
    resourceURL := p_resource_url
  } // End of template mw_user_list
Yann Garcia's avatar
Yann Garcia committed
55
56
57
58
  
  template (value) LocationInfo m_location_info(
                                                in float p_latitude,
                                                in float p_longitude,
Yann Garcia's avatar
Yann Garcia committed
59
                                                in UInt32 p_accuracy
Yann Garcia's avatar
Yann Garcia committed
60
61
62
63
64
65
66
67
68
69
  ) := {
    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 := ?,
Yann Garcia's avatar
Yann Garcia committed
70
                                                   template (present) UInt32 p_accuracy := ?
Yann Garcia's avatar
Yann Garcia committed
71
72
73
74
75
76
77
78
  ) := {
    latitude  := p_latitude,
    longitude := p_longitude,
    altitude  := *,
    accuracy  := p_accuracy
  } // End of template mw_location_info
  
  template (value) ZoneInfo m_zone_info(
Yann Garcia's avatar
Yann Garcia committed
79
80
81
82
83
                                        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
84
                                        ) := {
Yann Garcia's avatar
Yann Garcia committed
85
86
87
88
89
    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
90
91
92
  } // End of template m_zone_info
  
  template (present) ZoneInfo mw_zone_info(
Yann Garcia's avatar
Yann Garcia committed
93
94
95
96
97
                                           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
98
                                           ) := {
Yann Garcia's avatar
Yann Garcia committed
99
100
101
102
103
    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
104
105
  } // End of template mw_zone_info
  
Yann Garcia's avatar
Yann Garcia committed
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
  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
  
Yann Garcia's avatar
Yann Garcia committed
126
} // End of module LocationAPI_Templates