diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-11-20 18:04:51 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-11-21 12:45:03 +0000 |
commit | e2a6bd168da5505f150ffad21aaf03498f2a3f67 (patch) | |
tree | d8bb97ec60478ec6fd1d5a776a4b2e4cc79745b3 | |
parent | 6a3e8539d7020a7fdaa8be23b659bd0d9e8fd89b (diff) |
Ability to use custom encoder for CAN signalsguppy_6.99.2guppy_6.99.1guppy/6.99.2guppy/6.99.16.99.26.99.1
Adds the encoder header file that hold the default encoding functions
Bug-AGL: SPEC-1965
Change-Id: I13fe90b515cde04894ba45c9cce72477b56d924b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index dad4480..0929d8f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -217,7 +217,8 @@ std::ostream& operator<<(std::ostream& o, const generator<openxc::diagnostic_mes void generate(const std::string& header, const std::string& footer, const openxc::message_set& message_set, std::ostream& out)
{
out << "#include \"application.hpp\"\n"
- << "#include \"../can/can-decoder.hpp\"\n\n";
+ << "#include \"../can/can-decoder.hpp\"\n"
+ << "#include \"../can/can-encoder.hpp\"\n\n";
if (header.size()) out << header << "\n";
@@ -269,7 +270,7 @@ void generate(const std::string& header, const std::string& footer, const openxc std::string read_file(const std::string& file)
{
if(file.size() == 0) return std::string();
-
+
std::string content;
std::ifstream stream(file);
if (stream)
@@ -334,7 +335,7 @@ int main(int argc, char *argv[]) showhelpinfo(argv[0]);
exit(1);
}
- /*use function getopt to get the arguments with option."hu:p:s:v" indicate
+ /*use function getopt to get the arguments with option."hu:p:s:v" indicate
that option h,v are the options without arguments while u,p,s are the
options with arguments*/
while((tmp=(char)getopt(argc,argv,"m:h:f:o:"))!=-1)
@@ -385,7 +386,7 @@ int main(int argc, char *argv[]) throw std::runtime_error(ss.str());
}
}
- generate(header.str(), footer, message_set, output_file.size() ? out : std::cout);
+ generate(header.str(), footer, message_set, output_file.size() ? out : std::cout);
}
catch (std::exception& e)
{
|