How can I efficiently archive 1553A bus data to a file using BusTools/1553-API?

This is a modification of "example_bm3.c" for use with 1553A protocol.

This program demonstrates using the Bus Monitor to archive bus data to a file. The output file is in BMD format and can be viewed from the BusTools/1553 GUI.

This example is very similar to example_bm1.c but in this case we use the EVENT_RECORDER interrupt event to allow us to only write messages to disk when we have 64KB of data (512 messages). This gives us a more efficient archiving application.

The main program sets up the BM and registers the event handler function. It then waits until the user tells it to stop archiving. It then reads any messages left in the API BM message buffer, write them to file, and exit.

The event handler function grabs blocks of data and writes to file every time the EVENT_RECORDER interrupt occurs. This should happen every time the API has accumulated 64K of data. It also print an asterisk every time this happens so we have some indication that the program is actually doing something.

Use a bus analyzer (BusTools/1553) as BC and remote terminal.

Download this example by clicking the attachments link on the right.