pub struct SimulationAddressRecord {
pub site_identifier_field: u16,
pub application_identifier_field: u16,
}
Expand description
Simulation Address Record as defined in IEEE 1278.1 standard. Used to communicate the ID application running during the simulation.
Fields
site_identifier_field: u16
application_identifier_field: u16
Implementations
sourceimpl SimulationAddressRecord
impl SimulationAddressRecord
sourcepub fn new(site_identifier_field: u16, application_identifier_field: u16) -> Self
pub fn new(site_identifier_field: u16, application_identifier_field: u16) -> Self
Provides a function to create a new SimulationAddressRecord. Enforces all IDs must be non-zero.
Examples
Creating a new SimulationAddressRecord at site 1, on application 1:
let simulation_address_record = SimulationAddressRecord::new{
site_identifier_field: 1,
application_identifier_field: 1
};
sourcepub fn default() -> Self
pub fn default() -> Self
Provides a function to create a default SimulationAddressRecord. Creates a simulation address of site 1 and application 1.
Examples
Creating a default EntityIDRecord:
let simulation_address_record = SimulationAddressRecord::default();
sourcepub fn serialize(&self, buf: &mut BytesMut)
pub fn serialize(&self, buf: &mut BytesMut)
Fills a BytesMut struct with a SimulationAddressRecord serialised into binary. This buffer is then ready to be sent via UDP to the simluation network.
pub fn decode(buf: &mut BytesMut) -> SimulationAddressRecord
Trait Implementations
sourceimpl Clone for SimulationAddressRecord
impl Clone for SimulationAddressRecord
sourcefn clone(&self) -> SimulationAddressRecord
fn clone(&self) -> SimulationAddressRecord
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SimulationAddressRecord
impl Debug for SimulationAddressRecord
sourceimpl Default for SimulationAddressRecord
impl Default for SimulationAddressRecord
sourcefn default() -> SimulationAddressRecord
fn default() -> SimulationAddressRecord
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for SimulationAddressRecord
impl<'de> Deserialize<'de> for SimulationAddressRecord
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<SimulationAddressRecord> for SimulationAddressRecord
impl PartialEq<SimulationAddressRecord> for SimulationAddressRecord
sourcefn eq(&self, other: &SimulationAddressRecord) -> bool
fn eq(&self, other: &SimulationAddressRecord) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for SimulationAddressRecord
impl Serialize for SimulationAddressRecord
impl Copy for SimulationAddressRecord
impl StructuralPartialEq for SimulationAddressRecord
Auto Trait Implementations
impl RefUnwindSafe for SimulationAddressRecord
impl Send for SimulationAddressRecord
impl Sync for SimulationAddressRecord
impl Unpin for SimulationAddressRecord
impl UnwindSafe for SimulationAddressRecord
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