Table of Contents

Class Serialize

Namespace
Coherence.Serializer
Assembly
Coherence.Serializer.dll
public static class Serialize
Inheritance
Serialize

Fields

MAX_SERIALIZED_MESSAGE_BYTES

public const int MAX_SERIALIZED_MESSAGE_BYTES = 1024

Field Value

int

NUM_BITS_FOR_AUTHORITY

public const int NUM_BITS_FOR_AUTHORITY = 1

Field Value

int

NUM_BITS_FOR_COMMAND_HEADER

public const uint NUM_BITS_FOR_COMMAND_HEADER = 8

Field Value

uint

NUM_BITS_FOR_COMPONENT_COUNT

public const int NUM_BITS_FOR_COMPONENT_COUNT = 5

Field Value

int

NUM_BITS_FOR_COMPONENT_STATE

public const int NUM_BITS_FOR_COMPONENT_STATE = 2

Field Value

int

NUM_BITS_FOR_DESTROY_REASON

public const int NUM_BITS_FOR_DESTROY_REASON = 3

Field Value

int

NUM_BITS_FOR_LOD

public const int NUM_BITS_FOR_LOD = 4

Field Value

int

NUM_BITS_FOR_MESSAGE_TARGET

public const int NUM_BITS_FOR_MESSAGE_TARGET = 2

Field Value

int

NUM_BITS_FOR_OPERATION

public const int NUM_BITS_FOR_OPERATION = 2

Field Value

int

NUM_BITS_FOR_ORPHAN

public const int NUM_BITS_FOR_ORPHAN = 1

Field Value

int

NUM_BITS_FOR_SIMFRAME_DELTA_FLAG

public const int NUM_BITS_FOR_SIMFRAME_DELTA_FLAG = 1

Field Value

int

Methods

SerializeMessage(MessageType, MessageTarget, IEntityMessage, Entity, ISchemaSpecificComponentSerialize, bool, Logger)

public static SerializedEntityMessage SerializeMessage(MessageType messageType, MessageTarget target, IEntityMessage message, Entity id, ISchemaSpecificComponentSerialize serializer, bool useDebugStream, Logger logger)

Parameters

messageType MessageType
target MessageTarget
message IEntityMessage
id Entity
serializer ISchemaSpecificComponentSerialize
useDebugStream bool
logger Logger

Returns

SerializedEntityMessage

SerializeUpdated(EntityChange, AbsoluteSimulationFrame, ISchemaSpecificComponentSerialize, IOutBitStream, IOutProtocolBitStream, ref ushort, out uint, Logger)

public static void SerializeUpdated(EntityChange change, AbsoluteSimulationFrame referenceSimulationFrame, ISchemaSpecificComponentSerialize componentSerializer, IOutBitStream bitStream, IOutProtocolBitStream protocolStream, ref ushort lastIndex, out uint bitsTaken, Logger logger)

Parameters

change EntityChange
referenceSimulationFrame AbsoluteSimulationFrame
componentSerializer ISchemaSpecificComponentSerialize
bitStream IOutBitStream
protocolStream IOutProtocolBitStream
lastIndex ushort
bitsTaken uint
logger Logger

WriteEntityUpdates(List<EntityChange>, AbsoluteSimulationFrame, ISchemaSpecificComponentSerialize, IOutBitStream, bool, uint, Logger)

public static List<Entity> WriteEntityUpdates(List<EntityChange> changes, AbsoluteSimulationFrame referenceSimulationFrame, ISchemaSpecificComponentSerialize componentSerializer, IOutBitStream bitStream, bool useDebugStream, uint bitsRemainingInEmptyPacket, Logger logger)

Parameters

changes List<EntityChange>
referenceSimulationFrame AbsoluteSimulationFrame
componentSerializer ISchemaSpecificComponentSerialize
bitStream IOutBitStream
useDebugStream bool
bitsRemainingInEmptyPacket uint
logger Logger

Returns

List<Entity>

WriteFloatingOrigin(Vector3d, IOutBitStream, Logger)

public static void WriteFloatingOrigin(Vector3d floatingOrigin, IOutBitStream bitStream, Logger logger)

Parameters

floatingOrigin Vector3d
bitStream IOutBitStream
logger Logger

WriteMessages(MessageType, Queue<SerializedEntityMessage>, IOutBitStream, bool, Logger)

public static Queue<SerializedEntityMessage> WriteMessages(MessageType messageType, Queue<SerializedEntityMessage> messages, IOutBitStream bitStream, bool useDebugStreams, Logger logger)

Parameters

messageType MessageType
messages Queue<SerializedEntityMessage>
bitStream IOutBitStream
useDebugStreams bool
logger Logger

Returns

Queue<SerializedEntityMessage>