pub struct FirePDU {
    pub pdu_header_record: PDUHeaderRecord,
    pub firing_entity_id_record: EntityIDRecord,
    pub target_entity_id_record: EntityIDRecord,
    pub munition_id_record: EntityIDRecord,
    pub event_id_record: EventIDRecord,
    pub fire_mission_index_field: u32,
    pub location_in_world_record: WorldCoordinateRecord,
    pub burst_descriptor_record: BurstDescriptorRecord,
    pub velocity_record: VelocityVectorRecord,
    pub range_field: u32,
}
Expand description

Fire PDU as defined in IEEE 1278.1 standard. Used to communicate a weapon firing during the simulation.

Fields

pdu_header_record: PDUHeaderRecordfiring_entity_id_record: EntityIDRecordtarget_entity_id_record: EntityIDRecordmunition_id_record: EntityIDRecordevent_id_record: EventIDRecordfire_mission_index_field: u32location_in_world_record: WorldCoordinateRecordburst_descriptor_record: BurstDescriptorRecordvelocity_record: VelocityVectorRecordrange_field: u32

Implementations

Provides a blank FirePDU with all IDs set to 1 (as 0 is not allowed within the DIS protocol).

Examples

Creating a blank FirePDU:

let fire_pdu = FirePDU::default();

Populating a bank FirePDU’s firing_entity_id_record:

let mut fire_pdu = FirePDU::default();
fire_pdu.firing_entity_id_record = EntityIDRecord::default(2);

Fills a BytesMut struct with a FirePDU serialised into binary. This buffer is then ready to be sent via UDP to the simluation network.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.