Difference between revisions of "Unit Loopback"
From Ultibo.org
Line 54: | Line 54: | ||
---- | ---- | ||
− | '' | + | |
+ | '''Loopback adapter''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <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> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div> | ||
+ | |- | ||
+ | | <code>FHardwareAddress:THardwareAddress;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>function AddTransport(APacketType,AFrameType:Word; const APacketName:String; APacketHandler:TAdapterPacketHandler):THandle; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function RemoveTransport(AHandle:THandle; APacketType:Word):Boolean; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function GetMTU(AHandle:THandle):Word; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function SendPacket(AHandle:THandle; ADest:Pointer; APacket:PPacketFragment; ASize:Integer):Boolean; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function GetHardwareAddress(AHandle:THandle):THardwareAddress; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function StartAdapter:Boolean; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function StopAdapter:Boolean; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function ProcessAdapter:Boolean; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''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%;"| | ||
+ | |- | ||
+ | | <code>destructor Destroy; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>Buffer:TAdapterBuffer; </code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === |
Revision as of 06:23, 15 March 2017
Return to Unit Reference
Contents
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 adapter
TLoopbackAdapter = class(TNetworkAdapter)
constructor Create(AManager:TAdapterManager; ADevice:PNetworkDevice; const AName:String);
|
|
private
| |
FHardwareAddress:THardwareAddress;
|
|
public
| |
function AddTransport(APacketType,AFrameType:Word; const APacketName:String; APacketHandler:TAdapterPacketHandler):THandle; override;
|
|
function RemoveTransport(AHandle:THandle; APacketType:Word):Boolean; override;
|
|
function GetMTU(AHandle:THandle):Word; override;
|
|
function SendPacket(AHandle:THandle; ADest:Pointer; APacket:PPacketFragment; ASize:Integer):Boolean; override;
|
|
function GetHardwareAddress(AHandle:THandle):THardwareAddress; override;
|
|
function StartAdapter:Boolean; override;
|
|
function StopAdapter:Boolean; override;
|
|
function ProcessAdapter:Boolean; override;
|
Loopback adapter transport
TLoopbackAdapterTransport = class(TAdapterTransport)
constructor Create;
|
|
destructor Destroy; override;
|
|
public
| |
Buffer:TAdapterBuffer;
|
Public variables
None defined
Function declarations
Initialization functions
procedure LoopbackInit;
Description: To be documented
Note | None documented |
---|
Return to Unit Reference