#[repr(C)]pub struct ecx_context {Show 22 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 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,
pub userdata: *mut c_void,
}Expand description
Context structure , referenced by all ecx functions
Fields§
§port: *mut ecx_porttport reference, may include red_port
slavelist: *mut ec_slavetslavelist reference
slavecount: *mut c_intnumber of slaves found in configuration
maxslave: c_intmaximum number of slaves allowed in slavelist
grouplist: *mut ec_grouptgrouplist reference
maxgroup: c_intmaximum number of groups allowed in grouplist
esibuf: *mut uint8internal, reference to eeprom cache buffer
esimap: *mut uint32internal, reference to eeprom cache map
esislave: uint16internal, current slave for eeprom cache
elist: *mut ec_eringtinternal, reference to error list
idxstack: *mut ec_idxstackTinternal, reference to processdata stack buffer info
ecaterror: *mut booleanreference to ecaterror state
DCtime: *mut int64reference to last DC time from slaves
SMcommtype: *mut ec_SMcommtypetinternal, SM buffer
PDOassign: *mut ec_PDOassigntinternal, PDO assign list
PDOdesc: *mut ec_PDOdesctinternal, PDO description list
eepSM: *mut ec_eepromSMtinternal, SM list from eeprom
eepFMMU: *mut ec_eepromFMMUtinternal, 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_intflag to control legacy automatic state change or manual state change
userdata: *mut c_voiduserdata, promotes application configuration esp. in EC_VER2 with multiple ec_context instances. Note: userdata memory is managed by application, not SOEM
Trait Implementations§
Source§impl Clone for ecx_context
impl Clone for ecx_context
Source§fn clone(&self) -> ecx_context
fn clone(&self) -> ecx_context
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more