FW Profile - C1 Implementation
|
Implements the static initialization functions for the FW Procedure Module. More...
Go to the source code of this file.
Functions | |
void | FwPrInit (FwPrDesc_t prDesc) |
Initialize a procedure descriptor to represent an unconfigured procedure with no control flows, no actions, and no guards. More... | |
void | FwPrInitDer (FwPrDesc_t prDesc, FwPrDesc_t prDescBase) |
Initialize a procedure descriptor to extend another procedure (the base procedure). More... | |
Implements the static initialization functions for the FW Procedure Module.
This file is part of the FW Profile.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
For information on alternative licensing, please contact P&P Software GmbH.
Definition in file FwPrSCreate.c.
void FwPrInit | ( | FwPrDesc_t | prDesc | ) |
Initialize a procedure descriptor to represent an unconfigured procedure with no control flows, no actions, and no guards.
After this function has been executed, the argument procedure descriptor has the same content as a procedure descriptor which has been created by calling FwPrCreate
.
This function is primarily intended to be used to initialize a procedure descriptor which has been statically instantiated with macro FW_PR_INST
or FW_PR_INST_NODEC
.
If the function is called upon a procedure descriptor that had already been initialized, the previous initialization values are lost. In such a case, a memory leak is possible due to the potential loss of the pointers to the arrays where the procedures nodes and control flows are stored.
prDesc | the procedure descriptor to be initialized. |
Definition at line 23 of file FwPrSCreate.c.
void FwPrInitDer | ( | FwPrDesc_t | prDesc, |
FwPrDesc_t | prDescBase | ||
) |
Initialize a procedure descriptor to extend another procedure (the base procedure).
This function checks that the descriptor to be initialized satisfies the following constraints:
If either constraint is not satisfied, the function reports an error by setting the error code of the descriptor to be initialized and then returns. If the first constraint is not satisfied, the function sets the error code to prWrongNOfActions
. If the second constraint is not satisfied, the function sets the error code to prWrongNOfGuards
.
If both constraints are satisfied, this function initializes a descriptor as follows:
flowCnt
field to zero.Thus, the descriptor initialized by this function represents exactly the same procedure as the descriptor created by calling function FwPrCreateDer
.
This function is primarily intended to be used to initialize a procedure descriptor which has been statically instantiated with macro FW_PR_INST_DER
. If the function is called upon a procedure descriptor that had already been initialized, the previous initialization values are lost. In such a case, a memory leak is possible due to the potential loss of the pointers to the arrays where the procedures states, choice pseudo-states, transitions and embedded procedures are stored.
prDesc | the procedure descriptor to be initialized. |
prDescBase | the procedure descriptor of the base procedure. |
Definition at line 51 of file FwPrSCreate.c.