Ability to use custom encoder for CAN signals
[src/low-level-can-generator.git] / src / main.cpp
index dad4480..0929d8f 100644 (file)
@@ -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)\r
 {\r
        out << "#include \"application.hpp\"\n"\r
-               << "#include \"../can/can-decoder.hpp\"\n\n";\r
+               << "#include \"../can/can-decoder.hpp\"\n"\r
+               << "#include \"../can/can-encoder.hpp\"\n\n";\r
 \r
        if (header.size()) out << header << "\n";\r
 \r
@@ -269,7 +270,7 @@ void generate(const std::string& header, const std::string& footer, const openxc
 std::string read_file(const std::string& file)\r
 {\r
        if(file.size() == 0) return std::string();\r
-       \r
+\r
        std::string content;\r
        std::ifstream stream(file);\r
        if (stream)\r
@@ -334,7 +335,7 @@ int main(int argc, char *argv[])
                        showhelpinfo(argv[0]);\r
                        exit(1);\r
                }\r
-               /*use function getopt to get the arguments with option."hu:p:s:v" indicate \r
+               /*use function getopt to get the arguments with option."hu:p:s:v" indicate\r
                that option h,v are the options without arguments while u,p,s are the\r
                options with arguments*/\r
                while((tmp=(char)getopt(argc,argv,"m:h:f:o:"))!=-1)\r
@@ -385,7 +386,7 @@ int main(int argc, char *argv[])
                                throw std::runtime_error(ss.str());\r
                        }\r
                }\r
-               generate(header.str(), footer, message_set, output_file.size() ? out : std::cout); \r
+               generate(header.str(), footer, message_set, output_file.size() ? out : std::cout);\r
        }\r
        catch (std::exception& e)\r
        {\r