SCRC v0.5.1 Scrc.ActorData View Source

ActorData provides struct for SCRC actor data.

Link to this section Summary

Functions

Clip values according to field specification

Parse binary according to field/prefix specification and return Struct

Create new Struct based on values. Apply post-processing (if needed)

Callback for postprocessing after creation from binary

Create binary from struct according to field/prefix specification

Link to this section Types

Link to this type t() View Source
t() :: %Scrc.ActorData{
  acceleration: float(),
  brake: float(),
  clutch: float(),
  focus: float(),
  gear: integer(),
  meta: integer(),
  steer: float()
}

Link to this section Functions

Clip values according to field specification

Link to this function from_binary(binary) View Source
from_binary(binary()) :: Scrc.ActorData.t()

Parse binary according to field/prefix specification and return Struct

Create new Struct based on values. Apply post-processing (if needed).

Callback for postprocessing after creation from binary.

By default simply return the passed data

Create binary from struct according to field/prefix specification.