AlcapDAQ  1
Functions | Variables
frontend.c File Reference
#include <stdio.h>
#include "midas.h"
#include <termios.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/time.h>

Go to the source code of this file.

Functions

INT vacuum_gauge_read (char *pevent, INT off)
 
INT frontend_early_init ()
 
INT pre_begin_of_run ()
 
INT poll_event (INT source[], INT count, BOOL test)
 
INT interrupt_configure (INT cmd, INT source[], PTYPE adr)
 
INT frontend_init ()
 
INT frontend_exit ()
 
INT frontend_loop ()
 
INT begin_of_run (INT run_number, char *error)
 
INT end_of_run (INT run_number, char *error)
 
INT pause_run (INT run_number, char *error)
 
INT resume_run (INT run_number, char *error)
 

Variables

INT crate_number =10
 
HNDLE hDB
 
HNDLE hKey
 
int size
 
char * frontend_name = "VacuumMonitor"
 
char * frontend_file_name = __FILE__
 
BOOL frontend_call_loop = TRUE
 
INT display_period = 1000
 
INT max_event_size = 10000
 
INT max_event_size_frag = 5 * 1024 * 1024
 
INT event_buffer_size = 10 * 10000
 
static int vacuum
 
static struct termios vacuum_config
 
static struct timeval vac_timeout
 
static fd_set vac_ready
 
static const char vacuum_port [] = "/dev/ttyS0"
 
static const resp_size = 256
 
static char resp [256]
 
static int missed_reads
 
static const char NUL = '\x00'
 
static const char ACK = '\x06'
 
static const char NAK = '\x15'
 
static const char ENQ = '\x05'
 
static const char ETX = '\x03'
 
static const char LF = '\n'
 
static const char CR = '\r'
 
static const char EOM [] = "\n\r"
 
static const char INQ_MODE [] = "PR1\r\n"
 
static const char CONT_MODE [] = "COM,1\r\n"
 
static const char SETPNT_STAT [] = "SPS\r\n"
 
static const char SETPNT_1 [] = "SP1\r\n"
 
static const char SETPNT_2 [] = "SP2\r\n"
 
BANK_LIST vacuum_bank_list []
 
EQUIPMENT equipment []
 

Function Documentation

INT begin_of_run ( INT  run_number,
char *  error 
)

Definition at line 267 of file frontend.c.

References readout_module::bor, diag_print(), i, num_periodic_modules, num_trigger_modules, status, and SUCCESS.

268 {
269  return CM_SUCCESS;
270 }
INT end_of_run ( INT  run_number,
char *  error 
)

Definition at line 274 of file frontend.c.

References diag_print(), readout_module::eor, i, num_periodic_modules, num_trigger_modules, status, and SUCCESS.

275 {
276  return CM_SUCCESS;
277 }
INT frontend_early_init ( void  )

Definition at line 118 of file frontend.c.

119 {
120  return CM_SUCCESS;
121 }
INT frontend_exit ( void  )

Definition at line 253 of file frontend.c.

References readout_module::exit, i, num_periodic_modules, num_trigger_modules, and SUCCESS.

254 {
255  return CM_SUCCESS;
256 }
INT frontend_init ( void  )

Definition at line 139 of file frontend.c.

References ACK, hDB, i, readout_module::init, INQ_MODE, missed_reads, num_periodic_modules, num_trigger_modules, odb_get_int(), printf(), resp, run_state, status, SUCCESS, vac_ready, vac_timeout, vacuum, vacuum_config, and vacuum_port.

139  {
140  int ret, err;
141  cm_get_experiment_database(&hDB, NULL);
142 
143  // Open serial port for vacuum
144  vacuum = open(vacuum_port, O_RDWR | O_NOCTTY);
145  printf("Opening vacuum gauge port...");
146  if (vacuum < 0) {
147  err = errno;
148  printf("failed!\n");
149  cm_msg(MERROR, "vacuum_gauge_init",
150  "Error opening vacuum gauge (errno %d)", err);
151  return FE_ERR_HW;
152  }
153  printf("done.\n");
154  printf("Getting current serial port attributes...");
155  ret = tcgetattr(vacuum, &vacuum_config);
156  if (ret < 0) {
157  err = errno;
158  printf("failed!\n");
159  cm_msg(MERROR, "vacuum_gauge_init",
160  "Error getting vacuum gauge serial port attributes (errno %d)", err);
161  return FE_ERR_HW;
162  }
163  printf("done.\n");
164 
165  /**********************************************************/
166  /*** Serial Modes ***/
167  /* Disable everything */
168  vacuum_config.c_iflag &= ~(BRKINT | ICRNL | IGNBRK | IGNCR |
169  IGNPAR | INLCR | INPCK | ISTRIP |
170  IUCLC | IXANY | IXOFF | IXON |
171  PARMRK);
172  vacuum_config.c_oflag &= ~(OPOST);
173  vacuum_config.c_cflag &= ~(CLOCAL | CREAD | CSIZE | CSTOPB |
174  HUPCL | PARENB | PARODD);
175  vacuum_config.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL |
176  ICANON | IEXTEN | ISIG | NOFLSH |
177  TOSTOP | XCASE);
178  /* Input */
179  // Nothing.
180  /* Output */
181  // Nothing.
182  /* Local */
183  vacuum_config.c_cflag |= CLOCAL; // Do not become owner of device?
184  vacuum_config.c_cflag |= CREAD; // Enable reading
185  vacuum_config.c_cflag |= (CSIZE & CS8); // 8-bit bytes
186  cfsetispeed(&vacuum_config, B9600); // Default baudrate for vacuum is 9600
187  cfsetospeed(&vacuum_config, B9600); // Default baudrate for vacuum is 9600
188  /* Control */
189  vacuum_config.c_cc[VTIME] = 10; // Interbyte timeout of 1 sec
190  vacuum_config.c_cc[VMIN] = 28; // Longest msg is 2 measurements, 28 chars
191  /*** Timeout ***/
192  vac_timeout.tv_sec = 1; // Timeout to check if buffer is ready to read is 1 sec
193  vac_timeout.tv_usec = 0; // And 0 microseconds
194  /**********************************************************/
195 
196  // Apply the attributes
197  printf("Setting new serial port attributes...");
198  ret = tcsetattr(vacuum, TCSAFLUSH, &vacuum_config); // Flush the output, discard input, and apply changes
199  if (ret < 0) {
200  err = errno;
201  printf("failed!\n");
202  cm_msg(MERROR, "vacuum_gauge_init",
203  "Error setting vacuum gauge serial port attributes (errno %d)", err);
204  return FE_ERR_HW;
205  }
206  printf("done.\n");
207 
208  // Tell the vacuum gauge to await an inquiry
209  printf("Setting vacuum gauge to measurement request mode...");
210  ret = write(vacuum, INQ_MODE, sizeof(INQ_MODE)-1);
211  if (ret < 0) {
212  err = errno;
213  printf("failed!\n");
214  cm_msg(MERROR, "vacuum_gauge_init",
215  "Error writing to vacuum gauge to set inquire mode (errno %d)", errno);
216  return FE_ERR_HW;
217  }
218  printf("done.\n");
219  printf("Checking vacuum acknowledgement...");
220 
221  FD_ZERO(&vac_ready);
222  FD_SET(vacuum, &vac_ready);
223  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
224  if(!FD_ISSET(vacuum, &vac_ready)) {
225  printf("failed!\n");
226  cm_msg(MERROR, "vacuum_gauge_init",
227  "Vacuum gauge did not acknowledge measurement request mode (nothing received)");
228  return FE_ERR_HW;
229  }
230  ret = read(vacuum, resp, 3);
231  if (ret < 0) {
232  err = errno;
233  printf("failed!\n");
234  cm_msg(MERROR, "vacuum_gauge_init",
235  "Vacuum gauge did not acknowledge measurement request mode (errno %d)", errno);
236  return FE_ERR_HW;
237  } else if (resp[0] != ACK) {
238  err = errno;
239  printf("failed!\n");
240  cm_msg(MERROR, "vacuum_gauge_init",
241  "Vacuum gauge did not acknowledge measurement request mode (something other than ACK received)");
242  return FE_ERR_HW;
243  }
244  printf("done.\n");
245 
246  missed_reads = 0;
247 
248  return CM_SUCCESS;
249 }
INT frontend_loop ( void  )

Definition at line 260 of file frontend.c.

References consider_start(), FE_END_BLOCK, FE_NEED_STOP, i, num_trigger_modules, run_state, status, stop_cycle(), SUCCESS, and TRUE.

261 {
262  return CM_SUCCESS;
263 }
INT interrupt_configure ( INT  cmd,
INT  source[],
PTYPE  adr 
)

Definition at line 132 of file frontend.c.

133 {
134  return 1;
135 };
INT pause_run ( INT  run_number,
char *  error 
)

Definition at line 281 of file frontend.c.

References SUCCESS.

282 {
283  return CM_SUCCESS;
284 }
INT poll_event ( INT  source[],
INT  count,
BOOL  test 
)

Definition at line 128 of file frontend.c.

129 {
130  return 1;
131 };
INT pre_begin_of_run ( )

Definition at line 123 of file frontend.c.

124 {
125  return CM_SUCCESS;
126 }
INT resume_run ( INT  run_number,
char *  error 
)

Definition at line 288 of file frontend.c.

References SUCCESS.

289 {
290  return CM_SUCCESS;
291 }
INT vacuum_gauge_read ( char *  pevent,
INT  off 
)

Definition at line 295 of file frontend.c.

References ACK, ENQ, i, INQ_MODE, missed_reads, NUL, printf(), resp, SETPNT_1, SETPNT_2, SETPNT_STAT, status, vac_ready, vac_timeout, and vacuum.

295  {
296 
297  // Work variables
298  static int i; // Looping
299  static int ret, err; // Error reporting
300  static INT stat; // Temperaroy status holder for print statements
301  // All of the numbers we're measuring
302  static INT *status; // Status of gauge
303  static BOOL *sp1, *sp2; // Set points on or off
304  static float *sp1l, *sp1h; // First set point lower and upper trigger
305  static float *sp2l, *sp2h; // Second set point lower and upper trigger
306  static float *pres; // Pressure reading
307  // And their corresponding strings (with terminating NULL)
308  // Status: 1 character
309  // Measurements: 10 characters
310  static char status_str[1+1];
311  static char sp1_str[1+1], sp2_str[1+1];
312  static char sp1l_str[10+1], sp1h_str[10+1];
313  static char sp2l_str[10+1], sp2h_str[10+1];
314  static char pres_str[10+1];
315  // Null terminate for conversion to numbers
316  status_str[1] = NUL;
317  sp1_str[1] = NUL; sp2_str[1] = NUL;
318  sp1l_str[10] = NUL; sp1h_str[10] = NUL;
319  sp2l_str[10] = NUL; sp2h_str[10] = NUL;
320  pres_str[10] = NUL;
321 
322  // Keep track of erroneous calls to this function. Reset at end.
323  missed_reads++;
324 
325  /*** Get status of set points ***/
326  // Set mode (status)
327  ret = write(vacuum, SETPNT_STAT, sizeof(SETPNT_STAT)-1);
328  if (ret < 0) {
329  err = errno;
330  printf("Error writing to vacuum gauge to enable set point request mode (errno %d)\n", err);
331  return 0;
332  }
333  FD_ZERO(&vac_ready);
334  FD_SET(vacuum, &vac_ready);
335  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
336  if(!FD_ISSET(vacuum, &vac_ready)) {
337  printf("Vacuum gauge did not acknowledge set point request mode (nothing received)\n");
338  return 0;
339  }
340  ret = read(vacuum, resp, 3);
341  if (ret < 0) {
342  err = errno;
343  printf("Vacuum gauge did not acknowledge set point request mode (errno %d)\n", err);
344  return 0;
345  } else if (resp[0] != ACK) {
346  printf("Vacuum gauge did not acknowledge set point request mode (something other than ACK received)\n");
347  return 0;
348  }
349  // Request set points
350  ret = write(vacuum, &ENQ, sizeof(ENQ));
351  if (ret < 0){
352  err = errno;
353  printf("Error writing to vacuum gauge to request status of set points (errno %d)\n", err);
354  return 0;
355  }
356  FD_ZERO(&vac_ready);
357  FD_SET(vacuum, &vac_ready);
358  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
359  if(!FD_ISSET(vacuum, &vac_ready)) {
360  printf("Vacuum gauge did not send status of set points.\n");
361  return 0;
362  }
363  ret = read(vacuum, resp, 9);
364  if (ret < 0) {
365  err = errno;
366  printf("Error reading status of set points from vacuum gaige (errno %d)\n", err);
367  return 0;
368  } else if (ret != 9) {
369  printf("Received incorrect response size (expected 9, received %d)", ret);
370  return 0;
371  }
372  // Record status
373  sp1_str[0] = resp[0];
374  sp2_str[0] = resp[2];
375 
376  /*** Get set point values ***/
377  /* SP1 */
378  // Set mode
379  ret = write(vacuum, SETPNT_1, sizeof(SETPNT_1)-1);
380  if (ret < 0) {
381  err = errno;
382  printf("Error writing to vacuum gauge to enable set point request mode (errno %d)\n", err);
383  return 0;
384  }
385  FD_ZERO(&vac_ready);
386  FD_SET(vacuum, &vac_ready);
387  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
388  if(!FD_ISSET(vacuum, &vac_ready)) {
389  printf("Vacuum gauge did not acknowledge set point request mode (nothing received)\n");
390  return 0;
391  }
392  ret = read(vacuum, resp, 3);
393  if (ret < 0) {
394  err = errno;
395  printf("Vacuum gauge did not acknowledge set point request mode (errno %d)\n", err);
396  return 0;
397  } else if (resp[0] != ACK) {
398  printf("Vacuum gauge did not acknowledge set point request mode (something other than ACK received)\n");
399  return 0;
400  }
401  // Request set points
402  ret = write(vacuum, &ENQ, sizeof(ENQ));
403  if (ret < 0){
404  err = errno;
405  printf("Error writing to vacuum gauge to request status of set points (errno %d)\n", err);
406  return 0;
407  }
408  FD_ZERO(&vac_ready);
409  FD_SET(vacuum, &vac_ready);
410  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
411  if(!FD_ISSET(vacuum, &vac_ready)) {
412  printf("Vacuum gauge did not send status of set points.\n");
413  return 0;
414  }
415  ret = read(vacuum, resp, 25);
416  if (ret < 0) {
417  err = errno;
418  printf("Error reading status of set points from vacuum gaige (errno %d)\n", err);
419  return 0;
420  } else if (ret != 9) {
421  printf("Received incorrect response size (expected 25, received %d)\n", ret);
422  return 0;
423  }
424  if (resp[0] != '1') {
425  printf("Received incorrect set point value (expect 1, received %c)\n", resp[0]);
426  return 0;
427  }
428  for (i = 0; i < 10; i++) {
429  sp1l_str[i] = resp[i + 2];
430  sp1h_str[i] = resp[i + 13];
431  }
432  /* SP2 */
433  // Set mode
434  ret = write(vacuum, SETPNT_2, sizeof(SETPNT_2)-1);
435  if (ret < 0) {
436  err = errno;
437  printf("Error writing to vacuum gauge to enable set point request mode (errno %d)\n", err);
438  return 0;
439  }
440  FD_ZERO(&vac_ready);
441  FD_SET(vacuum, &vac_ready);
442  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
443  if(!FD_ISSET(vacuum, &vac_ready)) {
444  printf("Vacuum gauge did not acknowledge set point request mode (nothing received)\n");
445  return 0;
446  }
447  ret = read(vacuum, resp, 3);
448  if (ret < 0) {
449  err = errno;
450  printf("Vacuum gauge did not acknowledge set point request mode (errno %d)\n", err);
451  return 0;
452  } else if (resp[0] != ACK) {
453  printf("Vacuum gauge did not acknowledge set point request mode (something other than ACK received)\n");
454  return 0;
455  }
456  // Request set points
457  ret = write(vacuum, &ENQ, sizeof(ENQ));
458  if (ret < 0){
459  err = errno;
460  printf("Error writing to vacuum gauge to request status of set points (errno %d)\n", err);
461  return 0;
462  }
463  FD_ZERO(&vac_ready);
464  FD_SET(vacuum, &vac_ready);
465  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
466  if(!FD_ISSET(vacuum, &vac_ready)) {
467  printf("Vacuum gauge did not send status of set points.\n");
468  return 0;
469  }
470  ret = read(vacuum, resp, 25);
471  if (ret < 0) {
472  err = errno;
473  printf("Error reading status of set points from vacuum gaige (errno %d)\n", err);
474  return 0;
475  } else if (ret != 9) {
476  printf("Received incorrect response size (expected 25, received %d)\n", ret);
477  return 0;
478  }
479  if (resp[0] != '2') {
480  printf("Received incorrect set point value (expect 2, received %c)\n", resp[0]);
481  return 0;
482  }
483  for (i = 0; i < 10; i++) {
484  sp2l_str[i] = resp[i + 2];
485  sp2h_str[i] = resp[i + 13];
486  }
487 
488  /*** Get pressure and status of gauge ***/
489  // Set mode
490  ret = write(vacuum, INQ_MODE, sizeof(INQ_MODE)-1);
491  if (ret < 0) {
492  err = errno;
493  printf("Error writing to vacuum gauge to set inquire mode (errno %d)\n", err);
494  return 0;
495  }
496  FD_ZERO(&vac_ready);
497  FD_SET(vacuum, &vac_ready);
498  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
499  if(!FD_ISSET(vacuum, &vac_ready)) {
500  printf("Vacuum gauge did not acknowledge measurement request mode (nothing received)\n");
501  return 0;
502  }
503  ret = read(vacuum, resp, 3);
504  if (ret < 0) {
505  err = errno;
506  printf("Vacuum gauge did not acknowledge measurement request mode (errno %d)\n", errno);
507  return 0;
508  } else if (resp[0] != ACK) {
509  err = errno;
510  printf("Vacuum gauge did not acknowledge measurement request mode (something other than ACK received)\n");
511  return 0;
512  }
513  // Request pressure
514  ret = write(vacuum, &ENQ, sizeof(ENQ));
515  if (ret < 0) {
516  printf("Cannot write to vacuum gauge to request measurement (errno %d)", errno);
517  return 0;
518  }
519  FD_ZERO(&vac_ready);
520  FD_SET(vacuum, &vac_ready);
521  select(FD_SETSIZE, &vac_ready, NULL, NULL, &vac_timeout);
522  if(!FD_ISSET(vacuum, &vac_ready)) {
523  printf("Nothing to be read from vacuum gauge");
524  return 0;
525  }
526  ret = read(vacuum, resp, 15);
527  if (ret < 0) {
528  printf("Cannot read from vacuum gauge to get requested reading (errno %d)", errno);
529  return 0;
530  } else if (ret != 15) {
531  printf("Received incorrect size response (expected 15, received %d)", ret);
532  return 0;
533  }
534  status_str[0] = resp[0];
535  for (i = 0; i < 10; i++) {
536  pres_str[i] = resp[i + 4];
537  }
538 
539  // Record in banks
540  bk_init(pevent);
541  bk_create(pevent, "PRS0", TID_INT, &status);
542  *status++ = atoi(status_str); stat = *status;
543  bk_close(pevent, status);
544  bk_create(pevent, "PRM0", TID_FLOAT, &pres);
545  *pres++ = atof(pres_str);
546  bk_close(pevent, pres);
547  bk_create(pevent, "SP1S", TID_BOOL, &sp1);
548  *sp1++ = atoi(sp1_str);
549  bk_close(pevent, sp1);
550  bk_create(pevent, "SP2S", TID_BOOL, &sp2);
551  *sp2 = atoi(sp2_str);
552  bk_close(pevent, sp2);
553  bk_create(pevent, "SP1L", TID_FLOAT, &sp1l);
554  *sp1l = atof(sp1l_str);
555  bk_close(pevent, sp1l);
556  bk_create(pevent, "SP1H", TID_FLOAT, &sp1h);
557  *sp1h = atof(sp1h_str);
558  bk_close(pevent, sp1h);
559  bk_create(pevent, "SP2L", TID_FLOAT, &sp2l);
560  *sp2l = atof(sp2l_str);
561  bk_close(pevent, sp2l);
562  bk_create(pevent, "SP2H", TID_FLOAT, &sp2h);
563  *sp2h = atof(sp2h_str);
564  bk_close(pevent, sp2h);
565 
566  // Report on bad status
567 
568  switch (stat) {
569  case 0: break;
570  case 1: printf("Vacuum gauge under range.\n"); break;
571  case 2: printf("Vacuum gauge over range.\n"); break;
572  case 3: printf("Vacuum gauge error.\n"); break;
573  case 4: printf("Vacuum gauge off.\n"); break;
574  case 5: printf("Vacuum gauge not attached.\n"); break;
575  case 6: printf("Vacuum gauge unidentifiable.\n"); break;
576  default: printf("Vacuum gauge unknown status (status %d)\n", *status); break;
577  }
578 
579  // Had a succesful read.
580  missed_reads = 0;
581 
582  return bk_size(pevent);
583 }

Variable Documentation

const char ACK = '\x06'
static

Definition at line 58 of file frontend.c.

Referenced by frontend_init(), and vacuum_gauge_read().

const char CONT_MODE[] = "COM,1\r\n"
static

Definition at line 66 of file frontend.c.

const char CR = '\r'
static

Definition at line 63 of file frontend.c.

INT crate_number =10

Definition at line 17 of file frontend.c.

INT display_period = 1000

Definition at line 36 of file frontend.c.

const char ENQ = '\x05'
static

Definition at line 60 of file frontend.c.

Referenced by vacuum_gauge_read().

const char EOM[] = "\n\r"
static

Definition at line 64 of file frontend.c.

EQUIPMENT equipment[]
Initial value:
= {
{"VacuumMonitor",
{ 24, 0,
"SYSTEM",
EQ_PERIODIC,
0,
"MIDAS",
TRUE,
RO_ALWAYS | RO_ODB,
10000,
0,
0,
0,
"", "", "", },
NULL, NULL,
},
{""}
}

Definition at line 88 of file frontend.c.

const char ETX = '\x03'
static

Definition at line 61 of file frontend.c.

INT event_buffer_size = 10 * 10000

Definition at line 45 of file frontend.c.

BOOL frontend_call_loop = TRUE

Definition at line 33 of file frontend.c.

char* frontend_file_name = __FILE__

Definition at line 30 of file frontend.c.

char* frontend_name = "VacuumMonitor"

Definition at line 28 of file frontend.c.

HNDLE hDB

Definition at line 19 of file frontend.c.

HNDLE hKey

Definition at line 20 of file frontend.c.

const char INQ_MODE[] = "PR1\r\n"
static

Definition at line 65 of file frontend.c.

Referenced by frontend_init(), and vacuum_gauge_read().

const char LF = '\n'
static

Definition at line 62 of file frontend.c.

INT max_event_size = 10000

Definition at line 39 of file frontend.c.

INT max_event_size_frag = 5 * 1024 * 1024

Definition at line 42 of file frontend.c.

int missed_reads
static

Definition at line 55 of file frontend.c.

Referenced by frontend_init(), and vacuum_gauge_read().

const char NAK = '\x15'
static

Definition at line 59 of file frontend.c.

const char NUL = '\x00'
static

Definition at line 57 of file frontend.c.

Referenced by vacuum_gauge_read().

char resp[256]
static

Definition at line 54 of file frontend.c.

Referenced by frontend_init(), and vacuum_gauge_read().

const resp_size = 256
static

Definition at line 53 of file frontend.c.

const char SETPNT_1[] = "SP1\r\n"
static

Definition at line 68 of file frontend.c.

Referenced by vacuum_gauge_read().

const char SETPNT_2[] = "SP2\r\n"
static

Definition at line 69 of file frontend.c.

Referenced by vacuum_gauge_read().

const char SETPNT_STAT[] = "SPS\r\n"
static

Definition at line 67 of file frontend.c.

Referenced by vacuum_gauge_read().

int size

Definition at line 21 of file frontend.c.

fd_set vac_ready
static

Definition at line 51 of file frontend.c.

Referenced by frontend_init(), and vacuum_gauge_read().

struct timeval vac_timeout
static

Definition at line 50 of file frontend.c.

Referenced by frontend_init(), and vacuum_gauge_read().

int vacuum
static

Definition at line 48 of file frontend.c.

Referenced by frontend_init(), and vacuum_gauge_read().

BANK_LIST vacuum_bank_list[]
Initial value:
= {
{ "PRS0", TID_INT, 1, NULL },
{ "PRM0", TID_FLOAT, 1, NULL },
{ "SP1S", TID_BOOL, 1, NULL },
{ "SP2S", TID_BOOL, 1, NULL },
{ "SP1L", TID_FLOAT, 1, NULL },
{ "SP1H", TID_FLOAT, 1, NULL },
{ "SP2L", TID_FLOAT, 1, NULL },
{ "SP2H", TID_FLOAT, 1, NULL },
{ "" },
}

Definition at line 74 of file frontend.c.

struct termios vacuum_config
static

Definition at line 49 of file frontend.c.

Referenced by frontend_init().

const char vacuum_port[] = "/dev/ttyS0"
static

Definition at line 52 of file frontend.c.

Referenced by frontend_init().