Skip to content
EC-Monitor 3.1 documentation logo
EC-Monitor 8.6. Link Layer Control Interface
Type to start searching
    • | EtherCAT manuals |
    • | www.developer.acontis.com |
    • | www.acontis.com |
    • 8. Application programming interface, reference
    • 1. Introduction
      • 1.1. What is EtherCAT?
      • 1.2. The EC-Monitor - Features
      • 1.3. Protected version
      • 1.4. License
    • 2. Architecture
      • 2.1. EtherCAT Network Configuration (ENI)
      • 2.2. Operating system configuration
    • 3. Ethernet TAP
      • 3.1. Generic 100MBit/s Ethernet Switch
      • 3.2. Beckhoff ET2000
      • 3.3. Dualcomm ETAP-1000
      • 3.4. Hilscher netAnalyser
      • 3.5. ProfiTap ProfiShark
    • 4. Getting Started
      • 4.1. Running EcMonitorDemo
      • 4.2. Compiling the EcMonitorDemo
    • 5. Software Integration
      • 5.1. Example application
      • 5.2. Event notification
      • 5.3. Logging
      • 5.4. EtherCAT Network Configuration ENI
      • 5.5. Process Data Access
      • 5.6. EC-Monitor Source Code
    • 6. Platform and Operating Systems (OS)
      • 6.1. Linux
      • 6.2. QNX Neutrino
      • 6.3. Windriver VxWorks
      • 6.4. Microsoft Windows
    • 7. Link Layer
      • 7.1. Link Layer selection
      • 7.2. Windows NDIS - emllNdis
      • 7.3. Windows WinPcap - emllPcap
    • 8. Application programming interface, reference
      • 8.1. General functions
      • 8.2. Packet Capture
      • 8.3. Process Data functions
      • 8.4. Slave status functions
      • 8.5. Diagnosis
      • 8.6. Link Layer Control Interface
      • 8.7. EtherCAT Mailbox Transfer
      • 8.8. CAN application protocol over EtherCAT (CoE)
      • 8.9. File access over EtherCAT (FoE)
      • 8.10. Hot Connect
    • 9. Generic notification interface
      • 9.1. Notification callback
      • 9.2. emNotifyApp
      • 9.3. Enable/Disable notifications
      • 9.4. Status notifications
      • 9.5. Error notifications
    • 10. RAS-Server for EC-Inspector and EC-Engineer
      • 10.1. Integration Requirements
      • 10.2. Application programming interface
    • 11. Error Codes
      • 11.1. Groups
      • 11.2. Generic Error Codes
      • 11.3. DCM Error Codes
      • 11.4. ADS over EtherCAT (AoE) Error Codes
      • 11.5. CAN application protocol over EtherCAT (CoE) SDO Error Codes
      • 11.6. File Transfer over EtherCAT (FoE) Error Codes
      • 11.7. Servo Drive Profil over EtherCAT (SoE) Error Codes
      • 11.8. Remote API Error Codes

    8.6. Link Layer Control Interface

    8.6.1. emIoControl - EC_IOCTL_ISLINK_CONNECTED

    emIoControl - EC_IOCTL_ISLINK_CONNECTED
    Parameter
    • pbyInBuf: [in] Should be set to EC_NULL

    • dwInBufSize: [in] Should be set to 0

    • pbyOutBuf: [out] Pointer to buffer of type struct EC_T_LINK_CONNECTED_INFO

    • dwOutBufSize: [in] Size of the output buffer in bytes, sizeof(EC_T_LINK_CONNECTED_INFO)

    • pdwNumOutData: [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer

    Return

    EC_E_NOERROR or error code

    struct EC_T_LINK_CONNECTED_INFO

    Public Members

    EC_T_BOOL bConnected

    [out] MAIN or RED link detected

    EC_T_BOOL bSendEnabled

    [out] send enabled on MAIN or RED

    EC_T_BOOL bMainConnected

    [out] MAIN link detected

    EC_T_BOOL bMainMasked

    [out] MAIN link not used for sending, because topology changed delay not elapsed yet

    EC_T_BOOL bRedConnected

    [out] RED link detected

    EC_T_BOOL bRedMasked

    [out] RED link not used for sending, because topology changed delay not elapsed yet

    8.6.2. emIoControl - EC_IOCTL_GET_LINKLAYER_MODE

    emIoControl - EC_IOCTL_GET_LINKLAYER_MODE
    Parameter
    • pbyInBuf: [in] Should be set to EC_NULL

    • dwInBufSize: [in] Should be set to 0

    • pbyOutBuf: [out] Pointer to buffer of type struct EC_T_LINKLAYER_MODE_DESC

    • dwOutBufSize: [in] Size of the output buffer in bytes, sizeof(EC_T_LINKLAYER_MODE_DESC)

    • pdwNumOutData: [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer

    Return

    EC_E_NOERROR or error code

    struct EC_T_LINKLAYER_MODE_DESC

    Public Members

    EC_T_LINKMODE eLinkMode

    [out] Operation mode of main interface

    EC_T_LINKMODE eLinkModeRed

    [out] Operation mode of redundancy interface

    8.6.3. emIoControl - EC_LINKIOCTL…

    The generic control interface provides access to the main network adapter when adding EC_IOCTL_LINKLAYER_MAIN to the EC_LINKIOCTL parameter at dwCode.

    EC_T_DWORD dwCode = (EC_IOCTL_LINKLAYER_MAIN | EC_LINKIOCTL_GET_ETHERNET_ADDRESS);
    

    8.6.4. emIoControl - EC_LINKIOCTL_GET_ETHERNET_ADDRESS

    Provides MAC addresses of main or red line.

    emIoControl - EC_LINKIOCTL_GET_ETHERNET_ADDRESS
    Parameter
    • pbyInBuf: [in] Should be set to EC_NULL

    • dwInBufSize: [in] Should be set to 0

    • pbyOutBuf: [out] Pointer to MAC address buffer (6 bytes).

    • dwOutBufSize: [in] Size of the output buffer in bytes (at least 6).

    • pdwNumOutData: [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer.

    Return

    EC_E_NOERROR or error code

    8.6.5. emIoControl - EC_LINKIOCTL_GET_SPEED

    emIoControl - EC_LINKIOCTL_GET_SPEED
    Parameter
    • pbyInBuf: [in] Should be set to EC_NULL

    • dwInBufSize: [in] Should be set to 0

    • pbyOutBuf: [out] Pointer to EC_T_DWORD. Set by Link Layer driver to 10/100/1000.

    • dwOutBufSize: [in] Size of the output buffer in bytes.

    • pdwNumOutData: [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer.

    Return

    EC_E_NOERROR or error code

    Previous 8.5. Diagnosis
    Next 8.7. EtherCAT Mailbox Transfer
    © Copyright 2024-May-14, acontis technologies GmbH.
    Created using Sphinx 4.2.0. and Material for Sphinx