MME2 changes - Propped commits from openmme/paging branch. Added scripts
for code gen
Change-Id: Ie55032217232214ac8544ca76ea34335205329e4
diff --git a/scripts/SMCodeGen/templates/stateMachineTmpls/actionHandlers.cpp.tt b/scripts/SMCodeGen/templates/stateMachineTmpls/actionHandlers.cpp.tt
new file mode 100644
index 0000000..e4a98e2
--- /dev/null
+++ b/scripts/SMCodeGen/templates/stateMachineTmpls/actionHandlers.cpp.tt
@@ -0,0 +1,48 @@
+[%- BLOCK %]
+[%- actionList = [] %]
+[%- PYTHON %]
+procedure = [% TemplateInputVar %]
+actionNames = []
+import utils
+for state in procedure['States']:
+ for event in state['Events']:
+ for action in event['Actions']:
+ rc = utils.searchWordInDir(utils.outputDir, action.lower())
+ if rc is False:
+ actionNames.append(action.lower())
+flag = utils.isFileEmpty(utils.outputDir, utils.outputFileName)
+stash.set('actionList', actionNames)
+stash.set('includeHeader', flag)
+[%- END %]
+[%- END %]
+[%- IF includeHeader == 1 -%]
+/*
+ * Copyright 2019-present Infosys Limited
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/******************************************************************************
+ *
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/actionHandlers.cpp.tt>
+ ******************************************************************************/
+#include "actionHandlers/actionHandlers.h"
+#include "controlBlock.h"
+
+using namespace mme;
+using namespace SM;
+
+[% END %]
+[%- FOREACH action = actionList -%]
+/***************************************
+* Action handler : [% action %]
+***************************************/
+ActStatus ActionHandlers::[% action %](ControlBlock& cb)
+{
+ return ActStatus::PROCEED;
+}
+
+[% END -%]