Home

GEONius.com
25-Oct-2016
E-mail

The Windshield in a World of Bugs*

General Purpose Library
 
Networking Library
 
C++ Library
 
Applications
Windshield Chasing Bug!
Software Conventions
 
Porting and
Supported Platforms
 
Acknowledgements
 
On the Shelf

*Apologies to Mark Knopfler!

 

Design/Implementation/Documentation Conventions

My library software follows certain conventions that you might find useful to know when using or examining the software:

More to follow when I think of it ...

 

Porting and Supported Platforms

In writing my software, I try to make it as portable as possible. I make use of ANSI C libraries and header files as much as I can. Function declarations are made in both ANSI C and non-ANSI C form, so the code will compile whether your compiler is ANSI C-compliant or not. I've attempted to isolate compiler and OS dependencies in a header file, pragmatics.h, except for some networking and time definitions that are found in skt_util.h and tv_util.h, respectively.

The major operating systems I've used are:

In previous years, earlier incarnations of my software were built and run on the following OSes: SunOS (on 68K and SPARC platforms), HP/UX, IBM's AIX (we had a single PC RT in the late 1980s), Lynx OS 2.4 (on a PowerPC), PalmOS (68k), and VxWorks (circa 1990 and again in 1994-1996).

I currently have access to:

I've tried to write portable software, but I haven't been able to perform extensive testing of my software in 64-bit environments, especially with regards to the differences resulting from the I32LP64 and IL32P64 data models of Unix and Windows, respectively.

On Windows, I build static libraries and link them to console applications. The libraries are small. so there's no advantage to my figuring out DLLs yet.

The software distributions generally include the following Makefiles. The most up-to-date Makefile is always Makefile.linux, so start with it as a model for new Makefiles:

[Palm Pilot]

With respect to PalmOS, I built my libraries with PRC-Tools and I created a number of StdIOPalm applications that use the libraries. Click on the Palm Pilot thumbnail to see the screen output from a port scanner, scanet, running in the POSE emulator. I have not worked with PalmOS for quite some years now; the Palm world moved on to newer operating systems and eventually disappeared.

Update early 2016: I've got three versions of the PalmOS SDK and, on a whim, I installed the PRC-Tools RPMs on a machine running an aging Fedora Core 15. My code used to build under FC1 and FC2, but I got compilation errors and the cause wasn't obvious despite some effort at online research. However, I later installed PRC-Tools under Cygwin32 and, with some slight tweaking, I've been able to compile and build my code, as well as test some of it in two Windows versions of the POSE emulator. I have to use ROM images I found online because my Palm m105 now won't respond to POSE requests to transfer the m105's ROM image. The base CORBA library seems to work, but trying to build the CORBA-based EPOCH applications gives me errors indicating the relative branch limit is being exceeded in one or more code sections. (Looking at this page, I see that the increasing size of the EPOCH IDL caused the limit to be exceeded back in 2006.)

 

Acknowledgements

Thanks to the following people for bug and porting reports:

I don't have the changes required for the various ports, but at least I know it's possible to port the code to the various platforms with relatively little trouble. My apologies to anyone I've left out, including those who reported bugs (e.g., in the quadword utilities and in the IPC utilities) before I started keeping a list here.

 

General Purpose Library (csoft.tgz, 918K  -  csoft.zip, 1266K)

Last Update: Tue Dec 20 14:37:58 2016

Licensing: The CSOFT libraries and applications are covered by the MIT License. Basically, you are free to use the software however you see fit, in commercial or non-commerical applications. I only ask that, if your time and inclination permit, you report any bugs or portability problems you encounter. Suggestions for improvements and enhancements are welcome, but I do not guarantee I will act upon them.

Command Line Processing

opt_util - full-word option scanning package for UNIX-style command lines or strings.

Data Structures

gsc_util - generic depth-first and breadth-first graph search package.
hash_util - hash table creation/search package.
list_util - generic list handling package.
nnl_util - name/number lookup package.
tpl_util - N-tuple creation and element retrieval.

Error Reporting

aperror - perror(3)-like error reporting function.

Files

drs_util - directory scanning package.
fnm_util - file name parsing package.

Interprocess Communication

The IPC packages provide named message queues, semaphores, and shared memory segments under UNIX and VxWorks. Earlier versions of the semaphore and shared memory packages were ported to VMS by Fred Shaklan and myself; message queues were not needed, but they could have been easily emulated using mailboxes. If I ever work on VMS again, I'll port the new packages; the package APIs are operating system-independent.

msq_util - high-level interface to named message queues (UNIX and VxWorks).
nob_util - named objects database package.
sem_util - high-level interface to named semaphores (UNIX and VxWorks).
shm_util - high-level interface to named shared memory (UNIX and VxWorks).

Memory Management

meo_util - memory operations.

String Manipulation

get_util - miscellaneous string scanning functions.
rex_util - full-featured regular expression matching and substitution package.
str_util - miscellaneous string handling functions.
utf_util - Unicode Transformation Format (UTF) functions.
wcs_util - wide-character string handling functions.

Time

bmw_util - benchmarking package.
ts_util - POSIX timespec manipulation package.
tv_util - UNIX timeval manipulation package.

Miscellaneous

bit_util - bit manipulation functions.
id3_util - ID3 tag access functions.
xqt_util - shell execution package (high-level interface to UNIX shell or VMS CLI).

Networking

The following packages provide high-level, but powerful, interfaces to TCP/IP and UDP/IP networking:

tcp_util - high-level interface for TCP/IP network socket I/O.
udp_util - high-level interface for UDP/IP network socket I/O.

And the following packages implement higher-level protocols layered on top of the TCP_UTIL package:

lfn_util - high-level interface for LF-terminated network I/O.
nft_util - FTP server framework (UNIX, VMS, and VxWorks).
xnet_util - high-level interface to xdr(3)-based network I/O.

The IOX package simplifies the writing of I/O-event-driven applications (e.g., network servers):

iox_util - I/O and timer event dispatcher.
port_util - simple listening ports for IOX dispatcher-based network servers.

The remaining packages are an assortment of networking support functions:

net_util - miscellaneous network functions.
skt_util - socket support functions.

Version-Independent Messages

These three packages implement version-independent messages as described in Appendix B of Robert Martin's Designing Object-Oriented C++ Applications Using the Booch Method. (What he calls attributed data trees, I call name/value lists.) VIM network streams are layered on top of the TCP_UTIL package.

nvp_util - name/value pairs.
nvl_util - lists of name/value pairs.
vim_util - version-independent message streams.

CORBA-Lite

The CORBA-Lite packages provide a lightweight implementation of CORBA TCP/IP messaging.

coli_util - CORBA messaging functions.
comx_util - CORBA marshaling functions.
gimx_util - GIOP marshaling utilities.
iiop_util - Internet Inter-ORB Protocol (IIOP) streams.
bomx_util (idl.h) - GNOME Bonobo 2.0 marshaling functions.
damx_util (idl.h) - Data Acquisition from Industrial Systems (DAIS) marshaling functions.
ddmx_util (idl.h) - Data Distribution Service for Real-Time Systems (DDS) marshaling functions.
lemx_util (idl.h) - Laboratory Equipment Control Interface Specification (LECIS) marshaling functions.
 

C++ EPOCH Version 3/4 Remote Access Library (cppsoft.zip, 842K)

[Studying C++ Book]

Note: Preferring C to C++, I haven't used or updated this library in nearly 10 years. It worked when I did use it!

The ZIP file contains 3 library directories:

The latter two libraries can be dropped if you build a subset of the liberal library. The first six classes listed below have counterparts in the C-language libgpl library and the remaining, EPOCH-specific classes have counterparts in the libepl library.

Dispatcher - I/O events dispatcher.
HashTable - hash table creation and search.
OptionsScan - command-line options scanning.
Endpoint - network endpoint.
TcpEndpoint - TCP/IP endpoint.
BufferedTCP - buffered TCP/IP stream.
EpochStream - EPOCH network stream.
EpochMessage - EPOCH network message.
CortexStream - CORTEX network stream.
NVar - named variables.
NVarSet - sets of named variables.
NVarFile - files of named variable sets.
GSegment - EPOCH global variable segments.
GVar - EPOCH global variables.
 

C EPOCH Version 3/4 Library (esoft.tgz, 1239K  -  esoft.zip, 1693K)

Note: As with the liberal library above, I haven't used this library in nearly 10 years. It worked well when I did use it! The archive files above include the project-specific applications below and the latest csoft library.

64-bit Note: All our project code was built in 32-bit mode, so I never tested this code in 64-bit builds. Some of the code dates back to late 1996 or early 1997 and I generally used long to guarantee 32-bit integers. This could cause problems with epc_util communications between heterogeneous platforms, because the message header has long fields. The CORTEX code also uses longs in the CORTEX message header. I'm not sure how the CORBA code is affected: it uses long for 32-bit integers and long long for 64-bit integers; I don't believe this affects the over-the-network data stream.

eco_util - EPOCH V4 CORBA-Lite utilities.
edb_util - EPOCH events database utilities.
epc_util - EPOCH network communications.
gv_util - EPOCH global variables.
ins_util - IN-SNEC CORTEX utilities.
nvf_util - named variable set files.
nvr_util - named variable utilities.
nvs_util - named variable sets.
 

Applications

anise
A pocket FTP/WWW server. (When you select the file in the Nintendo DS directory listing, the icon is animated and looks pretty cool, with the red lines pulsating in all directions! Well, at least the 4 diagonal lines radiating out from the center. Yes, anise does work on the NDS. There was or still is a problem in the NDS sockets library when you close a network connection. Your peer on the connection may receive the close-connection message before he/she has received all the data in the pipeline. Consequently, retrieving a file via FTP from the NDS is likely to fail. The WWW server avoids this problem by keeping each connection alive for 30 seconds after sending the last data.)
finc
Networking extensions to John Sadler's Ficl (Forth Inspired Command Language) interpreter.
gentle
A network server that provides each client with its own Tcl interpreter, extended with networking and hardware debugging commands. (Derived from earlier programs, nicl and picl!)
npath
Collects function-by-function metrics for C source code. The metrics include lines-of-code, Halstead's Software Science volume, McCabe's cyclomatic complexity, and NPATH.
tsion
Networking extensions to the TinyScheme interpreter.

Generic Tools

chafn - change file names.
colior - dump CORBA Interoperable Object Reference (IOR).
dump - formatted dump program.
duop - dump old-style Opera files.
ffc - format file in columns.
gflow - graph flow.
talknet - network talk utility.
tag311 - add/change ID3v1.1 tags on MP3 files.

Project-Specific Tools (EPOCH)

The following programs were used in both Versions 3 and 4 of our system. Cornet, dumpaev, milk, and the descendants of epcot and entice were used extensively. I wrote dssi, eniac, and mcci just for the heck of it and they were probably run just once to see if they worked!

cornet - CORTEX network tool.
dssi - Dynamic Spacecraft Simulator (DSS) Interface client or server.
dumpaev - EPOCH archive dumper.
eniac - Enertec interactive client.
epcot - EPOCH-CORTEX telemetry server.
This program was later ported to C++ by me and given the bland name of CortexTlm by the powers-that-be!
mcci - acts as a Mission Control Center (MCC) client or Spacecraft Control Center (SCC) server.
milk - EPOCH device handler reader/writer.
This program was usually used for feeding canned telemetry data into the system for testing purposes. (Regarding the name: milk originally talked to a program, cereal, which emulated our serial-port device handler. We later switched to CORTEX and CORTEX-emulating Enertec interfaces. Consequently, cereal was replaced by a program, entice (Enertec In-Circuit Emulator), which, in turn, was ported to C++ by me and given the bland name of SimHandler by the powers-that-be!)

The following programs were specific to Version 3 of our system. They're all command-line tools and were a lot quicker and easier to use during testing than having to bring up the ponderous, X Windows GUIs to effect or monitor some action. I rarely used the last two, stamp and v3net.

const - EPOCH V3 node management client.
direct - EPOCH V3 directive submitter.
eire - EPOCH V3 events reader.
glop - EPOCH V3 global variable print.
stamp - EPOCH V3 stored command client.
v3net - generic EPOCH V3 client/server network tool.

The following programs were clients for our CORBA-based Version 4 system. As with the Version 3 programs above, these are all command-line tools and were a lot quicker and easier to use during testing than having to bring up the ponderous, Microsoft Windows GUIs to effect or monitor some action. The database clients, cdc and db4u, were very useful because they exhaustively retrieved every bit of information from the database servers, thus exercising them more than our actual system did. The point service client, psic, could request, retrieve, and display running updates of some or all of the available telemetry and non-telemetry points. The test team used to run it in parallel with the test system so that they could determine if a point-service problem was on the GUI client side of the system or the Unix server side.

cdc - EPOCH CORBA command database client.
dart - EPOCH CORBA data retriever client.
db4u - EPOCH CORBA telemetry database client.
dirt - EPOCH CORBA directive submitter.
f4rd - EPOCH CORBA telemetry frame reader.
noman - EPOCH CORBA node management client.
psic - EPOCH CORBA telemetry point service client.
(Pronounced "p-sick". I should have called it "Point Service/CORBA" or psico, pronounced "psycho"—an opportunity missed!)
v4ever - EPOCH CORBA events reader.

Alex Measday  /  E-mail