OpenNet
Classes | Public Member Functions | Static Public Member Functions | List of all members
OpenNet::Adapter Class Referenceabstract

This class define the adapter level interface. More...

#include <Adapter.h>

Inheritance diagram for OpenNet::Adapter:
OpenNet::StatisticsProvider

Classes

struct  Config
 The configuration. More...
 

Public Member Functions

virtual Status GetAdapterNo (unsigned int *aOut)=0
 This methode return the adapter numero. More...
 
virtual Status GetConfig (Config *aOut) const =0
 This methode return the configuration of the adapter. More...
 
virtual Status GetInfo (Info *aOut) const =0
 This methode returns the information about the adapter. More...
 
virtual const char * GetName () const =0
 This method returns the adapter's name. More...
 
virtual Status GetState (State *aOut)=0
 This methode returns the state of the adapter. More...
 
virtual bool IsConnected ()=0
 This methode indicate if the adapter is connected to a system. More...
 
virtual bool IsConnected (const System &aSystem)=0
 This methode indicate if the adapter is connected to the system. More...
 
virtual Status ResetInputFilter ()=0
 This methode reset the input filter. More...
 
virtual Status ResetProcessor ()=0
 This methode reset the processor. More...
 
virtual Status SetConfig (const Config &aConfig)=0
 This methode set the configuration. More...
 
virtual Status SetInputFilter (SourceCode *aSourceCode)=0
 This methode set the input filter. More...
 
virtual Status SetProcessor (Processor *aProcessor)=0
 This methode associate a processor to the adapter. More...
 
virtual Status Display (FILE *aOut) const =0
 Display. More...
 
virtual Status Event_RegisterCallback (Event_Callback aCallback, void *aContext)=0
 Wait for event. More...
 
virtual Status Packet_Send (const void *aData, unsigned int aSize_byte)=0
 This methode send a packet. More...
 
virtual Status Read (void *aOut, unsigned int aOutSize_byte, unsigned int *aInfo_byte)=0
 This methode read data from the driver. More...
 
virtual Status Tx_Disable ()=0
 This methode disable packet transmit. More...
 
virtual Status Tx_Enable ()=0
 This methode enable packet transmit. More...
 
- Public Member Functions inherited from OpenNet::StatisticsProvider
virtual Status GetStatistics (unsigned int *aOut, unsigned int aOutSize_byte, unsigned int *aInfo_byte=NULL, bool aReset=false)=0
 This methode return the statistics of the adapter. More...
 
OPEN_NET_PUBLIC unsigned int GetStatisticsQty () const
 This methode returns the number of statistics counter. More...
 
const OPEN_NET_PUBLIC StatisticsDescriptionGetStatisticsDescriptions () const
 This methode returns the statistics counter descriptions. More...
 
virtual Status ResetStatistics ()=0
 This methode resets the statistics of the adapter. More...
 
OPEN_NET_PUBLIC Status DisplayStatistics (const unsigned int *aIn, unsigned int aInSize_byte, FILE *aOut, unsigned int aMinLevel=0)
 Display. More...
 

Static Public Member Functions

static OPEN_NET_PUBLIC Status Display (const Config &aIn, FILE *aOut)
 Display. More...
 
static OPEN_NET_PUBLIC Status Display (const Info &aIn, FILE *aOut)
 Display. More...
 
static OPEN_NET_PUBLIC Status Display (const State &aIn, FILE *aOut)
 Display. More...
 

Detailed Description

This class define the adapter level interface.

Member Function Documentation

static OPEN_NET_PUBLIC Status OpenNet::Adapter::Display ( const Config aIn,
FILE *  aOut 
)
static

Display.

Parameters
aInThe Config instance to display
aOutThe output stream
Return values
STATUS_OK
STATUS_NOT_ALLOWED_NULL_ARGUMENT
STATUS_INVALID_REFERENCE
static OPEN_NET_PUBLIC Status OpenNet::Adapter::Display ( const Info aIn,
FILE *  aOut 
)
static

Display.

Parameters
aInThe Info instance to display
aOutThe output stream
Return values
STATUS_OK
STATUS_NOT_ALLOWED_NULL_ARGUMENT
STATUS_INVALID_REFERENCE
static OPEN_NET_PUBLIC Status OpenNet::Adapter::Display ( const State aIn,
FILE *  aOut 
)
static

Display.

Parameters
aInThe State instance to display
aOutThe output stream
Return values
STATUS_OK
STATUS_NOT_ALLOWED_NULL_ARGUMENT
STATUS_INVALID_REFERENCE
virtual Status OpenNet::Adapter::Display ( FILE *  aOut) const
pure virtual

Display.

Parameters
aOutThe output stream
Return values
STATUS_OK
STATUS_NOT_ALLOWED_NULL_ARGUMENT
virtual Status OpenNet::Adapter::Event_RegisterCallback ( Event_Callback  aCallback,
void *  aContext 
)
pure virtual

Wait for event.

Parameters
aCallbackThe event processing function. Use NULL to unregister.
aContextThe context to pass to the function
Return values
STATUS_OK
STATUS_NOT_ALLOWED_NULL_ARGUMENT
virtual Status OpenNet::Adapter::GetAdapterNo ( unsigned int *  aOut)
pure virtual

This methode return the adapter numero.

Parameters
aOutThe methode return the information here.
Return values
STATUS_OK
STATUS_ADAPTER_NOT_CONNECTED
STATUS_NOT_ALLOWED_NULL_ARGUMENT
See also
IsConnected
virtual Status OpenNet::Adapter::GetConfig ( Config aOut) const
pure virtual

This methode return the configuration of the adapter.

Parameters
aOutThe methode return the information here.
Return values
STATUS_OK
STATUS_NOT_ALLOWED_NULL_ARGUMENT
See also
SetConfig
virtual Status OpenNet::Adapter::GetInfo ( Info aOut) const
pure virtual

This methode returns the information about the adapter.

Parameters
aOutThe methode return the information here.
Return values
STATUS_OK
STATUS_NOT_ALLOWED_NULL_ARGUMENT
virtual const char* OpenNet::Adapter::GetName ( ) const
pure virtual

This method returns the adapter's name.

Returns
This method returns the address of an internal buffer.
virtual Status OpenNet::Adapter::GetState ( State aOut)
pure virtual

This methode returns the state of the adapter.

Parameters
aOutThe methode return the information here.
Return values
STATUS_OK
STATUS_IOCTL_ERROR
STATUS_NOT_ALLOWED_NULL_ARGUMENT
virtual bool OpenNet::Adapter::IsConnected ( )
pure virtual

This methode indicate if the adapter is connected to a system.

Return values
false
true
See also
GetAdapterNo
virtual bool OpenNet::Adapter::IsConnected ( const System aSystem)
pure virtual

This methode indicate if the adapter is connected to the system.

Parameters
aSystemThe System instance
Return values
false
true
See also
GetAdapterNo
virtual Status OpenNet::Adapter::Packet_Send ( const void *  aData,
unsigned int  aSize_byte 
)
pure virtual

This methode send a packet.

Parameters
aDataThe data
aSize_byteThe size
Return values
STATUS_OK
STATUS_IOCTL_ERROR
STATUS_NOT_ALLOWER_NULL_ARGUMENT
STATUS_PACKET_TO_LARGE
STATUS_PACKET_TO_SMALL
virtual Status OpenNet::Adapter::Read ( void *  aOut,
unsigned int  aOutSize_byte,
unsigned int *  aInfo_byte 
)
pure virtual

This methode read data from the driver.

Parameters
aOutThe output buffer
aOutSize_byteThe size of the output buffer
aInfo_byteThe method put the size of read data here
Return values
STATUS_OK
virtual Status OpenNet::Adapter::ResetInputFilter ( )
pure virtual

This methode reset the input filter.

Return values
STATUS_OK
STATUS_FILTER_NOT_SET
See also
SetInputFilter
virtual Status OpenNet::Adapter::ResetProcessor ( )
pure virtual

This methode reset the processor.

Return values
STATUS_OK
STATUS_PROCESSOR_NOT_SET
See also
SetProcessor
virtual Status OpenNet::Adapter::SetConfig ( const Config aConfig)
pure virtual

This methode set the configuration.

Parameters
aConfigThe Config instance
Return values
STATUS_OK
STATUS_INVALID_REFERENCE
STATUS_IOCTL_ERROR
See also
GetConfig
virtual Status OpenNet::Adapter::SetInputFilter ( SourceCode aSourceCode)
pure virtual

This methode set the input filter.

Parameters
aSourceCodeThe SourceCode instance
Return values
STATUS_OK
STATUS_FILTER_ALREADY_SET
STATUS_NOT_ALLOWED_NULL_ARGUMENT
STATUS_PROCESSOR_NOT_SET
See also
ResetInputFilter
virtual Status OpenNet::Adapter::SetProcessor ( Processor aProcessor)
pure virtual

This methode associate a processor to the adapter.

Parameters
aProcessorThe Processor instance
Return values
STATUS_OK
STATUS_INVALID_PROCESSOR
STATUS_NOT_ALLOWED_NULL_ARGUMENT
STATUS_PROCESSOR_ALREADY_SET
See also
ResetProcessor
virtual Status OpenNet::Adapter::Tx_Disable ( )
pure virtual

This methode disable packet transmit.

Return values
STATUS_OK
virtual Status OpenNet::Adapter::Tx_Enable ( )
pure virtual

This methode enable packet transmit.

Return values
STATUS_OK

The documentation for this class was generated from the following file: