Difference between revisions of "Unit Loopback"

From Ultibo.org
Jump to: navigation, search
Line 55: Line 55:
  
  
'''Loopback adapter'''
+
'''Loopback specific classes'''
  
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
<code>TLoopbackAdapter = class(TNetworkAdapter)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(AManager:TAdapterManager; ADevice:PNetworkDevice; const AName:String);</code>
+
| [[TLoopbackAdapter|<code>TLoopbackAdapter = class(TNetworkAdapter)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FHardwareAddress:THardwareAddress;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function AddTransport(APacketType,AFrameType:Word; const APacketName:String; APacketHandler:TAdapterPacketHandler):THandle; override;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveTransport(AHandle:THandle; APacketType:Word):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetMTU(AHandle:THandle):Word; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SendPacket(AHandle:THandle; ADest:Pointer; APacket:PPacketFragment; ASize:Integer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetHardwareAddress(AHandle:THandle):THardwareAddress; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function StartAdapter:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function StopAdapter:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ProcessAdapter:Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Loopback adapter transport'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TLoopbackAdapterTransport = class(TAdapterTransport)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
 
|-
 
|-
| <code>Buffer:TAdapterBuffer; </code>
+
| [[TLoopbackAdapterTransport|<code>TLoopbackAdapterTransport = class(TAdapterTransport)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div> 
 
 
<br />
 
<br />
  

Revision as of 05:22, 22 May 2018

Return to Unit Reference


Description


Ultibo Loopback Network adapter unit

To be documented

Constants



Loopback specific constants _LOOPBACK_*
MAX_LOOPBACK_BUFFERS = 256; Used for Recv Queues (Increased to Handle Higher Data Rate)
MIN_LOOPBACK_BUFFERS = 4; Used for Send Queues


Type definitions



Loopback buffer

PLoopbackBuffer = ^TLoopbackBuffer;

TLoopbackBuffer = packed record

Size:Word; Size of Data
Data:array[0..MAX_PHYSICAL_PACKET - 3] of Byte; MAX_PHYSICAL_PACKET - Word


Class definitions



Loopback specific classes

TLoopbackAdapter = class(TNetworkAdapter)
TLoopbackAdapterTransport = class(TAdapterTransport)


Public variables


None defined

Function declarations



Initialization functions

procedure LoopbackInit;
Description: To be documented
Note None documented


Return to Unit Reference