Skip to content
huggins edited this page May 3, 2023 · 5 revisions

PDU

Struct container for all information that is contained inside of all DIS PDUs. The base form of a PDU within the plugin.

struct FPDU

Includes

Back to Top


Members

Type Name Description
uint8 ExerciseID The DIS Exercise ID that this PDU is associated with
uint8 Length Length, in bytes, of the PDU
uint8 Padding Zero-filled array of padding
EPDUType PduType Type of pdu, unique for each PDU struct
uint8 ProtocolFamily Value that refers to the protocol family, e.g. SimulationManagement, etc.
uint8 ProtocolVersion The version of the protocol. 5=DIS-1995, 6=DIS-1998.
uint8 Timestamp Timestamp, either relative or UTC. This field shall specify the time which the data in the PDU is valid.

Back to Top


Constructors

Name Description
FPDU() Default constructor

Destructors

Name Description
~FPDU() Default destructor

Functions

Return Name Description
TArray<uint8> DISDataStreamToBytes(DIS::DataStream DataStream) Converts a DIS DataStream to an array of bytes.
SetupFromOpenDIS(DIS::DetonationPdu* PDUIn) Converts an OpenDIS Pdu struct to an FPDU struct.
TArray<uint8> ToBytes() Conversion to an array of bytes. Allows for an FPDU struct to be sent out with a UDP send socket.
ToOpenDIS(DIS::DetonationPdu& PDUOut) Conversion to OpenDIS Pdu struct

Back to Top


Details

ExerciseID

uint8 ExerciseID

The DIS Exercise ID that this PDU is associated with.

Category: GRILL DIS|Structs|PDUs

Back to Top


Length

uint8 Length

Length, in bytes, of the PDU.

Back to Top


PDUType

EPDUType PduType

Type of pdu, unique for each PDU struct

Back to Top


Padding

uint8 Padding

Zero-filled array of padding.

Back to Top


ProtocolFamily

uint8 ProtocolFamily

Value that refers to the protocol family, e.g. SimulationManagement, etc.

Back to Top


ProtocolVersion

uint8 ProtocolVersion

The version of the protocol. 5=DIS-1995, 6=DIS-1998.

Back to Top


Timestamp

uint8 Timestamp

Timestamp, either relative or UTC. This field shall specify the time which the data in the PDU is valid.

Back to Top


FPDU

FPDU()

Default constructor.

Back to Top


~FPDU

virtual ~FPDU()

Default destructor.

Back to Top


DISDataStreamToBytes

TArray<uint8> DISDataStreamToBytes
(
	DIS::DataStream DataStream
)

Converts a DIS DataStream to an array of bytes.

Parameter Description
DataStream The DIS DataStream to convert to an array of bytes.
Returns
An array of bytes containing the information from the given DIS DataStream.

Back to Top


SetupFromOpenDIS

void SetupFromOpenDIS
(
	DIS::Pdu* PDUIn
)

Converts an OpenDIS Pdu struct to an FPDU struct.

Parameter Description
PDUIn The OpenDIS Pdu struct to convert.

Back to Top


ToBytes

void ToOpenDIS
(
	DIS::DetonationPdu& PDUOut
)

Conversion to an array of bytes. Allows for an FPDU struct to be sent out with a UDP send socket.

Parameter Description
PDUOut The OpenDIS Pdu struct representation of this FPDU.

Back to Top


ToOpenDIS

virtual TArray<uint8> ToBytes() override

Conversion to OpenDIS DetonationPdu struct

Returns
An array of bytes containing the information from this FPDU.

Back to Top


Clone this wiki locally