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: PDUHeaderRecord
firing_entity_id_record: EntityIDRecord
target_entity_id_record: EntityIDRecord
munition_id_record: EntityIDRecord
event_id_record: EventIDRecord
fire_mission_index_field: u32
location_in_world_record: WorldCoordinateRecord
burst_descriptor_record: BurstDescriptorRecord
velocity_record: VelocityVectorRecord
range_field: u32
Implementations
sourceimpl FirePDU
impl FirePDU
sourcepub fn default() -> Self
pub fn default() -> Self
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);
Trait Implementations
impl Copy for FirePDU
impl PDU for FirePDU
Auto Trait Implementations
impl RefUnwindSafe for FirePDU
impl Send for FirePDU
impl Sync for FirePDU
impl Unpin for FirePDU
impl UnwindSafe for FirePDU
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more