Siemens 7 Benutzerhandbuch

Seite von 36
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