SDDS ToolKit Programs and Libraries for C and Python
|
Server program to log data to SDDS files.
This program listens on a specified port and handles multiple client connections to log data into SDDS files. It supports various commands such as adding values, creating channels, making directories, and generating SDDS plots. Key features include:
Required | Description |
---|---|
-port | Port number on which the server listens. |
Optional | Description |
---|---|
-root | Path of the root directory. Defaults to current directory. |
-forbid | Comma-separated list of commands to forbid. |
-sddsplotPath | Pathname for SDDS plot output files. |
-port
must be a valid positive integer.-root
must specify an existing directory.-sddsplotPath
requires a valid directory path.Definition in file sddslogserver.c.
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <signal.h>
#include <sys/stat.h>
#include <dirent.h>
#include "mdb.h"
#include "SDDS.h"
#include "scan.h"
Go to the source code of this file.
Functions | |
int | dostuff (int) |
int | createChannel (char *spec) |
int | addValue (char *spec) |
int | runSddsplot (char *returnBuffer, char *options) |
void | updateChannelDescription (void) |
int | makeDirectoryList (int64_t *returnNumber, char ***returnBuffer) |
int | getChannelList (int64_t *returnNumber, char ***returnBuffer) |
void | error (const char *msg, char *progName) |
int | writeReply (int sock, const char *message, int code) |
int | writeReplyList (int sock, int64_t nItems, char **messageList) |
void | freeReplyList (int64_t nItems, char **item) |
int | chdirFromRoot (char *path) |
void | shutdownServer (int arg) |
int | main (int argc, char *argv[]) |
int addValue | ( | char * | spec | ) |
Definition at line 526 of file sddslogserver.c.
int chdirFromRoot | ( | char * | path | ) |
Definition at line 169 of file sddslogserver.c.
int createChannel | ( | char * | spec | ) |
Definition at line 472 of file sddslogserver.c.
int dostuff | ( | int | sock | ) |
Definition at line 354 of file sddslogserver.c.
void error | ( | const char * | msg, |
char * | progName ) |
Definition at line 122 of file sddslogserver.c.
void freeReplyList | ( | int64_t | nItems, |
char ** | item ) |
Definition at line 159 of file sddslogserver.c.
int getChannelList | ( | int64_t * | returnNumber, |
char *** | returnBuffer ) |
Definition at line 743 of file sddslogserver.c.
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 212 of file sddslogserver.c.
int makeDirectoryList | ( | int64_t * | returnNumber, |
char *** | returnBuffer ) |
Definition at line 709 of file sddslogserver.c.
int runSddsplot | ( | char * | returnBuffer, |
char * | options ) |
Definition at line 643 of file sddslogserver.c.
void shutdownServer | ( | int | arg | ) |
Definition at line 204 of file sddslogserver.c.
void updateChannelDescription | ( | void | ) |
Definition at line 521 of file sddslogserver.c.
int writeReply | ( | int | sock, |
const char * | message, | ||
int | code ) |
Definition at line 129 of file sddslogserver.c.
int writeReplyList | ( | int | sock, |
int64_t | nItems, | ||
char ** | messageList ) |
Definition at line 140 of file sddslogserver.c.