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

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

#include <System.h>

Classes

struct  Config
 System configuration. More...
 
struct  Info
 System information. More...
 

Public Member Functions

virtual Status GetConfig (Config *aOut) const =0
 Retrieve the configuration of the system. More...
 
virtual Status GetInfo (Info *aOut) const =0
 Retrieve the information about the system. More...
 
virtual Status SetConfig (const Config &aConfig)=0
 Modify the configuration of the system. More...
 
virtual void Delete ()
 This methode delete the instance. More...
 
virtual Status Adapter_Connect (Adapter *aAdapter)=0
 Connect an Adapter to the System. More...
 
virtual unsigned int Adapter_GetCount () const =0
 
virtual AdapterAdapter_Get (unsigned int aIndex)=0
 
virtual AdapterAdapter_Get (OpenNetK::Adapter_Type aType, unsigned int aIndex)=0
 
virtual AdapterAdapter_Get (const unsigned char *aAddress, const unsigned char *aMask, const unsigned char *aMaskDiff)=0
 
virtual Status Display (FILE *aOut)=0
 Display. More...
 
virtual OpenNet::KernelKernel_Get (unsigned int aIndex)=0
 Retrieve a Kernel. More...
 
virtual unsigned int Kernel_GetCount () const =0
 Retrieve the number of Kernel. More...
 
virtual unsigned int Processor_GetCount () const =0
 
virtual ProcessorProcessor_Get (unsigned int aIndex)=0
 
virtual Status Start (unsigned int aFlags)=0
 Start. More...
 
virtual Status Stop ()=0
 Stop. More...
 

Static Public Member Functions

static OPEN_NET_PUBLIC SystemCreate ()
 This static methode create an instance of the System class. More...
 
static OPEN_NET_PUBLIC Status Display (const Config &aConfig, FILE *aOut)
 This static methode display the system configuration. More...
 
static OPEN_NET_PUBLIC Status Display (const Info &aInfo, FILE *aOut)
 This static methode display the system information. More...
 

Static Public Attributes

static OPEN_NET_PUBLIC const unsigned int START_FLAG_LOOPBACK
 Use this flag when adapters are physically connected to each other. If force the system to send packet to unblock reception operations. More...
 

Detailed Description

This class define the system level interface.

Member Function Documentation

virtual Status OpenNet::System::Adapter_Connect ( Adapter aAdapter)
pure virtual

Connect an Adapter to the System.

Parameters
aAdapterThe Adapter
Return values
STATUS_OK
virtual Adapter* OpenNet::System::Adapter_Get ( unsigned int  aIndex)
pure virtual
Parameters
aIndexThe index of the adapter to get
Return values
NULLNot found
OtherThe address of the Adapter instance
virtual Adapter* OpenNet::System::Adapter_Get ( OpenNetK::Adapter_Type  aType,
unsigned int  aIndex 
)
pure virtual
Parameters
aTypeSee OpenNetK::Adapter_Type
aIndexThe index of the adapter to get
Return values
NULLNot found
OtherThe address of the Adapter instance
virtual Adapter* OpenNet::System::Adapter_Get ( const unsigned char *  aAddress,
const unsigned char *  aMask,
const unsigned char *  aMaskDiff 
)
pure virtual
Parameters
aAddressThe Ethernet address to look for
aMaskThe bit set to 1 indicate the bit that must match the address.
aMaskDiffThe bit set to 1 indicate the part of address that must be different.
Return values
NULLNot found
OtherThe address of the Adapter instance
virtual unsigned int OpenNet::System::Adapter_GetCount ( ) const
pure virtual
Returns
This methode return the number of adapters.
static OPEN_NET_PUBLIC System* OpenNet::System::Create ( )
static

This static methode create an instance of the System class.

Returns
This static methode return the new instance address.
See also
Delete
virtual void OpenNet::System::Delete ( )
virtual

This methode delete the instance.

See also
Create
static OPEN_NET_PUBLIC Status OpenNet::System::Display ( const Config aConfig,
FILE *  aOut 
)
static

This static methode display the system configuration.

Parameters
aConfigThe configuration
aOutThe output stream
Return values
STATUS_OK
STATUS_INVALID_REFERENCE
STATUS_NOT_ALLOWER_NULL_ARGUMENT
static OPEN_NET_PUBLIC Status OpenNet::System::Display ( const Info aInfo,
FILE *  aOut 
)
static

This static methode display the system information.

Parameters
aInfoThe information
aOutThe output stream
Return values
STATUS_OK
STATUS_INVALID_REFERENCE
STATUS_NOT_ALLOWER_NULL_ARGUMENT
virtual Status OpenNet::System::Display ( FILE *  aOut)
pure virtual

Display.

Parameters
aOutThe output stream
Return values
STATUS_OK
virtual Status OpenNet::System::GetConfig ( Config aOut) const
pure virtual

Retrieve the configuration of the system.

Parameters
aOutThe output space
Return values
STATUS_OK
STATUS_NOT_ALLOWER_NULL_ARGUMENT
See also
SetConfig
virtual Status OpenNet::System::GetInfo ( Info aOut) const
pure virtual

Retrieve the information about the system.

Parameters
aOutThe output space
Return values
STATUS_OK
STATUS_NOT_ALLOWER_NULL_ARGUMENT
virtual OpenNet::Kernel* OpenNet::System::Kernel_Get ( unsigned int  aIndex)
pure virtual

Retrieve a Kernel.

Parameters
aIndexThe kernel index
Return values
NULLInvalid index
OtherThe Kernel instance
virtual unsigned int OpenNet::System::Kernel_GetCount ( ) const
pure virtual

Retrieve the number of Kernel.

Returns
The number of Kernel
virtual Processor* OpenNet::System::Processor_Get ( unsigned int  aIndex)
pure virtual
Parameters
aIndexThe index of the Processor to get
Returns
This method returns the processor.
virtual unsigned int OpenNet::System::Processor_GetCount ( ) const
pure virtual
Returns
This methode return the number of processors.
virtual Status OpenNet::System::SetConfig ( const Config aConfig)
pure virtual

Modify the configuration of the system.

Parameters
aConfigThe configuration
Return values
STATUS_OK
STATUS_INVALID_REFERENCE
See also
GetConfig
virtual Status OpenNet::System::Start ( unsigned int  aFlags)
pure virtual

Start.

Parameters
aFlagsSTART_FLAG_LOOPBACK
Return values
STATUS_OK
See also
Stop, START_FLAG_LOOPBACK
virtual Status OpenNet::System::Stop ( )
pure virtual

Stop.

Return values
STATUS_OK
See also
Start

Member Data Documentation

OPEN_NET_PUBLIC const unsigned int OpenNet::System::START_FLAG_LOOPBACK
static

Use this flag when adapters are physically connected to each other. If force the system to send packet to unblock reception operations.

See also
Start

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