Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial drafting of msmi support #333

Merged
merged 38 commits into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6f2c015
drafting documents after msmi discussions
May 16, 2019
477658b
Making Jenkins great again!
Jun 20, 2019
20e8d3c
Merge remote-tracking branch 'origin/master' into initial-drafting-of…
Jun 25, 2019
4e6dee3
#250 Added cse_config_parser and added extened model description.
Jun 25, 2019
897c6b9
#250 refactoring in progress
Jun 25, 2019
a640fae
#250 Now connecting plugs, sockets and bonds
mrindar Jul 15, 2019
82142e2
testing with linux line separator LF
Aug 21, 2019
9ca22d0
Revert "testing with linux line separator LF"
Aug 21, 2019
1542c84
Merge remote-tracking branch 'origin/master' into initial-drafting-of…
Aug 26, 2019
885b90a
#250 Using scalar_connection for connections
Aug 26, 2019
f9b81d4
#250 fix logging
Aug 26, 2019
4d008e0
Merge branch 'master' into initial-drafting-of-msmi-support
Aug 26, 2019
8e230d7
#250 removing dead code
Aug 26, 2019
1ed87ee
#250 switch to xml
Sep 5, 2019
390f2c6
#250 refactor transcode
Sep 5, 2019
e7bd430
#250 Add commented example of updated format
Sep 5, 2019
5d2f60b
[mob session] New formats and xsd.
Sep 17, 2019
d13388f
[mob session] Failed attempt at validation with xsd
Sep 17, 2019
80dea7b
#250 include libxerces in docker image
Sep 17, 2019
e157f23
#250 adding xsd for OspModelDescription
Sep 18, 2019
0b5850a
#250 using decimationFactor from config
Sep 18, 2019
27cc5af
#250 including libxerces in ubuntu docker
Sep 22, 2019
8437209
Need to install the -dev package to be able to build.
Sep 23, 2019
4639f81
Removig hardcoded config
Sep 23, 2019
e1a88a9
Merge branch 'master' into initial-drafting-of-msmi-support
Sep 23, 2019
20ee956
Fix after merging in master changes.
Sep 23, 2019
4562201
Downgrade version of gsl_microsoft conan package to be compatible wit…
Sep 23, 2019
934265e
Replace algorithm-specific "decimationFactor" with more general "step…
Sep 25, 2019
fb59f98
Better error messages. Move non public functions to anonymous namespace.
Sep 26, 2019
5e3a3de
Alphabetic
Sep 26, 2019
9a65715
Rename OSP config files according to last status meeting agreement. R…
Sep 26, 2019
3071a05
Merge branch 'master' into initial-drafting-of-msmi-support
Sep 26, 2019
cd3d58e
Fix merge mishap
Sep 27, 2019
3bc55e4
Namespacing our own types in the xsds.
Sep 27, 2019
6816167
One step further with XML validation. Still have to figure out why it…
Sep 27, 2019
b46df53
Fix xsd validation. Will now validate if schemaLocation specified in …
Sep 30, 2019
d3d8521
#250 declaring simulator_map_entry in cse_config.hpp
Sep 30, 2019
ac3a3b2
Remove obsolete json config files
Oct 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^[<"]cse[/.]'
Priority: 20
- Regex: '^[<"](boost|event2|fmilib|gsl|nlohmann|zip)[/.]'
- Regex: '^[<"](boost|event2|fmilib|gsl|nlohmann|zip|xercesc)[/.]'
eidekrist marked this conversation as resolved.
Show resolved Hide resolved
Priority: 30
- Regex: '^"'
Priority: 10
Expand Down
1 change: 1 addition & 0 deletions .dockerfiles/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN apt-get update && \
libzip-dev \
libmsgsl-dev \
nlohmann-json-dev \
libxerces-c3.2 \
&& rm -rf /var/lib/apt/lists/*

# Installing FMI Library from prebuilt .deb packages
Expand Down
1 change: 1 addition & 0 deletions .dockerfiles/Dockerfile.conan-build
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN apt-get update && \
python3-setuptools \
python3-wheel \
python3-pip \
libxerces-c3.2 \
&& rm -rf /var/lib/apt/lists/*

# Install Conan package manager and CMake
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ find_package(Boost REQUIRED COMPONENTS ${Boost_components})
find_package(FMILibrary REQUIRED)
find_package(LIBZIP REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(XercesC REQUIRED CONFIG)
if(CSECORE_WITH_FMUPROXY)
find_package(Thrift REQUIRED)
endif()
Expand Down
3 changes: 2 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class CSECoreConan(ConanFile):
"gsl_microsoft/1.0.0@bincrafters/stable",
"libzip/1.5.2@bincrafters/stable",
"jsonformoderncpp/3.5.0@vthiery/stable",
"bzip2/1.0.8@conan/stable"
"bzip2/1.0.8@conan/stable",
"xerces-c/3.2.2@bincrafters/stable"
)

options = {"fmuproxy": [True, False]}
Expand Down
37 changes: 37 additions & 0 deletions include/cse/cse_config_parser.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

#ifndef CSECORE_CONFIG_PARSER_HPP
#define CSECORE_CONFIG_PARSER_HPP

#include <cse/execution.hpp>
#include <cse/model.hpp>
#include <cse/orchestration.hpp>

#include <boost/filesystem/path.hpp>

#include <map>
#include <optional>
#include <string>


namespace cse
{


struct simulator_map_entry
{
simulator_index index;
std::string source;
model_description description;
};

using simulator_map = std::map<std::string, simulator_map_entry>;

std::pair<execution, simulator_map> load_cse_config(
cse::model_uri_resolver&,
const boost::filesystem::path& configPath,
const boost::filesystem::path& schemaPath,
std::optional<cse::time_point> overrideStartTime = {});

} // namespace cse

#endif //CSECORE_CONFIG_PARSER_HPP
3 changes: 3 additions & 0 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(publicHeaders
"async_slave.hpp"
"config.hpp"
"connection.hpp"
"cse_config_parser.hpp"
"exception.hpp"
"execution.hpp"
"ssp_parser.hpp"
Expand Down Expand Up @@ -47,6 +48,7 @@ set(sources
"algorithm.cpp"
"async_slave.cpp"
"connection.cpp"
"cse_config_parser.cpp"
"exception.cpp"
"execution.cpp"
"ssp_parser.cpp"
Expand Down Expand Up @@ -128,6 +130,7 @@ target_link_libraries(csecorecpp
Boost::filesystem
Boost::log
gsl
XercesC::XercesC
PRIVATE
nlohmann_json
)
Expand Down
Loading