blob: 66c7ac3240ebaf0c9fbbada363e69c7e9c54e30b [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301Requirements:
21.Python3.6.
32.Install the template-toolkit package.
4 a. pip install Template-Toolkit-Python or
5 b. git clone https://github.com/lmr/Template-Toolkit-Python, and set the path of the package in the codeGen.py script [as argument in sys.path.append]
6
7Inputs:
8 2 Json files:
9 generateItem.json - Defines path of templates, the class type to be generated(State/actionHandler/Enum), output directory to be produced.
10 stateMachineAppModel.json - Defines procedures, states for each procedure, event for each state, actions to be taken under each event and nextstate of the procedure.
11
12 Existing actionHandler.h and attachActionHandlers.cpp,detachActionHandlers.cpp,s1ReleaseActionHandlers.cpp files from <top-dir>/include/mme-app/actionHandlers and <top-dir>/src/mme-app/actionHandlers respectively.
13 Place it in output directories as the output produced should be merged with existing file properly.
14
15Output:
16 1. mme states .cpp and header files. Copy to <top-dir>/src/mme-app/mme-states and <top-dir>/include/mme-app/mme-states
17 2. stateFactory.h and stateFactory.cpp Copy to <top-dir>/src/mme-app/mme-states and <top-dir>/include/mme-app/mme-states
18 3. actionHandlers
19 actionHandler.h and actionHandler source files per procedure (eg: attachActionHandlers.cpp, detachActionHandlers.cpp )
20 actionHandler.h should be placed in <top-dir>/include/mme-app/actionHandlers
21 attachActionHandler.cpp should placed in <top-dir>/src/mme-app/actionHandlers
22 4. enums used by the MME state machine - <top-dir>/include/stateMachineFwk
23
24Execution:
25-Run the below command:
26 python codeGen.py
27
28