Skip to content

Commit

Permalink
auterion: move param transaction protocol to auterion
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejFranceskin committed Dec 11, 2024
1 parent 85d2059 commit 2e46646
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 43 deletions.
37 changes: 37 additions & 0 deletions message_definitions/v1.0/auterion.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<dialect>0</dialect>
<enums>
<enum name="MAV_CMD">
<entry value="900" name="MAV_CMD_PARAM_TRANSACTION" hasLocation="false" isDestination="false">
<description>Request to start or end a parameter transaction. Multiple kinds of transport layers can be used to exchange parameters in the transaction (param, param_ext and mavftp). The command response can either be a success/failure or an in progress in case the receiving side takes some time to apply the parameters.</description>
<param index="1" label="Action" enum="PARAM_TRANSACTION_ACTION">Action to be performed (start, commit, cancel, etc.)</param>
<param index="2" label="Transport" enum="PARAM_TRANSACTION_TRANSPORT">Possible transport layers to set and get parameters via mavlink during a parameter transaction.</param>
<param index="3" label="Transaction ID">Identifier for a specific transaction.</param>
</entry>
<entry value="2006" name="MAV_CMD_CAMERA_TRACK_OBJECT" hasLocation="false" isDestination="false">
<wip/>
<!-- This message is work-in-progress and it can therefore change. It should NOT be used in stable production environments. -->
Expand Down Expand Up @@ -88,8 +94,39 @@
<description>Decision to deny the handoff request and keep control ownership.</description>
</entry>
</enum>
<!-- Transactions for parameter protocol -->
<enum name="PARAM_TRANSACTION_TRANSPORT">
<description>Possible transport layers to set and get parameters via mavlink during a parameter transaction.</description>
<entry value="0" name="PARAM_TRANSACTION_TRANSPORT_PARAM">
<description>Transaction over param transport.</description>
</entry>
<entry value="1" name="PARAM_TRANSACTION_TRANSPORT_PARAM_EXT">
<description>Transaction over param_ext transport.</description>
</entry>
</enum>
<enum name="PARAM_TRANSACTION_ACTION">
<description>Possible parameter transaction actions.</description>
<entry value="0" name="PARAM_TRANSACTION_ACTION_START">
<description>Commit the current parameter transaction.</description>
</entry>
<entry value="1" name="PARAM_TRANSACTION_ACTION_COMMIT">
<description>Commit the current parameter transaction.</description>
</entry>
<entry value="2" name="PARAM_TRANSACTION_ACTION_CANCEL">
<description>Cancel the current parameter transaction.</description>
</entry>
</enum>
</enums>
<messages>
<!-- Transactions for parameter protocol -->
<message id="19" name="PARAM_ACK_TRANSACTION">
<description>Response from a PARAM_SET message when it is used in a transaction.</description>
<field type="uint8_t" name="target_system">Id of system that sent PARAM_SET message.</field>
<field type="uint8_t" name="target_component">Id of system that sent PARAM_SET message.</field>
<field type="char[16]" name="param_id">Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string</field>
<field type="float" name="param_value">Parameter value (new value if PARAM_ACCEPTED, current value otherwise)</field>
<field type="uint8_t" name="param_type" enum="MAV_PARAM_TYPE">Parameter type.</field>
<field type="uint8_t" name="param_result" enum="PARAM_ACK">Result code.</field>
<message id="447" name="BEACON_POSITION">
<description>Position of and distance to a Beacon.
</description>
Expand Down
8 changes: 3 additions & 5 deletions message_definitions/v1.0/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,6 @@
<param index="1" label="Tag" minValue="0" increment="1">Target tag to jump to.</param>
<param index="2" label="Repeat" minValue="0" increment="1">Repeat count.</param>
</entry>
<!-- entry value 900 reserved for MAV_CMD_PARAM_TRANSACTION (development.xml) -->
<entry value="1000" name="MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW" hasLocation="false" isDestination="false">
<description>Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. </description>
<param index="1" label="Pitch angle" units="deg" minValue="-180" maxValue="180">Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).</param>
Expand Down Expand Up @@ -3925,7 +3924,7 @@
</entry>
</enum>
<enum name="PARAM_ACK">
<description>Result from PARAM_EXT_SET message (or a PARAM_SET within a transaction).</description>
<description>Result from PARAM_EXT_SET message.</description>
<entry value="0" name="PARAM_ACK_ACCEPTED">
<description>Parameter value ACCEPTED and SET</description>
</entry>
Expand All @@ -3936,7 +3935,7 @@
<description>Parameter failed to set</description>
</entry>
<entry value="3" name="PARAM_ACK_IN_PROGRESS">
<description>Parameter value received but not yet set/accepted. A subsequent PARAM_ACK_TRANSACTION or PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent.</description>
<description>Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent.</description>
</entry>
</enum>
<enum name="CAMERA_MODE">
Expand Down Expand Up @@ -5179,7 +5178,6 @@
<field type="uint32_t" name="custom_mode">The new autopilot-specific mode. This field can be ignored by an autopilot.</field>
</message>
<!-- IDs 15-17 reserved for PARAM_VALUE_UNION and other param messages -->
<!-- IDs 19 reserved for PARAM_ACK_TRANSACTION (development.xml) -->
<message id="20" name="PARAM_REQUEST_READ">
<description>Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -&gt; value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also https://mavlink.io/en/services/parameter.html for a full documentation of QGroundControl and IMU code.</description>
<field type="uint8_t" name="target_system">System ID</field>
Expand All @@ -5203,7 +5201,7 @@
<message id="23" name="PARAM_SET">
<description>Set a parameter value (write new value to permanent storage).
The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html.
PARAM_SET may also be called within the context of a transaction (started with MAV_CMD_PARAM_TRANSACTION). Within a transaction the receiving component should respond with PARAM_ACK_TRANSACTION to the setter component (instead of broadcasting PARAM_VALUE), and PARAM_SET should be re-sent if this is ACK not received.</description>
</description>
<field type="uint8_t" name="target_system">System ID</field>
<field type="uint8_t" name="target_component">Component ID</field>
<field type="char[16]" name="param_id">Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string</field>
Expand Down
38 changes: 0 additions & 38 deletions message_definitions/v1.0/development.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,6 @@
<description>True if the data from this sensor is being actively used by the flight controller for guidance, navigation or control.</description>
</entry>
</enum>
<!-- Transactions for parameter protocol -->
<enum name="PARAM_TRANSACTION_TRANSPORT">
<description>Possible transport layers to set and get parameters via mavlink during a parameter transaction.</description>
<entry value="0" name="PARAM_TRANSACTION_TRANSPORT_PARAM">
<description>Transaction over param transport.</description>
</entry>
<entry value="1" name="PARAM_TRANSACTION_TRANSPORT_PARAM_EXT">
<description>Transaction over param_ext transport.</description>
</entry>
</enum>
<enum name="PARAM_TRANSACTION_ACTION">
<description>Possible parameter transaction actions.</description>
<entry value="0" name="PARAM_TRANSACTION_ACTION_START">
<description>Commit the current parameter transaction.</description>
</entry>
<entry value="1" name="PARAM_TRANSACTION_ACTION_COMMIT">
<description>Commit the current parameter transaction.</description>
</entry>
<entry value="2" name="PARAM_TRANSACTION_ACTION_CANCEL">
<description>Cancel the current parameter transaction.</description>
</entry>
</enum>
<enum name="MAV_STANDARD_MODE">
<description>Standard modes with a well understood meaning across flight stacks and vehicle types.
For example, most flight stack have the concept of a "return" or "RTL" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.
Expand Down Expand Up @@ -292,12 +270,6 @@
<param index="7" label="Altitude/Z">Center point altitude MSL/Z coordinate according to MAV_FRAME. If no MAV_FRAME specified, MAV_FRAME_GLOBAL is assumed.
INT32_MAX or NaN: Use current vehicle altitude.</param>
</entry>
<entry value="900" name="MAV_CMD_PARAM_TRANSACTION" hasLocation="false" isDestination="false">
<description>Request to start or end a parameter transaction. Multiple kinds of transport layers can be used to exchange parameters in the transaction (param, param_ext and mavftp). The command response can either be a success/failure or an in progress in case the receiving side takes some time to apply the parameters.</description>
<param index="1" label="Action" enum="PARAM_TRANSACTION_ACTION">Action to be performed (start, commit, cancel, etc.)</param>
<param index="2" label="Transport" enum="PARAM_TRANSACTION_TRANSPORT">Possible transport layers to set and get parameters via mavlink during a parameter transaction.</param>
<param index="3" label="Transaction ID">Identifier for a specific transaction.</param>
</entry>
<entry value="247" name="MAV_CMD_DO_UPGRADE" hasLocation="false" isDestination="false">
<description>Request a target system to start an upgrade of one (or all) of its components.
For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller.
Expand Down Expand Up @@ -522,16 +494,6 @@
</enum>
</enums>
<messages>
<!-- Transactions for parameter protocol -->
<message id="19" name="PARAM_ACK_TRANSACTION">
<description>Response from a PARAM_SET message when it is used in a transaction.</description>
<field type="uint8_t" name="target_system">Id of system that sent PARAM_SET message.</field>
<field type="uint8_t" name="target_component">Id of system that sent PARAM_SET message.</field>
<field type="char[16]" name="param_id">Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string</field>
<field type="float" name="param_value">Parameter value (new value if PARAM_ACCEPTED, current value otherwise)</field>
<field type="uint8_t" name="param_type" enum="MAV_PARAM_TYPE">Parameter type.</field>
<field type="uint8_t" name="param_result" enum="PARAM_ACK">Result code.</field>
</message>
<message id="295" name="AIRSPEED">
<description>Airspeed information from a sensor.</description>
<field type="uint8_t" name="id" instance="true">Sensor ID.</field>
Expand Down

0 comments on commit 2e46646

Please sign in to comment.