Revision 844, 1.1 kB
(checked in by prikryl, 15 years ago)
|
Do not use ATL macros (ATL is not shipped with Visual Studio Express).
|
Line | |
---|
1 | /*! |
---|
2 | \file |
---|
3 | \brief DataSource for experiments with Aimsun |
---|
4 | \author Jan Prikryl. |
---|
5 | |
---|
6 | */ |
---|
7 | |
---|
8 | /* WIN32 stuff */ |
---|
9 | #include <windows.h> |
---|
10 | #include <stdio.h> |
---|
11 | #include <tchar.h> |
---|
12 | |
---|
13 | #include <base/loggers.h> |
---|
14 | |
---|
15 | extern "C" { |
---|
16 | #include "eh_hrd.h" |
---|
17 | #include "vgs_hrd.h" |
---|
18 | } |
---|
19 | |
---|
20 | using namespace bdm; |
---|
21 | |
---|
22 | //! Simulator of traffic - AIMSUN |
---|
23 | class AimsunDS : public DS |
---|
24 | { |
---|
25 | |
---|
26 | protected: |
---|
27 | eh_els3hrd * p_rsp; |
---|
28 | //! pointer to realised signal plans stored in local data space of eh_api */ |
---|
29 | |
---|
30 | public: |
---|
31 | //! Constructor with fixed sampling period |
---|
32 | AimsunDS (); |
---|
33 | |
---|
34 | //! Get measurements and signal plans from ELS3 controllers |
---|
35 | void getdata ( vec &dt ) const; |
---|
36 | |
---|
37 | //! Write new signal plans to ELS3 |
---|
38 | void write ( vec &ut ); |
---|
39 | |
---|
40 | //! Wait for new data and copy them out to local buffers |
---|
41 | void step(); |
---|
42 | |
---|
43 | //! number of steps |
---|
44 | int max_length() {return 960;} |
---|
45 | |
---|
46 | // TODO dodelat void to_setting( Setting &root ) const; |
---|
47 | private: |
---|
48 | void AimsunDS::initVGS ( |
---|
49 | const vgs_headway_mode headway, |
---|
50 | const string &entrancePath, |
---|
51 | const string §ionStatsPath, |
---|
52 | const string &globalStatsPath |
---|
53 | ); |
---|
54 | }; |
---|