IoT-MBBR (masterthesis)
Masterthesis upgrading a Moving Bed BioReactor with extra sensors and cloud connectivity.
datatypes.h
Go to the documentation of this file.
1
/***************************************************************************/
/**
2
* @file datatypes.h
3
* @brief Definitions of the custom data-types used.
4
* @version 1.0
5
* @author Brecht Van Eeckhoudt
6
*
7
* ******************************************************************************
8
*
9
* @section Versions
10
*
11
* @li v1.0: Initial version
12
*
13
* ******************************************************************************
14
*
15
* @section License
16
*
17
* **Copyright (C) 2020 - Brecht Van Eeckhoudt**
18
*
19
* This program is free software: you can redistribute it and/or modify
20
* it under the terms of the **GNU General Public License** as published by
21
* the Free Software Foundation, either **version 3** of the License, or
22
* (at your option) any later version.
23
*
24
* This program is distributed in the hope that it will be useful,
25
* but WITHOUT ANY WARRANTY; without even the implied warranty of
26
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
* GNU General Public License for more details.
28
*
29
* *A copy of the GNU General Public License can be found in the `LICENSE`
30
* file along with this source code.*
31
*
32
* @n
33
*
34
* Some methods use code obtained from examples from [Silicon Labs' GitHub](https://github.com/SiliconLabs/peripheral_examples).
35
* These sections are licensed under the Silabs License Agreement. See the file
36
* "Silabs_License_Agreement.txt" for details. Before using this software for
37
* any purpose, you must agree to the terms of that agreement.
38
*
39
******************************************************************************/
40
41
42
/* Include guards prevent multiple inclusions of the same header */
43
#ifndef _DATATYPES_H_
44
#define _DATATYPES_H_
45
46
47
/* Include necessary for this header file */
48
#include <stdint.h>
/* (u)intXX_t */
49
50
51
/** Enum type for the state machine */
52
typedef
enum
mcu_states
53
{
54
INIT
,
55
MEASURE
,
56
SEND_DATA
,
57
SEND_STATUS
,
58
SLEEP
,
59
WAKEUP
60
}
MCU_State_t
;
61
62
63
/** Struct type to store the gathered data */
64
typedef
struct
65
{
66
int32_t
t1
;
/* Temperature 1 */
67
int32_t
t2
;
/* Temperature 2 */
68
uint32_t
p
;
/* pH */
69
uint32_t
n1
;
/* Nitrate concentration 1 */
70
uint32_t
n2
;
/* Nitrate concentration 2 */
71
uint32_t
r
;
/* Redox potential */
72
uint16_t
c
;
/* Measured height in carbon source container */
73
}
MeasurementData_t
;
74
75
76
#endif
/* _DATATYPES_H_ */
MeasurementData_t::t1
int32_t t1
Definition:
datatypes.h:66
MeasurementData_t::n1
uint32_t n1
Definition:
datatypes.h:69
SLEEP
Definition:
datatypes.h:58
SEND_STATUS
Definition:
datatypes.h:57
MeasurementData_t::c
uint16_t c
Definition:
datatypes.h:72
MeasurementData_t::t2
int32_t t2
Definition:
datatypes.h:67
MEASURE
Definition:
datatypes.h:55
mcu_states
mcu_states
Definition:
datatypes.h:52
MeasurementData_t::n2
uint32_t n2
Definition:
datatypes.h:70
SEND_DATA
Definition:
datatypes.h:56
int32_t
int int32_t
Typedef defining 32 bit int type. The developer should modify this to suit the platform being deploye...
Definition:
vl53l1_types.h:83
MeasurementData_t::p
uint32_t p
Definition:
datatypes.h:68
MeasurementData_t
Definition:
datatypes.h:64
WAKEUP
Definition:
datatypes.h:59
MCU_State_t
enum mcu_states MCU_State_t
INIT
Definition:
datatypes.h:54
MeasurementData_t::r
uint32_t r
Definition:
datatypes.h:71
uint16_t
unsigned short uint16_t
Typedef defining 16 bit unsigned short type. The developer should modify this to suit the platform be...
Definition:
vl53l1_types.h:88
uint32_t
unsigned int uint32_t
Typedef defining 32 bit unsigned int type. The developer should modify this to suit the platform bein...
Definition:
vl53l1_types.h:78
firmware
EFM32HG222F64_iot-mbbr
inc
datatypes.h
Generated on Thu Sep 3 2020 04:44:25 for IoT-MBBR (masterthesis) by
1.8.13