/* automatically generated by rust-bindgen 0.66.1 */

pub const EC_TIMEOUTRET: u32 = 2000;
pub const EC_TIMEOUTSTATE: u32 = 2000000;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_mutex_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 56usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_mutex_t() {
    const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutex_t> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_mutex_t>(),
        64usize,
        concat!("Size of: ", stringify!(_opaque_pthread_mutex_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_mutex_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_mutex_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_mutex_t),
            "::",
            stringify!(__opaque)
        )
    );
}
pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t;
pub type pthread_mutex_t = __darwin_pthread_mutex_t;
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;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ec_timet {
    pub sec: uint32,
    pub usec: uint32,
}
#[test]
fn bindgen_test_layout_ec_timet() {
    const UNINIT: ::std::mem::MaybeUninit<ec_timet> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).sec) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_timet),
            "::",
            stringify!(sec)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).usec) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_timet),
            "::",
            stringify!(usec)
        )
    );
}
#[doc = " definition for frame buffers"]
pub type ec_bufT = [uint8; 1518usize];
#[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 = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_uint;
#[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,
}
#[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() {
    const UNINIT: ::std::mem::MaybeUninit<ec_errort__bindgen_ty_1__bindgen_ty_1> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).ErrorCode) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(ErrorCode)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ErrorReg) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(ErrorReg)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).b1) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(b1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).w1) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort__bindgen_ty_1__bindgen_ty_1),
            "::",
            stringify!(w1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).w2) as usize - ptr 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() {
    const UNINIT: ::std::mem::MaybeUninit<ec_errort__bindgen_ty_1> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).AbortCode) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort__bindgen_ty_1),
            "::",
            stringify!(AbortCode)
        )
    );
}
#[test]
fn bindgen_test_layout_ec_errort() {
    const UNINIT: ::std::mem::MaybeUninit<ec_errort> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).Time) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort),
            "::",
            stringify!(Time)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Signal) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort),
            "::",
            stringify!(Signal)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Slave) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort),
            "::",
            stringify!(Slave)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Index) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort),
            "::",
            stringify!(Index)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SubIdx) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort),
            "::",
            stringify!(SubIdx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Etype) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_errort),
            "::",
            stringify!(Etype)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pcap {
    _unused: [u8; 0],
}
pub type pcap_t = pcap;
#[doc = " pointer structure to Tx and Rx stacks"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ec_stackT {
    #[doc = " socket connection used"]
    pub sock: *mut *mut pcap_t,
    #[doc = " tx buffer"]
    pub txbuf: *mut [ec_bufT; 16usize],
    #[doc = " tx buffer lengths"]
    pub txbuflength: *mut [::std::os::raw::c_int; 16usize],
    #[doc = " temporary receive buffer"]
    pub tempbuf: *mut ec_bufT,
    #[doc = " rx buffers"]
    pub rxbuf: *mut [ec_bufT; 16usize],
    #[doc = " rx buffer status fields"]
    pub rxbufstat: *mut [::std::os::raw::c_int; 16usize],
    #[doc = " received MAC source address (middle word)"]
    pub rxsa: *mut [::std::os::raw::c_int; 16usize],
}
#[test]
fn bindgen_test_layout_ec_stackT() {
    const UNINIT: ::std::mem::MaybeUninit<ec_stackT> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_stackT>(),
        56usize,
        concat!("Size of: ", stringify!(ec_stackT))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_stackT>(),
        8usize,
        concat!("Alignment of ", stringify!(ec_stackT))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).sock) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_stackT),
            "::",
            stringify!(sock)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).txbuf) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_stackT),
            "::",
            stringify!(txbuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).txbuflength) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_stackT),
            "::",
            stringify!(txbuflength)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tempbuf) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_stackT),
            "::",
            stringify!(tempbuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxbuf) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_stackT),
            "::",
            stringify!(rxbuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxbufstat) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_stackT),
            "::",
            stringify!(rxbufstat)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxsa) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_stackT),
            "::",
            stringify!(rxsa)
        )
    );
}
#[doc = " pointer structure to buffers for redundant port"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ecx_redportt {
    pub stack: ec_stackT,
    pub sockhandle: *mut pcap_t,
    #[doc = " rx buffers"]
    pub rxbuf: [ec_bufT; 16usize],
    #[doc = " rx buffer status"]
    pub rxbufstat: [::std::os::raw::c_int; 16usize],
    #[doc = " rx MAC source address"]
    pub rxsa: [::std::os::raw::c_int; 16usize],
    #[doc = " temporary rx buffer"]
    pub tempinbuf: ec_bufT,
}
#[test]
fn bindgen_test_layout_ecx_redportt() {
    const UNINIT: ::std::mem::MaybeUninit<ecx_redportt> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_redportt),
            "::",
            stringify!(stack)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).sockhandle) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_redportt),
            "::",
            stringify!(sockhandle)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxbuf) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_redportt),
            "::",
            stringify!(rxbuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxbufstat) as usize - ptr as usize },
        24352usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_redportt),
            "::",
            stringify!(rxbufstat)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxsa) as usize - ptr as usize },
        24416usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_redportt),
            "::",
            stringify!(rxsa)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tempinbuf) as usize - ptr as usize },
        24480usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_redportt),
            "::",
            stringify!(tempinbuf)
        )
    );
}
#[doc = " pointer structure to buffers, vars and mutexes for port instantiation"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ecx_portt {
    pub stack: ec_stackT,
    pub sockhandle: *mut pcap_t,
    #[doc = " rx buffers"]
    pub rxbuf: [ec_bufT; 16usize],
    #[doc = " rx buffer status"]
    pub rxbufstat: [::std::os::raw::c_int; 16usize],
    #[doc = " rx MAC source address"]
    pub rxsa: [::std::os::raw::c_int; 16usize],
    #[doc = " temporary rx buffer"]
    pub tempinbuf: ec_bufT,
    #[doc = " temporary rx buffer status"]
    pub tempinbufs: ::std::os::raw::c_int,
    #[doc = " transmit buffers"]
    pub txbuf: [ec_bufT; 16usize],
    #[doc = " transmit buffer lenghts"]
    pub txbuflength: [::std::os::raw::c_int; 16usize],
    #[doc = " temporary tx buffer"]
    pub txbuf2: ec_bufT,
    #[doc = " temporary tx buffer length"]
    pub txbuflength2: ::std::os::raw::c_int,
    #[doc = " last used frame index"]
    pub lastidx: uint8,
    #[doc = " current redundancy state"]
    pub redstate: ::std::os::raw::c_int,
    #[doc = " pointer to redundancy port and buffers"]
    pub redport: *mut ecx_redportt,
    pub getindex_mutex: pthread_mutex_t,
    pub tx_mutex: pthread_mutex_t,
    pub rx_mutex: pthread_mutex_t,
}
#[test]
fn bindgen_test_layout_ecx_portt() {
    const UNINIT: ::std::mem::MaybeUninit<ecx_portt> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ecx_portt>(),
        52088usize,
        concat!("Size of: ", stringify!(ecx_portt))
    );
    assert_eq!(
        ::std::mem::align_of::<ecx_portt>(),
        8usize,
        concat!("Alignment of ", stringify!(ecx_portt))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(stack)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).sockhandle) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(sockhandle)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxbuf) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(rxbuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxbufstat) as usize - ptr as usize },
        24352usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(rxbufstat)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rxsa) as usize - ptr as usize },
        24416usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(rxsa)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tempinbuf) as usize - ptr as usize },
        24480usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(tempinbuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tempinbufs) as usize - ptr as usize },
        26000usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(tempinbufs)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).txbuf) as usize - ptr as usize },
        26004usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(txbuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).txbuflength) as usize - ptr as usize },
        50292usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(txbuflength)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).txbuf2) as usize - ptr as usize },
        50356usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(txbuf2)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).txbuflength2) as usize - ptr as usize },
        51876usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(txbuflength2)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).lastidx) as usize - ptr as usize },
        51880usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(lastidx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).redstate) as usize - ptr as usize },
        51884usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(redstate)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).redport) as usize - ptr as usize },
        51888usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(redport)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).getindex_mutex) as usize - ptr as usize },
        51896usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(getindex_mutex)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tx_mutex) as usize - ptr as usize },
        51960usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(tx_mutex)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rx_mutex) as usize - ptr as usize },
        52024usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_portt),
            "::",
            stringify!(rx_mutex)
        )
    );
}
pub type ec_adaptert = ec_adapter;
#[repr(C)]
#[derive(Debug, 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() {
    const UNINIT: ::std::mem::MaybeUninit<ec_adapter> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_adapter),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_adapter),
            "::",
            stringify!(desc)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr 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() {
    const UNINIT: ::std::mem::MaybeUninit<ec_fmmu> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).LogStart) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(LogStart)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).LogLength) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(LogLength)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).LogStartbit) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(LogStartbit)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).LogEndbit) as usize - ptr as usize },
        7usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(LogEndbit)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PhysStart) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(PhysStart)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PhysStartBit) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(PhysStartBit)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMUtype) as usize - ptr as usize },
        11usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(FMMUtype)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMUactive) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(FMMUactive)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).unused1) as usize - ptr as usize },
        13usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(unused1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).unused2) as usize - ptr as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_fmmu),
            "::",
            stringify!(unused2)
        )
    );
}
#[doc = " record for FMMU"]
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() {
    const UNINIT: ::std::mem::MaybeUninit<ec_sm> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).StartAddr) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_sm),
            "::",
            stringify!(StartAddr)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SMlength) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_sm),
            "::",
            stringify!(SMlength)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SMflags) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_sm),
            "::",
            stringify!(SMflags)
        )
    );
}
#[doc = " record for sync manager"]
pub type ec_smt = ec_sm;
#[doc = " Context structure , referenced by all ecx functions"]
pub type ecx_contextt = ecx_context;
#[doc = " for list of ethercat slaves detected"]
#[repr(C)]
#[derive(Debug, 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() {
    const UNINIT: ::std::mem::MaybeUninit<ec_slave> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).state) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(state)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ALstatuscode) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(ALstatuscode)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).configadr) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(configadr)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).aliasadr) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(aliasadr)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).eep_man) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(eep_man)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).eep_id) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(eep_id)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).eep_rev) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(eep_rev)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Itype) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Itype)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Dtype) as usize - ptr as usize },
        22usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Dtype)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Obits) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Obits)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Obytes) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Obytes)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).outputs) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(outputs)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Ostartbit) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Ostartbit)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Ibits) as usize - ptr as usize },
        42usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Ibits)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Ibytes) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Ibytes)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inputs) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(inputs)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Istartbit) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Istartbit)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SM) as usize - ptr as usize },
        57usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(SM)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SMtype) as usize - ptr as usize },
        121usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(SMtype)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU) as usize - ptr as usize },
        129usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(FMMU)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU0func) as usize - ptr as usize },
        193usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(FMMU0func)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU1func) as usize - ptr as usize },
        194usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(FMMU1func)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU2func) as usize - ptr as usize },
        195usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(FMMU2func)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU3func) as usize - ptr as usize },
        196usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(FMMU3func)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).mbx_l) as usize - ptr as usize },
        198usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(mbx_l)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).mbx_wo) as usize - ptr as usize },
        200usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(mbx_wo)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).mbx_rl) as usize - ptr as usize },
        202usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(mbx_rl)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).mbx_ro) as usize - ptr as usize },
        204usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(mbx_ro)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).mbx_proto) as usize - ptr as usize },
        206usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(mbx_proto)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).mbx_cnt) as usize - ptr as usize },
        208usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(mbx_cnt)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).hasdc) as usize - ptr as usize },
        209usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(hasdc)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ptype) as usize - ptr as usize },
        210usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(ptype)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).topology) as usize - ptr as usize },
        211usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(topology)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).activeports) as usize - ptr as usize },
        212usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(activeports)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).consumedports) as usize - ptr as usize },
        213usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(consumedports)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize },
        214usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(parent)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).parentport) as usize - ptr as usize },
        216usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(parentport)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).entryport) as usize - ptr as usize },
        217usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(entryport)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCrtA) as usize - ptr as usize },
        220usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCrtA)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCrtB) as usize - ptr as usize },
        224usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCrtB)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCrtC) as usize - ptr as usize },
        228usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCrtC)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCrtD) as usize - ptr as usize },
        232usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCrtD)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).pdelay) as usize - ptr as usize },
        236usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(pdelay)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCnext) as usize - ptr as usize },
        240usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCnext)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCprevious) as usize - ptr as usize },
        242usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCprevious)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCcycle) as usize - ptr as usize },
        244usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCcycle)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCshift) as usize - ptr as usize },
        248usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCshift)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCactive) as usize - ptr as usize },
        252usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(DCactive)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).configindex) as usize - ptr as usize },
        254usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(configindex)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SIIindex) as usize - ptr as usize },
        256usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(SIIindex)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).eep_8byte) as usize - ptr as usize },
        258usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(eep_8byte)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).eep_pdi) as usize - ptr as usize },
        259usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(eep_pdi)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).CoEdetails) as usize - ptr as usize },
        260usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(CoEdetails)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FoEdetails) as usize - ptr as usize },
        261usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(FoEdetails)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).EoEdetails) as usize - ptr as usize },
        262usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(EoEdetails)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SoEdetails) as usize - ptr as usize },
        263usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(SoEdetails)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Ebuscurrent) as usize - ptr as usize },
        264usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(Ebuscurrent)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).blockLRW) as usize - ptr as usize },
        266usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(blockLRW)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize },
        267usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(group)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMUunused) as usize - ptr as usize },
        268usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(FMMUunused)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).islost) as usize - ptr as usize },
        269usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(islost)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PO2SOconfig) as usize - ptr as usize },
        272usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(PO2SOconfig)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PO2SOconfigx) as usize - ptr as usize },
        280usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(PO2SOconfigx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        288usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_slave),
            "::",
            stringify!(name)
        )
    );
}
#[doc = " for list of ethercat slaves detected"]
pub type ec_slavet = ec_slave;
#[doc = " for list of ethercat slave groups"]
#[repr(C)]
#[derive(Debug, 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() {
    const UNINIT: ::std::mem::MaybeUninit<ec_group> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).logstartaddr) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(logstartaddr)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Obytes) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(Obytes)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).outputs) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(outputs)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Ibytes) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(Ibytes)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inputs) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(inputs)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).hasdc) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(hasdc)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCnext) as usize - ptr as usize },
        34usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(DCnext)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Ebuscurrent) as usize - ptr as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(Ebuscurrent)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).blockLRW) as usize - ptr as usize },
        38usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(blockLRW)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nsegments) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(nsegments)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Isegment) as usize - ptr as usize },
        42usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(Isegment)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Ioffset) as usize - ptr as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(Ioffset)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).outputsWKC) as usize - ptr as usize },
        46usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(outputsWKC)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).inputsWKC) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(inputsWKC)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).docheckstate) as usize - ptr as usize },
        50usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(docheckstate)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).IOsegment) as usize - ptr as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_group),
            "::",
            stringify!(IOsegment)
        )
    );
}
#[doc = " for list of ethercat slave groups"]
pub type ec_groupt = ec_group;
#[doc = " SII FMMU structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ec_eepromFMMU {
    pub Startpos: uint16,
    pub nFMMU: uint8,
    pub FMMU0: uint8,
    pub FMMU1: uint8,
    pub FMMU2: uint8,
    pub FMMU3: uint8,
}
#[test]
fn bindgen_test_layout_ec_eepromFMMU() {
    const UNINIT: ::std::mem::MaybeUninit<ec_eepromFMMU> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_eepromFMMU>(),
        8usize,
        concat!("Size of: ", stringify!(ec_eepromFMMU))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_eepromFMMU>(),
        2usize,
        concat!("Alignment of ", stringify!(ec_eepromFMMU))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Startpos) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromFMMU),
            "::",
            stringify!(Startpos)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nFMMU) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromFMMU),
            "::",
            stringify!(nFMMU)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU0) as usize - ptr as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromFMMU),
            "::",
            stringify!(FMMU0)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU1) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromFMMU),
            "::",
            stringify!(FMMU1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU2) as usize - ptr as usize },
        5usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromFMMU),
            "::",
            stringify!(FMMU2)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FMMU3) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromFMMU),
            "::",
            stringify!(FMMU3)
        )
    );
}
#[doc = " SII FMMU structure"]
pub type ec_eepromFMMUt = ec_eepromFMMU;
#[doc = " SII SM structure"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ec_eepromSM {
    pub Startpos: uint16,
    pub nSM: uint8,
    pub PhStart: uint16,
    pub Plength: uint16,
    pub Creg: uint8,
    pub Sreg: uint8,
    pub Activate: uint8,
    pub PDIctrl: uint8,
}
#[test]
fn bindgen_test_layout_ec_eepromSM() {
    const UNINIT: ::std::mem::MaybeUninit<ec_eepromSM> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_eepromSM>(),
        12usize,
        concat!("Size of: ", stringify!(ec_eepromSM))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_eepromSM>(),
        2usize,
        concat!("Alignment of ", stringify!(ec_eepromSM))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Startpos) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(Startpos)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nSM) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(nSM)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PhStart) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(PhStart)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Plength) as usize - ptr as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(Plength)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Creg) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(Creg)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Sreg) as usize - ptr as usize },
        9usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(Sreg)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Activate) as usize - ptr as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(Activate)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PDIctrl) as usize - ptr as usize },
        11usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_eepromSM),
            "::",
            stringify!(PDIctrl)
        )
    );
}
#[doc = " SII SM structure"]
pub type ec_eepromSMt = ec_eepromSM;
#[doc = " stack structure to store segmented LRD/LWR/LRW constructs"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ec_idxstack {
    pub pushed: uint8,
    pub pulled: uint8,
    pub idx: [uint8; 16usize],
    pub data: [*mut ::std::os::raw::c_void; 16usize],
    pub length: [uint16; 16usize],
    pub dcoffset: [uint16; 16usize],
}
#[test]
fn bindgen_test_layout_ec_idxstack() {
    const UNINIT: ::std::mem::MaybeUninit<ec_idxstack> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_idxstack>(),
        216usize,
        concat!("Size of: ", stringify!(ec_idxstack))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_idxstack>(),
        8usize,
        concat!("Alignment of ", stringify!(ec_idxstack))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).pushed) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_idxstack),
            "::",
            stringify!(pushed)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).pulled) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_idxstack),
            "::",
            stringify!(pulled)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).idx) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_idxstack),
            "::",
            stringify!(idx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_idxstack),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_idxstack),
            "::",
            stringify!(length)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).dcoffset) as usize - ptr as usize },
        184usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_idxstack),
            "::",
            stringify!(dcoffset)
        )
    );
}
#[doc = " stack structure to store segmented LRD/LWR/LRW constructs"]
pub type ec_idxstackT = ec_idxstack;
#[doc = " ringbuf for error storage"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ec_ering {
    pub head: int16,
    pub tail: int16,
    pub Error: [ec_errort; 65usize],
}
#[test]
fn bindgen_test_layout_ec_ering() {
    const UNINIT: ::std::mem::MaybeUninit<ec_ering> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_ering>(),
        1824usize,
        concat!("Size of: ", stringify!(ec_ering))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_ering>(),
        4usize,
        concat!("Alignment of ", stringify!(ec_ering))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_ering),
            "::",
            stringify!(head)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_ering),
            "::",
            stringify!(tail)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).Error) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_ering),
            "::",
            stringify!(Error)
        )
    );
}
#[doc = " ringbuf for error storage"]
pub type ec_eringt = ec_ering;
#[doc = " SyncManager Communication Type structure for CA"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ec_SMcommtype {
    pub n: uint8,
    pub nu1: uint8,
    pub SMtype: [uint8; 8usize],
}
#[test]
fn bindgen_test_layout_ec_SMcommtype() {
    const UNINIT: ::std::mem::MaybeUninit<ec_SMcommtype> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_SMcommtype>(),
        10usize,
        concat!("Size of: ", stringify!(ec_SMcommtype))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_SMcommtype>(),
        1usize,
        concat!("Alignment of ", stringify!(ec_SMcommtype))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_SMcommtype),
            "::",
            stringify!(n)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nu1) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_SMcommtype),
            "::",
            stringify!(nu1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SMtype) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_SMcommtype),
            "::",
            stringify!(SMtype)
        )
    );
}
#[doc = " SyncManager Communication Type structure for CA"]
pub type ec_SMcommtypet = ec_SMcommtype;
#[doc = " SDO assign structure for CA"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ec_PDOassign {
    pub n: uint8,
    pub nu1: uint8,
    pub index: [uint16; 256usize],
}
#[test]
fn bindgen_test_layout_ec_PDOassign() {
    const UNINIT: ::std::mem::MaybeUninit<ec_PDOassign> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_PDOassign>(),
        514usize,
        concat!("Size of: ", stringify!(ec_PDOassign))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_PDOassign>(),
        1usize,
        concat!("Alignment of ", stringify!(ec_PDOassign))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_PDOassign),
            "::",
            stringify!(n)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nu1) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_PDOassign),
            "::",
            stringify!(nu1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_PDOassign),
            "::",
            stringify!(index)
        )
    );
}
#[doc = " SDO assign structure for CA"]
pub type ec_PDOassignt = ec_PDOassign;
#[doc = " SDO description structure for CA"]
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct ec_PDOdesc {
    pub n: uint8,
    pub nu1: uint8,
    pub PDO: [uint32; 256usize],
}
#[test]
fn bindgen_test_layout_ec_PDOdesc() {
    const UNINIT: ::std::mem::MaybeUninit<ec_PDOdesc> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<ec_PDOdesc>(),
        1026usize,
        concat!("Size of: ", stringify!(ec_PDOdesc))
    );
    assert_eq!(
        ::std::mem::align_of::<ec_PDOdesc>(),
        1usize,
        concat!("Alignment of ", stringify!(ec_PDOdesc))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_PDOdesc),
            "::",
            stringify!(n)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).nu1) as usize - ptr as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_PDOdesc),
            "::",
            stringify!(nu1)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PDO) as usize - ptr as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(ec_PDOdesc),
            "::",
            stringify!(PDO)
        )
    );
}
#[doc = " SDO description structure for CA"]
pub type ec_PDOdesct = ec_PDOdesc;
#[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 = " 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,
    #[doc = " userdata, promotes application configuration esp. in EC_VER2 with multiple\n ec_context instances. Note: userdata memory is managed by application, not SOEM"]
    pub userdata: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_ecx_context() {
    const UNINIT: ::std::mem::MaybeUninit<ecx_context> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    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::addr_of!((*ptr).port) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(port)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).slavelist) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(slavelist)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).slavecount) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(slavecount)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).maxslave) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(maxslave)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).grouplist) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(grouplist)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).maxgroup) as usize - ptr as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(maxgroup)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).esibuf) as usize - ptr as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(esibuf)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).esimap) as usize - ptr as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(esimap)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).esislave) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(esislave)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).elist) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(elist)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).idxstack) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(idxstack)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ecaterror) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(ecaterror)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).DCtime) as usize - ptr as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(DCtime)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).SMcommtype) as usize - ptr as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(SMcommtype)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PDOassign) as usize - ptr as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(PDOassign)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).PDOdesc) as usize - ptr as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(PDOdesc)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).eepSM) as usize - ptr as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(eepSM)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).eepFMMU) as usize - ptr as usize },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(eepFMMU)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).FOEhook) as usize - ptr as usize },
        144usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(FOEhook)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).EOEhook) as usize - ptr as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(EOEhook)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).manualstatechange) as usize - ptr as usize },
        160usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(manualstatechange)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).userdata) as usize - ptr as usize },
        168usize,
        concat!(
            "Offset of field: ",
            stringify!(ecx_context),
            "::",
            stringify!(userdata)
        )
    );
}
extern "C" {
    #[doc = " global struct to hold default master context"]
    pub static mut ecx_context: ecx_contextt;
}
extern "C" {
    #[doc = " main slave data structure array"]
    pub static mut ec_slave: [ec_slavet; 200usize];
}
extern "C" {
    #[doc = " number of slaves found by configuration function"]
    pub static mut ec_slavecount: ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " slave group structure"]
    pub static mut ec_group: [ec_groupt; 2usize];
}
extern "C" {
    pub static mut ec_DCtime: int64;
}
extern "C" {
    pub fn ec_init(ifname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn ec_close();
}
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_send_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_configdc() -> boolean;
}
extern "C" {
    pub fn ec_dcsync0(slave: uint16, act: boolean, CyclTime: uint32, CyclShift: int32);
}
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_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 ec_ALstatuscode2string(ALstatuscode: uint16) -> *mut ::std::os::raw::c_char;
}
