Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When the monitoring software is finished with a shared memory buffer
it buffer it releases the buffer by returning the message via its output queue.
The  The DAQ monitoring system does not store events. If no shared memory
buffers memory buffers are available, then any events that go past the monitoring
station monitoring station during that time will not be monitored.

To facilitate the development and testing of monitoring software, SLAC
has SLAC has developed a file server that mimics the DAQ system. Instead of
live of live data from the DAQ system, it reads a file and presents it to the
monitoring the monitoring software via the shared memory interface the same way that
the that the DAQ system does. One difference is that the file server will not
drop not drop events if the monitoring software takes too long. It will wait
indefinitely wait indefinitely for a free buffer for the next event in the file.

To use the example files you will need two shells. The executables are in
releasein release/build/pdsdata/bin/x86_64-linux-dbg. Assuming both shells are in
the in the executable directory, first start the server with something like:

...

This points the software at the xtc example file, specifying four
message buffers and the size of each message buffer. The -r option
specifies option specifies the rate that events will be sent in cps, limited only by the I/O
and O and CPU speeds of the platform you are running on. The last parameter shown
is shown is a "partition tag" string that is added the name of the message queue, to
allow to allow multiple people to use this mechanism without a "name collision".
If  If only one person is using a machine, then just supply a placeholder name.

If there is more than one user on the computer you are using, you
can you can use the partition tag parameter to resolve conflicts. If you use
your use your login name as the partition tag, then you will be guaranteed not
to collide with anyone else.

...

The optional argument, "-l", will cause the server to loop infinitely,
repetitively  repetitively supplying all the events in the file.

The buffers referred to above are in the shared memory. If you
donyou don't need the shared memory to add any latency tolerance then
you then you can use a smaller number. Using only one buffer will serialize
the serialize the operation because only one side will be able to read or
write or write at a time. The minimum number of buffers used should be two. The
buffer The buffer size must be large enough for the largest event that will be handled.

The server will load the shared memory buffers with the first
events first events in the file and then wait for the client to start reading the events.

...