pub struct LiveEntityPduHeader {
pub protocol_version: ProtocolVersion,
pub exercise_id: u8,
pub pdu_type: PduType,
pub protocol_family: ProtocolFamily,
pub timestamp: u32,
pub length: u16,
pub subprotocol_number: DISLiveEntitySubprotocolNumber,
/* private fields */
}Fields§
§protocol_version: ProtocolVersionThe version of the protocol
exercise_id: u8Exercise ID
pdu_type: PduTypeType of PDU, unique for each PDU class
protocol_family: ProtocolFamilyValue that refers to the protocol family
timestamp: u32Timestamp value
length: u16Length, in bytes, of the PDU
subprotocol_number: DISLiveEntitySubprotocolNumberThe subprotocol to be used to decode the PDU
Implementations§
Source§impl LiveEntityPduHeader
impl LiveEntityPduHeader
pub fn new( pdu_type: PduType, protocol_family: ProtocolFamily, exercise_id: u8, length: u16, ) -> Self
Sourcepub fn calculate_dis_timestamp() -> u32
pub fn calculate_dis_timestamp() -> u32
Gets the current time in terms of IEEE-1278.1 DIS time units
Trait Implementations§
Source§impl Clone for LiveEntityPduHeader
impl Clone for LiveEntityPduHeader
Source§fn clone(&self) -> LiveEntityPduHeader
fn clone(&self) -> LiveEntityPduHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LiveEntityPduHeader
impl Debug for LiveEntityPduHeader
Source§impl Default for LiveEntityPduHeader
impl Default for LiveEntityPduHeader
Source§impl GenericHeader for LiveEntityPduHeader
impl GenericHeader for LiveEntityPduHeader
fn pdu_type(&self) -> PduType
fn set_pdu_type(&mut self, value: PduType)
fn protocol_family(&self) -> ProtocolFamily
fn set_protocol_family(&mut self, value: ProtocolFamily)
fn length(&self) -> u16
fn set_length(&mut self, value: u16)
fn serialize(&self, buf: &mut BytesMut)
fn deserialize<B: Buf>(buf: &mut B) -> Self
Source§impl PartialEq for LiveEntityPduHeader
impl PartialEq for LiveEntityPduHeader
impl Copy for LiveEntityPduHeader
impl Eq for LiveEntityPduHeader
impl StructuralPartialEq for LiveEntityPduHeader
Auto Trait Implementations§
impl Freeze for LiveEntityPduHeader
impl RefUnwindSafe for LiveEntityPduHeader
impl Send for LiveEntityPduHeader
impl Sync for LiveEntityPduHeader
impl Unpin for LiveEntityPduHeader
impl UnwindSafe for LiveEntityPduHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more