- C-ATOM >
- Software system - SWSYS >
- Configuration manual
Configuration manual¶
You may see a fragment of the typical FLOW configuration file below. with basic explanation in comments
<swsys>
<expected_interface name="TLM1" dev_path="/dev/ttyS0"/>
...
<bus name="gcu_bus" eq_channel="0" max_topics="32">
<event_queue buffer_size="2000" size="32"/>
<dir name="hk" eq_channel="16"/>
<dir name="nav" eq_channel="16"/>
<dir name="cont" eq_channel="16"/>
</bus>
<task type="flow" config="flow_nav_imu_alignment.xml" name="nav_imu_alignement" priority="4" clk_method="timer" clk_period="100">
<connect>
<in alias="omega, a">nav_bus/$alias</in>
<out alias="omega_bias, q0, imu_reset">nav_bus/$alias</out>
</connect>
</task>
...
<bridge name="nav" priority="2" clk_method="timer" clk_period="50" to="gcu_bus/nav">
<source alias="omega, a">nav_bus/$alias</source>
<source alias="roll, pitch, yaw">nav_bus/$alias</source>
</bridge>
...
<service type="sdtl" name="gcu_link">
<baudrate value="57600"/>
<serial_port value="/dev/ttyS0"/>
<channel id="1" name="downlink" type="rel"/>
<channel id="2" name="downlink_sk" type="unrel"/>
</service>
...
</swsys>
<expected_interface> mark existing external interfaces¶
This tag does not have any functional support in C-ATOM but used for visualization purposes for now.
<bus> specify software buses for your system¶
<bus name="gcu_bus" eq_channel="1" max_topics="32">
<event_queue buffer_size="2000" size="32"/>
<dir name="hk" eq_channel="16"/>
<dir name="nav" eq_channel="16"/>
<dir name="cont" eq_channel="16"/>
</bus>
Tag |
Attrs |
Description |
---|---|---|
bus |
Define ESWB bus in a software system |
|
name |
Name of the bus |
|
eq_channel |
|
|
event_queue |
Activate event queue for a bus with specified parameters (see Event Queue for details) |
|
buffer_size |
Size of data buffer for all events in a queue |
|
size |
Maximum number of events to contain in a queue |
|
dir |
Create a directory in the bus |
|
name |
Name of the directory |
|
eq_channel |
Optional attribute for defining event queue channel number for directory and its content. |
<task> define functional computing units¶
<task type="flow" config="flow_nav_imu_alignment.xml" name="nav_imu_alignement" priority="4" clk_method="timer" clk_period="100">
<connect>
<in alias="omega, a">nav_bus/$alias</in>
<out alias="omega_bias, q0, imu_reset">nav_bus/$alias</out>
</connect>
</task>
<task type="flow" config="flow_cont_angrate.xml" name="cont_angrate" priority="6" clk_method="inp_upd" clk_input_path="nav_bus/omega">
<connect>
<in alias="omega">nav_bus/omega</in>
<in alias="desired_omega">control_bus/desired_omega</in>
<in alias="arming, direct">control_bus/rc/$alias</in>
<in alias="collective">control_bus/rc/direct_collective</in>
<in alias="pids_gain">control_bus/rc/pid_gain_angrate</in>
<in alias="enable">control_bus/rc/enable_angrate</in>
<out alias="m1, m2, m3, m4, armed">control_bus/solution/$alias</out>
</connect>
</task>
Tag |
Attrs |
Description |
---|---|---|
task |
Define task inside software system |
|
type |
type of the task, these are available: flow, fsm, ibr |
|
name |
name of the task |
|
config |
relative path to configuration file (relative to the catalog with swsys configuration file) |
|
priority |
relative priority against launching thread, usually the default priority, check your OS for valid range |
|
clk_method |
method of execution control of the task over time; these options are available: freerun - task don’t block between cycles; timer - unblock task every specified amount of time (makes clk_period attribute valid); inp_update - clock on input update, unblock task when specified ESWB topic is published (makes clk_input_path attribute valid); |
|
clk_period |
time in milliseconds between task iterations, valid only when clk_method is timer |
|
clk_input_path |
path to the ESWB topic for waiting of hte update, valid only when clk_method is inp_update |
|
connect |
Task connection section |
|
in |
Specify subscription path/paths for task’s inputs stated in alias attribute(these inputs must be defined in task’s functional specification (see Function specification for details) |
|
alias |
alias or list of input’s aliases separated by comma |
|
out |
Specify publishing path/paths for task’s outputs stated in alias attribute(these outputs must be defined in task’s functional specification (see Function specification for details) |
|
alias |
alias or list of output’s aliases separated by comma |
<service> place supporting services¶
<service type="sdtl" name="gcu_link">
<baudrate value="57600"/>
<serial_port value="/dev/ttyS0"/>
<channel id="1" name="downlink" type="rel"/>
<channel id="2" name="downlink_sk" type="unrel"/>
</service>
Tag |
Attrs |
Description |
---|---|---|
service |
type=”sdtl” |
Instantiate Simple Data Transmission Layer (SDTL) service |
name |
name of SDTL service instance |
|
baudrate |
value |
Define baudrate for SDTL instance |
serial_port |
value |
Define define path to the serial port for SDTL service to communicate |
channel |
Define a SDTL channel, a unit to transfer multiplexed information |
|
id |
Channel identification number, must be within 0-255, unique and correspond with the channels on the recipient’s side |
|
name |
Name of the SDTL channel |
|
type |
protocol type of the SDTL channel; these types are available: rel - reliable data delivery with acknowledgment await; unrel - unreliable data delivery via simplex streaming |
<service type="eqrb_sdtl" name="debug_sdtl">
<event_queue_source value="gcu_bus"/>
<sdtl_service value="gcu_link"/>
<channel_1_name value="downlink"/>
<channel_2_name value="downlink_sk"/>
</service>