SDDS ToolKit Programs and Libraries for C and Python
|
Capture and save waveform data from Agilent oscilloscopes to SDDS format.
This program communicates with Agilent oscilloscopes over Ethernet using the VXI-11 protocol. It retrieves waveform data and saves it in the SDDS (Self Describing Data Set) format. Users can specify the IP address, output filename, and the channel to capture data from. Additional options allow customization of timeout, sample rate, acquisition points, and averaging parameters.
Required | Description |
---|---|
-ip | IP address of the oscilloscope (e.g., 128.243.74.232). |
-f | Filename (without extension) for saving the waveform data. |
-c | Scope channel to capture data from (e.g., 1, 2, A, B). |
Optional | Description |
---|---|
-t | Timeout duration in milliseconds (default: 10000 ms). |
-s | Set the sample rate (e.g., 1e9 for 1 GS/s). |
-n | Minimum number of acquisition points. |
-a | Number to average (use <=0 for none). |
-s
(sample rate) and -n
(number of points) are mutually dependent:-t
must be a positive value and defaults to 10000 ms if not set.-c
argument must correspond to valid channels recognized by the oscilloscope.Definition in file agilentwaveform2sdds.cpp.
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cstdint>
#include <memory>
#include <rpc/rpc.h>
#include <pthread.h>
#include "SDDS.h"
Go to the source code of this file.
Functions | |
bool | sc (const char *con, const char *var) |
int | agilent_init (CLINK *clink) |
int | agilent_set_averages (CLINK *clink, int no_averages) |
void | agilent_set_for_auto (CLINK *clink) |
long | agilent_get_data (CLINK *clink, char chan, char *buf, unsigned long buf_len, unsigned long timeout) |
long | agilent_get_data (CLINK *clink, char chan, int digitise, char *buf, unsigned long buf_len, unsigned long timeout) |
int | agilent_get_preamble (CLINK *clink, char *buf, unsigned long buf_len) |
void | agilent_scope_channel_str (char chan, char *source) |
int | agilent_set_for_capture (CLINK *clink, double s_rate, long npoints, unsigned long timeout) |
long | agilent_calculate_no_of_bytes (CLINK *clink, char chan, unsigned long timeout) |
int | vxi11_open_device (const char *ip, CLINK *clink) |
int | vxi11_open_device (const char *ip, CLINK *clink, char *device) |
int | vxi11_open_device (const char *ip, CLIENT **client, VXI11_LINK **link, char *device) |
int | vxi11_open_link (const char *ip, CLIENT **client, VXI11_LINK **link, char *device) |
int | vxi11_send (CLINK *clink, const char *cmd) |
int | vxi11_send (CLINK *clink, const char *cmd, unsigned long len) |
int | vxi11_send (CLIENT *client, VXI11_LINK *link, const char *cmd) |
int | vxi11_send (CLIENT *client, VXI11_LINK *link, const char *cmd, unsigned long len) |
int | vxi11_close_device (const char *ip, CLINK *clink) |
int | vxi11_close_device (const char *ip, CLIENT *client, VXI11_LINK *link) |
int | vxi11_close_link (const char *ip, CLIENT *client, VXI11_LINK *link) |
double | vxi11_obtain_double_value (CLINK *clink, const char *cmd) |
double | vxi11_obtain_double_value (CLINK *clink, const char *cmd, unsigned long timeout) |
long | vxi11_send_and_receive (CLINK *clink, const char *cmd, char *buf, unsigned long buf_len, unsigned long timeout) |
long | vxi11_receive (CLINK *clink, char *buffer, unsigned long len) |
long | vxi11_receive (CLINK *clink, char *buffer, unsigned long len, unsigned long timeout) |
long | vxi11_obtain_long_value (CLINK *clink, const char *cmd, unsigned long timeout) |
long | vxi11_obtain_long_value (CLINK *clink, const char *cmd) |
long | vxi11_receive_data_block (CLINK *clink, char *buffer, unsigned long len, unsigned long timeout) |
enum clnt_stat | create_link_1 (Create_LinkParms *argp, Create_LinkResp *clnt_res, CLIENT *clnt) |
enum clnt_stat | device_write_1 (Device_WriteParms *argp, Device_WriteResp *clnt_res, CLIENT *clnt) |
enum clnt_stat | destroy_link_1 (Device_Link *argp, Device_Error *clnt_res, CLIENT *clnt) |
enum clnt_stat | device_read_1 (Device_ReadParms *argp, Device_ReadResp *clnt_res, CLIENT *clnt) |
bool_t | xdr_Create_LinkParms (XDR *xdrs, Create_LinkParms *objp) |
bool_t | xdr_Create_LinkResp (XDR *xdrs, Create_LinkResp *objp) |
bool_t | xdr_Device_ErrorCode (XDR *xdrs, Device_ErrorCode *objp) |
bool_t | xdr_Device_Link (XDR *xdrs, Device_Link *objp) |
bool_t | xdr_Device_WriteParms (XDR *xdrs, Device_WriteParms *objp) |
bool_t | xdr_Device_WriteResp (XDR *xdrs, Device_WriteResp *objp) |
bool_t | xdr_Device_Flags (XDR *xdrs, Device_Flags *objp) |
bool_t | xdr_Device_Error (XDR *xdrs, Device_Error *objp) |
bool_t | xdr_Device_ReadParms (XDR *xdrs, Device_ReadParms *objp) |
bool_t | xdr_Device_ReadResp (XDR *xdrs, Device_ReadResp *objp) |
int | main (int argc, char **argv) |
long | vxi11_receive (CLIENT *client, VXI11_LINK *link, char *buffer, unsigned long len, unsigned long timeout) |
long agilent_calculate_no_of_bytes | ( | CLINK * | clink, |
char | chan, | ||
unsigned long | timeout ) |
Definition at line 1323 of file agilentwaveform2sdds.cpp.
long agilent_get_data | ( | CLINK * | clink, |
char | chan, | ||
char * | buf, | ||
unsigned long | buf_len, | ||
unsigned long | timeout ) |
Definition at line 1017 of file agilentwaveform2sdds.cpp.
long agilent_get_data | ( | CLINK * | clink, |
char | chan, | ||
int | digitise, | ||
char * | buf, | ||
unsigned long | buf_len, | ||
unsigned long | timeout ) |
Definition at line 1021 of file agilentwaveform2sdds.cpp.
int agilent_get_preamble | ( | CLINK * | clink, |
char * | buf, | ||
unsigned long | buf_len ) |
Definition at line 1056 of file agilentwaveform2sdds.cpp.
int agilent_init | ( | CLINK * | clink | ) |
Definition at line 610 of file agilentwaveform2sdds.cpp.
void agilent_scope_channel_str | ( | char | chan, |
char * | source ) |
Definition at line 1071 of file agilentwaveform2sdds.cpp.
int agilent_set_averages | ( | CLINK * | clink, |
int | no_averages ) |
Definition at line 736 of file agilentwaveform2sdds.cpp.
void agilent_set_for_auto | ( | CLINK * | clink | ) |
Definition at line 751 of file agilentwaveform2sdds.cpp.
int agilent_set_for_capture | ( | CLINK * | clink, |
double | s_rate, | ||
long | npoints, | ||
unsigned long | timeout ) |
Definition at line 1169 of file agilentwaveform2sdds.cpp.
enum clnt_stat create_link_1 | ( | Create_LinkParms * | argp, |
Create_LinkResp * | clnt_res, | ||
CLIENT * | clnt ) |
Definition at line 526 of file agilentwaveform2sdds.cpp.
enum clnt_stat destroy_link_1 | ( | Device_Link * | argp, |
Device_Error * | clnt_res, | ||
CLIENT * | clnt ) |
Definition at line 811 of file agilentwaveform2sdds.cpp.
enum clnt_stat device_read_1 | ( | Device_ReadParms * | argp, |
Device_ReadResp * | clnt_res, | ||
CLIENT * | clnt ) |
Definition at line 918 of file agilentwaveform2sdds.cpp.
enum clnt_stat device_write_1 | ( | Device_WriteParms * | argp, |
Device_WriteResp * | clnt_res, | ||
CLIENT * | clnt ) |
Definition at line 699 of file agilentwaveform2sdds.cpp.
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 211 of file agilentwaveform2sdds.cpp.
bool sc | ( | const char * | con, |
const char * | var ) |
Definition at line 434 of file agilentwaveform2sdds.cpp.
int vxi11_close_device | ( | const char * | ip, |
CLIENT * | client, | ||
VXI11_LINK * | link ) |
Definition at line 785 of file agilentwaveform2sdds.cpp.
int vxi11_close_device | ( | const char * | ip, |
CLINK * | clink ) |
Definition at line 755 of file agilentwaveform2sdds.cpp.
int vxi11_close_link | ( | const char * | ip, |
CLIENT * | client, | ||
VXI11_LINK * | link ) |
Definition at line 795 of file agilentwaveform2sdds.cpp.
double vxi11_obtain_double_value | ( | CLINK * | clink, |
const char * | cmd ) |
Definition at line 818 of file agilentwaveform2sdds.cpp.
double vxi11_obtain_double_value | ( | CLINK * | clink, |
const char * | cmd, | ||
unsigned long | timeout ) |
Definition at line 822 of file agilentwaveform2sdds.cpp.
long vxi11_obtain_long_value | ( | CLINK * | clink, |
const char * | cmd ) |
Definition at line 1013 of file agilentwaveform2sdds.cpp.
long vxi11_obtain_long_value | ( | CLINK * | clink, |
const char * | cmd, | ||
unsigned long | timeout ) |
Definition at line 1003 of file agilentwaveform2sdds.cpp.
int vxi11_open_device | ( | const char * | ip, |
CLIENT ** | client, | ||
VXI11_LINK ** | link, | ||
char * | device ) |
Definition at line 445 of file agilentwaveform2sdds.cpp.
int vxi11_open_device | ( | const char * | ip, |
CLINK * | clink ) |
Definition at line 438 of file agilentwaveform2sdds.cpp.
int vxi11_open_device | ( | const char * | ip, |
CLINK * | clink, | ||
char * | device ) |
Definition at line 465 of file agilentwaveform2sdds.cpp.
int vxi11_open_link | ( | const char * | ip, |
CLIENT ** | client, | ||
VXI11_LINK ** | link, | ||
char * | device ) |
Definition at line 497 of file agilentwaveform2sdds.cpp.
long vxi11_receive | ( | CLIENT * | client, |
VXI11_LINK * | link, | ||
char * | buffer, | ||
unsigned long | len, | ||
unsigned long | timeout ) |
Definition at line 860 of file agilentwaveform2sdds.cpp.
long vxi11_receive | ( | CLINK * | clink, |
char * | buffer, | ||
unsigned long | len ) |
Definition at line 910 of file agilentwaveform2sdds.cpp.
long vxi11_receive | ( | CLINK * | clink, |
char * | buffer, | ||
unsigned long | len, | ||
unsigned long | timeout ) |
Definition at line 914 of file agilentwaveform2sdds.cpp.
long vxi11_receive_data_block | ( | CLINK * | clink, |
char * | buffer, | ||
unsigned long | len, | ||
unsigned long | timeout ) |
Definition at line 1108 of file agilentwaveform2sdds.cpp.
int vxi11_send | ( | CLIENT * | client, |
VXI11_LINK * | link, | ||
const char * | cmd ) |
Definition at line 635 of file agilentwaveform2sdds.cpp.
int vxi11_send | ( | CLIENT * | client, |
VXI11_LINK * | link, | ||
const char * | cmd, | ||
unsigned long | len ) |
Definition at line 639 of file agilentwaveform2sdds.cpp.
int vxi11_send | ( | CLINK * | clink, |
const char * | cmd ) |
Definition at line 627 of file agilentwaveform2sdds.cpp.
int vxi11_send | ( | CLINK * | clink, |
const char * | cmd, | ||
unsigned long | len ) |
Definition at line 631 of file agilentwaveform2sdds.cpp.
long vxi11_send_and_receive | ( | CLINK * | clink, |
const char * | cmd, | ||
char * | buf, | ||
unsigned long | buf_len, | ||
unsigned long | timeout ) |
Definition at line 833 of file agilentwaveform2sdds.cpp.
bool_t xdr_Create_LinkParms | ( | XDR * | xdrs, |
Create_LinkParms * | objp ) |
Definition at line 533 of file agilentwaveform2sdds.cpp.
bool_t xdr_Create_LinkResp | ( | XDR * | xdrs, |
Create_LinkResp * | objp ) |
Definition at line 590 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_Error | ( | XDR * | xdrs, |
Device_Error * | objp ) |
Definition at line 732 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_ErrorCode | ( | XDR * | xdrs, |
Device_ErrorCode * | objp ) |
Definition at line 602 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_Flags | ( | XDR * | xdrs, |
Device_Flags * | objp ) |
Definition at line 728 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_Link | ( | XDR * | xdrs, |
Device_Link * | objp ) |
Definition at line 606 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_ReadParms | ( | XDR * | xdrs, |
Device_ReadParms * | objp ) |
Definition at line 925 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_ReadResp | ( | XDR * | xdrs, |
Device_ReadResp * | objp ) |
Definition at line 993 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_WriteParms | ( | XDR * | xdrs, |
Device_WriteParms * | objp ) |
Definition at line 706 of file agilentwaveform2sdds.cpp.
bool_t xdr_Device_WriteResp | ( | XDR * | xdrs, |
Device_WriteResp * | objp ) |
Definition at line 720 of file agilentwaveform2sdds.cpp.