forked from teledyne-e2v/ModuleControl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleControl.hpp
More file actions
111 lines (95 loc) · 1.82 KB
/
ModuleControl.hpp
File metadata and controls
111 lines (95 loc) · 1.82 KB
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
31
32
33
34
35
36
37
38
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <math.h>
class ModuleCtrl
{
private:
/**
* @brief
* Device node
*
*/
int fd;
public:
/**
* @brief
* Initialise IC2 connection
*/
void ModuleControlInit();
~ModuleCtrl();
/**
* @brief
* Close IC2 connection
*
*/
void ModuleControlClose();
/**
* @brief write specified value in the specified register
*
* @param register address
* @param value to write
* @return int
*/
int writeReg(int regAddr, int value);
/**
* @brief
* Read specified register
*
* @param register address
* @param pointer to store the read value
* @return int
*/
int readReg(int regAddr, int *value);
/**
* @brief Read the state of the sensor
*
* @return int The sensor state value
*/
int read_sensor_state(int *state);
/**
* @brief Set the exposition time
*
* @param tint in milisecond
* @return int
*/
int setTint(float tint);
/**
* @brief Set the Analog Gain
*
* @param again
* @return int
*/
int setAnalogGain(float again);
/**
* @brief Set the Digital Gain
*
* @param dgain
* @return int
*/
int setDigitalGain(float dgain);
/**
* @brief Set the Gain
*
* @param gain
* @return int
*/
int setGain(float gain);
/**
* @brief Set the period time for frame rate control
*
* @param tperiod in milisecond
* @return int
*/
int setFramePeriod(float tperiod);
};
struct solution
{
int tintLL;
int tintCK;
};