ACQ2XX_API
Data Structures | Defines | Functions | Variables
Dt100Transport.cpp File Reference

defines the dt100 Transport. More...

#include "local.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "acq_transport.h"
#include "Dt100Transport.h"
#include "Frame.h"
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <stdarg.h>
#include <errno.h>
#include <netdb.h>
#include <fcntl.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/uio.h>
#include "iclient3.h"

Go to the source code of this file.

Data Structures

class  Dt100Transport
struct  Dt100Transport::State

Defines

#define MASTER_TO   30
#define SLAVE_TO   10
#define PUT_TO   10
#define VFPRINTF(fmt...)   if (verbose) fprintf(stderr, ## fmt)
#define VFPRINTF2(fmt...)   if (verbose > 1) fprintf(stderr, ## fmt)
#define SIGNON_FMT   "dt100 open %s %s\n"
#define ACQCMD   "acqcmd "
#define DUMMYCMD   "hostname\n"
#define STATCMD   "cat /dev/acq200/tblocks/acqstate\n"
#define MAXREAD   0x10000

Functions

static void signon (int sock, const char *remotedev, const char *mode)
static SOCKET get_sock (void)
static void connect_to (SOCKET sock, const char *remotehost, const char *remoteport)
int readb (int sock, char *buf, int nbytes)

Variables

int verbose = 0
static int sample_size = sizeof(short)
static unsigned S_BUFLEN = (4096*16)
static char * S_buf [2]
static char signon_command [80]
static const char * prefix
static struct timeval timeout
struct timeval zero_time = {}

Detailed Description

defines the dt100 Transport.

ACQ2xx cards offer the "dt100 service" at port 0xd100 This Transport controls the card using the dt100 service

Definition in file Dt100Transport.cpp.


Define Documentation

#define ACQCMD   "acqcmd "

Definition at line 236 of file Dt100Transport.cpp.

Referenced by Dt100Transport::acqcmd().

#define DUMMYCMD   "hostname\n"

Definition at line 255 of file Dt100Transport.cpp.

#define MASTER_TO   30

Definition at line 51 of file Dt100Transport.cpp.

Referenced by signon().

#define MAXREAD   0x10000

Definition at line 337 of file Dt100Transport.cpp.

Referenced by Dt100Transport::readChannel().

#define PUT_TO   10

Definition at line 53 of file Dt100Transport.cpp.

Referenced by signon().

#define SIGNON_FMT   "dt100 open %s %s\n"

Referenced by signon().

#define SLAVE_TO   10

Definition at line 52 of file Dt100Transport.cpp.

Referenced by signon().

#define STATCMD   "cat /dev/acq200/tblocks/acqstate\n"

Definition at line 319 of file Dt100Transport.cpp.

Referenced by Dt100Transport::waitStateChange().

#define VFPRINTF (   fmt...)    if (verbose) fprintf(stderr, ## fmt)

Definition at line 119 of file Dt100Transport.cpp.

#define VFPRINTF2 (   fmt...)    if (verbose > 1) fprintf(stderr, ## fmt)

Definition at line 120 of file Dt100Transport.cpp.


Function Documentation

static void connect_to ( SOCKET  sock,
const char *  remotehost,
const char *  remoteport 
) [static]
static SOCKET get_sock ( void  ) [static]
int readb ( int  sock,
char *  buf,
int  nbytes 
)

Definition at line 339 of file Dt100Transport.cpp.

Referenced by Dt100Transport::readChannel().

static void signon ( int  sock,
const char *  remotedev,
const char *  mode 
) [static]

Variable Documentation

const char* prefix [static]

Definition at line 127 of file Dt100Transport.cpp.

Referenced by Dt100Transport::readStreamingFrame(), and signon().

char* S_buf[2] [static]

Definition at line 122 of file Dt100Transport.cpp.

Referenced by Dt100Transport::Dt100Transport().

unsigned S_BUFLEN = (4096*16) [static]

Definition at line 121 of file Dt100Transport.cpp.

Referenced by Dt100Transport::Dt100Transport(), and get_sock().

int sample_size = sizeof(short) [static]
char signon_command[80] [static]

Definition at line 126 of file Dt100Transport.cpp.

Referenced by signon().

struct timeval timeout [static]

Definition at line 128 of file Dt100Transport.cpp.

int verbose = 0

Definition at line 55 of file Dt100Transport.cpp.

Referenced by Dt100Transport::Dt100Transport().

struct timeval zero_time = {}

Definition at line 129 of file Dt100Transport.cpp.