Space Engineers
Classes | Public Member Functions | Properties | List of all members
Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup Class Reference
Inheritance diagram for Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup:
VRage.Network.IMyStateGroup VRage.Network.IMyNetObject VRage.Network.IMyEventOwner

Public Member Functions

 MyEntityInventoryStateGroup (MyInventory entity, bool attach, IMyReplicable owner)
 
void CreateClientData (MyClientStateBase forClient)
 Called on server new clients starts replicating this group. More...
 
void DestroyClientData (MyClientStateBase forClient)
 Called on server when client stops replicating this group. More...
 
void ClientUpdate (MyTimeSpan clientTimestamp)
 Update method called on client. More...
 
void Destroy ()
 Called when state group is being destroyed. More...
 
float GetGroupPriority (int frameCountWithoutSync, MyClientInfo client)
 Gets priority related to client. When priority is lower than zero, it means the object is not relevant for client. Default priority is 1.0f. More...
 
float GetPriorityStateGroup (MyClientInfo client)
 
void Serialize (BitStream stream, EndpointId forClient, MyTimeSpan timestamp, byte packetId, int maxBitPosition)
 (De)serializes group state or it's diff for client. When writing, you can write beyond maxBitPosition, but message won't be sent and ACKs won't be received for it. ReplicationServer will detect, that state group written beyond packet size and revert it. When nothing written, ReplicationServer will detect that and state group won't receive ACK for that packet id. More...
 
void OnAck (MyClientStateBase forClient, byte packetId, bool delivered)
 Called for each packet id sent to client from this state group. When ACK received, called immediatelly. When several other packets received from client, but some were missing, called for each missing packet. More...
 
void ForceSend (MyClientStateBase clientData)
 
void TimestampReset (MyTimeSpan timestamp)
 
bool IsStillDirty (EndpointId forClient)
 

Properties

IMyReplicable Owner [get]
 
StateGroupEnum GroupType [get]
 
- Properties inherited from VRage.Network.IMyStateGroup
StateGroupEnum GroupType [get]
 
IMyReplicable Owner [get]
 

Detailed Description

Definition at line 21 of file MyEntityInventoryStateGroup.cs.

Constructor & Destructor Documentation

Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.MyEntityInventoryStateGroup ( MyInventory  entity,
bool  attach,
IMyReplicable  owner 
)
inline

Definition at line 72 of file MyEntityInventoryStateGroup.cs.

Member Function Documentation

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.ClientUpdate ( MyTimeSpan  clientTimestamp)
inline

Update method called on client.

Implements VRage.Network.IMyStateGroup.

Definition at line 141 of file MyEntityInventoryStateGroup.cs.

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.CreateClientData ( MyClientStateBase  forClient)
inline

Called on server new clients starts replicating this group.

Implements VRage.Network.IMyStateGroup.

Definition at line 98 of file MyEntityInventoryStateGroup.cs.

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.Destroy ( )
inline

Called when state group is being destroyed.

Implements VRage.Network.IMyStateGroup.

Definition at line 145 of file MyEntityInventoryStateGroup.cs.

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.DestroyClientData ( MyClientStateBase  forClient)
inline

Called on server when client stops replicating this group.

Implements VRage.Network.IMyStateGroup.

Definition at line 133 of file MyEntityInventoryStateGroup.cs.

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.ForceSend ( MyClientStateBase  clientData)
inline

Implements VRage.Network.IMyStateGroup.

Definition at line 882 of file MyEntityInventoryStateGroup.cs.

float Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.GetGroupPriority ( int  frameCountWithoutSync,
MyClientInfo  forClient 
)
inline

Gets priority related to client. When priority is lower than zero, it means the object is not relevant for client. Default priority is 1.0f.

Parameters
frameCountWithoutSyncHow long (in update frame count) has client not received sync of this state group.
forClientClient for whom is the priority get.

Implements VRage.Network.IMyStateGroup.

Definition at line 149 of file MyEntityInventoryStateGroup.cs.

float Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.GetPriorityStateGroup ( MyClientInfo  client)
inline

Definition at line 205 of file MyEntityInventoryStateGroup.cs.

bool Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.IsStillDirty ( EndpointId  forClient)
inline

Implements VRage.Network.IMyStateGroup.

Definition at line 891 of file MyEntityInventoryStateGroup.cs.

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.OnAck ( MyClientStateBase  forClient,
byte  packetId,
bool  delivered 
)
inline

Called for each packet id sent to client from this state group. When ACK received, called immediatelly. When several other packets received from client, but some were missing, called for each missing packet.

Parameters
forClientThe client.
packetIdId of the delivered or lost packet.
deliveredTrue when packet was delivered, false when packet is considered lost.

Implements VRage.Network.IMyStateGroup.

Definition at line 862 of file MyEntityInventoryStateGroup.cs.

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.Serialize ( BitStream  stream,
EndpointId  forClient,
MyTimeSpan  timestamp,
byte  packetId,
int  maxBitPosition 
)
inline

(De)serializes group state or it's diff for client. When writing, you can write beyond maxBitPosition, but message won't be sent and ACKs won't be received for it. ReplicationServer will detect, that state group written beyond packet size and revert it. When nothing written, ReplicationServer will detect that and state group won't receive ACK for that packet id.

Parameters
streamStream to write to or read from.
forClientWhen writing the client which will receive the data. When reading, it's null.
packetIdId of packet in which the data will be sent or from which the data is received.
maxBitPositionMaximum position in bit stream where you can write data, it's inclusive.

Implements VRage.Network.IMyStateGroup.

Definition at line 243 of file MyEntityInventoryStateGroup.cs.

void Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.TimestampReset ( MyTimeSpan  timestamp)
inline

Implements VRage.Network.IMyStateGroup.

Definition at line 887 of file MyEntityInventoryStateGroup.cs.

Property Documentation

StateGroupEnum Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.GroupType
get

Definition at line 69 of file MyEntityInventoryStateGroup.cs.

IMyReplicable Sandbox.Game.Replication.StateGroups.MyEntityInventoryStateGroup.Owner
get

Definition at line 53 of file MyEntityInventoryStateGroup.cs.


The documentation for this class was generated from the following file: