![]() |
Open 3D Engine GridMate API Reference
2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <ReplicaChunk.h>
Inherits GridMate::ReplicaChunkBase, and GridMate::ReplicaChunkInterface.
Inherited by GridMate::GridMember, GridMate::Internal::GridMemberStateReplica, GridMate::Internal::GridSessionReplica, GridMate::ReplicaInternal::PeerReplica, and GridMate::ReplicaInternal::SessionInfo.
Additional Inherited Members | |
![]() | |
using | RPCQueue = AZStd::ring_buffer< Internal::RpcRequest *, SysContAlloc > |
![]() | |
void | Init (ReplicaChunkClassId chunkTypeId) |
Initializes the chunk. Must be called before the chunk can be used. | |
void | Init (ReplicaChunkDescriptor *descriptor) |
bool | IsClassType (ReplicaChunkClassId classId) const |
ReplicaChunkDescriptor * | GetDescriptor () const |
ReplicaId | GetReplicaId () const |
PeerId | GetPeerId () const |
virtual ReplicaManager * | GetReplicaManager () |
bool | IsActive () const |
bool | IsPrimary () const |
bool | IsProxy () const |
virtual void | OnAttachedToReplica (Replica *replica) |
virtual void | OnDetachedFromReplica (Replica *replica) |
virtual bool | IsReplicaMigratable ()=0 |
virtual void | UpdateChunk (const ReplicaContext &rc) |
virtual void | UpdateFromChunk (const ReplicaContext &rc) |
virtual bool | AcceptChangeOwnership (PeerId requestor, const ReplicaContext &rc) |
virtual void | OnReplicaActivate (const ReplicaContext &rc) |
virtual void | OnReplicaDeactivate (const ReplicaContext &rc) |
virtual void | OnReplicaChangeOwnership (const ReplicaContext &rc) |
virtual bool | IsUpdateFromReplicaEnabled () |
Replica * | GetReplica () |
void | SetHandler (ReplicaChunkInterface *handler) |
ReplicaChunkInterface * | GetHandler () |
ReplicaPriority | GetPriority () const |
void | SetPriority (ReplicaPriority priority) |
virtual bool | ShouldSendToPeer (ReplicaPeer *peer) const |
template<typename T > | |
bool | IsType () |
virtual bool | IsBroadcast () |
AZ::u64 | GetLastChangeStamp () const |
virtual bool | ShouldBindToNetwork () |
![]() | |
friend | Replica |
friend | RpcBase |
friend | DataSetBase |
![]() | |
static constexpr AZStd::size_t | MaxRpcQueueSize = 512 |
Specify the maximum size of a RPC queues for each replica chunk. This queue can grow while RPCs are being delivered back to all clients. | |
![]() | |
enum | Flags { RepChunk_Updated = 1 << 0 } |
![]() | |
virtual AZ::u32 | CalculateDirtyDataSetMask (MarshalContext &mc) |
virtual void | OnDataSetChanged (const DataSetBase &dataSet) |
virtual void | Marshal (MarshalContext &mc, AZ::u32 chunkIndex) |
virtual void | Unmarshal (UnmarshalContext &mc, AZ::u32 chunkIndex) |
AZ_FORCE_INLINE void | add_ref () |
void | release () |
void | AttachedToReplica (Replica *replica) |
void | DetachedFromReplica () |
bool | IsDirty (AZ::u32 marshalFlags) const |
PrepareDataResult | PrepareData (EndianType endianType, AZ::u32 marshalFlags) |
void | MarshalDataSets (MarshalContext &mc, AZ::u32 chunkIndex) |
void | MarshalRpcs (MarshalContext &mc, AZ::u32 chunkIndex) |
void | UnmarshalDataSets (UnmarshalContext &mc, AZ::u32 chunkIndex) |
void | UnmarshalRpcs (UnmarshalContext &mc, AZ::u32 chunkIndex) |
void | AddDataSetEvent (DataSetBase *dataset) |
void | SignalDataSetChanged (const DataSetBase &dataset) |
void | EnqueueMarshalTask () |
void | QueueRPCRequest (GridMate::Internal::RpcRequest *rpc) |
bool | ProcessRPCs (const ReplicaContext &rc) |
void | MarkRPCsAsRelayed () |
void | ClearPendingRPCs () |
![]() | |
unsigned int | m_refCount |
Replica * | m_replica |
ReplicaChunkDescriptor * | m_descriptor |
AZ::u32 | m_flags |
RPCQueue | m_rpcQueue {MaxRpcQueueSize} |
ReplicaChunkInterface * | m_handler |
AZStd::bitset< GM_MAX_DATASETS_IN_CHUNK > | m_reliableDirtyBits |
AZStd::bitset< GM_MAX_DATASETS_IN_CHUNK > | m_unreliableDirtyBits |
AZStd::bitset< GM_MAX_DATASETS_IN_CHUNK > | m_nonDefaultValueBits |
AZ::u32 | m_nDownstreamReliableRPCs |
AZ::u32 | m_nDownstreamUnreliableRPCs |
AZ::u32 | m_nUpstreamReliableRPCs |
AZ::u32 | m_nUpstreamUnreliableRPCs |
AZ::u32 | m_dirtiedDataSets |
ReplicaPriority | m_priority |
AZ::u64 | m_revision |
Use ReplicaChunk as a parent class when the chunk contains the logic for its network events. This is useful for peer to peer environments and when the same code can be shared between client and server.