Struct ecx_context

Source
#[repr(C)]
pub struct ecx_context {
Show 23 fields pub port: *mut ecx_portt, pub slavelist: *mut ec_slavet, pub slavecount: *mut c_int, pub maxslave: c_int, pub grouplist: *mut ec_groupt, pub maxgroup: c_int, pub esibuf: *mut uint8, pub esimap: *mut uint32, pub esislave: uint16, pub elist: *mut ec_eringt, pub idxstack: *mut ec_idxstackT, pub ecaterror: *mut boolean, pub DCtO: uint16, pub DCl: uint16, pub DCtime: *mut int64, pub SMcommtype: *mut ec_SMcommtypet, pub PDOassign: *mut ec_PDOassignt, pub PDOdesc: *mut ec_PDOdesct, pub eepSM: *mut ec_eepromSMt, pub eepFMMU: *mut ec_eepromFMMUt, pub FOEhook: Option<unsafe extern "C" fn(slave: uint16, packetnumber: c_int, datasize: c_int) -> c_int>, pub EOEhook: Option<unsafe extern "C" fn(context: *mut ecx_contextt, slave: uint16, eoembx: *mut c_void) -> c_int>, pub manualstatechange: c_int,
}
Expand description

Context structure , referenced by all ecx functions

Fields§

§port: *mut ecx_portt

port reference, may include red_port

§slavelist: *mut ec_slavet

slavelist reference

§slavecount: *mut c_int

number of slaves found in configuration

§maxslave: c_int

maximum number of slaves allowed in slavelist

§grouplist: *mut ec_groupt

grouplist reference

§maxgroup: c_int

maximum number of groups allowed in grouplist

§esibuf: *mut uint8

internal, reference to eeprom cache buffer

§esimap: *mut uint32

internal, reference to eeprom cache map

§esislave: uint16

internal, current slave for eeprom cache

§elist: *mut ec_eringt

internal, reference to error list

§idxstack: *mut ec_idxstackT

internal, reference to processdata stack buffer info

§ecaterror: *mut boolean

reference to ecaterror state

§DCtO: uint16

internal, position of DC datagram in process data packet

§DCl: uint16

internal, length of DC datagram

§DCtime: *mut int64

reference to last DC time from slaves

§SMcommtype: *mut ec_SMcommtypet

internal, SM buffer

§PDOassign: *mut ec_PDOassignt

internal, PDO assign list

§PDOdesc: *mut ec_PDOdesct

internal, PDO description list

§eepSM: *mut ec_eepromSMt

internal, SM list from eeprom

§eepFMMU: *mut ec_eepromFMMUt

internal, FMMU list from eeprom

§FOEhook: Option<unsafe extern "C" fn(slave: uint16, packetnumber: c_int, datasize: c_int) -> c_int>

registered FoE hook

§EOEhook: Option<unsafe extern "C" fn(context: *mut ecx_contextt, slave: uint16, eoembx: *mut c_void) -> c_int>

registered EoE hook

§manualstatechange: c_int

flag to control legacy automatic state change or manual state change

Trait Implementations§

Source§

impl Clone for ecx_context

Source§

fn clone(&self) -> ecx_context

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ecx_context

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ecx_context

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.