24 lines
691 B
Text
24 lines
691 B
Text
CODING CONVENTIONS
|
|
|
|
1. write your methods always in the following order:
|
|
|
|
extTransition
|
|
timeAdvance
|
|
outputFnc
|
|
intTransition
|
|
|
|
this reflects the order in which the methods are called by the simulator:
|
|
|
|
extTransition always has highest priority (can interrupt anything)
|
|
timeAdvance is called before outputFnc
|
|
outputFnc is called right before intTransition
|
|
|
|
|
|
2. input/output port attributes start with 'in_' and 'out_'
|
|
|
|
|
|
TROUBLESHOOTING
|
|
|
|
- did you forget to return `self.state` from intTransition or extTransition ?
|
|
- did you accidentally write to `self.x` instead of `self.state.x` ?
|
|
- did you modify the state in timeAdvance or outputFnc (NOT ALLOWED!!)
|