- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
19
nread.tex
19
nread.tex
@ -11,11 +11,11 @@ through a command channel
|
||||
A prior
|
||||
version of SICS had a select system call for each of these cases. It was
|
||||
found, that the code spent most of its time in the select system call
|
||||
thus intrdoducing a major performance problem.
|
||||
thus introducing a major performance problem.
|
||||
|
||||
The select system call can handle more then one file descriptor in one call.
|
||||
This is exactly what this module handles. It does a global select on
|
||||
all open sockets and forwards any pending data to approriate handlers.
|
||||
all open sockets and forwards any pending data to appropriate handlers.
|
||||
This scheme brought a drastic
|
||||
performance improvement.
|
||||
|
||||
@ -25,13 +25,13 @@ differently:
|
||||
A connection request will be validated, a new connection object will be
|
||||
created and a new task for this connection object will be started.
|
||||
|
||||
A command will be placed in the apropriate command stack for the task
|
||||
A command will be placed in the appropriate command stack for the task
|
||||
belonging to this connection to work on in a later stage. The netreader will
|
||||
also take care that all commands are complete, this is the terminator
|
||||
\verb+\n+ or \verb+\r+ has been sent.
|
||||
|
||||
Both forms of interrupt will be interpreted and a suitable signal
|
||||
will be sent to all runing tasks if the interrupt request is valid.
|
||||
will be sent to all running tasks if the interrupt request is valid.
|
||||
|
||||
In order to perform his tasks the network reader needs to maintain a list of
|
||||
all open sockets and their types. Additionally it needs to know about the
|
||||
@ -61,6 +61,11 @@ come in on a user socket. This function is problematic with dynamically
|
||||
creates and deleted objects such as environment device objects. Its use is
|
||||
therefore no longer recommended.
|
||||
|
||||
In January 2009 a new asynchronous I/O structure was devised. This makes most of
|
||||
NetReader obsolete. However, it was decided to keep the old structure for the
|
||||
time being. A new function, NetReadInstallANETPort was added to install server
|
||||
ports for the new system.
|
||||
|
||||
Thus the interface looks like this:
|
||||
|
||||
\begin{flushleft} \small
|
||||
@ -88,7 +93,9 @@ $\langle$nrint {\footnotesize ?}$\rangle\equiv$
|
||||
\mbox{}\verb@ int NetReadWait4Data(pNetRead self, int iSocket);@\\
|
||||
\mbox{}\verb@ int NetReadReadable(pNetRead self, int iSocket);@\\
|
||||
\mbox{}\verb@ int NetReadResetUser(pNetRead self, int iSocket);@\\
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\mbox{}\verb@/*--------------------------------------------------------------------------*/@\\
|
||||
\mbox{}\verb@ int NetReadInstallANETPort(pNetRead self, eNRType eType, int iPort); @\\
|
||||
\mbox{}\verb@@$\Diamond$
|
||||
\end{list}
|
||||
\vspace{-1ex}
|
||||
\footnotesize\addtolength{\baselineskip}{-1ex}
|
||||
@ -153,7 +160,7 @@ if not.
|
||||
\mbox{}\verb@#define SICSNETREADER@\\
|
||||
\mbox{}\verb@@$\langle$nrint {\footnotesize ?}$\rangle$\verb@@\\
|
||||
\mbox{}\verb@#endif@\\
|
||||
\mbox{}\verb@@$\diamond$
|
||||
\mbox{}\verb@@$\Diamond$
|
||||
\end{list}
|
||||
\vspace{-2ex}
|
||||
\end{minipage}\\[4ex]
|
||||
|
Reference in New Issue
Block a user