-
Notifications
You must be signed in to change notification settings - Fork 7
PDUUtil
huggins edited this page Apr 10, 2025
·
4 revisions
Class that holds common utilities for PDUs.
public static class PDUUtil| Access | Type | Name | Description | |
|---|---|---|---|---|
| Public | const | string | DELIMITER_PERIOD | Constant field that contains a the "." character. |
| Access | Return | Name | Description | |
|---|---|---|---|---|
| Public | Static | EntityStatePdu | DeepCopyEntityStatePDU(EntityStatePdu EntityStatePDUIn) | Deep copies an Entity State PDU. |
| Public | Static | UInt64 | EntityIDToUInt64(FEntityID entityID) | Converts a DIS Entity ID to a UInt64. |
| Public | Static | UInt64 | EntityTypeToUInt64(FEntityType entityType) | Converts a DIS Entity Type to a UInt64. |
| Public | Static | string | getEntityStatePDUMarkingSAE(EntityStatePdu entityStatePdu) | Gets the Marking and Entity ID from the given Entity State PDU and converts them to a combined string. |
| Public | Static | string | getEntityTypeAsString(EntityStatePdu entityStatePdu) | Gets the Entity Type from the given Entity State PDU and converts it to a string. |
| Public | Static | string | getMarkingAsString(EntityStatePdu entityStatePdu) | Gets the Marking from the given Entity State PDU and converts it to a string. |
| Public | Static | Marking | getStringAsMarking(string stringToConvert) | Converts a given string to a DIS Marking. |
| Public | Static | UInt64 | ThreeUShortsToUInt64(ushort low, ushort mid, ushort high) | Converts the given ushorts to a UInt64. |
| Public | Static | string | UInt64ToString(UInt64 uInt64) | Converts the given UInt64 to a string. |
public const string DELIMITER_PERIOD = "."Constant field that contains a the "." character.
public static EntityStatePdu DeepCopyEntityStatePDU
(
EntityStatePdu EntityStatePDUIn
)Deep copies an Entity State PDU.
| Parameter | Description |
|---|---|
| EntityStatePDUIn | The Entity State PDU to make a deep copy of. |
| Returns |
|---|
| The deep copied Entity State PDU. |
public static UInt64 EntityIDToUInt64
(
EntityID entityID
)Converts a DIS Entity ID to a UInt64.
| Parameter | Description |
|---|---|
| entityID | The Entity ID to convert. |
| Returns |
|---|
| The UInt64 representation of the Entity ID. |
public static UInt64 EntityTypeToUInt64
(
EntityType entityType
)Converts a DIS Entity Type to a UInt64.
| Parameter | Description |
|---|---|
| entityType | The Entity Type to convert. |
| Returns |
|---|
| The UInt64 representation of the Entity Type. |
public static string getEntityStatePDUMarkingSAE
(
EntityStatePdu entityStatePdu
)Gets the Marking and Entity ID from the given Entity State PDU and converts them to a combined string.
| Parameter | Description |
|---|---|
| entityStatePdu | The Entity State PDU to get the string representation of the Marking and Entity ID from. |
| Returns |
|---|
| The string representation of the Marking and Entity ID. |
public static string getEntityTypeAsString
(
EntityStatePdu entityStatePdu
)Gets the Entity Type from the given Entity State PDU and converts it to a string.
| Parameter | Description |
|---|---|
| entityStatePdu | The Entity State PDU to get the string representation of the Entity Type from. |
| Returns |
|---|
| The string representation of the Entity Type. |
public static string getMarkingAsString
(
EntityStatePdu entityStatePdu
)Gets the Marking from the given Entity State PDU and converts it to a string.
| Parameter | Description |
|---|---|
| entityStatePdu | The Entity State PDU to get the string representation of the Marking from. |
| Returns |
|---|
| The string representation of the Marking. |
public static Marking getStringAsMarking
(
string stringToConvert
)Converts a given string to a DIS Marking.
| Parameter | Description |
|---|---|
| stringToConvert | The string to convert to a DIS Marking. |
| Returns |
|---|
| The DIS Marking. |
public static UInt64 ThreeUShortsToUInt64
(
ushort low,
ushort mid,
ushort high
)Converts the given ushorts to a UInt64.
| Parameter | Description |
|---|---|
| low | The least significant 16 bits. |
| mid | The middle 16 bits. |
| high | The most significant 16 bits. |
| Returns |
|---|
| The UInt64 representation of the 3 given ushorts. |
public static string UInt64ToString
(
UInt64 uInt64
)Converts the given UInt64 to a string.
| Parameter | Description |
|---|---|
| uInt64 | The UInt64 to convert to a string. |
| Returns |
|---|
| The string representation of the UInt64. |