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

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

A PSM defines the information exchanged between non-vehicle actors within a DSRC-capable environment and the vehicles and infrastructure of the environment

Link to this section Summary

Types

t()

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

Functions

Produces the PSM message struct from an equivalent map or keyword input

Returns the PSM identifying atom recognized by the ASN1 spec

Returns the PSM identifying integer

Link to this section Types

Specs

activity() ::
  :unavailable
  | :workingOnRoad
  | :settingUpClosures
  | :respondingToEvents
  | :directingTraffic
  | :otherActivities

Specs

assistance() ::
  :unavailable | :otherType | :vision | :hearing | :movement | :cognitition

Specs

sizing() ::
  :unavailable | :smallStature | :largeStature | :erraticMoving | :slowMoving

Specs

sub_activity() ::
  :unavailable
  | :policeAndTrafficOfficers
  | :trafficControlPersons
  | :railroadCrossingGuards
  | :civilDefenseNationalGuardMilitaryPolice
  | :emergencyOrganizationPersonnel
  | :highwayServiceVehiclePersonnel

Specs

t() :: %Kitt.Message.PSM{
  accelSet: Kitt.Types.acceleration_set_4_way(),
  accuracy: Kitt.Types.positional_accuracy(),
  activitySubType: sub_activity(),
  activityType: activity(),
  assistType: assistance(),
  attachment:
    :unavailable
    | :stroller
    | :bicycleTrailer
    | :cart
    | :wheelchair
    | :otherWalkAssistAttachments
    | :pet
    | {:asn1_enum, integer()},
  attachmentRadius: non_neg_integer(),
  basicType:
    :unavailable
    | :aPEDESTRIAN
    | :aPEDALCYCLIST
    | :aPUBLICSAFETYWORKER
    | :anANIMAL
    | {:asn1_enum, non_neg_integer()},
  clusterRadius: non_neg_integer(),
  clusterSize:
    :unavailable | :small | :medium | :large | {:asn1_enum, non_neg_integer()},
  crossRequest: boolean(),
  crossState: boolean(),
  eventResponderType:
    :unavailable
    | :towOperator
    | :fireAndEMSWorker
    | :aDOTWorker
    | :lawEnforcement
    | :hazmatResponder
    | :animalControlWorker
    | :otherPersonnel
    | {:asn1_enum, non_neg_integer()},
  heading: non_neg_integer(),
  id: non_neg_integer(),
  msgCnt: non_neg_integer(),
  pathHistory: Kitt.Types.path_history(),
  pathPrediction: Kitt.Types.path_prediction(),
  position: Kitt.Types.position_3d(),
  propulsion:
    {:human,
     :unavailable
     | :otherTypes
     | :onFoot
     | :skateBoard
     | :pushOrKickScooter
     | :wheelchair}
    | {:animal,
       :unavailable | :otherTypes | :animalMounted | :animalDrawnCarriage}
    | {:motor,
       :unavailable
       | :otherTypes
       | :wheelChair
       | :bicycle
       | :scooter
       | :selfBalancingDevice},
  regional: [Kitt.Types.regional_extension()],
  secMark: non_neg_integer(),
  sizing: sizing(),
  speed: non_neg_integer(),
  useState: use_state()
}

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

Specs

use_state() ::
  :unavailable
  | :other
  | :idle
  | :listeningToAudio
  | :typing
  | :calling
  | :playingGames
  | :reading
  | :viewing

Link to this section Functions

Specs

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

Produces the PSM message struct from an equivalent map or keyword input

Specs

type() :: atom()

Returns the PSM identifying atom recognized by the ASN1 spec

Specs

type_id() :: non_neg_integer()

Returns the PSM identifying integer