ConOpSys V2970  P004.07
ANVILEX control operating system
Functions | Variables
Protocol_IP_Over_ETHERNET.cpp File Reference

Communication protocol IP over Ethernet class implementation file. More...

#include "string.h"
#include "timeouts.h"
#include "lwip/sio.h"
#include "lwip/etharp.h"
#include "Parameter_Manager.h"
#include "Protocol_IP_Over_ETHERNET.h"
Include dependency graph for Protocol_IP_Over_ETHERNET.cpp:

Functions

sio_fd_t sio_open (u8_t devnum)
 
void sio_send (u8_t c, sio_fd_t fd)
 
u32_t sio_read (sio_fd_t fd, u8_t *data, u32_t len)
 
u32_t sio_tryread (sio_fd_t fd, u8_t *data, u32_t len)
 
err_t ethernetif_init (struct netif *netif)
 
static void low_level_init (struct netif *netif)
 
void ethernetif_input (struct netif *netif)
 
static struct pbuflow_level_input (struct netif *netif)
 
static err_t low_level_output (struct netif *netif, struct pbuf *p)
 
void ethernetif_notify_conn_changed (struct netif *netif)
 
void ethernetif_update_config (struct netif *netif)
 

Variables

uint8_t MACAddr [6]
 
ETH_HandleTypeDef heth
 
__ALIGN_BEGIN ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB__ALIGN_END
 

Detailed Description

Communication protocol IP over Ethernet class implementation file.

Attention
No special attention requered.
Revision
2075
Date
2020-09-12 14:00:31 +0500 (Sa, 12 Sep 2020)
Author
minch

Function Documentation

◆ ethernetif_notify_conn_changed()

void ethernetif_notify_conn_changed ( struct netif netif)

Referenced by ethernetif_update_config().

Here is the caller graph for this function:

◆ ethernetif_update_config()

void ethernetif_update_config ( struct netif netif)

◆ low_level_init()

static void low_level_init ( struct netif netif)
static

◆ low_level_input()

static struct pbuf* low_level_input ( struct netif netif)
static

Should allocate a pbuf and transfer the bytes of the incoming packet from the interface into the pbuf.

Parameters
netifthe lwip network interface structure for this ethernetif
Returns
a pbuf filled with the received packet (including MAC header) NULL on memory error

References ETH_DMARxFrameInfos::buffer, ETH_DMARXDESC_OWN, ETH_GetReceivedFrame(), ETH_RX_BUF_SIZE, ETH_DMARxFrameInfos::FSRxDesc, heth, ETH_HandleTypeDef::Instance, pbuf::len, ETH_DMARxFrameInfos::length, pbuf::next, NULL, pbuf::payload, pbuf_alloc(), PBUF_POOL, PBUF_RAW, RESET, ETH_HandleTypeDef::RxFrameInfos, ETH_DMARxFrameInfos::SegCount, and ETH_DMADescTypeDef::Status.

Referenced by ethernetif_input().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ low_level_output()

static err_t low_level_output ( struct netif netif,
struct pbuf p 
)
static

References ETH_DMADescTypeDef::Buffer1Addr, ERR_OK, ERR_USE, ETH_DMATXDESC_OWN, ETH_TransmitFrame(), ETH_TX_BUF_SIZE, heth, ETH_HandleTypeDef::Instance, pbuf::len, pbuf::next, NULL, pbuf::payload, RESET, and ETH_HandleTypeDef::TxDesc.

Referenced by ethernetif_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sio_open()

sio_fd_t sio_open ( u8_t  devnum)

Opens a serial device for communication.

Parameters
devnumdevice number
Returns
handle to serial device if successful, NULL otherwise

Referenced by slipif_init().

Here is the caller graph for this function:

◆ sio_read()

u32_t sio_read ( sio_fd_t  fd,
u8_t data,
u32_t  len 
)
Parameters
fdserial device handle
datapointer to data buffer for receiving
lenmaximum length (in bytes) of data to receive
Returns
number of bytes actually received - may be 0 if aborted by sio_read_abort
Note
This function will block until data can be received. The blocking can be cancelled by calling sio_read_abort().

◆ sio_send()

void sio_send ( u8_t  c,
sio_fd_t  fd 
)
Parameters
ccharacter to send
fdserial device handle
Note
This function will block until the character can be sent.

Referenced by slipif_output().

Here is the caller graph for this function:

◆ sio_tryread()

u32_t sio_tryread ( sio_fd_t  fd,
u8_t data,
u32_t  len 
)

Same as sio_read but returns immediately if no data is available and never blocks.

Parameters
fdserial device handle
datapointer to data buffer for receiving
lenmaximum length (in bytes) of data to receive
Returns
number of bytes actually received

Referenced by slipif_poll().

Here is the caller graph for this function:

Variable Documentation

◆ __ALIGN_END

__ALIGN_BEGIN uint8_t Tx_Buff [ ETH_TXBUFNB ][ ETH_TX_BUF_SIZE ] __ALIGN_END

< IAR Compiler

◆ heth

◆ MACAddr

uint8_t MACAddr[6]

Referenced by low_level_init().