Previous Menu Next
Exercise in Annotation

The following exercises are provided for you to test sending and receiving annotation messages to/from an engine. The example programs are located in:

	$OV_PROG_SAMPLES/ecs/annotate

To compile and run the annotation server example:

Make any required changes to the annotate server source code in annosvr.c.

Make any required changes to the Makefile to adapt it for your development environment.

Compile annosvr using make:

	make

A compiled circuit annosvr.eco has been provided. If you have an ECS Designer installed, you may wish to examine the circuit source file, annosvr.ecs.

Start the engine:

The ECS engine is automatically loaded when the postmaster is started. The pmd can be restarted with:

	ovstop
	ovstart

Load an annotation circuit onto the engine:

	ecsmgr -circuit_load anno annosvr.eco

Enable the circuit:

	ecsmgr -enable anno

Start the annotation server:

	annosvr -i 1

It will display the word "process" at regular intervals as an indication that it is running.

In a new terminal session, start event logging on the circuit so you can see the events output from the engine:

	ecsmgr -log_events circuit anno on
	ecsmgr -log_events input on

Annotation requests are logged to the circuit output file, and annotation responses are logged to the input file.

In a new terminal session, feed test events into the engine:

	$OV_CONTRIB/ecs/ecsevgen -i 1 simple.evt

NOTES:

You cannot use the ecsio, ecsin or ecsout sample programs (in $OV_PROG_SAMPLES/ecs/event_io) with the supplied annotation examples. This is because the sample annotation circuit is sensitive to event times.

Instead you must use the contributed program ecsevgen.

Timing

The sample circuit (annosvr.ecs) waits about a minute before sending an event for annotation.

The log contains lines such as the following:

	1997/01/03 12:03:01,Oden,LNKDN,5,"Link Down:Vili"
	% mdl:SimpleEvent:2
	+60

The first line is the event in SimpleEvent format. The next line, starting with %, defines the following data:

	encoding_type:syntax:network-delay

The third line is optional and defines the amount by which to increment the engine's clock to remain in line with the event's create_time.

The ECS Engine writes annotation requests to the output log and annotation responses to the input event log. These log will therefore contain entries similar to the following:

# My annotation event
0
simulate
anno_reg_001_module.tmpcompound.tmpnode.annonode
2
19970103010400.000000Z
["Link Down:Vili", (5, "Thor"), 1.230000, 1]
% anno:response:61