kitt v0.3.0 Kitt.Message.SRM View Source

Defines the structure and instantiation function for creating a J2735-compliant SignalRequestMessage

An SRM defines the interchange of a DSRC-capable vehicle with the infrastructure regarding signal and timing information pertaining to an intersection

Link to this section Summary

Types

t()

Defines the structure of a SignalRequestMessage and the data elements comprising its fields

Functions

Produces an SRM message struct from an equivalent map or keyword input

Returns the SRM identifying atom recognized by the ASN1 spec

Returns the SRM identifying integer

Link to this section Types

Link to this type

requestor_description()

View Source
requestor_description() :: %{
  id: Kitt.Types.vehicle_id(),
  type: Kitt.Types.requestor_type(),
  position: requestor_position_vector(),
  name: String.t(),
  routeName: String.t(),
  transitStatus: transit_status(),
  transitOccupancy:
    :occupancyUnknown
    | :occupancyEmpty
    | :occupancyVeryLow
    | :occupancyLow
    | :occupancyMed
    | :occupancyHigh
    | :occupancyNearlyFull
    | :occupancyFull,
  transitSchedule: integer(),
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

requestor_position_vector()

View Source
requestor_position_vector() :: %{
  position: Kitt.Types.position_3d(),
  heading: non_neg_integer(),
  speed: Kitt.Types.transmission_and_speed()
}
Link to this type

signal_request()

View Source
signal_request() :: %{
  id: Kitt.Types.intersection_reference_id(),
  requestID: non_neg_integer(),
  requestType:
    :priorityRequestTypeReserved
    | :priorityRequest
    | :priorityRequestUpdate
    | :priorityCancellation,
  inBoundLane: Kitt.Types.intersection_access_point(),
  outBoundLane: Kitt.Types.intersection_access_point(),
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

signal_request_package()

View Source
signal_request_package() :: %{
  request: signal_request(),
  minute: non_neg_integer(),
  second: non_neg_integer(),
  duration: non_neg_integer(),
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

t()

View Source
t() :: %Kitt.Message.SRM{
  regional: [Kitt.Types.regional_extension()],
  requestor: requestor_description(),
  requests: [signal_request_package()],
  second: non_neg_integer(),
  sequenceNumber: non_neg_integer(),
  timeStamp: Kitt.Types.minute_of_year()
}

Defines the structure of a SignalRequestMessage and the data elements comprising its fields

Link to this type

transit_status()

View Source
transit_status() :: :none | :anADAuse | :aBikeLoad | :doorOpen | :occM | :occL

Link to this section Functions

Produces an SRM message struct from an equivalent map or keyword input

Returns the SRM identifying atom recognized by the ASN1 spec

Returns the SRM identifying integer