- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
15
nread.w
15
nread.w
@@ -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:
|
||||
|
||||
@d nrint @{
|
||||
@@ -83,6 +88,8 @@ Thus the interface looks like this:
|
||||
int NetReadWait4Data(pNetRead self, int iSocket);
|
||||
int NetReadReadable(pNetRead self, int iSocket);
|
||||
int NetReadResetUser(pNetRead self, int iSocket);
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int NetReadInstallANETPort(pNetRead self, eNRType eType, int iPort);
|
||||
@}
|
||||
|
||||
This starts off with the definition of a data type for the net reader and an
|
||||
|
||||
Reference in New Issue
Block a user