FW Profile - C1 Implementation
FwSmConfig.c
Go to the documentation of this file.
1 
18 #include "FwSmConfig.h"
19 #include "FwSmPrivate.h"
20 #include <stdlib.h>
21 
41 static void AddTrans(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, StateType_t srcType,
42  FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard);
43 
61 static FwSmCounterS1_t AddAction(FwSmDesc_t smDesc, FwSmAction_t action);
62 
80 static FwSmCounterS1_t AddGuard(FwSmDesc_t smDesc, FwSmGuard_t guard);
81 
82 /* ----------------------------------------------------------------------------------------------------------------- */
83 void FwSmSetData(FwSmDesc_t smDesc, void* smData) {
84  smDesc->smData = smData;
85 }
86 
87 void* FwSmGetData(FwSmDesc_t smDesc) {
88  return smDesc->smData;
89 }
90 
91 /* ----------------------------------------------------------------------------------------------------------------- */
92 void FwSmAddState(FwSmDesc_t smDesc, FwSmCounterS1_t stateId, FwSmCounterS1_t nOfOutTrans, FwSmAction_t entryAction,
93  FwSmAction_t exitAction, FwSmAction_t doAction, FwSmDesc_t esmDesc) {
94 
95  SmPState_t* pState;
96  SmBaseDesc_t* smBase = smDesc->smBase;
97 
98  if (stateId > smBase->nOfPStates) {
99  smDesc->errCode = smIllStateId;
100  return;
101  }
102 
103  if (stateId < 1) {
104  smDesc->errCode = smIllStateId;
105  return;
106  }
107 
108  if (smBase->pStates[stateId - 1].outTransIndex != 0) {
109  smDesc->errCode = smStateIdInUse;
110  return;
111  }
112 
113  if (nOfOutTrans < 0) {
114  smDesc->errCode = smNegOutTrans;
115  return;
116  }
117 
118  if (smDesc->transCnt + nOfOutTrans > smBase->nOfTrans) {
119  smDesc->errCode = smTooManyOutTrans;
120  return;
121  }
122 
123  /* Initialize newly added state */
124  pState = &(smBase->pStates[stateId - 1]);
125 
126  pState->outTransIndex = smDesc->transCnt;
127  smDesc->transCnt = (FwSmCounterS1_t)(smDesc->transCnt + nOfOutTrans);
128 
129  pState->iDoAction = AddAction(smDesc, doAction);
130  pState->iEntryAction = AddAction(smDesc, entryAction);
131  pState->iExitAction = AddAction(smDesc, exitAction);
132 
133  smDesc->esmDesc[stateId - 1] = esmDesc;
134  pState->nOfOutTrans = nOfOutTrans;
135 
136  return;
137 }
138 
139 /* ----------------------------------------------------------------------------------------------------------------- */
141  SmCState_t* cState;
142  SmBaseDesc_t* smBase = smDesc->smBase;
143 
144  if (choiceId > smBase->nOfCStates) {
145  smDesc->errCode = smIllChoiceId;
146  return;
147  }
148 
149  if (choiceId < 1) {
150  smDesc->errCode = smIllChoiceId;
151  return;
152  }
153 
154  if (smBase->cStates[choiceId - 1].outTransIndex != 0) {
155  smDesc->errCode = smChoiceIdInUse;
156  return;
157  }
158 
159  if (nOfOutTrans < 1) {
160  smDesc->errCode = smIllNOfOutTrans;
161  return;
162  }
163 
164  if (smDesc->transCnt + nOfOutTrans > smBase->nOfTrans) {
165  smDesc->errCode = smTooManyOutTrans;
166  return;
167  }
168 
169  /* Initialize newly added choice pseudo-state */
170  cState = &(smBase->cStates[choiceId - 1]);
171 
172  cState->outTransIndex = smDesc->transCnt;
173  smDesc->transCnt = (FwSmCounterS1_t)(smDesc->transCnt + nOfOutTrans);
174 
175  cState->nOfOutTrans = nOfOutTrans;
176 
177  return;
178 }
179 
180 /* ----------------------------------------------------------------------------------------------------------------- */
182  AddTrans(smDesc, 0, 0, stoppedState, destId, trAction, NULL);
183 }
184 
185 /* ----------------------------------------------------------------------------------------------------------------- */
187  AddTrans(smDesc, 0, 0, stoppedState, (FwSmCounterS1_t)(-destId), trAction, NULL);
188 }
189 
190 /* ----------------------------------------------------------------------------------------------------------------- */
192  FwSmAction_t trAction, FwSmGuard_t trGuard) {
193  AddTrans(smDesc, transId, srcId, properState, destId, trAction, trGuard);
194 }
195 
196 /* ----------------------------------------------------------------------------------------------------------------- */
198  FwSmAction_t trAction, FwSmGuard_t trGuard) {
199  AddTrans(smDesc, transId, srcId, properState, (FwSmCounterS1_t)(-destId), trAction, trGuard);
200 }
201 
202 /* ----------------------------------------------------------------------------------------------------------------- */
204  FwSmGuard_t trGuard) {
205  AddTrans(smDesc, 0, srcId, choicePseudoState, destId, trAction, trGuard);
206 }
207 
208 /* ----------------------------------------------------------------------------------------------------------------- */
210  FwSmGuard_t trGuard) {
211  AddTrans(smDesc, transId, srcId, properState, 0, trAction, trGuard);
212 }
213 
214 /* ----------------------------------------------------------------------------------------------------------------- */
216  AddTrans(smDesc, 0, srcId, choicePseudoState, 0, trAction, trGuard);
217 }
218 
219 /* ----------------------------------------------------------------------------------------------------------------- */
220 static void AddTrans(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, StateType_t srcType,
221  FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard) {
222 
223  FwSmCounterS1_t i, baseLoc, nOfOutTrans;
224  FwSmCounterS1_t loc = -1;
225  SmTrans_t* trans;
226  SmBaseDesc_t* smBase = smDesc->smBase;
227 
228  /* check that the source state is legal and has been defined */
229  if (srcType == properState) {
230  if (srcId > smBase->nOfPStates) {
231  smDesc->errCode = smIllTransSrc;
232  return;
233  }
234  if (smBase->pStates[srcId - 1].outTransIndex == 0) {
235  smDesc->errCode = smUndefinedTransSrc;
236  return;
237  }
238  if (smBase->pStates[srcId - 1].nOfOutTrans < 1) {
239  smDesc->errCode = smIllTransSrc;
240  return;
241  }
242  baseLoc = smBase->pStates[srcId - 1].outTransIndex;
243  nOfOutTrans = smBase->pStates[srcId - 1].nOfOutTrans;
244  }
245  else if (srcType == choicePseudoState) {
246  if (srcId > smBase->nOfCStates) {
247  smDesc->errCode = smIllTransSrc;
248  return;
249  }
250  if (smBase->cStates[srcId - 1].outTransIndex == 0) {
251  smDesc->errCode = smUndefinedTransSrc;
252  return;
253  }
254  baseLoc = smBase->cStates[srcId - 1].outTransIndex;
255  nOfOutTrans = smBase->cStates[srcId - 1].nOfOutTrans;
256  }
257  else { /* Source state is the stopped state */
258  baseLoc = 0;
259  nOfOutTrans = 1;
260  }
261 
262  /* New transition will be stored in the transition array of the SM Descriptor at a location
263  * in the range [baseLoc, baseLoc+nOfOutTrans]. We check that this range of locations
264  * is not already full.
265  */
266  if (smBase->trans[baseLoc + nOfOutTrans - 1].iTrAction != -1) {
267  smDesc->errCode = smTooManyTrans;
268  return;
269  }
270 
271  /* Identify location where newly added transition will be stored in the transition array.
272  * Note that the nOfOutTrans is guaranteed to be greater than zero by the way it is
273  * initialized in the previous statements in this function. Hence, the loop will be
274  * taken at least once. */
275  for (i = 0; i < nOfOutTrans; i++) {
276  if (smBase->trans[baseLoc + i].iTrAction == -1) {
277  loc = (FwSmCounterS1_t)(baseLoc + i);
278  break;
279  }
280  }
281  trans = &(smBase->trans[loc]);
282 
283  /* Assign the transition identifier */
284  trans->id = transId;
285 
286  /* Assign transition destination */
287  trans->dest = destId;
288 
289  /* add transition action to transition descriptor */
290  trans->iTrAction = AddAction(smDesc, trAction);
291 
292  /* add guard to transition descriptor */
293  trans->iTrGuard = AddGuard(smDesc, trGuard);
294 
295  return;
296 }
297 
298 /* ----------------------------------------------------------------------------------------------------------------- */
299 static FwSmCounterS1_t AddAction(FwSmDesc_t smDesc, FwSmAction_t action) {
300  FwSmCounterS1_t i;
301 
302  if (action == NULL) {
303  return 0;
304  }
305 
306  for (i = 1; i < smDesc->nOfActions; i++) {
307  if (smDesc->smActions[i] == NULL) {
308  break;
309  }
310  if (action == smDesc->smActions[i]) {
311  return i;
312  }
313  }
314 
315  if (i < smDesc->nOfActions) {
316  smDesc->smActions[i] = action;
317  return i;
318  }
319 
320  smDesc->errCode = smTooManyActions;
321  return 0;
322 }
323 
324 /* ----------------------------------------------------------------------------------------------------------------- */
325 static FwSmCounterS1_t AddGuard(FwSmDesc_t smDesc, FwSmGuard_t guard) {
326  FwSmCounterS1_t i;
327 
328  if (guard == NULL) {
329  return 0;
330  }
331 
332  for (i = 1; i < smDesc->nOfGuards; i++) {
333  if (smDesc->smGuards[i] == NULL) {
334  break;
335  }
336  if (guard == smDesc->smGuards[i]) {
337  return i;
338  }
339  }
340 
341  if (i < smDesc->nOfGuards) {
342  smDesc->smGuards[i] = guard;
343  return i;
344  }
345 
346  smDesc->errCode = smTooManyGuards;
347  return 0;
348 }
349 /* ----------------------------------------------------------------------------------------------------------------- */
351 
352  FwSmCounterS1_t i, j;
353  FwSmBool_t found;
354  SmBaseDesc_t* smBase = smDesc->smBase;
355 
356  /* Check that no error occurred during the configuration process */
357  if (smDesc->errCode != smSuccess) {
358  return smConfigErr;
359  }
360 
361  /* Check that all proper states have been defined */
362  for (i = 0; i < smBase->nOfPStates; i++) {
363  if (smBase->pStates[i].outTransIndex == 0) {
364  return smNullPState;
365  }
366  }
367 
368  /* Check that all choice pseudo-states have been defined */
369  for (i = 0; i < smBase->nOfCStates; i++) {
370  if (smBase->cStates[i].outTransIndex == 0) {
371  return smNullCState;
372  }
373  }
374 
375  /* Check that all transitions have been defined */
376  for (i = 0; i < smBase->nOfTrans; i++) {
377  if (smBase->trans[i].iTrAction == -1) {
378  return smNullTrans;
379  }
380  }
381 
382  /* Check that all transition destinations are legal states or choice pseudo-states */
383  for (i = 0; i < smBase->nOfTrans; i++) {
384  if (smBase->trans[i].dest > smBase->nOfPStates) {
385  return smIllegalPDest;
386  }
387  if (smBase->trans[i].dest < -smBase->nOfCStates) {
388  return smIllegalCDest;
389  }
390  }
391 
392  /* Check that all actions have been defined */
393  for (i = 0; i < smDesc->nOfActions; i++) {
394  if (smDesc->smActions[i] == NULL) {
395  return smTooFewActions;
396  }
397  }
398 
399  /* Check that all guards have been defined */
400  for (i = 0; i < smDesc->nOfGuards; i++) {
401  if (smDesc->smGuards[i] == NULL) {
402  return smTooFewGuards;
403  }
404  }
405 
406  /* Check that all states are reachable */
407  for (i = 1; i <= smBase->nOfPStates; i++) {
408  found = 0;
409  for (j = 0; j < smBase->nOfTrans; j++) {
410  if (smBase->trans[j].dest == i) {
411  found = 1;
412  break;
413  }
414  }
415  if (found == 0) {
416  return smUnreachablePState;
417  }
418  }
419 
420  /* Check that all choice pseudo-states are reachable */
421  for (i = 1; i <= smBase->nOfCStates; i++) {
422  found = 0;
423  for (j = 0; j < smBase->nOfTrans; j++) {
424  if (smBase->trans[j].dest == -i) {
425  found = 1;
426  break;
427  }
428  }
429  if (found == 0) {
430  return smUnreachableCState;
431  }
432  }
433 
434  return smSuccess;
435 }
436 
437 /* ----------------------------------------------------------------------------------------------------------------- */
439  FwSmErrCode_t outcome;
440  FwSmCounterS1_t i;
441 
442  /* Check all embedded state machines */
443  for (i = 0; i < smDesc->smBase->nOfPStates; i++) {
444  if (smDesc->esmDesc[i] != NULL) {
445  outcome = FwSmCheckRec(smDesc->esmDesc[i]);
446  if (outcome != smSuccess) {
447  return outcome;
448  }
449  }
450  }
451 
452  return FwSmCheck(smDesc);
453 }
454 
455 /* ----------------------------------------------------------------------------------------------------------------- */
456 void FwSmOverrideAction(FwSmDesc_t smDesc, FwSmAction_t oldAction, FwSmAction_t newAction) {
457  FwSmCounterS1_t i;
458 
459  if (smDesc->transCnt != 0) {
460  smDesc->errCode = smNotDerivedSM;
461  return;
462  }
463 
464  for (i = 1; i < smDesc->nOfActions; i++) {
465  if (smDesc->smActions[i] == oldAction) {
466  smDesc->smActions[i] = newAction;
467  return;
468  }
469  }
470 
471  smDesc->errCode = smUndefAction;
472 }
473 
474 /* ----------------------------------------------------------------------------------------------------------------- */
475 void FwSmOverrideGuard(FwSmDesc_t smDesc, FwSmGuard_t oldGuard, FwSmGuard_t newGuard) {
476  FwSmCounterS1_t i;
477 
478  if (smDesc->transCnt != 0) {
479  smDesc->errCode = smNotDerivedSM;
480  return;
481  }
482 
483  for (i = 1; i < smDesc->nOfGuards; i++) {
484  if (smDesc->smGuards[i] == oldGuard) {
485  smDesc->smGuards[i] = newGuard;
486  return;
487  }
488  }
489 
490  smDesc->errCode = smUndefGuard;
491 }
492 
493 /* ----------------------------------------------------------------------------------------------------------------- */
494 void FwSmEmbed(FwSmDesc_t smDesc, FwSmCounterS1_t stateId, FwSmDesc_t esmDesc) {
495 
496  if (smDesc->transCnt != 0) {
497  smDesc->errCode = smNotDerivedSM;
498  return;
499  }
500 
501  if (stateId < 1) {
502  smDesc->errCode = smIllStateId;
503  return;
504  }
505 
506  if (stateId > smDesc->smBase->nOfPStates) {
507  smDesc->errCode = smIllStateId;
508  return;
509  }
510 
511  if (smDesc->esmDesc[stateId - 1] != NULL) {
512  smDesc->errCode = smEsmDefined;
513  return;
514  }
515 
516  smDesc->esmDesc[stateId - 1] = esmDesc;
517  return;
518 }
A choice pseudo-state is added to a state machine with an illegal (out-of-range) identifier.
FwSmCounterS1_t outTransIndex
index of first out-going transition in transition array of SmBaseDesc_t
Definition: FwSmPrivate.h:151
void FwSmAddTransStaToSta(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a proper state to a proper state and add it to a state machine.
Definition: FwSmConfig.c:191
void * FwSmGetData(FwSmDesc_t smDesc)
Get the pointer to the state machine data in the state machine descriptor.
Definition: FwSmConfig.c:87
FwSmCounterS1_t dest
the index of the destination of the transition
Definition: FwSmPrivate.h:197
FwSmCounterS1_t nOfOutTrans
number of outgoing transitions from the choice pseudo-state
Definition: FwSmPrivate.h:153
FwSmCounterS1_t iTrGuard
the index of the guard associated to the transition
Definition: FwSmPrivate.h:203
A transition from a certain source (either a state or a choice pseudo-state) is added to a state mach...
FwSmErrCode_t
Error codes and function return codes for the state machine functions.
Definition: FwSmConstants.h:82
There is an undefined transition in a state machine.
There is an undefined state in a state machine.
Definition: FwSmConstants.h:94
There is an undefined choice pseudo-state in a state machine.
Definition: FwSmConstants.h:98
FwSmCounterS1_t nOfActions
the number of actions (state actions + transition actions) in the state machine
Definition: FwSmPrivate.h:313
A configuration error has been detected during the state machine configuration process.
FwSmAction_t * smActions
the state machine actions (state and transition actions)
Definition: FwSmPrivate.h:307
FwSmCounterS1_t iDoAction
the do action for the state
Definition: FwSmPrivate.h:129
The number of actions added to the state machine is smaller than the number of actions declared when ...
Declaration of the configuration interface for a FW State Machine.
FwSmCounterS1_t nOfPStates
the number of states in the state machine
Definition: FwSmPrivate.h:243
void FwSmAddTransStaToCps(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a proper state to a choice pseudo-state and add it to a state machine...
Definition: FwSmConfig.c:197
A choice pseudo-state is added to a state machine with less than 1 out-going transitions.
A transition is added to a state machine with a source (either a state or a choice pseudo-state) whic...
SmCState_t * cStates
array holding the choice pseudo-states in the state machine
Definition: FwSmPrivate.h:239
A proper state in a state machine.
Definition: FwSmPrivate.h:61
The number of guards added to the state machine exceeds the number of guards declared when the state ...
The number of actions added to the state machine exceeds the number of actions declared when the stat...
FwSmCounterU2_t id
the identifier (the "name") of the transition
Definition: FwSmPrivate.h:199
void FwSmOverrideGuard(FwSmDesc_t smDesc, FwSmGuard_t oldGuard, FwSmGuard_t newGuard)
Override a guard in a derived state machine.
Definition: FwSmConfig.c:475
FwSmErrCode_t errCode
either &#39;success&#39; or the code of the last error encountered by the state machine
Definition: FwSmPrivate.h:325
The state machine where an action or a guard is overridden or a state machine is embedded is not a de...
The state machine has a choice pseudo-state which is not a destination of any transition.
FwSmErrCode_t FwSmCheckRec(FwSmDesc_t smDesc)
Recursively check the configuration of a state machine and all its embedded state machines...
Definition: FwSmConfig.c:438
FwSmCounterS1_t outTransIndex
index of first out-going transition in the transition array of SmBaseDesc_t
Definition: FwSmPrivate.h:123
void FwSmAddChoicePseudoState(FwSmDesc_t smDesc, FwSmCounterS1_t choiceId, FwSmCounterS1_t nOfOutTrans)
Create a choice pseudo-state with the given characteristics and add it to a state machine...
Definition: FwSmConfig.c:140
void FwSmOverrideAction(FwSmDesc_t smDesc, FwSmAction_t oldAction, FwSmAction_t newAction)
Override an action (either a state action or a transition action) in a derived state machine...
Definition: FwSmConfig.c:456
FwSmCounterS1_t transCnt
the counter for the number of transitions added to the state machine
Definition: FwSmPrivate.h:317
struct FwSmDesc ** esmDesc
the state machines embedded in the state machine
Definition: FwSmPrivate.h:311
A transition is added to a state machine with an illegal (out-of-range) choice pseudo-state destinati...
FwSmBool_t(* FwSmGuard_t)(FwSmDesc_t)
Type for a pointer to a state machine guard.
Definition: FwSmConstants.h:64
int FwSmBool_t
Type used for booleans (0 is "false" and 1 is "true").
Definition: FwSmConstants.h:49
Either the initial or the final pseudo-state.
Definition: FwSmPrivate.h:69
FwSmCounterS1_t nOfCStates
the number of choice pseudo-states in the state machine
Definition: FwSmPrivate.h:245
FwSmCounterS1_t nOfOutTrans
number of outgoing transitions
Definition: FwSmPrivate.h:125
unsigned short int FwSmCounterU2_t
Type used for unsigned counters with a "medium" range.
Definition: FwSmConstants.h:70
A state is added with a negative number of outgoing transitions.
void * smData
the pointer to the data manipulated by the state machine actions and guards
Definition: FwSmPrivate.h:327
void(* FwSmAction_t)(FwSmDesc_t)
Type for a pointer to a state machine action.
Definition: FwSmConstants.h:46
The state machine has a state which is not a destination of any transition.
The overridden guard in a derived state machine does not exist.
FwSmCounterS1_t nOfTrans
the number of transitions in SM
Definition: FwSmPrivate.h:247
Structure representing a transition.
Definition: FwSmPrivate.h:195
Structure representing a state machine descriptor.
Definition: FwSmPrivate.h:303
A choice pseudo-state is added twice to the same state machine.
void FwSmAddTransIpsToCps(FwSmDesc_t smDesc, FwSmCounterS1_t destId, FwSmAction_t trAction)
Create a transition from the initial pseudo-state to a choice pseudo-state and add it to a state mach...
Definition: FwSmConfig.c:186
void FwSmAddTransCpsToFps(FwSmDesc_t smDesc, FwSmCounterS1_t srcId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a choice pseudo-state to the final pseudo-state and add it to a state machin...
Definition: FwSmConfig.c:215
A transition is added to a state machine with an illegal (out-of-range) state destination.
void FwSmSetData(FwSmDesc_t smDesc, void *smData)
Set the pointer to the state machine data in the state machine descriptor.
Definition: FwSmConfig.c:83
FwSmErrCode_t FwSmCheck(FwSmDesc_t smDesc)
Check the correctness and completeness of the configuration of a state machine descriptor.
Definition: FwSmConfig.c:350
void FwSmAddTransStaToFps(FwSmDesc_t smDesc, FwSmCounterU2_t transId, FwSmCounterS1_t srcId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a proper state to the final pseudo-state and add it to a state machine...
Definition: FwSmConfig.c:209
FwSmCounterS1_t iExitAction
the exit action for the state
Definition: FwSmPrivate.h:131
FwSmCounterS1_t iTrAction
the index of the action associated to the transition
Definition: FwSmPrivate.h:201
Structure representing the base descriptor of a state machine.
Definition: FwSmPrivate.h:235
FwSmCounterS1_t nOfGuards
the number of guards in the state machine
Definition: FwSmPrivate.h:315
A choice pseudo-state in a state machine.
Definition: FwSmPrivate.h:65
FwSmGuard_t * smGuards
the transition guards in the state machine
Definition: FwSmPrivate.h:309
A state is added twice to the same state machine.
SmPState_t * pStates
array holding the proper states in the state machine
Definition: FwSmPrivate.h:237
SmBaseDesc_t * smBase
pointer to the base descriptor
Definition: FwSmPrivate.h:305
Structure representing a choice pseudo state in a state machine.
Definition: FwSmPrivate.h:149
void FwSmAddState(FwSmDesc_t smDesc, FwSmCounterS1_t stateId, FwSmCounterS1_t nOfOutTrans, FwSmAction_t entryAction, FwSmAction_t exitAction, FwSmAction_t doAction, FwSmDesc_t esmDesc)
Create a state with the given characteristics and add it to a state machine.
Definition: FwSmConfig.c:92
A transition is added to a state machine with a source which has an illegal identifier.
Structure representing a proper state in state machine.
Definition: FwSmPrivate.h:121
void FwSmAddTransIpsToSta(FwSmDesc_t smDesc, FwSmCounterS1_t destId, FwSmAction_t trAction)
Create a transition from the initial pseudo-state to a proper state and add it to a state machine...
Definition: FwSmConfig.c:181
The number of guards added to the state machine is smaller than the number of guards declared when th...
void FwSmAddTransCpsToSta(FwSmDesc_t smDesc, FwSmCounterS1_t srcId, FwSmCounterS1_t destId, FwSmAction_t trAction, FwSmGuard_t trGuard)
Create a transition from a choice pseudo-state to a proper state and add it to a state machine...
Definition: FwSmConfig.c:203
The overridden action in a derived state machine does not exist.
Return codes of a function which has completed execution without errors.
Definition: FwSmConstants.h:86
The state in a derived state machine to which an embedded state machine is added already holds an emb...
signed char FwSmCounterS1_t
Type used for signed counters with a "short" range.
Definition: FwSmConstants.h:79
A state or choice pseudo-state is added to a state machine which has more out-going transitions than ...
void FwSmEmbed(FwSmDesc_t smDesc, FwSmCounterS1_t stateId, FwSmDesc_t esmDesc)
Embed a state machine in a state of a derived state machine.
Definition: FwSmConfig.c:494
FwSmCounterS1_t iEntryAction
the entry action for the state
Definition: FwSmPrivate.h:127
Declaration of the internal data structures of the FW State Machine Module.
SmTrans_t * trans
array holding the transitions in the state machine
Definition: FwSmPrivate.h:241
A state is added to a state machine with an illegal (out-of-range) identifier.
StateType_t
Enumerated type for the type of a state in a state machine.
Definition: FwSmPrivate.h:57
P&P Software GmbH, Copyright 2011, All Rights Reserved