Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

acq2xx_server.cpp File Reference

server WS implementation. More...

#include "soapH.h"
#include "acq2xx.nsmap"
#include <stdio.h>
#include <assert.h>
#include <iostream>
#include <iomanip>
#include <string>
#include <string.h>
#include <pthread.h>

Go to the source code of this file.

Data Structures

class  Actor
class  ActorStub

Defines

#define info   printf
#define MAXBUF   16384
#define ACQCMD   "/usr/local/bin/acqcmd"
#define NOT_FOR_SERVER   0
#define BACKLOG   (100)
#define MAX_THR   (10)

Functions

static int cgi_main (soap *soap)
static int standalone_main (soap *soap, int port)
int main (int argc, char **argv)
static void print_signon (soap *soap, int i, int s)
static int soap_command (struct soap *soap, char *lcommand, char *command, char *&response)
int acq2xx__acqcmd (struct soap *soap, char *command, char *&response)
int acq2xx__acq2sh (struct soap *soap, char *command, char *&response)
int acq2xx__getVersion (struct soap *soap, char *client_version, char *&server_version)
static int acqcmd (const char *command, char *buf, int maxbuf)
int acq2xx__getAcqStatus (struct soap *soap, struct acq2xx__AcqStatus &status)
int acq2xx__setArm (struct soap *soap, int block, struct acq2xx__AcqStatus &status)
int acq2xx__waitStop (struct soap *soap, int timeout_sec, struct acq2xx__AcqStatus &status)
static const char * toString (enum acq2xx__DIx dix)
static const char * toString (enum acq2xx__DOx dox)
static const char * toString (enum acq2xx__EDGE edge)
int acq2xx__acq2script (struct soap *soap, acq2xx__Transaction *in, struct acq2xx__acq2scriptResponse &result)
static int parseVR (VRange *ranges, int channels, char *result)

Variables

static int verbose = 0
static int logcommands = 0
static Actoractor = new Actor()


Detailed Description

server WS implementation.

usage: acq2xx_server [port]

Server is multi-threaded, and stays resident by default

Definition in file acq2xx_server.cpp.


Define Documentation

#define ACQCMD   "/usr/local/bin/acqcmd"
 

Definition at line 48 of file acq2xx_server.cpp.

Referenced by acq2xx__acqcmd(), and acqcmd().

#define BACKLOG   (100)
 

Definition at line 75 of file acq2xx_server.cpp.

Referenced by standalone_main().

#define info   printf
 

Definition at line 37 of file acq2xx_server.cpp.

Referenced by acq2xx__getVersion(), main(), print_signon(), and standalone_main().

#define MAX_THR   (10)
 

Definition at line 76 of file acq2xx_server.cpp.

Referenced by standalone_main().

#define MAXBUF   16384
 

Definition at line 39 of file acq2xx_server.cpp.

Referenced by acq2xx__ShellTransaction::run().

#define NOT_FOR_SERVER   0
 

Definition at line 50 of file acq2xx_server.cpp.

Referenced by acq2xx__AcqControlTransaction::acq2xx__AcqControlTransaction(), acq2xx__ClockSetTransaction::acq2xx__ClockSetTransaction(), acq2xx__ExternalClockSetTransaction::acq2xx__ExternalClockSetTransaction(), acq2xx__InternalClockSetTransaction::acq2xx__InternalClockSetTransaction(), acq2xx__ModeSetTransaction::acq2xx__ModeSetTransaction(), and acq2xx__SignalSetTransaction::acq2xx__SignalSetTransaction().


Function Documentation

int acq2xx__acq2script struct soap soap,
acq2xx__Transaction in,
struct acq2xx__acq2scriptResponse result
 

Definition at line 406 of file acq2xx_server.cpp.

References acq2xx__Transaction::exec(), acq2xx__acq2scriptResponse::out, acq2xx__Transaction::print(), SOAP_OK, and verbose.

int acq2xx__acq2sh struct soap soap,
char *  command,
char *&  response
 

Definition at line 257 of file acq2xx_server.cpp.

References soap_command().

int acq2xx__acqcmd struct soap soap,
char *  command,
char *&  response
 

Definition at line 252 of file acq2xx_server.cpp.

References ACQCMD, and soap_command().

int acq2xx__getAcqStatus struct soap soap,
struct acq2xx__AcqStatus status
 

Definition at line 289 of file acq2xx_server.cpp.

References acqcmd(), acq2xx__AcqStatus::elapsed, acq2xx__AcqStatus::nchan, acq2xx__AcqStatus::numsamples, acq2xx__AcqStatus::postlen, acq2xx__AcqStatus::prelen, soap_malloc(), SOAP_OK, acq2xx__AcqStatus::state, and acq2xx__AcqStatus::state_string.

int acq2xx__getVersion struct soap soap,
char *  client_version,
char *&  server_version
 

Definition at line 262 of file acq2xx_server.cpp.

References ACQ2XX_H_VERSION, info, soap_malloc(), and SOAP_OK.

int acq2xx__setArm struct soap soap,
int  block,
struct acq2xx__AcqStatus status
 

Definition at line 315 of file acq2xx_server.cpp.

References acq2xx__getAcqStatus(), acqcmd(), ST_STOP, and acq2xx__AcqStatus::state.

int acq2xx__waitStop struct soap soap,
int  timeout_sec,
struct acq2xx__AcqStatus status
 

Definition at line 339 of file acq2xx_server.cpp.

References acq2xx__getAcqStatus(), and Actor::spawn_read().

static int acqcmd const char *  command,
char *  buf,
int  maxbuf
[static]
 

Definition at line 280 of file acq2xx_server.cpp.

References ACQCMD, and Actor::spawn_read().

Referenced by acq2xx__getAcqStatus(), and acq2xx__setArm().

static int cgi_main soap soap  )  [static]
 

Definition at line 110 of file acq2xx_server.cpp.

References soap_destroy, soap_end(), and soap_serve().

Referenced by main().

int main int  argc,
char **  argv
 

Definition at line 81 of file acq2xx_server.cpp.

References ACQ2XX_H_VERSION, cgi_main(), info, logcommands, soap_init(), standalone_main(), and verbose.

static int parseVR VRange ranges,
int  channels,
char *  result
[static]
 

Definition at line 636 of file acq2xx_server.cpp.

References VRange::max, and VRange::min.

Referenced by acq2xx__GetVRangeTransaction::run().

static void print_signon soap soap,
int  i,
int  s
[static]
 

Definition at line 118 of file acq2xx_server.cpp.

References info, and soap::ip.

Referenced by standalone_main().

static int soap_command struct soap soap,
char *  lcommand,
char *  command,
char *&  response
[static]
 

Definition at line 238 of file acq2xx_server.cpp.

Referenced by acq2xx__acq2sh(), and acq2xx__acqcmd().

static int standalone_main soap soap,
int  port
[static]
 

Definition at line 131 of file acq2xx_server.cpp.

References BACKLOG, soap::errnum, info, MAX_THR, print_signon(), soap_accept(), soap_bind(), soap_copy(), soap_destroy, soap_done(), soap_end(), soap_print_fault(), soap_serve(), SOAP_SOCKET, soap_valid_socket, and soap::socket.

Referenced by main().

static const char* toString enum acq2xx__EDGE  edge  )  [static]
 

Definition at line 400 of file acq2xx_server.cpp.

References EDGE_FALLING.

static const char* toString enum acq2xx__DOx  dox  )  [static]
 

Definition at line 379 of file acq2xx_server.cpp.

References DO0, DO1, DO2, DO3, DO4, DO5, and DO_NONE.

static const char* toString enum acq2xx__DIx  dix  )  [static]
 

Definition at line 358 of file acq2xx_server.cpp.

References DI0, DI1, DI2, DI3, DI4, DI5, and DI_NONE.

Referenced by acq2xx__SignalSetTransaction::run(), acq2xx__ExternalClockSetTransaction::run(), and acq2xx__InternalClockSetTransaction::run().


Variable Documentation

Actor* actor = new Actor() [static]
 

Definition at line 70 of file acq2xx_server.cpp.

int logcommands = 0 [static]
 

Definition at line 53 of file acq2xx_server.cpp.

Referenced by main().

int verbose = 0 [static]
 

Definition at line 52 of file acq2xx_server.cpp.


Generated on Mon Aug 21 12:39:58 2006 for ACQ2XXWebServices by  doxygen 1.4.4