-
Notifications
You must be signed in to change notification settings - Fork 20
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 |
|---|---|---|
| FDesignatorPDUProcessed | OnDesignatorPDUProcessed(FDesignatorPDU DesignatorPDU) | Called after a Designator PDU is processed |
| FDetonationPDUProcessed | OnDetonationPDUProcessed(FDetonationPDU DetonationPDU) | Called after a Detonation PDU is processed |
| FElectromagneticEmissionsPDUProcessed | OnElectromagneticEmissionsPDUProcessed(FElectromagneticEmissionsPDU ElectromagneticEmissionsPDU) | Called after an Electromagnetic Emissions 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 |
| FSignalPDUProcessed | OnSignalPDUProcessed(FSignalPDU SignalPDU) | Called after a Signal 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(const 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::BIGThe state of the endianness
private const unsigned int PDU_TYPE_POSITION = 2The position of the PDU Type variable in a UDP packet.
public FDesignatorPDUProcessed OnDesignatorPDUProcessedCalled after a Designator PDU is processed.
Category: GRILL DIS|PDU Processor|Events
| Parameter | Description |
|---|---|
| DesignatorPDU | The Designator PDU to be passed to the listeners. |
public FDetonationPDUProcessed OnDetonationPDUProcessedCalled 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 FElectromagneticEmissionsPDUProcessed OnElectromagneticEmissionsPDUProcessedCalled after an Electromagnetic Emissions PDU is processed.
Category: GRILL DIS|PDU Processor|Events
| Parameter | Description |
|---|---|
| ElectromagneticEmissionsPDU | The Electromagnetic Emissions PDU to be passed to the listeners. |
public FEntityStatePDUProcessed OnEntityStatePDUProcessedCalled 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 OnEntityStateUpdatePDUProcessedCalled 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 OnFirePDUProcessedCalled 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 OnRemoveEntityPDUProcessedCalled 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 FSignalPDUProcessed OnSignalPDUProcessedCalled after a Signal PDU is processed.
Category: GRILL DIS|PDU Processor|Events
| Parameter | Description |
|---|---|
| SignalPDU | The Signal PDU to be passed to the listeners. |
public FStartResumePDUProcessed OnStartResumePDUProcessedCalled 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 OnStopFreezePDUProcessedCalled 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() overrideDeinitializes 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) overrideInitializes 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. |