anjana_sreekumar@infosys.com | 991c206 | 2020-01-08 11:42:57 +0530 | [diff] [blame^] | 1 | Requirements: |
| 2 | 1.Python3.6. |
| 3 | 2.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 | |
| 7 | Inputs: |
| 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 | |
| 15 | Output: |
| 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 | |
| 24 | Execution: |
| 25 | -Run the below command: |
| 26 | python codeGen.py |
| 27 | |
| 28 | |