openETCS
case study for the European Train Control System developed for the authors dissertation
DF/Configuration.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010-2012
3  Johannes Feuser <feuser@uni-bremen.de>
4  This file is part of the openETCS library.
5 
6  The openETCS library is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  any later version.
10 
11  The openETCS library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with the openETCS library. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 /*!
21  * \author Johannes Feuser <feuser@uni-bremen.de>
22  * \brief provides general data types, types defines and variables
23  */
24 
25 #ifndef __OETCS_DF_CONFIGURATION_H__
26 #define __OETCS_DF_CONFIGURATION_H__
27 
28 
29 #include <chrono>
30 
31 #include <vector>
32 
33 
34 
35 
36 
37 namespace oETCS {
38 
39 namespace DF {
40 
41 
42 /*!
43  * \brief global sample time used for data flow execution in micro seconds
44  */
45 #define __DATA_FLOW_SAMPLE_TIME__ 500000
46 
47 
48 
49 
50 
51 
52 /*!
53  * \brief types of of data flow
54  */
55 enum DATA_T
56 {
57  /*!
58  * \brief boolean DMI type
59  */
60  BOOL = 0,
61 
62  /*!
63  * \brief double DMI type
64  */
65  DOUBLE = 1,
66 
67  /*!
68  * \brief double array DMI type
69  */
71 
72  /*!
73  * \brief integer DMI type
74  */
75  INT = 3,
76 
77  /*!
78  * \brief integer DMI type
79  */
80  STRING = 4
81 
82 
83 }; // enum DATA_T
84 
85 /*!
86  * \brief typedef for the a data type holding one byte
87  */
88 typedef unsigned char BYTE_T;
89 
90 
91 /*!
92  * \brief typedef for the data type holding the value in a ETCS variable
93  */
94 typedef bool VARIABLE_VALUE_T;
95 
96 
97 /*!
98  * \brief typedef for the data type holding the value vector in a ETCS variable
99  */
100 typedef ::std::vector< bool > VARIABLE_VALUE_VECTOR_T;
101 
102 
103 /*!
104  * \brief typedef for a time point
105  */
106 typedef ::std::chrono::time_point< ::std::chrono::system_clock, ::std::chrono::duration< long long, ::std::chrono::system_clock::duration::period > > TIME_POINT_T;
107 
108 
109 
110 
111 } // namespace oETCS::DF
112 
113 } // namespace oETCS
114 
115 #endif // __ OETCS_DF_CONFIGURATION_H__

Copyright (C) 2010-2012 Johannes Feuser (feuser@uni-bremen.de)
The openETCS library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
The openETCS library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the openETCS library. If not, see "http://www.gnu.org/licenses/.