Initial
r1113 | dcl | 2006-09-12 15:00:46 +1000 (Tue, 12 Sep 2006) | 2 lines
This commit is contained in:
48
site_ansto/hardsup/Digital/params.h
Normal file
48
site_ansto/hardsup/Digital/params.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user