9.6. Real-time Ethernet Driver Control Interface
9.6.1. emonIoCtl - EC_IOCTL_ISLINK_CONNECTED
-
EC_IOCTL_ISLINK_CONNECTED
Determine whether the link between the stack and the first slave is connected.
- Parameters
pbyInBuf – [in] Should be set to EC_NULL
dwInBufSize – [in] Should be set to 0
pbyOutBuf – [out] Pointer to EC_T_DWORD. If value is EC_TRUE link is connected, if EC_FALSE it is not.
dwOutBufSize – [in] Size of the output buffer in bytes
pdwNumOutData – [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer.
- Returns
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
-
EC_T_BOOL bConnected
See also
9.6.2. emonIoCtl - EC_IOCTL_GET_LINKLAYER_MODE
-
EC_IOCTL_GET_LINKLAYER_MODE
This call allows the application to determine whether the Real-time Ethernet Driver is currently running in polling or in interrupt mode.
- Parameters
pbyInBuf – [in] Should be set to EC_NULL
dwInBufSize – [in] Should be set to 0
pbyOutBuf – [out] Pointer to struct EC_T_LINKLAYER_MODE_DESC
dwOutBufSize – [in] Size of the output buffer in bytes
pdwNumOutData – [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer.
- Returns
EC_E_NOERROR or error code
See also
9.6.3. emonIoCtl - 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);
9.6.4. emonIoCtl - EC_LINKIOCTL_GET_ETHERNET_ADDRESS
Provides MAC addresses of main or red line.
- emonIoCtl - EC_LINKIOCTL_GET_ETHERNET_ADDRESS
- Parameter
pbyInBuf: [in] Should be set to EC_NULLdwInBufSize: [in] Should be set to 0pbyOutBuf: [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.
See also
9.6.5. emonIoCtl - EC_LINKIOCTL_GET_SPEED
- emonIoCtl - EC_LINKIOCTL_GET_SPEED
- Parameter
pbyInBuf: [in] Should be set to EC_NULLdwInBufSize: [in] Should be set to 0pbyOutBuf: [out] Pointer to EC_T_DWORD. Set by Real-time Ethernet Driver to 10/100/1000.dwOutBufSize: [in] Size of the output buffer in bytespdwNumOutData: [out] Pointer to EC_T_DWORD. Amount of bytes written to the output buffer.
See also