Updates source file names to adhere to a consistent lowercase convention, improving code maintainability and readability. This change ensures consistency across the codebase and aligns with common coding standards.
34 lines
666 B
C++
34 lines
666 B
C++
#include "dixon_node_state.h"
|
|
|
|
#include <iostream>
|
|
#include <ostream>
|
|
|
|
DixonNodeState& DixonNodeState::instance()
|
|
{
|
|
static DixonNodeState instance;
|
|
return instance;
|
|
}
|
|
|
|
void DixonNodeState::setConnected(const bool value)
|
|
{
|
|
connected_ = value;
|
|
}
|
|
|
|
bool DixonNodeState::isConnected() const
|
|
{
|
|
return connected_;
|
|
}
|
|
|
|
void DixonNodeState::setNodeStatus(NodeStatus value)
|
|
{
|
|
NodeStatus oldStatus = node_status_.exchange(value);
|
|
|
|
logger_.info("Node status changed: {} -> {}",
|
|
static_cast<int>(oldStatus),
|
|
static_cast<int>(value));
|
|
}
|
|
|
|
NodeStatus DixonNodeState::getNodeStatus() const
|
|
{
|
|
return node_status_.load();
|
|
}
|