Interface ITickSink
Receives a decoded TICK, block by block, in stream order — the blocks Read<TSink>(ReadOnlySpan<byte>, CatalogPlan, ref TSink, TickBlocks) was asked for. Field values arrive
through the IFieldSink members between the record call that opened them and the next record call.
public interface ITickSink : IFieldSink
- Inherited Members
Methods
Ack(ushort, byte)
A command rejection.
void Ack(ushort seq, byte reason)
Parameters
sequshortThe rejected command's sequence.
reasonbyteThe reason code (AckReasons).
AggregateCell(uint, scoped ReadOnlySpan<uint>)
One changed cell's counts, one per Archetypes entry.
void AggregateCell(uint cell, scoped ReadOnlySpan<uint> counts)
Parameters
celluintThe row-major cell index.
countsReadOnlySpan<uint>The counts; valid only for the duration of the call.
BeginAggregate(CatalogGrid, bool)
An AGG block begins.
void BeginAggregate(CatalogGrid grid, bool reset)
Parameters
gridCatalogGridThe grid.
resetboolWhether every cell not listed is now empty.
BeginEntities(ArchetypePlan)
An ENTITIES block begins.
void BeginEntities(ArchetypePlan archetype)
Parameters
archetypeArchetypePlanIts archetype.
BeginTick(uint, TickFlags, uint)
A frame begins.
void BeginTick(uint tick, TickFlags flags, uint periodUs)
Parameters
tickuintThe frame's tick.
flagsTickFlagsThe frame's flags.
periodUsuintThe elapsed interval's period when Period is set, otherwise 0.
Debug(byte, scoped ReadOnlySpan<byte>)
A DEBUG sub-block.
void Debug(byte subType, scoped ReadOnlySpan<byte> payload)
Parameters
subTypebyteThe sub-block type.
payloadReadOnlySpan<byte>Its bytes; valid only for the duration of the call.
EndTick()
The frame ends.
void EndTick()
Enter(uint, scoped ReadOnlySpan<double>, scoped ReadOnlySpan<double>, uint, byte)
An enter record: its position, then every public field in wire order through the field members.
void Enter(uint netId, scoped ReadOnlySpan<double> position, scoped ReadOnlySpan<double> velocity, uint t0, byte epoch)
Parameters
netIduintThe entity.
positionReadOnlySpan<double>The position, empty when the archetype is not spatial.
velocityReadOnlySpan<double>The velocity per tick, empty unless the archetype moves linearly.
t0uintThe segment's start tick, 0 unless the archetype moves.
epochbyteThe teleport counter, 0 unless the archetype moves.
Event(MessagePlan)
An event: its fields follow through the field members.
void Event(MessagePlan type)
Parameters
typeMessagePlanThe event type.
Ext(uint, scoped ReadOnlySpan<byte>)
An EXT block.
void Ext(uint appTypeId, scoped ReadOnlySpan<byte> payload)
Parameters
appTypeIduintThe application's payload type.
payloadReadOnlySpan<byte>Its bytes; valid only for the duration of the call.
Leave(uint)
A leave. Applied last in the frame by a store, so an event can still resolve the entity.
void Leave(uint netId)
Parameters
netIduintThe entity.
Metric(MetricPlan, int, double)
One metric value.
void Metric(MetricPlan metric, int valueIndex, double value)
Parameters
metricMetricPlanThe metric.
valueIndexintWhich value of a labelled metric, 0 for a scalar.
valuedoubleThe value.
Segment(uint, scoped ReadOnlySpan<double>, scoped ReadOnlySpan<double>, uint, byte)
A motion segment.
void Segment(uint netId, scoped ReadOnlySpan<double> position, scoped ReadOnlySpan<double> velocity, uint t0, byte epoch)
Parameters
netIduintThe entity.
positionReadOnlySpan<double>The segment's start position.
velocityReadOnlySpan<double>The velocity per tick, empty for the
nonemodel.t0uintThe segment's start tick.
epochbyteThe teleport counter; never interpolate across a change.
Self(ArchetypePlan, uint, ushort, byte)
The SELF block: the owner groups in ownerMask follow through the field members.
void Self(ArchetypePlan archetype, uint netId, ushort lastSeq, byte ownerMask)
Parameters
archetypeArchetypePlanThe controlled entity's archetype.
netIduintThe controlled entity.
lastSequshortThe highest command sequence drained into a tick at or before this frame's.
ownerMaskbyteBit i set when owner group i is carried.
Source(ushort, byte, ushort)
A source lifecycle entry.
void Source(ushort requestId, byte status, ushort code)
Parameters
requestIdushortThe client-chosen request id.
statusbytecodeushortThe error code, 0 when applied.
State(uint, byte)
A state record: the fields of the groups in groupMask follow through the field members.
void State(uint netId, byte groupMask)
Parameters
UnknownBlock(byte)
A block of a type this library does not know, skipped.
void UnknownBlock(byte blockType)
Parameters
blockTypebyteThe type byte.