From 7b7286b9caf6da88d59f6bef1b18cfdcc3817ec0 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sat, 10 Jan 2015 20:12:48 +0300 Subject: [PATCH] HardwareVersion extended with 255-byte COA field --- dsdl/uavcan/protocol/551.GetNodeInfo.uavcan | 9 +++++---- dsdl/uavcan/protocol/HardwareVersion.uavcan | 3 +++ .../test/dsdl_test/dsdl_uavcan_compilability.cpp | 15 ++++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dsdl/uavcan/protocol/551.GetNodeInfo.uavcan b/dsdl/uavcan/protocol/551.GetNodeInfo.uavcan index 01fd45e16b..9360d59561 100644 --- a/dsdl/uavcan/protocol/551.GetNodeInfo.uavcan +++ b/dsdl/uavcan/protocol/551.GetNodeInfo.uavcan @@ -1,16 +1,17 @@ # # Full node info request. +# Note that all fields of the response section are byte-aligned. # --- -# Version information shall not be changed while the node is running. -HardwareVersion hardware_version -SoftwareVersion software_version - # Current node status NodeStatus status +# Version information shall not be changed while the node is running. +SoftwareVersion software_version +HardwareVersion hardware_version + # Human readable non-empty ASCII node name. # Empty string is not a valid node name. # Node name shall not be changed while the node is running. diff --git a/dsdl/uavcan/protocol/HardwareVersion.uavcan b/dsdl/uavcan/protocol/HardwareVersion.uavcan index 0c3685855a..731c2e4460 100644 --- a/dsdl/uavcan/protocol/HardwareVersion.uavcan +++ b/dsdl/uavcan/protocol/HardwareVersion.uavcan @@ -10,3 +10,6 @@ uint8 minor # All zeros is not a valid UID. # If filled with zeros, assume that the value is undefined. uint8[16] unique_id + +# Certificate of authenticity (COA) of the hardware, 255 bytes max. +uint8[<256] certificate_of_authenticity diff --git a/libuavcan/test/dsdl_test/dsdl_uavcan_compilability.cpp b/libuavcan/test/dsdl_test/dsdl_uavcan_compilability.cpp index 9e1b2cf804..d1671c4ef5 100644 --- a/libuavcan/test/dsdl_test/dsdl_uavcan_compilability.cpp +++ b/libuavcan/test/dsdl_test/dsdl_uavcan_compilability.cpp @@ -57,19 +57,20 @@ TEST(Dsdl, Streaming) "msgid: 0\n" "payload: \"Here\\x09goes\\x0Apayload\"\n" "==========\n" - "hardware_version: \n" - " major: 0\n" - " minor: 0\n" - " unique_id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n" + "status: \n" + " uptime_sec: 0\n" + " status_code: 0\n" "software_version: \n" " major: 0\n" " minor: 0\n" " optional_field_mask: 0\n" " vcs_commit: 0\n" " image_crc: 0\n" - "status: \n" - " uptime_sec: 0\n" - " status_code: 0\n" + "hardware_version: \n" + " major: 0\n" + " minor: 0\n" + " unique_id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n" + " certificate_of_authenticity: \"\"\n" "name: \"\"\n" "==========\n" "c: 0\n"