Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: also encapsulate "TransferMetadata" into cyphal namespace. #246

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 */
Loading