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.
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
GridMate::GridMember Class Referenceabstract

#include <Session.h>

Inherits GridMate::ReplicaChunk.

Public Member Functions

 GM_CLASS_ALLOCATOR (GridMember)
 
virtual const MemberIDGetId () const =0
 return an abstracted member id. (member ID is world unique but unrelated to player ID it's related to the session).
 
const MemberIDCompact & GetIdCompact () const
 return a compact version of the member id.
 
virtual const PlayerId * GetPlayerId () const =0
 Returns a player ID that's unique in the world and it's not session related. If NULL not player ID is supported.
 
NatType GetNatType () const
 
AZStd::string GetName () const
 
GridSessionGetSession () const
 
bool IsHost () const
 
bool IsLocal () const
 
bool IsInvited () const
 
const RemotePeerMode GetPeerMode () const
 
void Mute (GridMember *member)
 
void Mute (const MemberIDCompact &id)
 Unmute (audio/video is send and received) from this member. Can be called on your local members.
 
void Unmute (GridMember *member)
 
void Unmute (const MemberIDCompact &id)
 Check if a member is muted by this member.
 
bool IsMuted (GridMember *member) const
 
bool IsMuted (const MemberIDCompact &id) const
 Return true if the member is talking on the microphone.
 
bool IsTalking () const
 Refresh talking state for given member, member will be marked as talking.
 
void UpdateTalking ()
 
ConnectionID GetConnectionId () const
 
AZ::PlatformID GetPlatformId () const
 
AZ::u32 GetProcessId () const
 
AZStd::string GetMachineName () const
 
bool SendBinary (const void *data, unsigned int dataSize, Carrier::DataReliability reliability=Carrier::SEND_RELIABLE, Carrier::DataPriority priority=Carrier::PRIORITY_NORMAL)
 Binary data exchange - Carrier for more detailed info about send and receive. Send can fail if current connectionId is invalid!
 
Carrier::ReceiveResult ReceiveBinary (char *data, unsigned int maxDataSize)
 
- Public Member Functions inherited from GridMate::ReplicaChunkBase
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
 
ReplicaChunkDescriptorGetDescriptor () const
 
ReplicaId GetReplicaId () const
 
PeerId GetPeerId () const
 
virtual ReplicaManagerGetReplicaManager ()
 
bool IsActive () const
 
bool IsPrimary () const
 
bool IsProxy () const
 
virtual void OnAttachedToReplica (Replica *replica)
 
virtual void OnDetachedFromReplica (Replica *replica)
 
virtual void UpdateChunk (const ReplicaContext &rc)
 
virtual void UpdateFromChunk (const ReplicaContext &rc)
 
virtual bool AcceptChangeOwnership (PeerId requestor, const ReplicaContext &rc)
 
virtual bool IsUpdateFromReplicaEnabled ()
 
ReplicaGetReplica ()
 
void SetHandler (ReplicaChunkInterface *handler)
 
ReplicaChunkInterfaceGetHandler ()
 
ReplicaPriority GetPriority () const
 
void SetPriority (ReplicaPriority priority)
 
virtual bool ShouldSendToPeer (ReplicaPeer *peer) const
 
template<typename T >
bool IsType ()
 
AZ::u64 GetLastChangeStamp () const
 
virtual bool ShouldBindToNetwork ()
 

Protected Member Functions

 GridMember (const MemberIDCompact &memberIdCompact)
 
bool IsReplicaMigratable () override
 
bool IsBroadcast () override
 
void OnReplicaActivate (const ReplicaContext &rc) override
 
void OnReplicaDeactivate (const ReplicaContext &rc) override
 
void OnReplicaChangeOwnership (const ReplicaContext &rc) override
 
bool OnKick (AZ::u8 reason, const RpcContext &rc)
 
void SetHost (bool isHost)
 
void SetInvited (bool isInvited)
 
- Protected Member Functions inherited from GridMate::ReplicaChunkBase
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 ()
 

Protected Attributes

ReplicaPtr m_clientStateReplica
 The state is a replica owned by the actual member, while the GridMember is managed by the session!
 
AZStd::intrusive_ptr< Internal::GridMemberStateReplica > m_clientState
 The state is a replica owned by the actual member, while the GridMember is managed by the session!
 
ConnectionID m_connectionId
 
GridSessionm_session
 
int m_slotType
 Local slot type returned from GridSession::ReserveSlot.
 
TimeStamp m_voiceDataProcessed
 Time stamp when we last processed input/output voice data for this member.
 
MemberIDCompact m_memberIdCompact
 Compact ID version (faster transfer etc.) if the full MemberID Member ID.
 
DataSet< bool > m_isHost
 
DataSet< bool > m_isInvited
 
DataSet< RemotePeerMode > m_peerMode
 
Rpc< RpcArg< AZ::u8 > >::BindInterface< GridMember, &GridMember::OnKick > KickRpc
 
- Protected Attributes inherited from GridMate::ReplicaChunkBase
unsigned int m_refCount
 
Replicam_replica
 
ReplicaChunkDescriptorm_descriptor
 
AZ::u32 m_flags
 
RPCQueue m_rpcQueue {MaxRpcQueueSize}
 
ReplicaChunkInterfacem_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
 

Friends

class GridSession
 
class SessionService
 

Additional Inherited Members

- Public Types inherited from GridMate::ReplicaChunkBase
using RPCQueue = AZStd::ring_buffer< Internal::RpcRequest *, SysContAlloc >
 
- Public Attributes inherited from GridMate::ReplicaChunkBase
friend Replica
 
friend RpcBase
 
friend DataSetBase
 
- Static Public Attributes inherited from GridMate::ReplicaChunkBase
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.
 
- Protected Types inherited from GridMate::ReplicaChunkBase
enum  Flags { RepChunk_Updated = 1 << 0 }
 

Detailed Description

Grid member interface class.


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