Reader

The MARTe2-Python repository whilst providing Python class representations of GAMs, DataSources and every object which makes up a MARTe2Application, also provides the functionality to read a pre-existing .cfg file and input this into the pythonic MARTe2Application instance. To use it you can:

from martepy.marte2.reader import readApplication

app, state_machine, http_browser, http_messages = readApplication(filename)

Where filename is the filename of your .cfg and app contains all aspects of the application. For simplifying coding, it also returns any detected state machines, http browsers and http messages combined together as a tuple that you can seperate as in the above line.

Note: if no state machine exists in the .cfg, one will be auto generated for the MARTe2Application instance

Note: The reader does not currently support importing types defined within a .cfg