Skip to content

five-on-it / packages/protocol/src/messages / encodeAiReadout

Function: encodeAiReadout() ​

encodeAiReadout(readout): string

Defined in: packages/protocol/src/messages.ts:588

Serializes a readout as a text frame.

Parameters ​

readout ​

alert? ​

string = ...

cameras? ​

object[] = ...

npcs ​

object[] = ...

pedestrians? ​

object[] = ...

roles? ​

object[] = ...

sentries? ​

object[] = ...

tick ​

number = ...

traffic? ​

{ cars: object[]; target: number; walkers: object[]; } = ...

traffic.cars ​

object[] = ...

traffic.target ​

number = ...

traffic.walkers ​

object[] = ...

type ​

"ai" = ...

Returns ​

string