|
ACQ2XX_API
|
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 = {} |
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 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.
| static void connect_to | ( | SOCKET | sock, |
| const char * | remotehost, | ||
| const char * | remoteport | ||
| ) | [static] |
Definition at line 193 of file Dt100Transport.cpp.
References die(), and set_address().
Referenced by Dt100Transport::acq2sh(), Dt100Transport::readChannel(), Dt100Transport::readStreamingFrame(), and Dt100Transport::waitStateChange().
| static SOCKET get_sock | ( | void | ) | [static] |
Definition at line 173 of file Dt100Transport.cpp.
References die(), S_BUFLEN, and SOCKET.
Referenced by Dt100Transport::acq2sh(), Dt100Transport::readChannel(), Dt100Transport::readStreamingFrame(), and Dt100Transport::waitStateChange().
| 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] |
Definition at line 132 of file Dt100Transport.cpp.
References MASTER_TO, prefix, PUT_TO, readline(), signon_command, SIGNON_FMT, SLAVE_TO, and timeout.
Referenced by Dt100Transport::acq2sh(), Dt100Transport::readChannel(), Dt100Transport::readStreamingFrame(), and Dt100Transport::waitStateChange().
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] |
Definition at line 57 of file Dt100Transport.cpp.
Referenced by Dt100TransportFactory::createTransport(), and Dt100Transport::readChannel().
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.
1.7.4