56 typedef void(*Event_Callback)(
void *);
148 volatile uint32_t * mMarker_MA;
153 unsigned mStopRequested : 1;
155 unsigned mReserved : 31;
160 uint32_t mMarkerValue;
161 unsigned int mPacketInfoOffset_byte;
162 volatile long mRx_Counter ;
163 volatile long mTx_Counter ;
167 uint8_t mReserved1[28];
173 void Buffer_SendPackets(
BufferInfo * aBufferInfo);
177 void Interrupt_Process2(
bool * aNeedMoreProcessing);
178 void Interrupt_Process3();
180 int IoCtl(
void * aFileObject,
unsigned int aCode,
const void * aIn,
unsigned int aInSize_byte,
void * aOut,
unsigned int aOutSize_byte);
200 void Buffer_InitHeader_Zone0 (
OpenNet_BufferHeader * aHeader_XA,
const Buffer & aBuffer, Packet * aPackets);
201 bool Buffer_Queue_Zone0 (
const Buffer & aBuffer);
202 void Buffer_Release_Zone0 ();
203 void Buffer_Receive_Zone0 (BufferInfo * aBufferInfo);
204 void Buffer_Send_Zone0 (BufferInfo * aBufferInfo);
205 void Buffer_WriteMarker_Zone0(BufferInfo * aBufferInfo);
207 void Event_Report_Zone0(Event_Type aType, uint32_t aData);
209 void Interrupt_Process2_Px_Zone0();
210 void Interrupt_Process2_Rx_Zone0();
211 void Interrupt_Process2_Tx_Zone0();
216 void Buffer_EventPending_Zone0(BufferInfo * aBufferInfo);
217 void Buffer_PxRunning_Zone0 (BufferInfo * aBufferInfo);
218 void Buffer_RxRunning_Zone0 (BufferInfo * aBufferInfo);
219 void Buffer_TxRunning_Zone0 (BufferInfo * aBufferInfo);
222 void Buffer_Enter_RxProgramming_Zone0(BufferInfo * aBufferInfo,
unsigned int aIndex,
const char * aFrom);
223 void Buffer_Enter_Stopped_Zone0 (BufferInfo * aBufferInfo,
unsigned int aIndex,
const char * aFrom);
227 int IoCtl_Config_Get(Adapter_Config * aOut);
228 int IoCtl_Info_Get (Adapter_Info * aOut)
const;
230 int IoCtl_Config_Set (
const Adapter_Config * aIn, Adapter_Config * aOut);
231 int IoCtl_PacketGenerator_Config_Set(
const PacketGenerator_Config * aIn, PacketGenerator_Config * aOut);
233 int IoCtl_Connect(
const void * aIn,
void * aOut,
void * aFileObject);
235 int IoCtl_Event_Wait (
const void * aIn, Event * aOut,
unsigned int aOutSize_byte);
236 int IoCtl_Statistics_Get(
const void * aIn, uint32_t * aOut,
unsigned int aOutSize_byte)
const;
238 int IoCtl_Event_Wait_Cancel ();
239 int IoCtl_Packet_Drop ();
240 int IoCtl_PacketGenerator_Stop();
241 int IoCtl_Statistics_Reset ();
243 int IoCtl_Tx_Disable ();
244 int IoCtl_Tx_Enable ();
246 int IoCtl_License_Set(
const void * aIn,
void * aOut);
248 int IoCtl_Packet_Send_Ex(
const void * aIn,
unsigned int aInSize_byte);
250 int IoCtl_PacketGenerator_Config_Get(PacketGenerator_Config * aOut);
251 int IoCtl_State_Get (Adapter_State * aOut);
253 int IoCtl_PacketGenerator_Start(
void * aFileObject);
255 int IoCtl_Start(
const Buffer * aIn,
unsigned int aInSize_byte);
257 Adapter ** mAdapters ;
258 unsigned int mAdapterNo;
259 Hardware * mHardware ;
260 unsigned int mSystemId ;
262 void * mConnect_FileObject;
264 PacketGenerator_Config mPacketGenerator_Config ;
265 unsigned int mPacketGenerator_Counter;
266 void * mPacketGenerator_FileObject;
267 long mPacketGenerator_Pending;
269 mutable uint32_t mStatistics[32];
273 mutable uint64_t mStatistics_Start_us;
275 uint32_t mEvaluation_ms;
283 BufferCountAndIndex mBuffer;
286 Event_Callback mEvent_Callback;
287 void * mEvent_Context ;
288 unsigned int mEvent_In ;
289 unsigned int mEvent_Out ;
290 bool mEvent_Pending ;
291 Event mEvents[EVENT_QTY];
This structure contains pointer to OS dependant functions.
Definition: OSDep.h:178
OpenNet_BufferHeader, OpenNet_PacketInfo (RT)
This class cache packet information.
Definition: Packet.h:30
void SetOSDep(OpenNetK_OSDep *aOSDep)
Set the OSDep structure.
This structure contains information about buffer size an IoCtl accepts.
Definition: IoCtl.h:27
OpenNetK_IoCtl_Info (DDK)
This structure is used to pass the information about a buffer.
Definition: Adapter_Types.h:31
SpinLock interface.
Definition: SpinLock.h:36
This class defines the hardware interface.
Definition: Hardware.h:37
#define OPEN_NET_BUFFER_QTY
The maximum number of buffer for an Adapter.
Definition: Constants.h:19
OpenNetK::Adapter_Config, OpenNetK::Adapter_Info, OpenNetK::Adapter_State, OpenNetK::Buffer, OpenNetK::EthernetAddress, OpenNetK::IPv4Address, OpenNetK::VersionInfo (SDK)
void SetHardware(Hardware *aHardware)
Connect the Hardware instance.
static bool IoCtl_GetInfo(unsigned int aCode, OpenNetK_IoCtl_Info *aInfo)
Retrieve information about an IoCtl code.
void Event_RegisterCallback(Event_Callback aCallback, void *aContext)
Register an event callback.
OpenNetK::PacketGenerator_Config.
void FileCleanup(void *aFileObject)
Cleanup on file close.
This class maintains information about an adapter on the OpenNet internal network.
Definition: Adapter.h:51
DirectGMA Buffer information. This structur is not documented and may change or disapear in futur ver...
Definition: Adapter.h:142
unsigned int Event_GetPendingCount() const
Does some events pending?