1
2
3
/* automatically generated by rust-bindgen */

# [ repr ( C ) ] # [ derive ( Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd ) ] pub struct __BindgenBitfieldUnit < Storage , Align > { storage : Storage , align : [ Align ; 0 ] , } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > { # [ inline ] pub const fn new ( storage : Storage ) -> Self { Self { storage , align : [ ] } } } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > where Storage : AsRef < [ u8 ] > + AsMut < [ u8 ] >, { # [ inline ] pub fn get_bit ( & self , index : usize ) -> bool { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = self . storage . as_ref ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [ inline ] pub fn set_bit ( & mut self , index : usize , val : bool ) { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [ inline ] pub fn get ( & self , bit_offset : usize , bit_width : u8 ) -> u64 { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; let mut val = 0 ; for i in 0 .. ( bit_width as usize ) { if self . get_bit ( i + bit_offset ) { let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [ inline ] pub fn set ( & mut self , bit_offset : usize , bit_width : u8 , val : u64 ) { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; for i in 0 .. ( bit_width as usize ) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; self . set_bit ( index + bit_offset , val_bit_is_set ) ; } } } pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __int16_t = :: std :: os :: raw :: c_short ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; pub type __int64_t = :: std :: os :: raw :: c_long ; pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type boolean = u8 ; pub type int16 = i16 ; pub type int32 = i32 ; pub type uint8 = u8 ; pub type uint16 = u16 ; pub type uint32 = u32 ; pub type int64 = i64 ; pub type uint64 = u64 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ec_timet { pub sec : uint32 , pub usec : uint32 , } # [ test ] fn bindgen_test_layout_ec_timet ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_timet > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ec_timet ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_timet > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ec_timet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_timet > ( ) ) ) . sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_timet ) , "::" , stringify ! ( sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_timet > ( ) ) ) . usec as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_timet ) , "::" , stringify ! ( usec ) ) ) ; } # [ doc = " No valid state." ] pub const ec_state_EC_STATE_NONE : ec_state = 0 ; # [ doc = " Init state" ] pub const ec_state_EC_STATE_INIT : ec_state = 1 ; # [ doc = " Pre-operational." ] pub const ec_state_EC_STATE_PRE_OP : ec_state = 2 ; # [ doc = " Boot state" ] pub const ec_state_EC_STATE_BOOT : ec_state = 3 ; # [ doc = " Safe-operational." ] pub const ec_state_EC_STATE_SAFE_OP : ec_state = 4 ; # [ doc = " Operational" ] pub const ec_state_EC_STATE_OPERATIONAL : ec_state = 8 ; # [ doc = " Error or ACK error" ] pub const ec_state_EC_STATE_ACK : ec_state = 16 ; # [ doc = " Error or ACK error" ] pub const ec_state_EC_STATE_ERROR : ec_state = 16 ; # [ doc = " Possible EtherCAT slave states" ] pub type ec_state = u32 ; pub const ec_err_type_EC_ERR_TYPE_SDO_ERROR : ec_err_type = 0 ; pub const ec_err_type_EC_ERR_TYPE_EMERGENCY : ec_err_type = 1 ; pub const ec_err_type_EC_ERR_TYPE_PACKET_ERROR : ec_err_type = 3 ; pub const ec_err_type_EC_ERR_TYPE_SDOINFO_ERROR : ec_err_type = 4 ; pub const ec_err_type_EC_ERR_TYPE_FOE_ERROR : ec_err_type = 5 ; pub const ec_err_type_EC_ERR_TYPE_FOE_BUF2SMALL : ec_err_type = 6 ; pub const ec_err_type_EC_ERR_TYPE_FOE_PACKETNUMBER : ec_err_type = 7 ; pub const ec_err_type_EC_ERR_TYPE_SOE_ERROR : ec_err_type = 8 ; pub const ec_err_type_EC_ERR_TYPE_MBX_ERROR : ec_err_type = 9 ; pub const ec_err_type_EC_ERR_TYPE_FOE_FILE_NOTFOUND : ec_err_type = 10 ; pub const ec_err_type_EC_ERR_TYPE_EOE_INVALID_RX_DATA : ec_err_type = 11 ; # [ doc = " Error types" ] pub type ec_err_type = u32 ; # [ doc = " Struct to retrieve errors." ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ec_errort { # [ doc = " Time at which the error was generated." ] pub Time : ec_timet , # [ doc = " Signal bit, error set but not read" ] pub Signal : boolean , # [ doc = " Slave number that generated the error" ] pub Slave : uint16 , # [ doc = " CoE SDO index that generated the error" ] pub Index : uint16 , # [ doc = " CoE SDO subindex that generated the error" ] pub SubIdx : uint8 , # [ doc = " Type of error" ] pub Etype : ec_err_type , pub __bindgen_anon_1 : ec_errort__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union ec_errort__bindgen_ty_1 { # [ doc = " General abortcode" ] pub AbortCode : int32 , pub __bindgen_anon_1 : ec_errort__bindgen_ty_1__bindgen_ty_1 , _bindgen_union_align : [ u32 ; 2usize ] , } # [ doc = " Specific error for Emergency mailbox" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ec_errort__bindgen_ty_1__bindgen_ty_1 { pub ErrorCode : uint16 , pub ErrorReg : uint8 , pub b1 : uint8 , pub w1 : uint16 , pub w2 : uint16 , } # [ test ] fn bindgen_test_layout_ec_errort__bindgen_ty_1__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_errort__bindgen_ty_1__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ec_errort__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_errort__bindgen_ty_1__bindgen_ty_1 > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( ec_errort__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . ErrorCode as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( ErrorCode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . ErrorReg as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( ErrorReg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . b1 as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( b1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . w1 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( w1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . w2 as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( w2 ) ) ) ; } # [ test ] fn bindgen_test_layout_ec_errort__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_errort__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ec_errort__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_errort__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ec_errort__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort__bindgen_ty_1 > ( ) ) ) . AbortCode as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort__bindgen_ty_1 ) , "::" , stringify ! ( AbortCode ) ) ) ; } # [ test ] fn bindgen_test_layout_ec_errort ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_errort > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( ec_errort ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_errort > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ec_errort ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort > ( ) ) ) . Time as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort ) , "::" , stringify ! ( Time ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort > ( ) ) ) . Signal as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort ) , "::" , stringify ! ( Signal ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort > ( ) ) ) . Slave as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort ) , "::" , stringify ! ( Slave ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort > ( ) ) ) . Index as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort ) , "::" , stringify ! ( Index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort > ( ) ) ) . SubIdx as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort ) , "::" , stringify ! ( SubIdx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_errort > ( ) ) ) . Etype as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( ec_errort ) , "::" , stringify ! ( Etype ) ) ) ; } # [ doc = " pointer structure to buffers for redundant port" ] # [ repr ( C ) ] # [ repr ( align ( 8 ) ) ] pub struct ecx_redportt { pub _bindgen_opaque_blob : [ u64 ; 3250usize ] , } # [ test ] fn bindgen_test_layout_ecx_redportt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ecx_redportt > ( ) , 26000usize , concat ! ( "Size of: " , stringify ! ( ecx_redportt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ecx_redportt > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ecx_redportt ) ) ) ; } # [ doc = " pointer structure to buffers, vars and mutexes for port instantiation" ] # [ repr ( C ) ] # [ repr ( align ( 8 ) ) ] pub struct ecx_portt { pub _bindgen_opaque_blob : [ u64 ; 6502usize ] , } # [ test ] fn bindgen_test_layout_ecx_portt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ecx_portt > ( ) , 52016usize , concat ! ( "Size of: " , stringify ! ( ecx_portt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ecx_portt > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ecx_portt ) ) ) ; } extern "C" { pub fn ec_setupnic ( ifname : * const :: std :: os :: raw :: c_char , secondary : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_closenic ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_setbufstat ( idx : :: std :: os :: raw :: c_int , bufstat : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn ec_getindex ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_outframe ( idx : :: std :: os :: raw :: c_int , sock : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_outframe_red ( idx : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_waitinframe ( idx : :: std :: os :: raw :: c_int , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_srconfirm ( idx : :: std :: os :: raw :: c_int , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_setupheader ( p : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn ecx_setupnic ( port : * mut ecx_portt , ifname : * const :: std :: os :: raw :: c_char , secondary : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_closenic ( port : * mut ecx_portt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_setbufstat ( port : * mut ecx_portt , idx : :: std :: os :: raw :: c_int , bufstat : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn ecx_getindex ( port : * mut ecx_portt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_outframe ( port : * mut ecx_portt , idx : :: std :: os :: raw :: c_int , sock : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_outframe_red ( port : * mut ecx_portt , idx : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_waitinframe ( port : * mut ecx_portt , idx : :: std :: os :: raw :: c_int , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_srconfirm ( port : * mut ecx_portt , idx : :: std :: os :: raw :: c_int , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_setupdatagram ( port : * mut ecx_portt , frame : * mut :: std :: os :: raw :: c_void , com : uint8 , idx : uint8 , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_adddatagram ( port : * mut ecx_portt , frame : * mut :: std :: os :: raw :: c_void , com : uint8 , idx : uint8 , more : boolean , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_BWR ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_BRD ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_APRD ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_ARMW ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_FRMW ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_APRDw ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint16 ; } extern "C" { pub fn ecx_FPRD ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_FPRDw ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint16 ; } extern "C" { pub fn ecx_APWRw ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_APWR ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_FPWRw ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_FPWR ( port : * mut ecx_portt , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_LRW ( port : * mut ecx_portt , LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_LRD ( port : * mut ecx_portt , LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_LWR ( port : * mut ecx_portt , LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_LRWDC ( port : * mut ecx_portt , LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , DCrs : uint16 , DCtime : * mut int64 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_setupdatagram ( frame : * mut :: std :: os :: raw :: c_void , com : uint8 , idx : uint8 , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_adddatagram ( frame : * mut :: std :: os :: raw :: c_void , com : uint8 , idx : uint8 , more : boolean , ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_BWR ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_BRD ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_APRD ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_ARMW ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_FRMW ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_APRDw ( ADP : uint16 , ADO : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint16 ; } extern "C" { pub fn ec_FPRD ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_FPRDw ( ADP : uint16 , ADO : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint16 ; } extern "C" { pub fn ec_APWRw ( ADP : uint16 , ADO : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_APWR ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_FPWRw ( ADP : uint16 , ADO : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_FPWR ( ADP : uint16 , ADO : uint16 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_LRW ( LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_LRD ( LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_LWR ( LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_LRWDC ( LogAdr : uint32 , length : uint16 , data : * mut :: std :: os :: raw :: c_void , DCrs : uint16 , DCtime : * mut int64 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } pub type ec_adaptert = ec_adapter ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ec_adapter { pub name : [ :: std :: os :: raw :: c_char ; 128usize ] , pub desc : [ :: std :: os :: raw :: c_char ; 128usize ] , pub next : * mut ec_adaptert , } # [ test ] fn bindgen_test_layout_ec_adapter ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_adapter > ( ) , 264usize , concat ! ( "Size of: " , stringify ! ( ec_adapter ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_adapter > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ec_adapter ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_adapter > ( ) ) ) . name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_adapter ) , "::" , stringify ! ( name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_adapter > ( ) ) ) . desc as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( ec_adapter ) , "::" , stringify ! ( desc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_adapter > ( ) ) ) . next as * const _ as usize } , 256usize , concat ! ( "Offset of field: " , stringify ! ( ec_adapter ) , "::" , stringify ! ( next ) ) ) ; } # [ doc = " record for FMMU" ] # [ repr ( C , packed ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ec_fmmu { pub LogStart : uint32 , pub LogLength : uint16 , pub LogStartbit : uint8 , pub LogEndbit : uint8 , pub PhysStart : uint16 , pub PhysStartBit : uint8 , pub FMMUtype : uint8 , pub FMMUactive : uint8 , pub unused1 : uint8 , pub unused2 : uint16 , } # [ test ] fn bindgen_test_layout_ec_fmmu ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_fmmu > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( ec_fmmu ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_fmmu > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( ec_fmmu ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . LogStart as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( LogStart ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . LogLength as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( LogLength ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . LogStartbit as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( LogStartbit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . LogEndbit as * const _ as usize } , 7usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( LogEndbit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . PhysStart as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( PhysStart ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . PhysStartBit as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( PhysStartBit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . FMMUtype as * const _ as usize } , 11usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( FMMUtype ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . FMMUactive as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( FMMUactive ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . unused1 as * const _ as usize } , 13usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( unused1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_fmmu > ( ) ) ) . unused2 as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( ec_fmmu ) , "::" , stringify ! ( unused2 ) ) ) ; } pub type ec_fmmut = ec_fmmu ; # [ doc = " record for sync manager" ] # [ repr ( C , packed ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ec_sm { pub StartAddr : uint16 , pub SMlength : uint16 , pub SMflags : uint32 , } # [ test ] fn bindgen_test_layout_ec_sm ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_sm > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ec_sm ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_sm > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( ec_sm ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_sm > ( ) ) ) . StartAddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_sm ) , "::" , stringify ! ( StartAddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_sm > ( ) ) ) . SMlength as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( ec_sm ) , "::" , stringify ! ( SMlength ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_sm > ( ) ) ) . SMflags as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_sm ) , "::" , stringify ! ( SMflags ) ) ) ; } pub type ec_smt = ec_sm ; pub type ecx_contextt = ecx_context ; # [ doc = " for list of ethercat slaves detected" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ec_slave { # [ doc = " state of slave" ] pub state : uint16 , # [ doc = " AL status code" ] pub ALstatuscode : uint16 , # [ doc = " Configured address" ] pub configadr : uint16 , # [ doc = " Alias address" ] pub aliasadr : uint16 , # [ doc = " Manufacturer from EEprom" ] pub eep_man : uint32 , # [ doc = " ID from EEprom" ] pub eep_id : uint32 , # [ doc = " revision from EEprom" ] pub eep_rev : uint32 , # [ doc = " Interface type" ] pub Itype : uint16 , # [ doc = " Device type" ] pub Dtype : uint16 , # [ doc = " output bits" ] pub Obits : uint16 , # [ doc = " output bytes, if Obits < 8 then Obytes = 0" ] pub Obytes : uint32 , # [ doc = " output pointer in IOmap buffer" ] pub outputs : * mut uint8 , # [ doc = " startbit in first output byte" ] pub Ostartbit : uint8 , # [ doc = " input bits" ] pub Ibits : uint16 , # [ doc = " input bytes, if Ibits < 8 then Ibytes = 0" ] pub Ibytes : uint32 , # [ doc = " input pointer in IOmap buffer" ] pub inputs : * mut uint8 , # [ doc = " startbit in first input byte" ] pub Istartbit : uint8 , # [ doc = " SM structure" ] pub SM : [ ec_smt ; 8usize ] , # [ doc = " SM type 0=unused 1=MbxWr 2=MbxRd 3=Outputs 4=Inputs" ] pub SMtype : [ uint8 ; 8usize ] , # [ doc = " FMMU structure" ] pub FMMU : [ ec_fmmut ; 4usize ] , # [ doc = " FMMU0 function" ] pub FMMU0func : uint8 , # [ doc = " FMMU1 function" ] pub FMMU1func : uint8 , # [ doc = " FMMU2 function" ] pub FMMU2func : uint8 , # [ doc = " FMMU3 function" ] pub FMMU3func : uint8 , # [ doc = " length of write mailbox in bytes, if no mailbox then 0" ] pub mbx_l : uint16 , # [ doc = " mailbox write offset" ] pub mbx_wo : uint16 , # [ doc = " length of read mailbox in bytes" ] pub mbx_rl : uint16 , # [ doc = " mailbox read offset" ] pub mbx_ro : uint16 , # [ doc = " mailbox supported protocols" ] pub mbx_proto : uint16 , # [ doc = " Counter value of mailbox link layer protocol 1..7" ] pub mbx_cnt : uint8 , # [ doc = " has DC capability" ] pub hasdc : boolean , # [ doc = " Physical type; Ebus, EtherNet combinations" ] pub ptype : uint8 , # [ doc = " topology: 1 to 3 links" ] pub topology : uint8 , # [ doc = " active ports bitmap : ....3210 , set if respective port is active" ] pub activeports : uint8 , # [ doc = " consumed ports bitmap : ....3210, used for internal delay measurement" ] pub consumedports : uint8 , # [ doc = " slave number for parent, 0=master" ] pub parent : uint16 , # [ doc = " port number on parent this slave is connected to" ] pub parentport : uint8 , # [ doc = " port number on this slave the parent is connected to" ] pub entryport : uint8 , # [ doc = " DC receivetimes on port A" ] pub DCrtA : int32 , # [ doc = " DC receivetimes on port B" ] pub DCrtB : int32 , # [ doc = " DC receivetimes on port C" ] pub DCrtC : int32 , # [ doc = " DC receivetimes on port D" ] pub DCrtD : int32 , # [ doc = " propagation delay" ] pub pdelay : int32 , # [ doc = " next DC slave" ] pub DCnext : uint16 , # [ doc = " previous DC slave" ] pub DCprevious : uint16 , # [ doc = " DC cycle time in ns" ] pub DCcycle : int32 , # [ doc = " DC shift from clock modulus boundary" ] pub DCshift : int32 , # [ doc = " DC sync activation, 0=off, 1=on" ] pub DCactive : uint8 , # [ doc = " link to config table" ] pub configindex : uint16 , # [ doc = " link to SII config" ] pub SIIindex : uint16 , # [ doc = " 1 = 8 bytes per read, 0 = 4 bytes per read" ] pub eep_8byte : uint8 , # [ doc = " 0 = eeprom to master , 1 = eeprom to PDI" ] pub eep_pdi : uint8 , # [ doc = " CoE details" ] pub CoEdetails : uint8 , # [ doc = " FoE details" ] pub FoEdetails : uint8 , # [ doc = " EoE details" ] pub EoEdetails : uint8 , # [ doc = " SoE details" ] pub SoEdetails : uint8 , # [ doc = " E-bus current" ] pub Ebuscurrent : int16 , # [ doc = " if >0 block use of LRW in processdata" ] pub blockLRW : uint8 , # [ doc = " group" ] pub group : uint8 , # [ doc = " first unused FMMU" ] pub FMMUunused : uint8 , # [ doc = " Boolean for tracking whether the slave is (not) responding, not used/set by the SOEM library" ] pub islost : boolean , # [ doc = " registered configuration function PO->SO, (DEPRECATED)" ] pub PO2SOconfig : :: std :: option :: Option < unsafe extern "C" fn ( slave : uint16 ) -> :: std :: os :: raw :: c_int > , # [ doc = " registered configuration function PO->SO" ] pub PO2SOconfigx : :: std :: option :: Option < unsafe extern "C" fn ( context : * mut ecx_contextt , slave : uint16 ) -> :: std :: os :: raw :: c_int > , # [ doc = " readable name" ] pub name : [ :: std :: os :: raw :: c_char ; 41usize ] , } # [ test ] fn bindgen_test_layout_ec_slave ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_slave > ( ) , 336usize , concat ! ( "Size of: " , stringify ! ( ec_slave ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_slave > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ec_slave ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . state as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . ALstatuscode as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( ALstatuscode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . configadr as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( configadr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . aliasadr as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( aliasadr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . eep_man as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( eep_man ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . eep_id as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( eep_id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . eep_rev as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( eep_rev ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Itype as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Itype ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Dtype as * const _ as usize } , 22usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Dtype ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Obits as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Obits ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Obytes as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Obytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . outputs as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( outputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Ostartbit as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Ostartbit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Ibits as * const _ as usize } , 42usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Ibits ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Ibytes as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Ibytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . inputs as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( inputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Istartbit as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Istartbit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . SM as * const _ as usize } , 57usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( SM ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . SMtype as * const _ as usize } , 121usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( SMtype ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . FMMU as * const _ as usize } , 129usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( FMMU ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . FMMU0func as * const _ as usize } , 193usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( FMMU0func ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . FMMU1func as * const _ as usize } , 194usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( FMMU1func ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . FMMU2func as * const _ as usize } , 195usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( FMMU2func ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . FMMU3func as * const _ as usize } , 196usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( FMMU3func ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . mbx_l as * const _ as usize } , 198usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( mbx_l ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . mbx_wo as * const _ as usize } , 200usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( mbx_wo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . mbx_rl as * const _ as usize } , 202usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( mbx_rl ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . mbx_ro as * const _ as usize } , 204usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( mbx_ro ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . mbx_proto as * const _ as usize } , 206usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( mbx_proto ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . mbx_cnt as * const _ as usize } , 208usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( mbx_cnt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . hasdc as * const _ as usize } , 209usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( hasdc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . ptype as * const _ as usize } , 210usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( ptype ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . topology as * const _ as usize } , 211usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( topology ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . activeports as * const _ as usize } , 212usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( activeports ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . consumedports as * const _ as usize } , 213usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( consumedports ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . parent as * const _ as usize } , 214usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( parent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . parentport as * const _ as usize } , 216usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( parentport ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . entryport as * const _ as usize } , 217usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( entryport ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCrtA as * const _ as usize } , 220usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCrtA ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCrtB as * const _ as usize } , 224usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCrtB ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCrtC as * const _ as usize } , 228usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCrtC ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCrtD as * const _ as usize } , 232usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCrtD ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . pdelay as * const _ as usize } , 236usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( pdelay ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCnext as * const _ as usize } , 240usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCnext ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCprevious as * const _ as usize } , 242usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCprevious ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCcycle as * const _ as usize } , 244usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCcycle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCshift as * const _ as usize } , 248usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCshift ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . DCactive as * const _ as usize } , 252usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( DCactive ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . configindex as * const _ as usize } , 254usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( configindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . SIIindex as * const _ as usize } , 256usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( SIIindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . eep_8byte as * const _ as usize } , 258usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( eep_8byte ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . eep_pdi as * const _ as usize } , 259usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( eep_pdi ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . CoEdetails as * const _ as usize } , 260usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( CoEdetails ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . FoEdetails as * const _ as usize } , 261usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( FoEdetails ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . EoEdetails as * const _ as usize } , 262usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( EoEdetails ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . SoEdetails as * const _ as usize } , 263usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( SoEdetails ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . Ebuscurrent as * const _ as usize } , 264usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( Ebuscurrent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . blockLRW as * const _ as usize } , 266usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( blockLRW ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . group as * const _ as usize } , 267usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( group ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . FMMUunused as * const _ as usize } , 268usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( FMMUunused ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . islost as * const _ as usize } , 269usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( islost ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . PO2SOconfig as * const _ as usize } , 272usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( PO2SOconfig ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . PO2SOconfigx as * const _ as usize } , 280usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( PO2SOconfigx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_slave > ( ) ) ) . name as * const _ as usize } , 288usize , concat ! ( "Offset of field: " , stringify ! ( ec_slave ) , "::" , stringify ! ( name ) ) ) ; } pub type ec_slavet = ec_slave ; # [ doc = " for list of ethercat slave groups" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ec_group { # [ doc = " logical start address for this group" ] pub logstartaddr : uint32 , # [ doc = " output bytes, if Obits < 8 then Obytes = 0" ] pub Obytes : uint32 , # [ doc = " output pointer in IOmap buffer" ] pub outputs : * mut uint8 , # [ doc = " input bytes, if Ibits < 8 then Ibytes = 0" ] pub Ibytes : uint32 , # [ doc = " input pointer in IOmap buffer" ] pub inputs : * mut uint8 , # [ doc = " has DC capabillity" ] pub hasdc : boolean , # [ doc = " next DC slave" ] pub DCnext : uint16 , # [ doc = " E-bus current" ] pub Ebuscurrent : int16 , # [ doc = " if >0 block use of LRW in processdata" ] pub blockLRW : uint8 , # [ doc = " IO segments used" ] pub nsegments : uint16 , # [ doc = " 1st input segment" ] pub Isegment : uint16 , # [ doc = " Offset in input segment" ] pub Ioffset : uint16 , # [ doc = " Expected workcounter outputs" ] pub outputsWKC : uint16 , # [ doc = " Expected workcounter inputs" ] pub inputsWKC : uint16 , # [ doc = " check slave states" ] pub docheckstate : boolean , # [ doc = " IO segmentation list. Datagrams must not break SM in two." ] pub IOsegment : [ uint32 ; 64usize ] , } # [ test ] fn bindgen_test_layout_ec_group ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_group > ( ) , 312usize , concat ! ( "Size of: " , stringify ! ( ec_group ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_group > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ec_group ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . logstartaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( logstartaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . Obytes as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( Obytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . outputs as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( outputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . Ibytes as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( Ibytes ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . inputs as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( inputs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . hasdc as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( hasdc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . DCnext as * const _ as usize } , 34usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( DCnext ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . Ebuscurrent as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( Ebuscurrent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . blockLRW as * const _ as usize } , 38usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( blockLRW ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . nsegments as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( nsegments ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . Isegment as * const _ as usize } , 42usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( Isegment ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . Ioffset as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( Ioffset ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . outputsWKC as * const _ as usize } , 46usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( outputsWKC ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . inputsWKC as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( inputsWKC ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . docheckstate as * const _ as usize } , 50usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( docheckstate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_group > ( ) ) ) . IOsegment as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( ec_group ) , "::" , stringify ! ( IOsegment ) ) ) ; } pub type ec_groupt = ec_group ; pub type ec_eepromFMMUt = [ u16 ; 4usize ] ; pub type ec_eepromSMt = [ u16 ; 6usize ] ; # [ doc = " record to store rxPDO and txPDO table from eeprom" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ec_eepromPDO { pub Startpos : uint16 , pub Length : uint16 , pub nPDO : uint16 , pub Index : [ uint16 ; 512usize ] , pub SyncM : [ uint16 ; 512usize ] , pub BitSize : [ uint16 ; 512usize ] , pub SMbitsize : [ uint16 ; 8usize ] , } # [ test ] fn bindgen_test_layout_ec_eepromPDO ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_eepromPDO > ( ) , 3094usize , concat ! ( "Size of: " , stringify ! ( ec_eepromPDO ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_eepromPDO > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( ec_eepromPDO ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_eepromPDO > ( ) ) ) . Startpos as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_eepromPDO ) , "::" , stringify ! ( Startpos ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_eepromPDO > ( ) ) ) . Length as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( ec_eepromPDO ) , "::" , stringify ! ( Length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_eepromPDO > ( ) ) ) . nPDO as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_eepromPDO ) , "::" , stringify ! ( nPDO ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_eepromPDO > ( ) ) ) . Index as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( ec_eepromPDO ) , "::" , stringify ! ( Index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_eepromPDO > ( ) ) ) . SyncM as * const _ as usize } , 1030usize , concat ! ( "Offset of field: " , stringify ! ( ec_eepromPDO ) , "::" , stringify ! ( SyncM ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_eepromPDO > ( ) ) ) . BitSize as * const _ as usize } , 2054usize , concat ! ( "Offset of field: " , stringify ! ( ec_eepromPDO ) , "::" , stringify ! ( BitSize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_eepromPDO > ( ) ) ) . SMbitsize as * const _ as usize } , 3078usize , concat ! ( "Offset of field: " , stringify ! ( ec_eepromPDO ) , "::" , stringify ! ( SMbitsize ) ) ) ; } pub type ec_eepromPDOt = ec_eepromPDO ; # [ doc = " mailbox buffer array" ] pub type ec_mbxbuft = [ uint8 ; 1487usize ] ; pub type ec_idxstackT = [ u64 ; 23usize ] ; pub type ec_eringt = [ u32 ; 456usize ] ; pub type ec_SMcommtypet = [ u8 ; 10usize ] ; pub type ec_PDOassignt = [ u8 ; 514usize ] ; pub type ec_PDOdesct = [ u8 ; 1026usize ] ; # [ doc = " Context structure , referenced by all ecx functions" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ecx_context { # [ doc = " port reference, may include red_port" ] pub port : * mut ecx_portt , # [ doc = " slavelist reference" ] pub slavelist : * mut ec_slavet , # [ doc = " number of slaves found in configuration" ] pub slavecount : * mut :: std :: os :: raw :: c_int , # [ doc = " maximum number of slaves allowed in slavelist" ] pub maxslave : :: std :: os :: raw :: c_int , # [ doc = " grouplist reference" ] pub grouplist : * mut ec_groupt , # [ doc = " maximum number of groups allowed in grouplist" ] pub maxgroup : :: std :: os :: raw :: c_int , # [ doc = " internal, reference to eeprom cache buffer" ] pub esibuf : * mut uint8 , # [ doc = " internal, reference to eeprom cache map" ] pub esimap : * mut uint32 , # [ doc = " internal, current slave for eeprom cache" ] pub esislave : uint16 , # [ doc = " internal, reference to error list" ] pub elist : * mut ec_eringt , # [ doc = " internal, reference to processdata stack buffer info" ] pub idxstack : * mut ec_idxstackT , # [ doc = " reference to ecaterror state" ] pub ecaterror : * mut boolean , # [ doc = " internal, position of DC datagram in process data packet" ] pub DCtO : uint16 , # [ doc = " internal, length of DC datagram" ] pub DCl : uint16 , # [ doc = " reference to last DC time from slaves" ] pub DCtime : * mut int64 , # [ doc = " internal, SM buffer" ] pub SMcommtype : * mut ec_SMcommtypet , # [ doc = " internal, PDO assign list" ] pub PDOassign : * mut ec_PDOassignt , # [ doc = " internal, PDO description list" ] pub PDOdesc : * mut ec_PDOdesct , # [ doc = " internal, SM list from eeprom" ] pub eepSM : * mut ec_eepromSMt , # [ doc = " internal, FMMU list from eeprom" ] pub eepFMMU : * mut ec_eepromFMMUt , # [ doc = " registered FoE hook" ] pub FOEhook : :: std :: option :: Option < unsafe extern "C" fn ( slave : uint16 , packetnumber : :: std :: os :: raw :: c_int , datasize : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int > , # [ doc = " registered EoE hook" ] pub EOEhook : :: std :: option :: Option < unsafe extern "C" fn ( context : * mut ecx_contextt , slave : uint16 , eoembx : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > , # [ doc = " flag to control legacy automatic state change or manual state change" ] pub manualstatechange : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_ecx_context ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ecx_context > ( ) , 176usize , concat ! ( "Size of: " , stringify ! ( ecx_context ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ecx_context > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ecx_context ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . port as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . slavelist as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( slavelist ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . slavecount as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( slavecount ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . maxslave as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( maxslave ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . grouplist as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( grouplist ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . maxgroup as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( maxgroup ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . esibuf as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( esibuf ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . esimap as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( esimap ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . esislave as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( esislave ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . elist as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( elist ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . idxstack as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( idxstack ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . ecaterror as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( ecaterror ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . DCtO as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( DCtO ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . DCl as * const _ as usize } , 98usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( DCl ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . DCtime as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( DCtime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . SMcommtype as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( SMcommtype ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . PDOassign as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( PDOassign ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . PDOdesc as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( PDOdesc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . eepSM as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( eepSM ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . eepFMMU as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( eepFMMU ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . FOEhook as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( FOEhook ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . EOEhook as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( EOEhook ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ecx_context > ( ) ) ) . manualstatechange as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( ecx_context ) , "::" , stringify ! ( manualstatechange ) ) ) ; } extern "C" { pub fn ec_pusherror ( Ec : * const ec_errort ) ; } extern "C" { pub fn ec_poperror ( Ec : * mut ec_errort ) -> boolean ; } extern "C" { pub fn ec_iserror ( ) -> boolean ; } extern "C" { pub fn ec_packeterror ( Slave : uint16 , Index : uint16 , SubIdx : uint8 , ErrorCode : uint16 ) ; } extern "C" { pub fn ec_init ( ifname : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_init_redundant ( ifname : * const :: std :: os :: raw :: c_char , if2name : * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_close ( ) ; } extern "C" { pub fn ec_siigetbyte ( slave : uint16 , address : uint16 ) -> uint8 ; } extern "C" { pub fn ec_siifind ( slave : uint16 , cat : uint16 ) -> int16 ; } extern "C" { pub fn ec_siistring ( str : * mut :: std :: os :: raw :: c_char , slave : uint16 , Sn : uint16 ) ; } extern "C" { pub fn ec_siiFMMU ( slave : uint16 , FMMU : * mut ec_eepromFMMUt ) -> uint16 ; } extern "C" { pub fn ec_siiSM ( slave : uint16 , SM : * mut ec_eepromSMt ) -> uint16 ; } extern "C" { pub fn ec_siiSMnext ( slave : uint16 , SM : * mut ec_eepromSMt , n : uint16 ) -> uint16 ; } extern "C" { pub fn ec_siiPDO ( slave : uint16 , PDO : * mut ec_eepromPDOt , t : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readstate ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_writestate ( slave : uint16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_statecheck ( slave : uint16 , reqstate : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint16 ; } extern "C" { pub fn ec_mbxempty ( slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_mbxsend ( slave : uint16 , mbx : * mut ec_mbxbuft , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_mbxreceive ( slave : uint16 , mbx : * mut ec_mbxbuft , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_esidump ( slave : uint16 , esibuf : * mut uint8 ) ; } extern "C" { pub fn ec_readeeprom ( slave : uint16 , eeproma : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint32 ; } extern "C" { pub fn ec_writeeeprom ( slave : uint16 , eeproma : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_eeprom2master ( slave : uint16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_eeprom2pdi ( slave : uint16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readeepromAP ( aiadr : uint16 , eeproma : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint64 ; } extern "C" { pub fn ec_writeeepromAP ( aiadr : uint16 , eeproma : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readeepromFP ( configadr : uint16 , eeproma : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint64 ; } extern "C" { pub fn ec_writeeepromFP ( configadr : uint16 , eeproma : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readeeprom1 ( slave : uint16 , eeproma : uint16 ) ; } extern "C" { pub fn ec_readeeprom2 ( slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint32 ; } extern "C" { pub fn ec_send_processdata_group ( group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_send_overlap_processdata_group ( group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_receive_processdata_group ( group : uint8 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_send_processdata ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_send_overlap_processdata ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_receive_processdata ( timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_find_adapters ( ) -> * mut ec_adaptert ; } extern "C" { pub fn ec_free_adapters ( adapter : * mut ec_adaptert ) ; } extern "C" { pub fn ec_nextmbxcnt ( cnt : uint8 ) -> uint8 ; } extern "C" { pub fn ec_clearmbx ( Mbx : * mut ec_mbxbuft ) ; } extern "C" { pub fn ecx_pusherror ( context : * mut ecx_contextt , Ec : * const ec_errort ) ; } extern "C" { pub fn ecx_poperror ( context : * mut ecx_contextt , Ec : * mut ec_errort ) -> boolean ; } extern "C" { pub fn ecx_iserror ( context : * mut ecx_contextt ) -> boolean ; } extern "C" { pub fn ecx_packeterror ( context : * mut ecx_contextt , Slave : uint16 , Index : uint16 , SubIdx : uint8 , ErrorCode : uint16 ) ; } extern "C" { pub fn ecx_init ( context : * mut ecx_contextt , ifname : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_init_redundant ( context : * mut ecx_contextt , redport : * mut ecx_redportt , ifname : * const :: std :: os :: raw :: c_char , if2name : * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_close ( context : * mut ecx_contextt ) ; } extern "C" { pub fn ecx_siigetbyte ( context : * mut ecx_contextt , slave : uint16 , address : uint16 ) -> uint8 ; } extern "C" { pub fn ecx_siifind ( context : * mut ecx_contextt , slave : uint16 , cat : uint16 ) -> int16 ; } extern "C" { pub fn ecx_siistring ( context : * mut ecx_contextt , str : * mut :: std :: os :: raw :: c_char , slave : uint16 , Sn : uint16 ) ; } extern "C" { pub fn ecx_siiFMMU ( context : * mut ecx_contextt , slave : uint16 , FMMU : * mut ec_eepromFMMUt ) -> uint16 ; } extern "C" { pub fn ecx_siiSM ( context : * mut ecx_contextt , slave : uint16 , SM : * mut ec_eepromSMt ) -> uint16 ; } extern "C" { pub fn ecx_siiSMnext ( context : * mut ecx_contextt , slave : uint16 , SM : * mut ec_eepromSMt , n : uint16 ) -> uint16 ; } extern "C" { pub fn ecx_siiPDO ( context : * mut ecx_contextt , slave : uint16 , PDO : * mut ec_eepromPDOt , t : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readstate ( context : * mut ecx_contextt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_writestate ( context : * mut ecx_contextt , slave : uint16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_statecheck ( context : * mut ecx_contextt , slave : uint16 , reqstate : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint16 ; } extern "C" { pub fn ecx_mbxempty ( context : * mut ecx_contextt , slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_mbxsend ( context : * mut ecx_contextt , slave : uint16 , mbx : * mut ec_mbxbuft , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_mbxreceive ( context : * mut ecx_contextt , slave : uint16 , mbx : * mut ec_mbxbuft , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_esidump ( context : * mut ecx_contextt , slave : uint16 , esibuf : * mut uint8 ) ; } extern "C" { pub fn ecx_readeeprom ( context : * mut ecx_contextt , slave : uint16 , eeproma : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint32 ; } extern "C" { pub fn ecx_writeeeprom ( context : * mut ecx_contextt , slave : uint16 , eeproma : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_eeprom2master ( context : * mut ecx_contextt , slave : uint16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_eeprom2pdi ( context : * mut ecx_contextt , slave : uint16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readeepromAP ( context : * mut ecx_contextt , aiadr : uint16 , eeproma : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint64 ; } extern "C" { pub fn ecx_writeeepromAP ( context : * mut ecx_contextt , aiadr : uint16 , eeproma : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readeepromFP ( context : * mut ecx_contextt , configadr : uint16 , eeproma : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint64 ; } extern "C" { pub fn ecx_writeeepromFP ( context : * mut ecx_contextt , configadr : uint16 , eeproma : uint16 , data : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readeeprom1 ( context : * mut ecx_contextt , slave : uint16 , eeproma : uint16 ) ; } extern "C" { pub fn ecx_readeeprom2 ( context : * mut ecx_contextt , slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> uint32 ; } extern "C" { pub fn ecx_send_overlap_processdata_group ( context : * mut ecx_contextt , group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_receive_processdata_group ( context : * mut ecx_contextt , group : uint8 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_send_processdata ( context : * mut ecx_contextt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_send_overlap_processdata ( context : * mut ecx_contextt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_receive_processdata ( context : * mut ecx_contextt , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_send_processdata_group ( context : * mut ecx_contextt , group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_configdc ( ) -> boolean ; } extern "C" { pub fn ec_dcsync0 ( slave : uint16 , act : boolean , CyclTime : uint32 , CyclShift : int32 ) ; } extern "C" { pub fn ec_dcsync01 ( slave : uint16 , act : boolean , CyclTime0 : uint32 , CyclTime1 : uint32 , CyclShift : int32 ) ; } extern "C" { pub fn ecx_configdc ( context : * mut ecx_contextt ) -> boolean ; } extern "C" { pub fn ecx_dcsync0 ( context : * mut ecx_contextt , slave : uint16 , act : boolean , CyclTime : uint32 , CyclShift : int32 ) ; } extern "C" { pub fn ecx_dcsync01 ( context : * mut ecx_contextt , slave : uint16 , act : boolean , CyclTime0 : uint32 , CyclTime1 : uint32 , CyclShift : int32 ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ec_ODlistt { # [ doc = " slave number" ] pub Slave : uint16 , # [ doc = " number of entries in list" ] pub Entries : uint16 , # [ doc = " array of indexes" ] pub Index : [ uint16 ; 1024usize ] , # [ doc = " array of datatypes, see EtherCAT specification" ] pub DataType : [ uint16 ; 1024usize ] , # [ doc = " array of object codes, see EtherCAT specification" ] pub ObjectCode : [ uint8 ; 1024usize ] , # [ doc = " number of subindexes for each index" ] pub MaxSub : [ uint8 ; 1024usize ] , # [ doc = " textual description of each index" ] pub Name : [ [ :: std :: os :: raw :: c_char ; 41usize ] ; 1024usize ] , } # [ test ] fn bindgen_test_layout_ec_ODlistt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_ODlistt > ( ) , 48132usize , concat ! ( "Size of: " , stringify ! ( ec_ODlistt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_ODlistt > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( ec_ODlistt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_ODlistt > ( ) ) ) . Slave as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_ODlistt ) , "::" , stringify ! ( Slave ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_ODlistt > ( ) ) ) . Entries as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( ec_ODlistt ) , "::" , stringify ! ( Entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_ODlistt > ( ) ) ) . Index as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ec_ODlistt ) , "::" , stringify ! ( Index ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_ODlistt > ( ) ) ) . DataType as * const _ as usize } , 2052usize , concat ! ( "Offset of field: " , stringify ! ( ec_ODlistt ) , "::" , stringify ! ( DataType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_ODlistt > ( ) ) ) . ObjectCode as * const _ as usize } , 4100usize , concat ! ( "Offset of field: " , stringify ! ( ec_ODlistt ) , "::" , stringify ! ( ObjectCode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_ODlistt > ( ) ) ) . MaxSub as * const _ as usize } , 5124usize , concat ! ( "Offset of field: " , stringify ! ( ec_ODlistt ) , "::" , stringify ! ( MaxSub ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_ODlistt > ( ) ) ) . Name as * const _ as usize } , 6148usize , concat ! ( "Offset of field: " , stringify ! ( ec_ODlistt ) , "::" , stringify ! ( Name ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ec_OElistt { # [ doc = " number of entries in list" ] pub Entries : uint16 , # [ doc = " array of value infos, see EtherCAT specification" ] pub ValueInfo : [ uint8 ; 256usize ] , # [ doc = " array of value infos, see EtherCAT specification" ] pub DataType : [ uint16 ; 256usize ] , # [ doc = " array of bit lengths, see EtherCAT specification" ] pub BitLength : [ uint16 ; 256usize ] , # [ doc = " array of object access bits, see EtherCAT specification" ] pub ObjAccess : [ uint16 ; 256usize ] , # [ doc = " textual description of each index" ] pub Name : [ [ :: std :: os :: raw :: c_char ; 41usize ] ; 256usize ] , } # [ test ] fn bindgen_test_layout_ec_OElistt ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ec_OElistt > ( ) , 12290usize , concat ! ( "Size of: " , stringify ! ( ec_OElistt ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ec_OElistt > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( ec_OElistt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_OElistt > ( ) ) ) . Entries as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ec_OElistt ) , "::" , stringify ! ( Entries ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_OElistt > ( ) ) ) . ValueInfo as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( ec_OElistt ) , "::" , stringify ! ( ValueInfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_OElistt > ( ) ) ) . DataType as * const _ as usize } , 258usize , concat ! ( "Offset of field: " , stringify ! ( ec_OElistt ) , "::" , stringify ! ( DataType ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_OElistt > ( ) ) ) . BitLength as * const _ as usize } , 770usize , concat ! ( "Offset of field: " , stringify ! ( ec_OElistt ) , "::" , stringify ! ( BitLength ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_OElistt > ( ) ) ) . ObjAccess as * const _ as usize } , 1282usize , concat ! ( "Offset of field: " , stringify ! ( ec_OElistt ) , "::" , stringify ! ( ObjAccess ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ec_OElistt > ( ) ) ) . Name as * const _ as usize } , 1794usize , concat ! ( "Offset of field: " , stringify ! ( ec_OElistt ) , "::" , stringify ! ( Name ) ) ) ; } extern "C" { pub fn ec_SDOerror ( Slave : uint16 , Index : uint16 , SubIdx : uint8 , AbortCode : int32 ) ; } extern "C" { pub fn ec_SDOread ( slave : uint16 , index : uint16 , subindex : uint8 , CA : boolean , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_SDOwrite ( Slave : uint16 , Index : uint16 , SubIndex : uint8 , CA : boolean , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , Timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_RxPDO ( Slave : uint16 , RxPDOnumber : uint16 , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_TxPDO ( slave : uint16 , TxPDOnumber : uint16 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readPDOmap ( Slave : uint16 , Osize : * mut :: std :: os :: raw :: c_int , Isize : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readPDOmapCA ( Slave : uint16 , Thread_n : :: std :: os :: raw :: c_int , Osize : * mut :: std :: os :: raw :: c_int , Isize : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readODlist ( Slave : uint16 , pODlist : * mut ec_ODlistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readODdescription ( Item : uint16 , pODlist : * mut ec_ODlistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readOEsingle ( Item : uint16 , SubI : uint8 , pODlist : * mut ec_ODlistt , pOElist : * mut ec_OElistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readOE ( Item : uint16 , pODlist : * mut ec_ODlistt , pOElist : * mut ec_OElistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_SDOerror ( context : * mut ecx_contextt , Slave : uint16 , Index : uint16 , SubIdx : uint8 , AbortCode : int32 ) ; } extern "C" { pub fn ecx_SDOread ( context : * mut ecx_contextt , slave : uint16 , index : uint16 , subindex : uint8 , CA : boolean , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_SDOwrite ( context : * mut ecx_contextt , Slave : uint16 , Index : uint16 , SubIndex : uint8 , CA : boolean , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , Timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_RxPDO ( context : * mut ecx_contextt , Slave : uint16 , RxPDOnumber : uint16 , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_TxPDO ( context : * mut ecx_contextt , slave : uint16 , TxPDOnumber : uint16 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readPDOmap ( context : * mut ecx_contextt , Slave : uint16 , Osize : * mut :: std :: os :: raw :: c_int , Isize : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readPDOmapCA ( context : * mut ecx_contextt , Slave : uint16 , Thread_n : :: std :: os :: raw :: c_int , Osize : * mut :: std :: os :: raw :: c_int , Isize : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readODlist ( context : * mut ecx_contextt , Slave : uint16 , pODlist : * mut ec_ODlistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readODdescription ( context : * mut ecx_contextt , Item : uint16 , pODlist : * mut ec_ODlistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readOEsingle ( context : * mut ecx_contextt , Item : uint16 , SubI : uint8 , pODlist : * mut ec_ODlistt , pOElist : * mut ec_OElistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readOE ( context : * mut ecx_contextt , Item : uint16 , pODlist : * mut ec_ODlistt , pOElist : * mut ec_OElistt ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_FOEdefinehook ( hook : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_FOEread ( slave : uint16 , filename : * mut :: std :: os :: raw :: c_char , password : uint32 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_FOEwrite ( slave : uint16 , filename : * mut :: std :: os :: raw :: c_char , password : uint32 , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_FOEdefinehook ( context : * mut ecx_contextt , hook : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_FOEread ( context : * mut ecx_contextt , slave : uint16 , filename : * mut :: std :: os :: raw :: c_char , password : uint32 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_FOEwrite ( context : * mut ecx_contextt , slave : uint16 , filename : * mut :: std :: os :: raw :: c_char , password : uint32 , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_SoEread ( slave : uint16 , driveNo : uint8 , elementflags : uint8 , idn : uint16 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_SoEwrite ( slave : uint16 , driveNo : uint8 , elementflags : uint8 , idn : uint16 , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_readIDNmap ( slave : uint16 , Osize : * mut :: std :: os :: raw :: c_int , Isize : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_SoEread ( context : * mut ecx_contextt , slave : uint16 , driveNo : uint8 , elementflags : uint8 , idn : uint16 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_SoEwrite ( context : * mut ecx_contextt , slave : uint16 , driveNo : uint8 , elementflags : uint8 , idn : uint16 , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_readIDNmap ( context : * mut ecx_contextt , slave : uint16 , Osize : * mut :: std :: os :: raw :: c_int , Isize : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } # [ doc = " EOE ip4 address in network order" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct eoe_ip4_addr { pub addr : u32 , } # [ test ] fn bindgen_test_layout_eoe_ip4_addr ( ) { assert_eq ! ( :: std :: mem :: size_of :: < eoe_ip4_addr > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( eoe_ip4_addr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < eoe_ip4_addr > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( eoe_ip4_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_ip4_addr > ( ) ) ) . addr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eoe_ip4_addr ) , "::" , stringify ! ( addr ) ) ) ; } pub type eoe_ip4_addr_t = eoe_ip4_addr ; # [ doc = " EOE ethernet address" ] # [ repr ( C , packed ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct eoe_ethaddr { pub addr : [ u8 ; 6usize ] , } # [ test ] fn bindgen_test_layout_eoe_ethaddr ( ) { assert_eq ! ( :: std :: mem :: size_of :: < eoe_ethaddr > ( ) , 6usize , concat ! ( "Size of: " , stringify ! ( eoe_ethaddr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < eoe_ethaddr > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( eoe_ethaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_ethaddr > ( ) ) ) . addr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( eoe_ethaddr ) , "::" , stringify ! ( addr ) ) ) ; } pub type eoe_ethaddr_t = eoe_ethaddr ; # [ doc = " EoE IP request structure, storage only, no need to pack" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct eoe_param { pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub mac : eoe_ethaddr_t , pub ip : eoe_ip4_addr_t , pub subnet : eoe_ip4_addr_t , pub default_gateway : eoe_ip4_addr_t , pub dns_ip : eoe_ip4_addr_t , pub dns_name : [ :: std :: os :: raw :: c_char ; 32usize ] , } # [ test ] fn bindgen_test_layout_eoe_param ( ) { assert_eq ! ( :: std :: mem :: size_of :: < eoe_param > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( eoe_param ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < eoe_param > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( eoe_param ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_param > ( ) ) ) . mac as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( eoe_param ) , "::" , stringify ! ( mac ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_param > ( ) ) ) . ip as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( eoe_param ) , "::" , stringify ! ( ip ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_param > ( ) ) ) . subnet as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( eoe_param ) , "::" , stringify ! ( subnet ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_param > ( ) ) ) . default_gateway as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( eoe_param ) , "::" , stringify ! ( default_gateway ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_param > ( ) ) ) . dns_ip as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( eoe_param ) , "::" , stringify ! ( dns_ip ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < eoe_param > ( ) ) ) . dns_name as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( eoe_param ) , "::" , stringify ! ( dns_name ) ) ) ; } impl eoe_param { # [ inline ] pub fn mac_set ( & self ) -> u8 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_mac_set ( & mut self , val : u8 ) { unsafe { let val : u8 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn ip_set ( & self ) -> u8 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_ip_set ( & mut self , val : u8 ) { unsafe { let val : u8 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn subnet_set ( & self ) -> u8 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 2usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_subnet_set ( & mut self , val : u8 ) { unsafe { let val : u8 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 2usize , 1u8 , val as u64 ) } } # [ inline ] pub fn default_gateway_set ( & self ) -> u8 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 3usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_default_gateway_set ( & mut self , val : u8 ) { unsafe { let val : u8 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 3usize , 1u8 , val as u64 ) } } # [ inline ] pub fn dns_ip_set ( & self ) -> u8 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 4usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_dns_ip_set ( & mut self , val : u8 ) { unsafe { let val : u8 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 4usize , 1u8 , val as u64 ) } } # [ inline ] pub fn dns_name_set ( & self ) -> u8 { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 5usize , 1u8 ) as u8 ) } } # [ inline ] pub fn set_dns_name_set ( & mut self , val : u8 ) { unsafe { let val : u8 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 5usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( mac_set : u8 , ip_set : u8 , subnet_set : u8 , default_gateway_set : u8 , dns_ip_set : u8 , dns_name_set : u8 ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let mac_set : u8 = unsafe { :: std :: mem :: transmute ( mac_set ) } ; mac_set as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let ip_set : u8 = unsafe { :: std :: mem :: transmute ( ip_set ) } ; ip_set as u64 } ) ; __bindgen_bitfield_unit . set ( 2usize , 1u8 , { let subnet_set : u8 = unsafe { :: std :: mem :: transmute ( subnet_set ) } ; subnet_set as u64 } ) ; __bindgen_bitfield_unit . set ( 3usize , 1u8 , { let default_gateway_set : u8 = unsafe { :: std :: mem :: transmute ( default_gateway_set ) } ; default_gateway_set as u64 } ) ; __bindgen_bitfield_unit . set ( 4usize , 1u8 , { let dns_ip_set : u8 = unsafe { :: std :: mem :: transmute ( dns_ip_set ) } ; dns_ip_set as u64 } ) ; __bindgen_bitfield_unit . set ( 5usize , 1u8 , { let dns_name_set : u8 = unsafe { :: std :: mem :: transmute ( dns_name_set ) } ; dns_name_set as u64 } ) ; __bindgen_bitfield_unit } } pub type eoe_param_t = eoe_param ; extern "C" { pub fn ecx_EOEdefinehook ( context : * mut ecx_contextt , hook : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_EOEsetIp ( context : * mut ecx_contextt , slave : uint16 , port : uint8 , ipparam : * mut eoe_param_t , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_EOEgetIp ( context : * mut ecx_contextt , slave : uint16 , port : uint8 , ipparam : * mut eoe_param_t , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_EOEsend ( context : * mut ecx_contextt , slave : uint16 , port : uint8 , psize : :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_EOErecv ( context : * mut ecx_contextt , slave : uint16 , port : uint8 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_EOEreadfragment ( MbxIn : * mut ec_mbxbuft , rxfragmentno : * mut uint8 , rxframesize : * mut uint16 , rxframeoffset : * mut uint16 , rxframeno : * mut uint16 , psize : * mut :: std :: os :: raw :: c_int , p : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_config_init ( usetable : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_config_map ( pIOmap : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_config_overlap_map ( pIOmap : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_config_map_group ( pIOmap : * mut :: std :: os :: raw :: c_void , group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_config_overlap_map_group ( pIOmap : * mut :: std :: os :: raw :: c_void , group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_config ( usetable : uint8 , pIOmap : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_config_overlap ( usetable : uint8 , pIOmap : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_recover_slave ( slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_reconfig_slave ( slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_config_init ( context : * mut ecx_contextt , usetable : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_config_map_group ( context : * mut ecx_contextt , pIOmap : * mut :: std :: os :: raw :: c_void , group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_config_overlap_map_group ( context : * mut ecx_contextt , pIOmap : * mut :: std :: os :: raw :: c_void , group : uint8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_recover_slave ( context : * mut ecx_contextt , slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ecx_reconfig_slave ( context : * mut ecx_contextt , slave : uint16 , timeout : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ec_sdoerror2string ( sdoerrorcode : uint32 ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ec_ALstatuscode2string ( ALstatuscode : uint16 ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ec_soeerror2string ( errorcode : uint16 ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ec_mbxerror2string ( errorcode : uint16 ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ecx_err2string ( Ec : ec_errort ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ecx_elist2string ( context : * mut ecx_contextt ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ec_elist2string ( ) -> * mut :: std :: os :: raw :: c_char ; }