We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent def9073 commit fa86c2eCopy full SHA for fa86c2e
src/Node.cpp
@@ -78,6 +78,23 @@ NodeInfo Node::create_node_info(uint8_t const protocol_major, uint8_t const prot
78
name);
79
}
80
81
+NodeInfo Node::create_node_info(uint8_t const protocol_major, uint8_t const protocol_minor,
82
+ uint8_t const hardware_major, uint8_t const hardware_minor,
83
+ uint8_t const software_major, uint8_t const software_minor,
84
+ uint64_t const software_vcs_revision_id,
85
+ std::array<uint8_t, 16> const & unique_id,
86
+ std::string const & name,
87
+ uint64_t const image_crc)
88
+{
89
+ return std::make_shared<impl::NodeInfo>(*this,
90
+ protocol_major, protocol_minor,
91
+ hardware_major, hardware_minor,
92
+ software_major, software_minor,
93
+ software_vcs_revision_id,
94
+ unique_id,
95
+ name, image_crc);
96
+}
97
+
98
void Node::spinSome()
99
{
100
processPortList();
src/Node.hpp
@@ -113,6 +113,14 @@ class Node
113
std::array<uint8_t, 16> const & unique_id,
114
std::string const & name);
115
116
+ NodeInfo create_node_info(uint8_t const protocol_major, uint8_t const protocol_minor,
117
118
119
120
121
122
+ uint64_t const image_crc);
123
124
/* Must be called from the application to process
125
* all received CAN frames.
126
*/
src/util/nodeinfo/NodeInfo.hpp
@@ -34,6 +34,29 @@ namespace impl
34
class NodeInfo : public NodeInfoBase
35
36
public:
37
+ NodeInfo(Node & node_hdl,
38
+ uint8_t const protocol_major,
39
+ uint8_t const protocol_minor,
40
+ uint8_t const hardware_major,
41
+ uint8_t const hardware_minor,
42
+ uint8_t const software_major,
43
+ uint8_t const software_minor,
44
45
46
47
+ std::uint64_t const software_image_crc)
48
+ : NodeInfo{node_hdl,
49
50
51
52
53
54
+ name}
55
+ {
56
+ std::array<std::uint64_t, 1> const crc = {software_image_crc};
57
+ std::copy(crc.cbegin(), crc.cend(), std::back_inserter(_node_info_rsp.software_image_crc));
58
+ }
59
60
NodeInfo(Node & node_hdl,
61
uint8_t const protocol_major,
62
uint8_t const protocol_minor,
0 commit comments