FncBlocks and BTree helps us to define behaviour of any atomic functions. In the same manner we can define behaviour of high lelevl, middle level, low level atomic functions (see example from previous post). We don’t need to create components to define behaviour of higl level functions and can define behaviour of any atomic fucntions.
If want to specify bahaviour for HighLevelFunction we can add FncBlock behaviour specification that contains
Behaviour Tree that define control flow for FncBlocks
data flow diagram that defines detailed data flow betwee FncBlocks
BTree definition diagram is used to specify control flow and helps to define FncBlocks (leaf actions)
FncBlock data flow diagram helps to define in details data flows betwee FncBlocks. It also delegates dataflows to input\output ports of parent function (HighLevelFunction).
I plan to change visual notation for delegate ports.
Dataflow diagram does not show “call results” (return). Every FncBlock can return: SUCCESS, FAILURE or RUNNING. The same result type for all FuncBlocks. Based on this result BTree make decision about next node execution.
The result model created for specifying detailed behaviour of function HighLevelFunction wiil look like this
Leaf actions in BTree are involvements of FncBlocks.
When detailed data flows between FunctionBlocks are defined it’s possible to add addition information about behaviour of separate functionBlocks. In many cases behaviour of FncBlocks that call some other function is simple. It takes own input parameter, prepare input parameter for function call. Receive output parameter from called function. And prepare it’s own output parameter.
For such simple FncBlocks it’s possible to use ComplexValues to define data mapping between different parameters
For example in CallMiddleLevelFunction1
- how in1 value is defined based on in input
- how out value is defined based on out1
For this puprpose we use ComplexValue Viewpoint to define mappings between different parameters.
I wiil add example of using ComplexValues with FncBlocks in next posts.
Using FncBlocks we was able to specify behaviour of atomic function in detail without decomposing atomic function to small functions like “Call MediumLevelFunction”. It would be incorrect usage of functional decomposition in Capella.