Skip to content

Commit

Permalink
Fix: also encapsulate "TransferMetadata" into cyphal namespace. (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger authored Aug 10, 2023
1 parent 84d005b commit 6070e38
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static int const MKRCAN_MCP2515_INT_PIN = 7;
**************************************************************************************/

void onReceiveBufferFull(CanardFrame const &);
void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, TransferMetadata const & metadata);
void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, cyphal::TransferMetadata const & metadata);

/**************************************************************************************
* GLOBAL VARIABLES
Expand Down Expand Up @@ -95,7 +95,7 @@ void onReceiveBufferFull(CanardFrame const & frame)
node_hdl.onCanFrameReceived(frame);
}

void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, TransferMetadata const & metadata)
void onHeartbeat_1_0_Received(Heartbeat_1_0 const & msg, cyphal::TransferMetadata const & metadata)
{
char msg_buf[70];
snprintf(
Expand Down
17 changes: 17 additions & 0 deletions src/util/transfer_metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,25 @@

#pragma once

/**************************************************************************************
* NAMESPACE
**************************************************************************************/

namespace cyphal
{

/**************************************************************************************
* TYPEDEF
**************************************************************************************/

struct TransferMetadata final
{
uint16_t remote_node_id;
// More stuff may appear here in the future!
};

/**************************************************************************************
* NAMESPACE
**************************************************************************************/

} /* cyphal */

0 comments on commit 6070e38

Please sign in to comment.