openETCS
case study for the European Train Control System developed for the authors dissertation
FunctionBlocks.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 all local function block classes
23  */
24 
25 #ifndef __OETCS_DF_FUNCTIONBLOCKS_H__
26 #define __OETCS_DF_FUNCTIONBLOCKS_H__
27 
28 
29 
30 
31 #include "Error/ExceptionTypes.h"
32 #include "EVCStateMachine.h"
33 #include <vector>
34 #include "Configuration.h"
35 #include <string>
36 
37 
38 
39 
40 namespace oETCS { namespace DF { class CEVCStateMachine; } }
41 namespace oETCS { namespace DF { class CBaliseDeviceIn; } }
42 namespace oETCS { namespace DF { class CBaliseDeviceOut; } }
43 
44 
45 namespace oETCS {
46 
47 namespace DF {
48 
49 
50 /*!
51  * \brief function block class for computing a boolean and
52  */
54 {
55  public:
56  /*!
57  * \brief general constructor
58  *
59  * \param[in] pStateMachine pointer to the parent EVC state machine object
60  */
61  explicit CAnd(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
62 
63 
64 
65  /*!
66  * \brief destructor
67  */
68  virtual ~CAnd() throw();
69 
70 
71 
72  /*!
73  * \brief method for computing all outputs
74  */
75  virtual void Calculate() throw(::oETCS::DF::Error::CException);
76 
77 
78 
79  /*!
80  * \brief storage for the first input
81  */
83 
84 
85 
86  /*!
87  * \brief storage for the second input
88  */
90 
91 
92 
93  /*!
94  * \brief pointers to storage of boolean result of calculation
95  */
96  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Result;
97 
98 
99 
100 
101 }; // class CAnd : public oETCS::DF::CFunctionBlock
102 
103 
104 
105 /*!
106  * \brief function block class for computing a boolean or
107  */
109 {
110  public:
111  /*!
112  * \brief general/default constructor
113  *
114  * \param[in] pStateMachine pointer to the parent EVC state machine object
115  */
116  explicit COr(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
117 
118 
119 
120  /*!
121  * \brief destructor
122  */
123  virtual ~COr() throw();
124 
125 
126 
127  /*!
128  * \brief method for computing all outputs
129  */
130  virtual void Calculate() throw(::oETCS::DF::Error::CException);
131 
132 
133 
134  /*!
135  * \brief storage for the first input
136  */
138 
139 
140 
141  /*!
142  * \brief storage for the second input
143  */
145 
146 
147 
148  /*!
149  * \brief pointers to storage of boolean result of calculation
150  */
151  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Result;
152 
153 
154 
155 
156 }; // class COr : public oETCS::DF::CFunctionBlock
157 
158 
159 
160 /*!
161  * \brief function block class for computing a double division
162  */
164 {
165  public:
166  /*!
167  * \brief default constructor
168  *
169  * \param[in] pStateMachine pointer to the parent EVC state machine object
170  */
171  explicit CDivision(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
172 
173 
174 
175  /*!
176  * \brief destructor
177  */
178  virtual ~CDivision() throw();
179 
180 
181 
182  /*!
183  * \brief method for computing all outputs
184  */
185  virtual void Calculate() throw(::oETCS::DF::Error::CException);
186 
187 
188 
189  /*!
190  * \brief storage of the dividend
191  */
193 
194 
195 
196  /*!
197  * \brief storage of the divisor
198  */
200 
201 
202 
203  /*!
204  * \brief pointers to the storage of the quotient
205  */
206  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_Quotient;
207 
208 
209 
210 
211 }; // class CDivision : public oETCS::DF::CFunctionBlock
212 
213 
214 
215 /*!
216  * \brief function block class for computing a double equal
217  */
219 {
220  public:
221  /*!
222  * \brief default/general constructor
223  *
224  * \param[in] pStateMachine pointer to the parent EVC state machine object
225  */
226  explicit CDoubleEqual(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
227 
228 
229 
230  /*!
231  * \brief destructor
232  */
233  virtual ~CDoubleEqual() throw();
234 
235 
236 
237  /*!
238  * \brief method for computing all outputs
239  */
240  virtual void Calculate() throw(::oETCS::DF::Error::CException);
241 
242 
243 
244  /*!
245  * \brief storage of the first input
246  */
248 
249 
250 
251  /*!
252  * \brief storage of the second input
253  */
255 
256 
257 
258  /*!
259  * \brief pointers to storage of the result
260  */
261  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Equal;
262 
263 
264 
265 
266 }; // class CDoubleEqual : public oETCS::DF::CFunctionBlock
267 
268 
269 
270 /*!
271  * \brief function block class for computing a double multiplication
272  */
274 {
275  public:
276  /*!
277  * \brief default constructor
278  *
279  * \param[in] pStateMachine pointer to the parent EVC state machine object
280  */
281  CMultiplication(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
282 
283 
284 
285  /*!
286  * \brief destructor
287  */
288  virtual ~CMultiplication() throw();
289 
290 
291 
292  /*!
293  * \brief method for computing all outputs
294  */
295  virtual void Calculate() throw(::oETCS::DF::Error::CException);
296 
297 
298 
299  /*!
300  * \brief storage of the first multiplicator
301  */
303 
304 
305 
306  /*!
307  * \brief storage of the second multiplicator
308  */
310 
311 
312 
313  /*!
314  * \brief storage of the third multiplicator
315  */
317 
318 
319 
320  /*!
321  * \brief pointer to storage of the product
322  */
323  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_Product;
324 
325 
326 
327 
328 }; // class CMultiplication : public oETCS::DF::CFunctionBlock
329 
330 
331 
332 /*!
333  * \brief function block class for computing a boolean negation
334  */
336 {
337  public:
338  /*!
339  * \brief general constructor
340  *
341  * \param[in] pStateMachine pointer to the parent EVC state machine object
342  */
343  explicit CNot(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
344 
345 
346 
347  /*!
348  * \brief destructor
349  */
350  virtual ~CNot() throw();
351 
352 
353 
354  /*!
355  * \brief method for computing all outputs
356  */
357  virtual void Calculate() throw(::oETCS::DF::Error::CException);
358 
359 
360 
361  /*!
362  * \brief storage for theinput
363  */
365 
366 
367 
368  /*!
369  * \brief pointers to storage of boolean result of calculation
370  */
371  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Result;
372 
373 
374 
375 
376 }; // class CNot : public oETCS::DF::CFunctionBlock
377 
378 
379 
380 /*!
381  * \brief function block class for computing a double substraction
382  */
384 {
385  public:
386  /*!
387  * \brief general constructor
388  *
389  * \param[in] pStateMachine pointer to the parent EVC state machine object
390  */
391  explicit CSubstraction(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
392 
393 
394 
395  /*!
396  * \brief destructor
397  */
398  virtual ~CSubstraction() throw();
399 
400 
401 
402  /*!
403  * \brief method for computing all outputs
404  */
405  virtual void Calculate() throw(::oETCS::DF::Error::CException);
406 
407 
408 
409  /*!
410  * \brief storage of the minuend
411  */
413 
414 
415 
416  /*!
417  * \brief storage of the subtrahend
418  */
420 
421 
422 
423  /*!
424  * \brief vector with pointers to the storages of the difference
425  */
426  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_Difference;
427 
428 
429 
430 
431 }; // class CSubstraction : public oETCS::DF::CFunctionBlock
432 
433 
434 
435 /*!
436  * \brief function block class for computing a double sum
437  */
439 {
440  public:
441  /*!
442  * \brief general constructor
443  *
444  * \param[in] pStateMachine pointer to the parent EVC state machine object
445  */
446  CSum(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
447 
448 
449 
450  /*!
451  * \brief destructor
452  */
453  virtual ~CSum() throw();
454 
455 
456 
457  /*!
458  * \brief method for computing all outputs
459  */
460  virtual void Calculate() throw(::oETCS::DF::Error::CException);
461 
462 
463 
464  /*!
465  * \brief storage of the first addend
466  */
468 
469 
470 
471  /*!
472  * \brief storage of the second addend
473  */
475 
476 
477 
478  /*!
479  * \brief storage of the third addend
480  */
482 
483 
484 
485  /*!
486  * \brief pointers to storage of the sum
487  */
488  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_Sum;
489 
490 
491 
492 
493 }; // class CSum : public oETCS::DF::CFunctionBlock
494 
495 
496 
497 /*!
498  * \brief function block class for computing a boolean exclusive or
499  */
501 {
502  public:
503  /*!
504  * \brief general constructor
505  *
506  * \param[in] pStateMachine pointer to the parent EVC state machine object
507  */
508  explicit CXor(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
509 
510 
511 
512  /*!
513  * \brief destructor
514  */
515  virtual ~CXor() throw();
516 
517 
518 
519  /*!
520  * \brief method for computing all outputs
521  */
522  virtual void Calculate() throw(::oETCS::DF::Error::CException);
523 
524 
525 
526  /*!
527  * \brief storage for the first input
528  */
530 
531 
532 
533  /*!
534  * \brief storage for the second input
535  */
537 
538 
539 
540  /*!
541  * \brief pointers to storage of boolean result of calculation
542  */
543  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Result;
544 
545 
546 
547 
548 }; // class CXor : public oETCS::DF::CFunctionBlock
549 
550 
551 
552 /*!
553  * \brief function block class for accessing a element of a double array
554  */
556 {
557  public:
558  /*!
559  * \brief default/genral constructor
560  *
561  * \param[in] pStateMachine pointer to the parent EVC state machine object
562  */
563  explicit CDoubleArrayAccessor(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
564 
565 
566 
567  /*!
568  * \brief destructor
569  */
570  virtual ~CDoubleArrayAccessor() throw();
571 
572 
573 
574  /*!
575  * \brief method for computing all outputs
576  */
577  virtual void Calculate() throw(::oETCS::DF::Error::CException);
578 
579 
580 
581  /*!
582  * \brief storage of the double array
583  */
585 
586 
587 
588  /*!
589  * \brief storage of the index
590  */
592 
593 
594 
595  /*!
596  * \brief storage of the indexed value
597  */
598  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_Value;
599 
600 
601 
602 
603 }; // class CDoubleArrayAccessor : public oETCS::DF::CFunctionBlock
604 
605 
606 
607 /*!
608  * \brief function block class for computing a double equal or greater
609  */
611 {
612  public:
613  /*!
614  * \brief general constructor
615  *
616  * \param[in] pStateMachine pointer to the parent EVC state machine object
617  */
618  explicit CDoubleEqualOrGreater(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
619 
620 
621 
622  /*!
623  * \brief destructor
624  */
625  virtual ~CDoubleEqualOrGreater() throw();
626 
627 
628 
629  /*!
630  * \brief method for computing all outputs
631  */
632  virtual void Calculate() throw(::oETCS::DF::Error::CException);
633 
634 
635 
636  /*!
637  * \brief storage of the first input
638  */
640 
641 
642 
643  /*!
644  * \brief storage of the second input
645  */
647 
648 
649 
650  /*!
651  * \brief pointers to storage of the result
652  */
653  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_EqualOrGreater;
654 
655 
656 
657 
658 }; // class CDoubleEqualOrGreater : public oETCS::DF::CFunctionBlock
659 
660 
661 
662 /*!
663  * \brief function block class for computing a double greater
664  */
666 {
667  public:
668  /*!
669  * \brief default/general constructor
670  *
671  * \param[in] pStateMachine pointer to the parent EVC state machine object
672  */
673  explicit CDoubleGreater(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
674 
675 
676 
677  /*!
678  * \brief destructor
679  */
680  virtual ~CDoubleGreater() throw();
681 
682 
683 
684  /*!
685  * \brief method for computing all outputs
686  */
687  virtual void Calculate() throw(::oETCS::DF::Error::CException);
688 
689 
690 
691  /*!
692  * \brief storage of the first input
693  */
695 
696 
697 
698  /*!
699  * \brief storage of the second input
700  */
702 
703 
704 
705  /*!
706  * \brief pointers to storage of the result
707  */
708  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Greater;
709 
710 
711 
712 
713 }; // class CDoubleGreater : public oETCS::DF::CFunctionBlock
714 
715 
716 
717 /*!
718  * \brief function block class for computing an integer greater
719  */
721 {
722  public:
723  /*!
724  * \brief general constructor
725  *
726  * \param[in] pStateMachine pointer to the parent EVC state machine object
727  */
728  explicit CIntGreater(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
729 
730 
731 
732  /*!
733  * \brief destructor
734  */
735  virtual ~CIntGreater() throw();
736 
737 
738 
739  /*!
740  * \brief method for computing all outputs
741  */
742  virtual void Calculate() throw(::oETCS::DF::Error::CException);
743 
744 
745 
746  /*!
747  * \brief storage of the first input
748  */
750 
751 
752 
753  /*!
754  * \brief storage of the second input
755  */
757 
758 
759 
760  /*!
761  * \brief pointers to storage of the result
762  */
763  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Greater;
764 
765 
766 
767 
768 }; // class CIntGreater : public oETCS::DF::CFunctionBlock
769 
770 
771 
772 /*!
773  * \brief function block class for computing a string equal
774  */
776 {
777  public:
778  /*!
779  * \brief general constructor
780  *
781  * \param[in] pStateMachine pointer to the parent EVC state machine object
782  */
783  explicit CStringEqual(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
784 
785 
786 
787  /*!
788  * \brief destructor
789  */
790  virtual ~CStringEqual() throw();
791 
792 
793 
794  /*!
795  * \brief method for computing all outputs
796  */
797  virtual void Calculate() throw(::oETCS::DF::Error::CException);
798 
799 
800 
801  /*!
802  * \brief storage of the first input
803  */
805 
806 
807 
808  /*!
809  * \brief storage of the second input
810  */
812 
813 
814 
815  /*!
816  * \brief pointers to storage of the result
817  */
818  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Equal;
819 
820 
821 
822 
823 }; // class CStringEqual : public oETCS::DF::CFunctionBlock
824 
825 
826 
827 /*!
828  * \brief function block class for providing a boolean gate
829  */
831 {
832  public:
833  /*!
834  * \brief default/general constructor
835  *
836  * \param[in] pStateMachine pointer to the parent EVC state machine object
837  */
838  explicit CBoolGate(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
839 
840 
841 
842  /*!
843  * \brief destructor
844  */
845  virtual ~CBoolGate() throw();
846 
847 
848 
849  /*!
850  * \brief method for computing all outputs
851  */
852  virtual void Calculate() throw(::oETCS::DF::Error::CException);
853 
854 
855 
856  /*!
857  * \brief storage for the input
858  */
860 
861 
862 
863  /*!
864  * \brief storage for the open flag
865  */
867 
868 
869 
870  /*!
871  * \brief pointers to boolean results of calculation
872  */
873  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_GateOutput;
874 
875 
876 
877 
878 }; // class CBoolGate : public oETCS::DF::CFunctionBlock
879 
880 
881 
882 /*!
883  * \brief function block class for providing a boolean switch
884  */
886 {
887  public:
888  /*!
889  * \brief general constructor
890  *
891  * \param[in] pStateMachine pointer to the parent EVC state machine object
892  */
893  explicit CBoolSwitch(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
894 
895 
896 
897  /*!
898  * \brief destructor
899  */
900  virtual ~CBoolSwitch() throw();
901 
902 
903 
904  /*!
905  * \brief method for computing all outputs
906  */
907  virtual void Calculate() throw(::oETCS::DF::Error::CException);
908 
909 
910 
911  /*!
912  * \brief storage for the first input
913  */
915 
916 
917 
918  /*!
919  * \brief storage for the second input
920  */
922 
923 
924 
925  /*!
926  * \brief storage for the usage flag for the first input
927  */
929 
930 
931 
932  /*!
933  * \brief pointers to boolean results of calculation
934  */
935  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_SwitchOutput;
936 
937 
938 
939 
940 }; // class CBoolSwitch : public oETCS::DF::CFunctionBlock
941 
942 
943 
944 /*!
945  * \brief function block class for providing a double gate
946  */
948 {
949  public:
950  /*!
951  * \brief general constructor
952  *
953  * \param[in] pStateMachine pointer to the parent EVC state machine object
954  */
955  explicit CDoubleGate(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
956 
957 
958 
959  /*!
960  * \brief destructor
961  */
962  virtual ~CDoubleGate() throw();
963 
964 
965 
966  /*!
967  * \brief method for computing all outputs
968  */
969  virtual void Calculate() throw(::oETCS::DF::Error::CException);
970 
971 
972 
973  /*!
974  * \brief storage for the input
975  */
977 
978 
979 
980  /*!
981  * \brief storage for the open flag
982  */
984 
985 
986 
987  /*!
988  * \brief pointers to double results of calculation
989  */
990  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_GateOutput;
991 
992 
993 
994 
995 }; // class CDoubleGate : public oETCS::DF::CFunctionBlock
996 
997 
998 
999 /*!
1000  * \brief function block class for providing a double switch
1001  */
1003 {
1004  public:
1005  /*!
1006  * \brief general constructor
1007  *
1008  * \param[in] pStateMachine pointer to the parent EVC state machine object
1009  */
1010  explicit CDoubleSwitch(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
1011 
1012 
1013 
1014  /*!
1015  * \brief destructor
1016  */
1017  virtual ~CDoubleSwitch() throw();
1018 
1019 
1020 
1021  /*!
1022  * \brief method for computing all outputs
1023  */
1024  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1025 
1026 
1027 
1028  /*!
1029  * \brief storage for the first input
1030  */
1032 
1033 
1034 
1035  /*!
1036  * \brief storage for the second input
1037  */
1039 
1040 
1041 
1042  /*!
1043  * \brief storage for the usage flag for the first input
1044  */
1046 
1047 
1048 
1049  /*!
1050  * \brief pointers to boolean results of calculation
1051  */
1052  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_SwitchOutput;
1053 
1054 
1055 
1056 
1057 }; // class CDoubleSwitch : public oETCS::DF::CFunctionBlock
1058 
1059 
1060 
1061 /*!
1062  * \brief function block class for providing a string gate
1063  */
1065 {
1066  public:
1067  /*!
1068  * \brief default constructor
1069  *
1070  * \param[in] pStateMachine pointer to the parent EVC state machine object
1071  */
1072  explicit CStringGate(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
1073 
1074 
1075 
1076  /*!
1077  * \brief destructor
1078  */
1079  virtual ~CStringGate() throw();
1080 
1081 
1082 
1083  /*!
1084  * \brief method for computing all outputs
1085  */
1086  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1087 
1088 
1089 
1090  /*!
1091  * \brief storage for the input
1092  */
1094 
1095 
1096 
1097  /*!
1098  * \brief storage for the open flag
1099  */
1101 
1102 
1103 
1104  /*!
1105  * \brief pointers to string results of calculation
1106  */
1107  ::std::vector< oETCS::DF::STRING_OUTPUT_T > m_GateOutput;
1108 
1109 
1110 
1111 
1112 }; // class CStringGate : public oETCS::DF::CFunctionBlock
1113 
1114 
1115 
1116 /*!
1117  * \brief function block class for controling a brake curve to a certain target speed
1118  */
1120 {
1121  public:
1122  /*!
1123  * \brief default/general constructor
1124  *
1125  * \param[in] pStateMachine pointer to the parent EVC state machine object
1126  */
1127  CBrakingToTargetSpeed(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
1128 
1129 
1130 
1131  /*!
1132  * \brief destructor
1133  */
1134  virtual ~CBrakingToTargetSpeed() throw();
1135 
1136 
1137 
1138  /*!
1139  * \brief method for computing all outputs
1140  */
1141  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1142 
1143 
1144 
1145  /*!
1146  * \brief storage of the gradient distances
1147  */
1149 
1150 
1151 
1152  /*!
1153  * \brief storage of gradient values
1154  */
1156 
1157 
1158 
1159  /*!
1160  * \brief storage of the current absolute distance
1161  */
1163 
1164 
1165 
1166  /*!
1167  * \brief storage of the current absolute distance
1168  */
1170 
1171 
1172 
1173  /*!
1174  * \brief storage of the distance of the permitted velocity
1175  */
1177 
1178 
1179 
1180  /*!
1181  * \brief storage of the permitted velocity
1182  */
1184 
1185 
1186 
1187  /*!
1188  * \brief storage of the adhesion factor
1189  */
1191 
1192 
1193 
1194  /*!
1195  * \brief pointers to storage of the speed warning
1196  */
1197  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_SpeedWarning;
1198 
1199 
1200 
1201  /*!
1202  * \brief pointers to storage of the flag for applied service brake
1203  */
1204  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_ServiceBrakeApplied;
1205 
1206 
1207 
1208  /*!
1209  * \brief pointers storage of the flag for applied emegerncy brake
1210  */
1211  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_EmergencyBrakeApplied;
1212 
1213 
1214 
1215  /*!
1216  * \brief pointers to storage of emergency brake value
1217  */
1218  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_EmergencyBrakeValue;
1219 
1220 
1221 
1222  /*!
1223  * \brief pointers to storage of service brake value
1224  */
1225  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_ServiceBrakeValue;
1226 
1227 
1228 
1229 
1230 }; // class CBrakingToTargetSpeed : public oETCS::DF::CFunctionBlock
1231 
1232 
1233 
1234 /*!
1235  * \brief function block class for controling the speed in respect to a ceeling speed value
1236  */
1238 {
1239  public:
1240  /*!
1241  * \brief default/general constructor
1242  *
1243  * \param[in] pStateMachine pointer to the parent EVC state machine object
1244  */
1245  CCeelingSpeedControl(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
1246 
1247 
1248 
1249  /*!
1250  * \brief destructor
1251  */
1252  virtual ~CCeelingSpeedControl() throw();
1253 
1254 
1255 
1256  /*!
1257  * \brief method for computing all outputs
1258  */
1259  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1260 
1261 
1262 
1263  /*!
1264  * \brief storage of the gradient distances
1265  */
1267 
1268 
1269 
1270  /*!
1271  * \brief storage of gradient values
1272  */
1274 
1275 
1276 
1277  /*!
1278  * \brief storage of the current absolute distance
1279  */
1281 
1282 
1283 
1284  /*!
1285  * \brief storage of the current absolute distance
1286  */
1288 
1289 
1290 
1291  /*!
1292  * \brief storage of the permitted velocity
1293  */
1295 
1296 
1297 
1298  /*!
1299  * \brief storage of the adhesion factor
1300  */
1302 
1303 
1304 
1305  /*!
1306  * \brief pointers to storage of the speed warning
1307  */
1308  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_SpeedWarning;
1309 
1310 
1311 
1312  /*!
1313  * \brief pointers to storage of the flag for applied service brake
1314  */
1315  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_ServiceBrakeApplied;
1316 
1317 
1318 
1319  /*!
1320  * \brief pointers storage of the flag for applied emegerncy brake
1321  */
1322  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_EmergencyBrakeApplied;
1323 
1324 
1325 
1326  /*!
1327  * \brief pointers to storage of emergency brake value
1328  */
1329  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_EmergencyBrakeValue;
1330 
1331 
1332 
1333  /*!
1334  * \brief pointers to storage of service brake value
1335  */
1336  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_ServiceBrakeValue;
1337 
1338 
1339 
1340 
1341 }; // class CCeelingSpeedControl : public oETCS::DF::CFunctionBlock
1342 
1343 
1344 
1345 /*!
1346  * \brief function block class for a bolean output on an entered data flow event
1347  */
1349 {
1350  public:
1351  /*!
1352  * \brief general constructor
1353  *
1354  * \param[in] pStateMachine pointer to the parent EVC state machine object
1355  */
1356  explicit CEnteredTrigger(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
1357 
1358 
1359 
1360  /*!
1361  * \brief destructor
1362  */
1363  virtual ~CEnteredTrigger() throw();
1364 
1365 
1366 
1367  /*!
1368  * \brief method for computing all outputs
1369  */
1370  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1371 
1372 
1373 
1374  /*!
1375  * \brief class global flag for a newly entered data flow
1376  */
1377  static bool m_bEnteredState;
1378 
1379 
1380 
1381  /*!
1382  * \brief pointers to boolean results of calculation
1383  */
1384  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Entered;
1385 
1386 
1387 
1388 
1389 }; // class CEnteredTrigger : public oETCS::DF::CFunctionBlock
1390 
1391 
1392 
1393 /*!
1394  * \brief function block class for providing a string switch
1395  */
1397 {
1398  public:
1399  /*!
1400  * \brief general constructor
1401  *
1402  * \param[in] pStateMachine pointer to the parent EVC state machine object
1403  */
1404  explicit CStringSwitch(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
1405 
1406 
1407 
1408  /*!
1409  * \brief destructor
1410  */
1411  virtual ~CStringSwitch() throw();
1412 
1413 
1414 
1415  /*!
1416  * \brief method for computing all outputs
1417  */
1418  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1419 
1420 
1421 
1422  /*!
1423  * \brief storage for the first input
1424  */
1426 
1427 
1428 
1429  /*!
1430  * \brief storage for the second input
1431  */
1433 
1434 
1435 
1436  /*!
1437  * \brief storage for the usage flag for the first input
1438  */
1440 
1441 
1442 
1443  /*!
1444  * \brief pointers to string results of calculation
1445  */
1446  ::std::vector< oETCS::DF::STRING_OUTPUT_T > m_SwitchOutput;
1447 
1448 
1449 
1450 
1451 }; // class CStringSwitch : public oETCS::DF::CFunctionBlock
1452 
1453 
1454 
1455 /*!
1456  * \brief function block class for computing an integer equal
1457  */
1459 {
1460  public:
1461  /*!
1462  * \brief default/general constructor
1463  *
1464  * \param[in] pStateMachine pointer to the parent EVC state machine object
1465  */
1466  explicit CIntEqual(oETCS::DF::CEVCStateMachine * const pStateMachine) throw();
1467 
1468 
1469 
1470  /*!
1471  * \brief destructor
1472  */
1473  virtual ~CIntEqual() throw();
1474 
1475 
1476 
1477  /*!
1478  * \brief method for computing all outputs
1479  */
1480  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1481 
1482 
1483 
1484  /*!
1485  * \brief storage of the first input
1486  */
1488 
1489 
1490 
1491  /*!
1492  * \brief storage of the second input
1493  */
1495 
1496 
1497 
1498  /*!
1499  * \brief pointers to storage of the result
1500  */
1501  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Equal;
1502 
1503 
1504 
1505 
1506 }; // class CIntEqual : public oETCS::DF::CFunctionBlock
1507 
1508 
1509 
1510 /*!
1511  * \brief communication class for incomming messages in a data flow
1512  */
1514 {
1515  public:
1516  /*!
1517  * \brief general constructor
1518  *
1519  * \param[in] pStateMachine pointer to the parent EVC state machine object
1520  * \param[in] InDevices vector with pointers to all in devices (takes over posession)
1521  * \param[in] PacketIDs optinal vector with Packet IDs valid for activating boolean output for new IDs
1522  */
1523  explicit CComBlockIn(oETCS::DF::CEVCStateMachine * const pStateMachine, const ::std::vector< oETCS::DF::CBaliseDeviceIn * >& InDevices, const ::std::vector< unsigned char > & PacketIDs = ::std::vector< unsigned char >()) throw();
1524 
1525 
1526 
1527  /*!
1528  * \brief destructor
1529  */
1530  virtual ~CComBlockIn() throw();
1531 
1532 
1533 
1534  /*!
1535  * \brief pure virtual method for computing all outputs
1536  *
1537  * \remark must me implemented by any inheriting class
1538  */
1539  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1540 
1541 
1542 
1543  /*!
1544  * \brief clears all telegrams from all connected in devices
1545  */
1546  void Clear() throw();
1547 
1548 
1549 
1550  /*!
1551  * \brief pointers to storage of the flag for a received telegram
1552  */
1553  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_Received;
1554 
1555 
1556 
1557  /*!
1558  * \brief vector of Packet IDs, which are valid for new telegrams
1559  */
1560  const ::std::vector< unsigned char > m_PacketIDs;
1561 
1562 
1563 
1564 
1565  private:
1566  /*!
1567  * \brief vector with pointers to all communication in devices in this com block
1568  */
1569  const ::std::vector< oETCS::DF::CBaliseDeviceIn* > m_InDevices;
1570 
1571 
1572 
1573 
1574 }; // class CComBlockIn : public oETCS::DF::CFunctionBlock
1575 
1576 
1577 
1578 /*!
1579  * \brief communication class for outgoing messages in a data flow
1580  */
1582 {
1583  public:
1584  /*!
1585  * \brief general constructor
1586  *
1587  * \param[in] pStateMachine pointer to the parent EVC state machine object
1588  * \param[in] OutDevices vector with pointers to all out devices (takes over posession)
1589  */
1590  explicit CComBlockOut(oETCS::DF::CEVCStateMachine * const pStateMachine, const ::std::vector< oETCS::DF::CBaliseDeviceOut * >& OutDevices) throw();
1591 
1592 
1593 
1594  /*!
1595  * \brief destructor
1596  */
1597  virtual ~CComBlockOut() throw();
1598 
1599 
1600 
1601  /*!
1602  * \brief pure virtual method for computing all outputs
1603  *
1604  * \remark must me implemented by any inheriting class
1605  */
1606  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1607 
1608 
1609 
1610  /*!
1611  * \brief storage of the flag for sending a telegram
1612  */
1614 
1615 
1616 
1617 
1618  private:
1619  /*!
1620  * \brief vector with pointers to all communication out devices in this com block
1621  */
1622  const ::std::vector< oETCS::DF::CBaliseDeviceOut* > m_OutDevices;
1623 
1624 
1625 
1626 
1627 }; // class CComBlockOut : public oETCS::DF::CFunctionBlock
1628 
1629 
1630 
1631 /*!
1632  * \brief class for inputs from the driver via the DMI
1633  */
1635 {
1636  public:
1637  /*!
1638  * \brief general constructor
1639  *
1640  * \param[in] pStateMachine pointer to the parent EVC state machine object
1641  * \param[in] eType data type of the input
1642  * \param[in] pParent optional pointer to parent widget
1643  * \param[in] Label optional label string
1644  * \param[in] bInitialVisible optional flag for initial visibility
1645  */
1646  explicit CDMIInput(oETCS::DF::CEVCStateMachine * const pStateMachine, const oETCS::DF::DATA_T & eType, const ::std::string & Label = "", const bool & bInitialVisible = true) throw();
1647 
1648 
1649 
1650  virtual ~CDMIInput() throw();
1651 
1652 
1653 
1654  /*!
1655  * \brief pure virtual method for computing all outputs
1656  *
1657  * \remark must me implemented by any inheriting class
1658  */
1659  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1660 
1661 
1662 
1663  /*!
1664  * \brief storage of an entered boolean message
1665  */
1667 
1668 
1669 
1670  /*!
1671  * \brief storage of an entered double message
1672  */
1674 
1675 
1676 
1677  /*!
1678  * \brief storage of an entered integer message
1679  */
1681 
1682 
1683 
1684  /*!
1685  * \brief storage of a predefined string message
1686  */
1688 
1689 
1690 
1691  /*!
1692  * \brief storage of the visible flag input
1693  */
1695 
1696 
1697 
1698  /*!
1699  * \brief optional label
1700  */
1701  const ::std::string m_Label;
1702 
1703 
1704 
1705  /*!
1706  * \brief set of allowed boolean inputs by DMI
1707  */
1708  ::std::vector< bool > m_AllowedBoolInputs;
1709 
1710 
1711 
1712  /*!
1713  * \brief set of allowed double inputs by DMI
1714  */
1715  ::std::vector< double > m_AllowedDoubleInputs;
1716 
1717 
1718 
1719  /*!
1720  * \brief set of allowed integer inputs by DMI
1721  */
1722  ::std::vector< int > m_AllowedIntInputs;
1723 
1724 
1725 
1726  /*!
1727  * \brief set of allowed string inputs by DMI
1728  */
1729  ::std::vector< ::std::string > m_AllowedStringInputs;
1730 
1731 
1732 
1733  /*!
1734  * \brief pointers to boolean results of input
1735  */
1736  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_BoolMessage;
1737 
1738 
1739 
1740  /*!
1741  * \brief pointers to double results of input
1742  */
1743  ::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > m_DoubleMessage;
1744 
1745 
1746 
1747  /*!
1748  * \brief pointers to integer results of input
1749  */
1750  ::std::vector< oETCS::DF::INT_OUTPUT_T > m_IntMessage;
1751 
1752 
1753 
1754  /*!
1755  * \brief pointers to string results of input
1756  */
1757  ::std::vector< oETCS::DF::STRING_OUTPUT_T > m_StringMessage;
1758 
1759 
1760 
1761  /*!
1762  * \brief vevtor with pointers to boolean inputs for entered data
1763  */
1764  ::std::vector< oETCS::DF::BOOL_OUTPUT_T > m_EnteredData;
1765 
1766 
1767 
1768  /*!
1769  * \brief data type of input
1770  */
1772 
1773 
1774 
1775 
1776 }; // class CDMIInput : public oETCS::DF::CFunctionBlock
1777 
1778 
1779 
1780 /*!
1781  * \brief class for outputs to the driver via the DMI
1782  *
1783  */
1785 {
1786  public:
1787  /*!
1788  * \brief general constructor
1789  *
1790  * \param[in] pStateMachine pointer to the parent EVC state machine object
1791  * \param[in] eType data type of the DMI input object
1792  * \param[in] Label optional label string
1793  * \param[in] bInitialVisible optional flag for initial visibility
1794  */
1795  explicit CDMIOutput(oETCS::DF::CEVCStateMachine * const pStateMachine, const oETCS::DF::DATA_T & eType, const ::std::string& Label = "", const bool & bInitialVisible = true) throw();
1796 
1797 
1798 
1799  /*!
1800  * \brief destructor
1801  */
1802  virtual ~CDMIOutput() throw();
1803 
1804 
1805 
1806  /*!
1807  * \brief pure virtual method for computing all outputs
1808  *
1809  * \remark must me implemented by any inheriting class
1810  */
1811  virtual void Calculate() throw(::oETCS::DF::Error::CException);
1812 
1813 
1814 
1815  /*!
1816  * \brief storage of a boolean message
1817  */
1819 
1820 
1821 
1822  /*!
1823  * \brief storage of a double message
1824  */
1826 
1827 
1828 
1829  /*!
1830  * \brief storage of a double array message
1831  */
1833 
1834 
1835 
1836  /*!
1837  * \brief storage of an integer message
1838  */
1840 
1841 
1842 
1843  /*!
1844  * \brief storage of a string message
1845  */
1847 
1848 
1849 
1850  /*!
1851  * \brief storage of the visible flag input
1852  */
1854 
1855 
1856 
1857  /*!
1858  * \brief optional label
1859  */
1860  const ::std::string m_Label;
1861 
1862 
1863 
1864  /*!
1865  * \brief data type of input
1866  */
1868 
1869 
1870 
1871 
1872 }; // class CDMIOutput : public oETCS::DF::CFunctionBlock
1873 
1874 
1875 
1876 
1877 
1878 } // namespace oETCS::DF
1879 
1880 } // namespace oETCS
1881 
1882 #endif // __ OETCS_DF_FUNCTIONBLOCKS_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/.