kitt v0.3.0 Kitt.Message.SPAT View Source

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

A SPAT defines the messages generated by the roadside infrastructure regarding current and pending signal status and expected timing of signal status changes.

Link to this section Summary

Types

t()

Defines the structure of a SignalPhaseandTiming message and the data elements comprising its fields

Functions

Produces a SPAT message struct from an equivalent map or keyword input

Returns the SPAT identifying atom recognized by the ASN1 spec

Returns the SPAT identifying integer

Link to this section Types

Link to this type

advisory_speed()

View Source
advisory_speed() :: %{
  type: :none | :greenwave | :ecoDrive | :transit,
  speed: non_neg_integer(),
  confidence:
    :unavailable
    | :prec100ms
    | :prec10ms
    | :prec5ms
    | :prec1ms
    | :"prec0-1ms"
    | :"prec0-05ms"
    | :"prec0-01ms",
  distance: non_neg_integer(),
  class: non_neg_integer(),
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

connection_maneuver_assist()

View Source
connection_maneuver_assist() :: %{
  connectionID: non_neg_integer(),
  queueLength: non_neg_integer(),
  availableStorageLength: non_neg_integer(),
  waitOnStop: boolean(),
  pedBicycleDetect: boolean(),
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

intersection_state()

View Source
intersection_state() :: %{
  name: String.t(),
  id: Kitt.Types.intersection_reference_id(),
  revision: non_neg_integer(),
  status: status(),
  moy: Kitt.Types.minute_of_year(),
  timeStamp: non_neg_integer(),
  enabledLanes: [non_neg_integer()],
  states: [movement_state()],
  maneuverAssistList: [connection_maneuver_assist()],
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

movement_event()

View Source
movement_event() :: %{
  eventState:
    :unavailable
    | :dark
    | :"stop-Then-Proceed"
    | :"stop-And-Remain"
    | :"pre-Movement"
    | :"permissive-Movement-Allowed"
    | :"protected-Movement-Allowed"
    | :"permissive-clearance"
    | :"protected-clearance"
    | :"caution-Conflicting-Traffic",
  timing: time_change_details(),
  speeds: [advisory_speed()],
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

movement_state()

View Source
movement_state() :: %{
  movementName: String.t(),
  signalGroup: non_neg_integer(),
  "state-time-speed": [movement_event()],
  maneuverAssistList: [connection_maneuver_assist()],
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

status()

View Source
status() ::
  :manualControlIsEnabled
  | :stopTimeIsActivated
  | :failureFlash
  | :preemptIsActive
  | :signalPriorityIsActive
  | :fixedTimeOperation
  | :trafficDependentOperation
  | :standbyOperation
  | :failureMode
  | :off
  | :recentMAPmessageUpdate
  | :recentChangeInMAPassignedLanesIDsUsed
  | :noValidMAPisAvailableAtThisTime
  | :noValidSPATisAvailableAtThisTime
Link to this type

t()

View Source
t() :: %Kitt.Message.SPAT{
  intersections: [intersection_state()],
  name: String.t(),
  regional: [Kitt.Types.regional_extension()],
  timeStamp: Kitt.Types.minute_of_year()
}

Defines the structure of a SignalPhaseandTiming message and the data elements comprising its fields

Link to this type

time_change_details()

View Source
time_change_details() :: %{
  startTime: non_neg_integer(),
  minEndTime: non_neg_integer(),
  maxEndTime: non_neg_integer(),
  likelyTime: non_neg_integer(),
  confidence: non_neg_integer(),
  nextTime: non_neg_integer()
}

Link to this section Functions

Produces a SPAT message struct from an equivalent map or keyword input

Returns the SPAT identifying atom recognized by the ASN1 spec

Returns the SPAT identifying integer