Network interface block for NCM USB device.
More...
#include <ncm_interface.h>
Inherits EtherLikeInterface, and EtherLikeInterface.
|
| | NcmInterfaceBlock (const char *name, dCDC_NCM *pDevice) |
| | Constructor.
|
| |
|
void | LinkToDevice () |
| | Register interface and link to NCM device Called after RegisterInterface() to update the device with interface number.
|
| |
| virtual void | send_func (PoolPtr poolPtr) override |
| | Send function - called by network stack to transmit.
|
| |
| virtual void | EnableMulticast (MACADR macAddress, BOOL addAddress) override |
| | Enable or disable multicast address reception.
|
| |
| virtual bool | LinkActive () override |
| | Returns current link status.
|
| |
| virtual int | LinkSpeed () override |
| | Returns link speed in Mbps.
|
| |
| void | SetLinkSpeed (int speed) |
| | Set the link speed.
|
| |
| virtual bool | LinkDuplex () override |
| | Returns duplex mode.
|
| |
| void | SetMACAddress (const MACADR &mac) |
| | Set the MAC address for this interface.
|
| |
| virtual bool | bNeedsArp () override |
| | Check if this interface needs ARP.
|
| |
| dCDC_NCM * | GetNcmDevice () |
| | Get the associated NCM device.
|
| |
| | NcmInterfaceBlock (const char *name, dCDC_NCM *pDevice) |
| | Constructor.
|
| |
|
void | LinkToDevice () |
| | Register interface and link to NCM device Called after RegisterInterface() to update the device with interface number.
|
| |
| virtual void | send_func (PoolPtr poolPtr) override |
| | Send function - called by network stack to transmit.
|
| |
| virtual void | EnableMulticast (MACADR macAddress, BOOL addAddress) override |
| | Enable or disable multicast address reception.
|
| |
| virtual bool | LinkActive () override |
| | Returns current link status.
|
| |
| virtual int | LinkSpeed () override |
| | Returns link speed in Mbps.
|
| |
| void | SetLinkSpeed (int speed) |
| | Set the link speed.
|
| |
| virtual bool | LinkDuplex () override |
| | Returns duplex mode.
|
| |
| void | SetMACAddress (const MACADR &mac) |
| | Set the MAC address for this interface.
|
| |
| virtual bool | bNeedsArp () override |
| | Check if this interface needs ARP.
|
| |
| dCDC_NCM * | GetNcmDevice () |
| | Get the associated NCM device.
|
| |
Network interface block for NCM USB device.
This class extends EtherLikeInterface to provide network stack integration for the USB NCM device. It handles frame transmission via USB and provides link status to the network stack.
◆ NcmInterfaceBlock() [1/2]
| NcmInterfaceBlock::NcmInterfaceBlock |
( |
const char * | name, |
|
|
dCDC_NCM * | pDevice ) |
Constructor.
- Parameters
-
| name | Interface name (e.g., "NCM0") |
| pDevice | Pointer to the associated NCM device |
◆ NcmInterfaceBlock() [2/2]
| NcmInterfaceBlock::NcmInterfaceBlock |
( |
const char * | name, |
|
|
dCDC_NCM * | pDevice ) |
Constructor.
- Parameters
-
| name | Interface name (e.g., "NCM0") |
| pDevice | Pointer to the associated NCM device |
◆ bNeedsArp() [1/2]
| bool NcmInterfaceBlock::bNeedsArp |
( |
| ) |
|
|
overridevirtual |
Check if this interface needs ARP.
- Returns
- True (NCM is Ethernet-like and uses ARP)
Reimplemented from InterfaceBlock.
◆ bNeedsArp() [2/2]
| virtual bool NcmInterfaceBlock::bNeedsArp |
( |
| ) |
|
|
overridevirtual |
Check if this interface needs ARP.
- Returns
- True (NCM is Ethernet-like and uses ARP)
Reimplemented from InterfaceBlock.
◆ EnableMulticast() [1/2]
| void NcmInterfaceBlock::EnableMulticast |
( |
MACADR | macAddress, |
|
|
BOOL | addAddress ) |
|
overridevirtual |
Enable or disable multicast address reception.
- Parameters
-
| macAddress | The multicast MAC address |
| addAddress | True to add, false to remove |
Implements InterfaceBlock.
◆ EnableMulticast() [2/2]
| virtual void NcmInterfaceBlock::EnableMulticast |
( |
MACADR | macAddress, |
|
|
BOOL | addAddress ) |
|
overridevirtual |
Enable or disable multicast address reception.
- Parameters
-
| macAddress | The multicast MAC address |
| addAddress | True to add, false to remove |
Implements InterfaceBlock.
◆ GetNcmDevice() [1/2]
| dCDC_NCM * NcmInterfaceBlock::GetNcmDevice |
( |
| ) |
|
|
inline |
Get the associated NCM device.
- Returns
- Pointer to the NCM device
◆ GetNcmDevice() [2/2]
| dCDC_NCM * NcmInterfaceBlock::GetNcmDevice |
( |
| ) |
|
|
inline |
Get the associated NCM device.
- Returns
- Pointer to the NCM device
◆ LinkActive() [1/2]
| bool NcmInterfaceBlock::LinkActive |
( |
| ) |
|
|
overridevirtual |
Returns current link status.
- Returns
- True if USB is connected and NCM is in CONNECTED state
Implements InterfaceBlock.
◆ LinkActive() [2/2]
| virtual bool NcmInterfaceBlock::LinkActive |
( |
| ) |
|
|
overridevirtual |
Returns current link status.
- Returns
- True if USB is connected and NCM is in CONNECTED state
Implements InterfaceBlock.
◆ LinkDuplex() [1/2]
| bool NcmInterfaceBlock::LinkDuplex |
( |
| ) |
|
|
overridevirtual |
Returns duplex mode.
- Returns
- Always true (full duplex) for USB
Implements InterfaceBlock.
◆ LinkDuplex() [2/2]
| virtual bool NcmInterfaceBlock::LinkDuplex |
( |
| ) |
|
|
overridevirtual |
Returns duplex mode.
- Returns
- Always true (full duplex) for USB
Implements InterfaceBlock.
◆ LinkSpeed() [1/2]
| int NcmInterfaceBlock::LinkSpeed |
( |
| ) |
|
|
overridevirtual |
Returns link speed in Mbps.
- Returns
- Link speed (typically 100 for USB 2.0 High Speed)
Implements InterfaceBlock.
◆ LinkSpeed() [2/2]
| virtual int NcmInterfaceBlock::LinkSpeed |
( |
| ) |
|
|
overridevirtual |
Returns link speed in Mbps.
- Returns
- Link speed (typically 100 for USB 2.0 High Speed)
Implements InterfaceBlock.
◆ send_func() [1/2]
| void NcmInterfaceBlock::send_func |
( |
PoolPtr | poolPtr | ) |
|
|
overridevirtual |
Send function - called by network stack to transmit.
- Parameters
-
| poolPtr | Pointer to the buffer containing the Ethernet frame |
Implements InterfaceBlock.
◆ send_func() [2/2]
| virtual void NcmInterfaceBlock::send_func |
( |
PoolPtr | poolPtr | ) |
|
|
overridevirtual |
Send function - called by network stack to transmit.
- Parameters
-
| poolPtr | Pointer to the buffer containing the Ethernet frame |
Implements InterfaceBlock.
◆ SetLinkSpeed() [1/2]
| void NcmInterfaceBlock::SetLinkSpeed |
( |
int | speed | ) |
|
Set the link speed.
- Parameters
-
◆ SetLinkSpeed() [2/2]
| void NcmInterfaceBlock::SetLinkSpeed |
( |
int | speed | ) |
|
Set the link speed.
- Parameters
-
◆ SetMACAddress() [1/2]
| void NcmInterfaceBlock::SetMACAddress |
( |
const MACADR & | mac | ) |
|
Set the MAC address for this interface.
- Parameters
-
| mac | The MAC address to use |
◆ SetMACAddress() [2/2]
| void NcmInterfaceBlock::SetMACAddress |
( |
const MACADR & | mac | ) |
|
Set the MAC address for this interface.
- Parameters
-
| mac | The MAC address to use |
The documentation for this class was generated from the following files: