thruput_add_on
A dev_server add-on to display the approximate instantaneous thruput on a serial port.
thruput_driver
A kernel serial port driver add-on which interfaces with thruput_add_on through the dev_server.
To install the add-ons, open a terminal window running the Be shell. Navigate to the thruput_example/ directory located in the dev_server/ directory. Type "make install". This will build both the dev_server add-on and the kernel driver add-on and place copies of them and their xMAP files in the ~/config/add-ons/dev_server/ and ~/config/add-ons/kernel/drivers/ directories, respectively..
thruput_add_on and thruput_driver are add-ons for the dev_server. dev_server is a server and a set of tools designed specifically for kernel add-ons that wish (for convenience, etc.) to be able to access things not available in kernel-space (e.g., the app_server, net_server, etc.). For a more complete description of what it is and how to use it, please refer to the documentation that came with the dev_server package. If you are reading this file and have not yet obtained the dev_server package, please e-mail me (Matt Bogosian <mbogosian@usa.net>) immediately.
To use, make sure the dev_server is running and the thruput package has been installed. Then treat the /dev/ports/thruput device as you would any other port device. When /dev/ports/thruput is opened, (and the dev_server is running and thruput_add_on has been properly installed), a window should pop up prompting the user for the real port device (selectable in the window). Once the port has been selected, the Thruput window goes to work displaying the number of Bytes per second that pass through the device. The window disappears when the device is closed.
The thruput package has the ability to store and retrieve one user setting. To save the current settings, hold down the shift key or the caps-lock key while the thruput port is closed. This will save the port device, scale and window position. Each successive time the thruput port is opened, these settings will be used. To start anew, hold down the shift key or the caps-lock key while the thruput port is opened.
This section attempts to outline dev_server add-on use and construction. You may also investigate the serial port thruput monitor coding example: thruput_add_on and thruput_driver (see the Files section below).
The dev_server behaves similarly to many network servers. In short, it listens on a well-known port for a connection by a device. The device indicates to the dev_server the add-on with which it wants to communicate, and the dev_server attempts to load that add-on and hand off the connection to it. After that, all communication is performed directly between the device and the add-on. To perform this duty, the dev_server spawns a separate thread to listen on the port to which all new connection requests must be written.
When finished, this section will attempt to describe how to construct a device driver which makes a connection with the dev_server and requests the spawning of a specific add-on. In the meantime, you may be able to learn a great deal from the serial port thruput monitor coding example: thruput_add_on and thruput_driver (see the Files section below).
When finished, this section will attempt to describe how to construct a dev_server which completes a connection between the dev_server and the device driver. In the meantime, you may be able to learn a great deal from the serial port thruput monitor coding example: thruput_add_on and thruput_driver (see the Files section below).
The following files are included with this distribution:
doc/README.html
This file.
The makefile for thruput_add_on and thruput_driver.
ThruputAddOn.h, ThruputAddOn.cpp
A header and source file containing the documentation for and definition of the ThruputAddOn class used in thruput_add_on.
ThruputView.h, ThruputView.cpp
A header and source file containing the documentation for and definition of the ThruputView class used in thruput_add_on.
ThruputWindow.h, ThruputWindow.cpp
A header and source file containing the documentation for and definition of the ThruputView class used in thruput_add_on.
A source file containing the hook functions for the kernel-loadable device driver in thruput_driver.
This dev_server add-on and driver pair were tested using a host of serial ports and drivers, but my favorite was to set my PPP connection to /dev/ports/thruput and then select my real modem port once the Thruput window came up. Voila: PPP with a thruput monitor.
There are no known bugs at this time. In the event you should find a bug, something you don't like or something you would like but is missing, please feel free to e-mail me (Matt Bogosian <mbogosian@usa.net>). Please let me know which version you have (listed at the top of this document).
v1.0.0
Initial release (this version).
The dev_server package (including any and all documentation) is freeware and is provided as-is with no warranty of correctness or usefulness. If you have any comments, requests, questions or complaints, please email me (Matt Bogosian <mbogosian@usa.net>). If I am notified of a bug, I will do my best to correct it, but I guarantee nothing.
The dev_server package (including this sample code) is not freely distributable. Distribution may occur with written permission from the author and with the provision that all files (including this documentation) remain intact and with the distributed package.
Neither any warranty nor restrictions which apply to the dev_server package are transferable to third-party add-ons and code written which make use of the dev_server package. In other words, I'm not responsible for poorly-written dev_server add-ons (unless, of course, they're mine).
© 1998, Matt Bogosian <mbogosian@usa.net>. All rights reserved.