Galaxy Communicator Documentation:

Binary data example


In this example, we demonstrate how to use the binary data object.

This example can be found in the distribution in contrib/MITRE/examples/binary_data.

Source fiiles

audio_binary.c: routes 8-bit audio data from itself to itself, using a binary object. Dumps the result to the audio device. Compare this to the brokering version.

data_binary.c: creates a data encoding and decoding for a simple structure and passes it through the Hub using binary objects.

mgal_data_binary.c: creates a data encoding and decoding for two simply structures and passes them through the Hub using the MITRE facility for manipulating binary objects.

Scripts

audio.csh: runs the audio_binary server and the Hub, using the audio.pgm program file.

binary.csh: runs the data_binary server and the Hub, using the binary.pgm program file.

mgal_binary.csh: runs the mgal_data_binary server and the Hub, using the binary.pgm. program file.

Language bindings

The python/ subdirectory contains Python versions of the audio_binary, data_binary and mgal_data_binary servers. These servers are completely interchangeable with the C versions. In order to play with them, you can substitute them into the scripts.

The acl/ subdirectory contains an Allegro Common Lisp version of the audio_binary server. This server is completely interchangeable with the C version. In order to play with it, you can substitute it into the script.

The java/ subdirectory contains Java versions of the testaudio and echo servers. These are interchangeable with the C versions. In order to play with them, you can substitute them into the scripts. However since they use /dev/audio to play sounds they should only work on sparc-solaris machines.

Compilation

Typing "make" in this directory will create the servers, MIT-style Makefiles, scripts and Python, Java and Allegro Common Lisp servers.

Discussion

See the documentation on binary objects and the documentation on the MITRE binary object tools.


Please send comments and suggestions to:bugs-darpacomm@linus.mitre.org
Last updated October 15, 2000.

 Copyright (c) 1998, 1999
The MITRE Corporation
ALL RIGHTS RESERVED