kitt v0.3.0 Kitt.Message.PSM 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

Link to this type

activity()

View Source
activity() ::
  :unavailable
  | :workingOnRoad
  | :settingUpClosures
  | :respondingToEvents
  | :directingTraffic
  | :otherActivities
Link to this type

assistance()

View Source
assistance() ::
  :unavailable | :otherType | :vision | :hearing | :movement | :cognitition
Link to this type

sizing()

View Source
sizing() ::
  :unavailable | :smallStature | :largeStature | :erraticMoving | :slowMoving
Link to this type

sub_activity()

View Source
sub_activity() ::
  :unavailable
  | :policeAndTrafficOfficers
  | :trafficControlPersons
  | :railroadCrossingGuards
  | :civilDefenseNationalGuardMilitaryPolice
  | :emergencyOrganizationPersonnel
  | :highwayServiceVehiclePersonnel
Link to this type

t()

View Source
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

Link to this type

use_state()

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

Link to this section 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