#include "azcam.h"
Functions | |
| int | SetSocket (azcam_t *cam, int client, char *host, int port, char *reply) |
| Open/Close socket connections to various AzCam server clients. | |
| int | WriteImage (azcam_t *cam, char *filename, char *reply) |
| Write an image from memory to disk. | |
| int | SendImage (azcam_t *cam, int client, char *host, int port, char *reply) |
| Send the image in memory to the named client. | |
The following are a suite of interface functions that provide access to all of the AzCam server image writing functions.
All routines call the communication layer routines in iosubs.c to take care of common handling of timeout, errors, and reply processing.
All of the image writing commands documented in Section 8 of the AzCam Programmers Reference Manual are implemented.
|
||||||||||||||||||||||||
|
Open/Close socket connections to various AzCam server clients.
Supported client codes are:
GUIDER_CLIENT - opens a connection to an autoguider client
GUIDER_CLOSE - closes a connection to an autoguider client
MESSAGE_CLIENT - opens a connection to a message client (sees all status messages)
MESSAGE_CLOSE - closes a connection to a messge client
DISPLAY_CLIENT - defines a display client (SendImage() will open/close socket)
FILE_CLIENT - defines a file handler client (SendImage() will open/close socket)
There are two classes of clients at work: persistent clients whose socket connections are opened or closed by this function (Guider and Message clients), and non-persistent clients that are opened/closed by the SendImage() function.
|
|
||||||||||||||||
|
Write an image from memory to disk.
The filename provided must be the full name of the file including all counters, paths, etc. The calling application is responsible for building a full valid filename; this function cannot do validation. The path must be a valid file path on the AzCam server proper. On successful completion, this function sets the azcam::LastFile datum to tell the calling application the name of the file just written. It does not, however advance file counters. That is the responsibility of the calling application (since counters are optional). |
|
||||||||||||||||||||||||
|
Send the image in memory to the named client.
If client is DISPLAY_CLIENT, the AzCam server opens the client socket, sends the data, then closes the client socket. If client is FILE_CLIENT, the AzCam server opens the client socket, sends the complete image (header+data), then closes the client socket. If client is GUIDER_CLIENT, the AzCam server sends the image data to the client. The AzCam server does not first open the guider client, this must be done with a previous call to SetSocket(). |
1.4.2