user_settings.h 3.38 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/***********************************************************************************************
* MODULE:     user_settings.h
* PURPOSE:    user settng definitions
* WRITTEN BY: NDA
* COPYRIGHT:  CAEN S.p.A. all rights reserved
* USAGE:      compiled with gcc ?!?!
************************************************************************************************/
#ifndef __USER_SETTINGS_DEF_H
#define __USER_SETTINGS_DEF_H

////////////////////////////////////////////
// File includes
////////////////////////////////////////////
#include "common_defs.h"
#include "./include/N957oslib.h"
#include "./include/N957types.h"

////////////////////////////////////////////
// Global defines
////////////////////////////////////////////

#define MAX_FILENAME_LENGHT					255							/* maximum filename length */

typedef struct
{
	char* m_log_filename;					// output filename
	char* m_config_filename;				// Configuration filename
	char* m_gnu_plot_path;					// gnuplot path
	long m_max_num_samples;					// The maximum number of samples to acquire
	N957_UINT16 m_bldim;					// block dimension: maximum number of samples per call to retrive
31
	BOOL m_debug;						// debugging features enabled
32
33
34
35
36
	N957ControlModes m_mode;				// acqusition mode
	int32_t m_N957_handle;					// Board handle
	int m_bd_num;							// N957 board number
	N957_BYTE m_lld;						// LLD Threshold
	BOOL m_log_to_file;						// Write Data to output file
37
38
//	int m_gnu_plot_refresh;					// Gnu Plot refresh rate (msec)
//	float m_gnu_plot_x_scale;				// Gnu Plot X convertsion factor
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
} user_setting_data;
////////////////////////////////////////////
// Global variables declaration
////////////////////////////////////////////

////////////////////////////////////////////
// Global methods declaration
////////////////////////////////////////////


/***********************************************************************************************
* METHOD:     user_settings_open
* PURPOSE:    init user setting module
* PARAMETERS: <in> user_setting_data* p_data: data buffer pointer
* RETURN:     TRUE: module init ok
* USAGE:      call before any other methods
************************************************************************************************/
BOOL user_settings_open( user_setting_data* p_data);
/***********************************************************************************************
* METHOD:     user_settings_close
* PURPOSE:    closes user setting module (frees allocated resources)
* PARAMETERS: <in> user_setting_data* p_data: data buffer pointer
* RETURN:     TRUE: module init ok
* USAGE:      call before any other methods
************************************************************************************************/
BOOL user_settings_close( user_setting_data* p_data);
/***********************************************************************************************
* METHOD:     user_parse_input_param
* PURPOSE:    scan user input parameters
* PARAMETERS: <in> user_setting_data* p_data: data buffer pointer
*             <in> int argc: number of input parameters
*             <in> char* argv[]: string parameters list
* RETURN:     TRUE: input parameter parsing ok
* USAGE:      
************************************************************************************************/
BOOL user_settings_parse_input_param( user_setting_data* p_data, int argc, char* argv[]);






#endif