- C-ATOM >
- Function specification
Function specification¶
Function specification is generalized structure between any SWSYS and atomic functions. In general, specification describes:
function name;
inputs and their types;
outputs and their types;
function state variables and their types;
For DSL defined functions inside FLOW, FSM, IBR - C-ATOM uses XML notation below to define function specification. This notation is generalized for mentioned configurable layers.
...
<spec name="cont_angrate">
<inputs>
<i alias="omega" type="core.type.v3f64"/>
<i alias="desired_omega" type="core.type.v3f64"/>
<i alias="collective" type="core.type.f64"/>
<i alias="direct" type="core.type.v3f64"/>
<i alias="enable" type="core.type.bool"/>
<i alias="arming" type="core.type.bool"/>
<i alias="pids_gain" type="core.type.f64"/>
</inputs>
<outputs>
<o alias="m1" type="core.type.f64"/>
<o alias="m2" type="core.type.f64"/>
<o alias="m3" type="core.type.f64"/>
<o alias="m4" type="core.type.f64"/>
<o alias="armed" type="core.type.bool"/>
</outputs>
</spec>
...
Tag |
Attrs |
Description |
---|---|---|
spec |
Function specification |
|
name |
Function specification name, must be unique inside the running scope |
|
inputs |
Grouping tag for function’s inputs specifications |
|
i |
Input specification |
|
alias |
alias of the input |
|
type |
data type of the input from the list C-ATOM data types |
|
outputs |
Grouping tag for function’s outputs specifications |
|
o |
Output specification |
|
alias |
alias of the output |
|
type |
data type of the output from the list C-ATOM data types |