Files
sics/site_ansto/hardsup/Monitor/params.h
Douglas Clowes 99ebb2e910 Add output line drive and partial hardware sync
r1112 | dcl | 2006-09-07 16:48:08 +1000 (Thu, 07 Sep 2006) | 2 lines
2012-11-15 12:47:16 +11:00

49 lines
1.5 KiB
C

#ifndef _PARAM_H_
#define _PARAM_H_
#include "utility.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/**
* Counter Control Parameters
*/
typedef struct parameter_t
{
/** direction of counting for the logical counter */
enum { COUNT_UP = 0, COUNT_DOWN } direction;
/** counter read period in milliseconds */
int poll_period;
/** sample period in number of reads per sample */
int sample_period;
/** report period in number of samples per report */
int report_period;
/** value of the logical counter on START, normally zero */
uint64 initial_count;
/** value for terminal count exception if enabled */
uint64 terminal_count;
/** low limit for acceptable range or zero */
double range_low;
/** high limit for acceptable range or zero */
double range_high;
/** type = 0:none, 1:count, 2:time */
int terminal_check_type;
/** true if range exception enabled */
bool range_check_enable;
/** true if range gating enabled */
bool range_gate_enable;
/** mode = 0:report, 1:sample, 2:poll */
int range_mode;
/** output = 0:disabled, 1:enabled, 2:inverted */
int output_line;
/** hardware_sync false:internal, true:external */
bool sync;
} PARAMETERS, *pPARAMETERS;
bool param_set(pPARAMETERS pp, char* name, char* value);
bool param_set_cmd(pPARAMETERS pp, char* cmd);
bool param_get_cmd(pPARAMETERS pp, char* cmd, int n);
#endif