Skip to content

Commit 6070e38

Browse files
authored
Fix: also encapsulate "TransferMetadata" into cyphal namespace. (#246)
1 parent 84d005b commit 6070e38

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

examples/OpenCyphal-Heartbeat-Subscriber-With-Metadata/OpenCyphal-Heartbeat-Subscriber-With-Metadata.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static int const MKRCAN_MCP2515_INT_PIN = 7;
3030
**************************************************************************************/
3131

3232
void onReceiveBufferFull(CanardFrame const &);
33-
void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, TransferMetadata const & metadata);
33+
void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, cyphal::TransferMetadata const & metadata);
3434

3535
/**************************************************************************************
3636
* GLOBAL VARIABLES
@@ -95,7 +95,7 @@ void onReceiveBufferFull(CanardFrame const & frame)
9595
node_hdl.onCanFrameReceived(frame);
9696
}
9797

98-
void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, TransferMetadata const & metadata)
98+
void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, cyphal::TransferMetadata const & metadata)
9999
{
100100
char msg_buf[70];
101101
snprintf(

src/util/transfer_metadata.hpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,25 @@
77

88
#pragma once
99

10+
/**************************************************************************************
11+
* NAMESPACE
12+
**************************************************************************************/
13+
14+
namespace cyphal
15+
{
16+
17+
/**************************************************************************************
18+
* TYPEDEF
19+
**************************************************************************************/
20+
1021
struct TransferMetadata final
1122
{
1223
uint16_t remote_node_id;
1324
// More stuff may appear here in the future!
1425
};
26+
27+
/**************************************************************************************
28+
* NAMESPACE
29+
**************************************************************************************/
30+
31+
} /* cyphal */

0 commit comments

Comments
 (0)