NodeStatus extended with a 32-bit vendor-specific status code

This commit is contained in:
Pavel Kirienko
2015-02-03 15:55:19 +03:00
parent d75139a318
commit d3d266264c
3 changed files with 8 additions and 4 deletions
+6 -3
View File
@@ -1,6 +1,9 @@
#
# Abstract node status information.
# Any UAVCAN node is required to publish this message periodically.
# It is NOT recommended to change its publication rate at run time.
#
# See http://uavcan.org/Standard_data_types_and_application_level_functions
#
uint16 MAX_PUBLICATION_PERIOD_MS = 1000
@@ -13,9 +16,6 @@ uint16 OFFLINE_TIMEOUT_MS = 3000
uint28 uptime_sec
# Status code should be used to reflect the node status in the most abstract way.
# Use cases: top-level onboard computer should not allow the UAV to begin normal operation
# unless all nodes report OK. If a mission critical node reports CRITICAL status, current
# mission should be immediately yet safely aborted (e.g. RTL).
# OFFLINE status can be actually reported by the node to explicitly inform other network
# participants that the sending node is about to shutdown. In this case other nodes will not
# have to wait OFFLINE_TIMEOUT_MS before they detect that the node is no longer available.
@@ -25,3 +25,6 @@ uint4 STATUS_WARNING = 2
uint4 STATUS_CRITICAL = 3
uint4 STATUS_OFFLINE = 15
uint4 status_code
# Optional, vendor-specific node status code, e.g. a fault code or a status bitmask.
uint32 vendor_specific_status_code
@@ -60,6 +60,7 @@ TEST(Dsdl, Streaming)
"status: \n"
" uptime_sec: 0\n"
" status_code: 0\n"
" vendor_specific_status_code: 0\n"
"software_version: \n"
" major: 0\n"
" minor: 0\n"
@@ -20,7 +20,7 @@ static void publishNodeStatus(CanDriverMock& can, uavcan::NodeID node_id, uavcan
// Manual message publication
ASSERT_LT(0, uavcan::protocol::NodeStatus::encode(msg, codec));
ASSERT_GE(7, buffer.getMaxWritePos());
ASSERT_GE(8, buffer.getMaxWritePos());
// DataTypeID data_type_id, TransferType transfer_type, NodeID src_node_id, NodeID dst_node_id,
// uint_fast8_t frame_index, TransferID transfer_id, bool last_frame