Struct Master

Source
pub struct Master { /* private fields */ }
Expand description

An EtherCAT master.

Implementations§

Source§

impl Master

Source

pub fn open(idx: MasterIdx, access: MasterAccess) -> Result<Self>

Source

pub fn master_count() -> Result<usize>

Source

pub fn reserve(&self) -> Result<()>

Source

pub fn create_domain(&self) -> Result<DomainIdx>

Source

pub const fn domain(&self, idx: DomainIdx) -> Domain<'_>

Source

pub fn domain_data(&mut self, idx: DomainIdx) -> Result<&mut [u8]>

Source

pub fn activate(&mut self) -> Result<()>

Source

pub fn deactivate(&mut self) -> Result<()>

Source

pub fn set_send_interval(&mut self, interval_us: usize) -> Result<()>

Source

pub fn send(&mut self) -> Result<usize>

Source

pub fn receive(&mut self) -> Result<()>

Source

pub fn reset(&mut self) -> Result<()>

Source

pub fn state(&self) -> Result<MasterState>

Source

pub fn get_info(&self) -> Result<MasterInfo>

Source

pub fn get_slave_info(&self, position: SlavePos) -> Result<SlaveInfo>

Source

pub fn get_config_info(&self, idx: SlaveConfigIdx) -> Result<ConfigInfo>

Source

pub fn configure_slave( &mut self, addr: SlaveAddr, expected: SlaveId, ) -> Result<SlaveConfig<'_>>

Source

pub fn get_sdo( &mut self, slave_pos: SlavePos, sdo_pos: SdoPos, ) -> Result<SdoInfo>

Source

pub fn get_sdo_entry( &mut self, slave_pos: SlavePos, addr: SdoEntryAddr, ) -> Result<SdoEntryInfo>

Source

pub fn sdo_download<T>( &mut self, position: SlavePos, sdo_idx: SdoIdx, complete_access: bool, data: &T, ) -> Result<()>
where T: SdoData + ?Sized,

Source

pub fn sdo_upload<'t>( &self, position: SlavePos, sdo_idx: SdoIdx, complete_access: bool, target: &'t mut [u8], ) -> Result<&'t mut [u8]>

Source

pub fn get_pdo( &mut self, slave_pos: SlavePos, sync_index: SmIdx, pdo_position: PdoPos, ) -> Result<PdoInfo>

Source

pub fn get_pdo_entry( &mut self, slave_pos: SlavePos, sync_index: SmIdx, pdo_pos: PdoPos, entry_pos: PdoEntryPos, ) -> Result<PdoEntryInfo>

Source

pub fn get_sync(&mut self, slave_pos: SlavePos, sm: SmIdx) -> Result<SmInfo>

Source

pub fn request_state( &mut self, slave_pos: SlavePos, state: AlState, ) -> Result<()>

Source

pub fn set_application_time(&mut self, app_time: u64) -> Result<()>

Source

pub fn sync_reference_clock(&mut self) -> Result<()>

Source

pub fn sync_slave_clocks(&mut self) -> Result<()>

Source

pub fn sync_reference_clock_to(&mut self, sync_time: u64) -> Result<()>

Source

pub fn sync_monitor_queue(&mut self) -> Result<()>

Source

pub fn sync_monitor_process(&mut self) -> Result<u32>

Source

pub fn get_reference_clock_time(&mut self) -> Result<u32>

Source

pub fn foe_read(&mut self, idx: SlavePos, name: &str) -> Result<Vec<u8>>

Source

pub fn foe_write( &mut self, idx: SlavePos, name: &str, data: &[u8], ) -> Result<()>

Auto Trait Implementations§

§

impl Freeze for Master

§

impl RefUnwindSafe for Master

§

impl Send for Master

§

impl Sync for Master

§

impl Unpin for Master

§

impl UnwindSafe for Master

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.