Kitt.Message.TIM (kitt v0.4.0) View Source

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

A TIM defines a generic message type used to relay various advisory notifications to equipped devices, including but not limited to vehicles

Link to this section Summary

Functions

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

Returns the TIM identifying atom recognized by the ASN1 spec

Returns the TIM identifying integer

Link to this section Types

Specs

area() ::
  {:shapePointSet, shape_point_set()}
  | {:circle, circle()}
  | {:regionPointSet, region_point_set()}

Specs

circle() :: %{
  center: Kitt.Types.position_3d(),
  radius: non_neg_integer(),
  units:
    :centimeter
    | :"cm2-5"
    | :decimeter
    | :meter
    | :kilometer
    | :foot
    | :yard
    | :mile
}

Specs

content() ::
  {:advisory, [itis_item()]}
  | {:workZone, itis_item()}
  | {:genericSign, itis_item()}
  | {:speedLimit, itis_item()}
  | {:exitService, itis_item()}

Specs

description() ::
  {:path, Kitt.Types.offset_system()}
  | {:geometry, geometric_projection()}
  | {:oldRegion, valid_region()}
  | {:regional, [Kitt.Types.regional_extension()]}

Specs

direction_of_use() :: :unavailable | :forward | :reverse | :both

Specs

geographical_path() :: %{
  name: String.t(),
  id: Kitt.Types.road_segment_reference_id(),
  anchor: Kitt.Types.position_3d(),
  laneWidth: non_neg_integer(),
  directionality: direction_of_use(),
  closedPath: boolean(),
  direction: Kitt.Types.angle(),
  description: description(),
  regional: [Kitt.Types.regional_extension()]
}
Link to this type

geometric_projection()

View Source

Specs

geometric_projection() :: %{
  direction: Kitt.Types.angle(),
  extent: Kitt.Types.extent(),
  laneWidth: non_neg_integer(),
  circle: circle(),
  regional: [Kitt.Types.regional_extension()]
}

Specs

itis_item() :: {:itis, non_neg_integer()} | {:text, String.t()}

Specs

msg_id() :: {:furtherInfoID, non_neg_integer()} | {:roadSignID, road_sign_id()}

Specs

region_offset() :: %{xOffset: integer(), yOffset: integer(), zOffset: integer()}

Specs

region_point_set() :: %{
  anchor: Kitt.Types.position_3d(),
  scale: non_neg_integer(),
  nodeList: [region_offset()]
}

Specs

road_sign_id() :: %{
  position: Kitt.Types.position_3d(),
  viewAngle: Kitt.Types.angle(),
  mutcdCode:
    :none
    | :regulatory
    | :warning
    | :maintenance
    | :motoristService
    | :guide
    | :rec,
  crc: non_neg_integer()
}

Specs

shape_point_set() :: %{
  achor: Kitt.Types.position_3d(),
  laneWidth: non_neg_integer(),
  directionality: direction_of_use()
}

Specs

t() :: %Kitt.Message.TIM{
  dataFrames: [traveler_data_frame()],
  msgCnt: non_neg_integer(),
  packetID: non_neg_integer(),
  regional: [Kitt.Types.regional_extension()],
  timeStamp: Kitt.Types.minute_of_year(),
  urlB: String.t()
}

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

Specs

traveler_data_frame() :: %{
  sspTimRights: non_neg_integer(),
  frameType: :unknown | :advisory | :roadSignage | :commercialSignage,
  msdId: msg_id(),
  startYear: non_neg_integer(),
  startTime: non_neg_integer(),
  durationTime: non_neg_integer(),
  priority: non_neg_integer(),
  sspLocationRights: non_neg_integer(),
  regions: [geographical_path()],
  sspMsgRights1: non_neg_integer(),
  sspMsgRights2: non_neg_integer(),
  content: content(),
  url: String.t()
}

Specs

valid_region() :: %{
  direction: Kitt.Types.angle(),
  extent: Kitt.Types.extent(),
  area: area()
}

Link to this section Functions

Specs

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

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

Specs

type() :: atom()

Returns the TIM identifying atom recognized by the ASN1 spec

Specs

type_id() :: non_neg_integer()

Returns the TIM identifying integer