LocationAPI_Templates.ttcn 4.62 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
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