LocationAPI_Templates.ttcn 5.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
                                        in universal charstring p_address := PX_USER,
Yann Garcia's avatar
Yann Garcia committed
12
13
                                        in universal charstring p_access_point_id := PX_ACCESS_POINT_ID,
                                        in universal charstring p_zone_id := PX_ZONE_ID,
Yann Garcia's avatar
Yann Garcia committed
14
                                        in universal charstring 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
26
    locationInfo        := omit,
    contextLocationInfo := omit,
    ancillaryInfo       := omit
  } // End of template m_user_info
  
  template (present) UserInfo mw_user_info(
                                           template (present) universal charstring p_address := ?,
Yann Garcia's avatar
Yann Garcia committed
27
28
                                           template (present) universal charstring p_access_point_id := ?,
                                           template (present) universal charstring 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
42
43
44
45
46
47
48
49
50
51
52
53
54

  template (omit) UserList m_user_list(
                                       in template (omit) UserInfos p_userInfo := omit,
                                       in universal charstring p_resource_url
                                       ) := {
    user        := p_userInfo,
    resourceURL := p_resource_url
  } // End of template m_user_list
  
  template UserList mw_user_list(
                                 template UserInfos p_userInfo := *,
                                 template (present) universal charstring p_resource_url := ?
                                 ) := {
    user        := p_userInfo,
    resourceURL := p_resource_url
  } // End of template mw_user_list
Yann Garcia's avatar
Yann Garcia committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
  
  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(
Yann Garcia's avatar
Yann Garcia committed
79
80
81
82
83
                                        in universal charstring p_zone_id := PX_ZONE_ID,
                                        in UInt32 p_number_of_access_points := PX_NB_ACCESS_POINTS,
                                        in UInt32 p_number_of_unservicable_access_points := PX_NB_UNSERVICABLEL_ACCESS_POINTS,
                                        in UInt32 p_number_of_users := PX_NB_USERS,
                                        in universal charstring 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) universal charstring p_zone_id := ?,
                                           template (present) UInt32 p_number_of_access_points := ?,
                                           template (present) UInt32 p_number_of_unservicable_access_points := ?,
                                           template (present) UInt32 p_number_of_users := ?,
                                           template (present) universal charstring 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
106
  } // End of template mw_zone_info
  
} // End of module LocationAPI_Templates