-
Notifications
You must be signed in to change notification settings - Fork 16
PDUProcessor
A class to handle receiving PDUs and triggers the appropriate events
class UPDUProcessor
: public UGameInstanceSubsystem
Access | Type | Name | Description | |
---|---|---|---|---|
Private | DIS::Endian | BigEndian | The state of the endianness | |
Private | const | unsigned int | PDU_TYPE_POSITION |
Delegate Name | Event Name | Description |
---|---|---|
FDetonationPDUProcessed | OnDetonationPDUProcessed(FDetonationPDU DetonationPDU) | Called after a Detonation PDU is processed |
FEntityStatePDUProcessed | OnEntityStatePDUProcessed(FEntityStatePDU EntityStatePDU) | Called after an Entity State PDU is processed |
FEntityStateUpdatePDUProcessed | OnEntityStateUpdatePDUProcessed(FEntityStateUpdatePDU EntityStateUpdatePDU) | Called after an Entity State Update PDU is processed |
FFirePDUProcessed | OnFirePDUProcessed(FFirePDU FirePDU) | Called after a Fire PDU is processed |
FRemoveEntityPDUProcessed | OnRemoveEntityPDUProcessed(FRemoveEntityPDU RemoveEntityPDU) | Called after a RemoveEntity PDU is processed |
FStartResumePDUProcessed | OnStartResumePDUProcessed(FStartResumePDU StartResumePDU) | Called after a Start/Resume PDU is processed |
FStopFreezePDUProcessed | OnStopFreezePDUProcessed(FStopFreezePDU StopFreezePDU) | Called after a Stop/Freeze PDU is processed |
Access | Return | Name | Description | |
---|---|---|---|---|
Public | virtual | void | Deinitialize() | Deinitializes the subsystem. |
Protected | void | HandleOnReceivedUDPBytes(const TArray<uint8>& Bytes, const FString& IPAddress) | Helper function for processing DIS packets. Binds to OnReceivedBytes from the UDPSubsystem. | |
Public | virtual | void | Initialize(FSubsystemCollectionBase& Collection) | Initializes the subsystem. |
Public | void | ProcessDISPacket(TArray<uint8> InData) | Processes a given DIS packet to determine the type of packet. Delegates handling of the packet to whatever is bound to the associated PDU type's OnPDUProcessed event. |
private DIS::Endian BigEndian = DIS::BIG
The state of the endianness
private const unsigned int PDU_TYPE_POSITION = 2
The position of the PDU Type variable in a UDP packet.
public FDetonationPDUProcessed OnDetonationPDUProcessed
Called after a Detonation PDU is processed.
Category: GRILL DIS|PDU Processor|Events
Parameter | Description |
---|---|
DetonationPDU | The Detonation PDU to be passed to the listeners. |
public FEntityStatePDUProcessed OnEntityStatePDUProcessed
Called after an Entity State PDU is processed.
Category: GRILL DIS|PDU Processor|Events
Parameter | Description |
---|---|
EntityStatePDU | The Entity State PDU to be passed to the listeners. |
public FEntityStateUpdatePDUProcessed OnEntityStateUpdatePDUProcessed
Called after an Entity State Update PDU is processed.
Category: GRILL DIS|PDU Processor|Events
Parameter | Description |
---|---|
EntityStateUpdatePDU | The Entity State Update PDU to be passed to the listeners. |
public FFirePDUProcessed OnFirePDUProcessed
Called after a Fire PDU is processed.
Category: GRILL DIS|PDU Processor|Events
Parameter | Description |
---|---|
FirePDU | The Fire PDU to be passed to the listeners. |
public FRemoveEntityPDUProcessed OnRemoveEntityPDUProcessed
Called after a Remove Entity PDU is processed.
Category: GRILL DIS|PDU Processor|Events
Parameter | Description |
---|---|
RemoveEntityPDU | The Remove Entity PDU to be passed to the listeners. |
public FStartResumePDUProcessed OnStartResumePDUProcessed
Called after a Start/Resume PDU is processed.
Category: GRILL DIS|PDU Processor|Events
Parameter | Description |
---|---|
StartResumePDU | The Start Resume PDU to be passed to the listeners. |
public FStopFreezePDUProcessed OnStopFreezePDUProcessed
Called after a Stop/Freeze PDU is processed.
Category: GRILL DIS|PDU Processor|Events
Parameter | Description |
---|---|
StopFreezePDU | The Stop Freeze PDU to be passed to the listeners. |
public virtual void Deinitialize() override
Deinitializes the subsystem.
protected void HandleOnReceivedUDPBytes
(
const TArray<uint8>& Bytes,
const FString& IPAddress
)
Helper function for processing DIS packets. Binds to OnReceivedBytes from the UDPSubsystem.
Parameter | Description |
---|---|
Bytes | The received UDP bytes to process into a DIS packet. |
IPAddress | The IP address the UDP bytes were received from. |
public virtual void Initialize(FSubsystemCollectionBase& Collection) override
Initializes the subsystem.
Parameter | Description |
---|---|
Collection | The collection of all subsystems. |
public void ProcessDISPacket
(
TArray<uint8> InData
)
Processes a given DIS packet to determine the type of packet. Delegates handling of the packet to whatever is bound to the associated PDU type's OnPDUProcessed event.
Category: GRILL DIS|PDU Processor
Parameter | Description |
---|---|
InData | The UDP data to process into a DIS packet. |