summaryrefslogtreecommitdiff
path: root/tools/InterfaceGenerator/Generator.py
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2016-09-20 11:44:51 -0400
committerJacob Keeler <jacob.keeler@livioradio.com>2016-09-20 14:37:25 -0400
commit039581419749dbdd32590804e8b14a77fcaf9636 (patch)
treeced927fc4bef4686f7373a5f45dd692bd9fc9de0 /tools/InterfaceGenerator/Generator.py
parent1b96b7c02d2e338b846a7314c6fa0bdaa31f7c5e (diff)
parentaff7f09a4ec07becfb64dc78992580061d3342ff (diff)
downloadsdl_core-039581419749dbdd32590804e8b14a77fcaf9636.tar.gz
Merge branch 'master'
Diffstat (limited to 'tools/InterfaceGenerator/Generator.py')
-rwxr-xr-xtools/InterfaceGenerator/Generator.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/InterfaceGenerator/Generator.py b/tools/InterfaceGenerator/Generator.py
index 5b5894bc00..932620c153 100755
--- a/tools/InterfaceGenerator/Generator.py
+++ b/tools/InterfaceGenerator/Generator.py
@@ -26,6 +26,7 @@ import generator.parsers.SDLRPCV2
import generator.parsers.JSONRPC
import generator.generators.SmartFactorySDLRPC
import generator.generators.SmartFactoryJSONRPC
+import MsgVersionGenerate
from generator.parsers.RPCBase import ParseError
from generator.generators.SmartFactoryBase import GenerateError
@@ -71,7 +72,6 @@ def _handle_fatal_error(error):
print
sys.exit(errno.EINVAL)
-
def main():
"""Main function of the generator that does actual work."""
@@ -101,6 +101,13 @@ Generating interface source code with following parameters:
except ParseError as error:
_handle_fatal_error(error)
+ # Parse sdl version from MOBILE_API.xml and create source file with this version
+ if src_xml_name == "MOBILE_API":
+ try:
+ MsgVersionGenerate.generate_msg_version(src_xml, output_dir)
+ except ParseError as error:
+ _handle_fatal_error(error)
+
# Generate SmartFactory source code from internal model
try:
code_generator.generate(interface,