Kitt.Message.SRM (kitt v0.4.0) 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

Specs

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

Specs

requestor_position_vector() :: %{
  position: Kitt.Types.position_3d(),
  heading: non_neg_integer(),
  speed: Kitt.Types.transmission_and_speed()
}

Specs

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

Specs

signal_request_package() :: %{
  request: signal_request(),
  minute: non_neg_integer(),
  second: non_neg_integer(),
  duration: non_neg_integer(),
  regional: [Kitt.Types.regional_extension()]
}

Specs

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

Specs

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

Link to this section Functions

Specs

new(map() | keyword()) :: t()

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

Specs

type() :: atom()

Returns the SRM identifying atom recognized by the ASN1 spec

Specs

type_id() :: non_neg_integer()

Returns the SRM identifying integer