LocationAPI_Templates.ttcn 15.7 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
module LocationAPI_Templates {
  
YannGarcia's avatar
YannGarcia committed
  // JSON
  import from JSON all;
  
Yann Garcia's avatar
Yann Garcia committed
  // 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
                                        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
  ) := {
    address_            := p_address,
Yann Garcia's avatar
Yann Garcia committed
    accessPointId       := p_access_point_id,
    zoneId              := p_zone_id,
    resourceURL         := p_resource_url,
Yann Garcia's avatar
Yann Garcia committed
    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
                                           template (present) Address p_address := ?,
                                           template (present) AccessPointId p_access_point_id := ?,
                                           template (present) ZoneId p_zone_id := ?,
YannGarcia's avatar
YannGarcia committed
                                           template (present) ResourceURL p_resource_url := ?
Yann Garcia's avatar
Yann Garcia committed
  ) := {
    address_            := p_address,
Yann Garcia's avatar
Yann Garcia committed
    accessPointId       := p_access_point_id,
    zoneId              := p_zone_id,
    resourceURL         := p_resource_url,
Yann Garcia's avatar
Yann Garcia committed
    locationInfo        := *,
    contextLocationInfo := *,
    ancillaryInfo       := *
  } // End of template mw_user_info
Yann Garcia's avatar
Yann Garcia committed

  template (omit) UserList m_user_list(
                                       in template (omit) UserInfos p_userInfo := omit,
Yann Garcia's avatar
Yann Garcia committed
                                       in ResourceURL p_resource_url
Yann Garcia's avatar
Yann Garcia committed
                                       ) := {
    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
                                 template (present) ResourceURL p_resource_url := ?
Yann Garcia's avatar
Yann Garcia committed
                                 ) := {
    user        := p_userInfo,
    resourceURL := p_resource_url
  } // End of template mw_user_list
Yann Garcia's avatar
Yann Garcia committed
  
  template (value) LocationInfo m_location_info(
YannGarcia's avatar
YannGarcia committed
                                                in JSON.Number p_latitude,
                                                in JSON.Number p_longitude,
                                                in Shape p_shape := POLYGON,
                                                in VelocityType p_velocityType := HORIZONTAL_VERTICAL_UNCERT
Yann Garcia's avatar
Yann Garcia committed
  ) := {
    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
  } // End of template m_location_info
  
  template (present) LocationInfo mw_location_info(
YannGarcia's avatar
YannGarcia committed
                                                   template (present) JSON.Number p_latitude := ?,
                                                   template (present) JSON.Number p_longitude := ?,
                                                   template (present) Shape p_shape := ?
Yann Garcia's avatar
Yann Garcia committed
  ) := {
    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
  } // End of template mw_location_info
  
  template (value) ZoneInfo m_zone_info(
Yann Garcia's avatar
Yann Garcia committed
                                        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
                                        ) := {
Yann Garcia's avatar
Yann Garcia committed
    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
  } // End of template m_zone_info
  
  template (present) ZoneInfo mw_zone_info(
Yann Garcia's avatar
Yann Garcia committed
                                           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
                                           ) := {
Yann Garcia's avatar
Yann Garcia committed
    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
  } // End of template mw_zone_info
  
Yann Garcia's avatar
Yann Garcia committed
  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
  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
  
  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
    clientCorrelator  := p_clientCorrelator,
    callbackReference := p_callbackReference,
    address_          := p_address,
    userEventCriteria := p_userEventCriteria,
    resourceURL       := p_resourceURL
  } // End of template mw_user_tracking_subscription
  
  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
  
  template (omit) CircleNotificationSubscription m_circle_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
  } // End of template m_circle_notification_subscription
  
  template CircleNotificationSubscription mw_circle_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 m_wcircle_notification_subscription
  
  template (value) TerminalDistance m_terminal_distance(in JSON.Number p_distance) := {
    distance := p_distance
  } // End of template m_terminal_distance
  
  template (present) TerminalDistance mw_terminal_distance(template (present) JSON.Number p_distance := ?) := {
    distance := p_distance
  } // 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
} // End of module LocationAPI_Templates