rtdServer is the process that manages the image event mechanism. Clients register to the rtdServer via the rtdInitImageEvt call. When a client attaches to a camera source an incoming image event will be forwarded to this client. Image events received from image sources where no clients are attached are simply discarded. Clients can also attach to image sources that not have registered yet as the rtdServer supports an independence between image event producer and image event consumer.
Furthermore rtdServer contains a simulator part that can be used to simulate the generation of image events. This feature is reserved for testing purposes only. Similarly, it also contains a performance test facility, in which several areas of shared memory are sent to a client Rtd in quick succession, and measurements are taken on certain performance parameters (see RtdPerformanceTool(3/n).
The rtdServer also implements semaphore locking of shared memory, to avoid the possibility of the RTD client reading the shared memory at the same time as the CCD writes (this is known as "image jitter"). The server program expects the CCD software to set a semaphore against any shared memory that has been written to (effectively to lock it). The server will then increment this semaphore by the number of RTD clients less one. If semaphores are not implemented in the incoming image event, no action is taken. The overall locking scheme is discussed in more detail in rtdSem(1). Semaphore locking is implemented in the simulator facility.
A C library, rtdImgEvt, is available for client applications to communicate with the rtdServer. It contains functions for connecting to the server, attaching to and detaching from a given CCD camera. It also contains functions for the CCD developer to lock areas of shared memory with semaphores.
Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory