55     uint16_t voltagedac,voltagedacrx;
    64     iretn = vmt35_connect((
char *)
"/dev/ttyUSB4");
    69         printf(
"Error: vmt35_connect() %d\n",iretn);
    82     if (strcmp (
arg1str,
"RESET") == 0) {
    98     if (strcmp (
arg1str,
"SETVOLTAGE") == 0) {
    99         vmt35_set_percent_voltage(0,99);
   100         vmt35_set_percent_voltage(1,99);
   101         vmt35_set_percent_voltage(2,99);
   110     if (strcmp (
arg1str,
"RUN") == 0) {
   113         printf(
">> Enabling Supply Voltage ... ");
   114         if (vmt35_enable()==0)
   119         vmt35_set_percent_voltage(0,99);
   120         vmt35_set_percent_voltage(1,99);
   121         vmt35_set_percent_voltage(2,99);
   123         printf(
">> Setting Supply Current to Ch 0, %f A ... ",current);
   124         vmt35_set_amps(0,current);
   129         printf(
">> Setting Supply Current to Ch 1, %f A ... ",current);
   130         vmt35_set_amps(1,current);
   135         printf(
">> Setting Supply Current to Ch 2, %f A ... ",current);
   136         vmt35_set_amps(2,current);
   145     if (strcmp (
arg1str,
"SETCH") == 0) {
   148         current = ceilf(
arg3num * 1000000) / 1000000;
   151         printf(
">> Enabling Supply Voltage ... ");
   152         if (vmt35_enable()==0)
   157         vmt35_set_percent_voltage(channel,99);
   159         printf(
">> Setting Supply Current to Ch %d, %f A ... ",(
int)channel, current);
   160         vmt35_set_amps(channel,current);
   166     if (strcmp (
arg1str,
"SETCDAC") == 0) {
   171         printf(
">> Enabling Supply Voltage ... ");
   172         if (vmt35_enable()==0)
   177         vmt35_set_percent_voltage(channel,99);
   179         printf(
">> Setting Supply Current to Ch %d, %d DAC ... ",(
int)channel, (
int)current);
   180         vmt35_set_current_dac(channel,current);
   187     if (strcmp (
arg1str,
"GETV") == 0) {
   195     if (strcmp (
arg1str,
"GETAMP") == 0) {
   200         vmt35_get_current(channel,&s);
   202         printf(
">> Got current: %d (raw) %f (A)\n",amps,current);
   208     if (strcmp (
arg1str,
"SETVDAC") == 0) {
   212         voltagedac = (uint16_t)
arg3num;
   214         printf(
">> Enabling Supply Voltage ... ");
   215         if (vmt35_enable()==0)
   218         printf(
">> Setting Supply Voltage to Ch %d, %d DAC ... ",(
int)channel, (
int)voltagedac);
   221         vmt35_set_voltage(channel,voltagedac);
   224         vmt35_get_voltage(channel,&voltagedacrx);
   225         printf(
">> Voltage from DAC: %d\n",voltagedacrx);
   232     if (strcmp (
arg1str,
"SETAMP") == 0) {
   233         printf(
">> Setting Supply Current ... ");
   235         vmt35_set_amps((
int)
arg2num,current);
   240     if (strcmp (
arg1str,
"DISABLE") == 0) {
   241         printf(
">> Disabling Supply Voltage ... ");
   246     if (strcmp (
arg1str,
"ENABLE") == 0) {
   247         printf(
">> Enabling Supply Voltage ... ");
   248         if (vmt35_enable()==0)
   255         vmt35_set_amps(0,current);
   256         vmt35_set_amps(1,current);
   257         vmt35_set_amps(2,current);
 char arg1str[100]
Definition: vmt35_test_enable.cpp:35
int iretn
Definition: rw_test.cpp:37
void getVoltageDac(int channel)
Definition: vmt35_test_enable.cpp:293
static antstruc current
Definition: agent_antenna.cpp:161
float arg3num
Definition: vmt35_test_enable.cpp:39
void parseCommandLine(int argc, char **argv)
Definition: vmt35_test_enable.cpp:303
float arg2num
Definition: vmt35_test_enable.cpp:38
void reset()
Definition: vmt35_test_enable.cpp:285