FW Profile - C1 Implementation
|
Implements the auxiliary functions of the FW State Machine Module. More...
Go to the source code of this file.
Functions | |
void | FwSmPrintConfig (FwSmDesc_t smDesc, FILE *stream) |
Print the configuration of the state machine to an output stream. More... | |
void | FwSmPrintConfigRec (FwSmDesc_t smDesc, FILE *stream) |
Print the configuration of the state machine and its embedded state machines to an output stream. More... | |
char * | FwSmPrintErrCode (FwSmErrCode_t errCode) |
Print the name of a state machine error code. More... | |
Implements the auxiliary functions of the FW State Machine 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 FwSmAux.c.
void FwSmPrintConfig | ( | FwSmDesc_t | smDesc, |
FILE * | stream | ||
) |
Print the configuration of the state machine to an output stream.
This function extracts all the configuration information from the argument state machine and prints it to the argument output stream. It is legal for the argument state machine to be only partly configured. It is also legal to call this function on a state machine which has already been started.
The function describes the configuration of the argument state machine in terms of its states, choice pseudo-states, transitions, actions and guards. The following conventions are used to refer to these items:
This function assumes the argument output stream to be open and to have enough space to receive the output generated by the function. The function neither closes nor flushes the output stream. Opening and closing of the output stream must thus be done by the caller.
smDesc | the descriptor of the state machine to be started. |
stream | the output stream to which the configuration information is printed. |
void FwSmPrintConfigRec | ( | FwSmDesc_t | smDesc, |
FILE * | stream | ||
) |
Print the configuration of the state machine and its embedded state machines to an output stream.
This is a recursive version of FwSmPrintConfig
which operates on a state machine and, recursively, on all its embedded state machines. This function assumes the argument output stream to be open and to have enough space to receive the output generated by the function. The function neither closes nor flushes the output stream. Opening and closing of the output stream must thus be done by the caller.
smDesc | the descriptor of the state machine to be started. |
stream | the output stream to which the configuration information is printed. |
char* FwSmPrintErrCode | ( | FwSmErrCode_t | errCode | ) |
Print the name of a state machine error code.
Error code are defined as instances of an enumerated type in FwSmConstants.h
. This function translates an error code to a string holding the name of its enumerated value.
errCode | the error code |