beautypg.com

3 buffer handling, Buffer handling, Figure 5 – Siemens 7 User Manual

Page 29: Driver internal buffer handling, Multiplexer driver developer’s guide, Sermux, Wrapper

background image

Multiplexer Driver Developer’s Guide

7.3 Buffer Handling

s

Mux_Drv_DevGuide_v07

Page 29 of 36

2006-9-27

Confidential / Released

7.3

Buffer Handling

Figure 5: Driver internal buffer handling

SerMux

void WrIndicateReadBuffer(void *Buffer,ULONG Length);

Wrapper

SerPort 0

Write Buffer

Pool

Read Buffer

Pool

WrGetWriteBuffer(void *Buffer,ULONG &Length);
WrSubmitWriteBuffer(void *Buffer,ULONG
Length);
WrWriteComplete();
WrReturnWriteBuffer();

IndicateRead {
ProcessData(); // check frame, crc
SerPortIndicateFrame()
// indicate frame to a SerPort instance
}

Frame Assembly and check

state machine Demux

Send function:

while(GetWriteBuffer) {
SerPort=GetNextSerPort();
SerPort->GetFrame();
SubmitWriteBuffer();
}

Channel number

Priority with MaxSequence

Timeouts (Request Timeouts and

Scanning Timeouts)
Statistics
V24 Status from itself and the
Modem
Handshake Status
Current Read and Write Status
Circular Buffer Params
ScanSendRequest

RCV

Queue

Requests

Send

Queue

Requests

Circular

buffer

RCV

Circular

buffer

Send

Special control functions:

EstablishDLC
ReleaseDLC
CloseDown
SetModemStatus
SendVersionCommand

Circular

buffer

Send

CommandBuffer

ConfirmCommand

Buffer

if receive a Control Command

GetFrameBufferPort0()

SerPort0IndicateFrame()

SerPortN

Mulitplexer Control Port 0

Timer functions:

WrTimer()

OnTimerSerPort0()
OnTimerSerPort()

Control Timeouts for Send and Receive Queue Requests for
repeating Control Commands and Timeouts for scanning the
Escape Sequence