Skip to content
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 @@ -4,16 +4,16 @@
#include <stdexcept>
#include <string_view>

#include <librmcs/agent/common.hpp>
#include <librmcs/board/common.hpp>
#include <librmcs/data/datas.hpp>
#include <librmcs/protocol/handler.hpp>
#include <librmcs/spec/c_board/gpio.hpp>
#include <librmcs/spec/gpio.hpp>

namespace librmcs::agent {
namespace librmcs::board {

/**
* @brief High-level host agent for C Board.
* @brief High-level host board interface for C Board.
*
* This class owns the transport and protocol stack for a single board connection.
* The supplied `Callback` is stored by reference, is not owned by the board, and must outlive the
Expand Down Expand Up @@ -177,4 +177,4 @@ class CBoard final {
host::protocol::Handler handler_;
};

} // namespace librmcs::agent
} // namespace librmcs::board
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#include <type_traits>
#include <utility>

namespace librmcs::agent {
namespace librmcs::board {

/**
* @brief Advanced transport options passed during agent construction.
* @brief Advanced transport options passed during board construction.
*
* `bind_advanced_options()` returns an object derived from `AdvancedOptions` whose `thread_setup`
* callback depends on state stored in that derived object. Copying or moving the base type would
* slice away that state while retaining a now-dangling function pointer, so `AdvancedOptions` is
* intentionally non-copyable and non-movable.
*
* Construct `AdvancedOptions` directly during agent construction, or explicitly copy the required
* Construct `AdvancedOptions` directly during board construction, or explicitly copy the required
* plain data fields into a fresh `AdvancedOptions` instance instead of copying an existing object.
*
* @warning Never copy, assign, or reuse any function pointer from an object returned by
Expand Down Expand Up @@ -87,4 +87,4 @@ auto bind_advanced_options(FunctorT&& thread_setup_impl) {
return OptionsImpl{std::forward<FunctorT>(thread_setup_impl)};
}

} // namespace librmcs::agent
} // namespace librmcs::board
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
#include <stdexcept>
#include <string_view>

#include <librmcs/agent/common.hpp>
#include <librmcs/board/common.hpp>
#include <librmcs/data/datas.hpp>
#include <librmcs/protocol/handler.hpp>
#include <librmcs/spec/gpio.hpp>
#include <librmcs/spec/rmcs_board_lite/gpio.hpp>

namespace librmcs::agent {
namespace librmcs::board {

/**
* @brief High-level host agent for RMCS Board Lite.
* @brief High-level host board interface for RMCS Board Lite.
*
* This class owns the transport and protocol stack for a single board connection.
* The supplied `Callback` is stored by reference, is not owned by the board, and must outlive the
Expand Down Expand Up @@ -193,4 +193,4 @@ class RmcsBoardLite final {
host::protocol::Handler handler_;
};

} // namespace librmcs::agent
} // namespace librmcs::board
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
#include <stdexcept>
#include <string_view>

#include <librmcs/agent/common.hpp>
#include <librmcs/board/common.hpp>
#include <librmcs/data/datas.hpp>
#include <librmcs/protocol/handler.hpp>
#include <librmcs/spec/gpio.hpp>
#include <librmcs/spec/rmcs_board_pro/gpio.hpp>

namespace librmcs::agent {
namespace librmcs::board {

/**
* @brief High-level host agent for RMCS Board Pro.
* @brief High-level host board interface for RMCS Board Pro.
*
* This class owns the transport and protocol stack for a single board connection.
* The supplied `Callback` is stored by reference, is not owned by the board, and must outlive the
Expand Down Expand Up @@ -207,4 +207,4 @@ class RmcsBoardPro final {
host::protocol::Handler handler_;
};

} // namespace librmcs::agent
} // namespace librmcs::board
4 changes: 2 additions & 2 deletions host/include/librmcs/protocol/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cstdint>
#include <string_view>

#include <librmcs/agent/common.hpp>
#include <librmcs/board/common.hpp>
#include <librmcs/data/datas.hpp>
#include <librmcs/export.hpp>

Expand Down Expand Up @@ -43,7 +43,7 @@ class LIBRMCS_API Handler {

Handler(
uint16_t usb_vid, int32_t usb_pid, std::string_view serial_filter,
const agent::AdvancedOptions& options, data::DataCallback& callback);
const board::AdvancedOptions& options, data::DataCallback& callback);

Handler(const Handler&) = delete;
Handler& operator=(const Handler&) = delete;
Expand Down
4 changes: 2 additions & 2 deletions host/src/protocol/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "host/src/logging/logging.hpp"
#include "host/src/protocol/stream_buffer.hpp"
#include "host/src/transport/transport.hpp"
#include "librmcs/agent/common.hpp"
#include "librmcs/board/common.hpp"
#include "librmcs/data/datas.hpp"

namespace librmcs::host::protocol {
Expand Down Expand Up @@ -379,7 +379,7 @@ bool Handler::PacketBuilder::write_gpio_analog_data(

Handler::Handler(
uint16_t usb_vid, int32_t usb_pid, std::string_view serial_filter,
const agent::AdvancedOptions& options, data::DataCallback& callback)
const board::AdvancedOptions& options, data::DataCallback& callback)
: impl_(new Impl(
transport::usb::create_transport(usb_vid, usb_pid, serial_filter, options), callback)) {}

Expand Down
4 changes: 2 additions & 2 deletions host/src/transport/transport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string_view>

#include "core/src/protocol/constant.hpp"
#include "librmcs/agent/common.hpp"
#include "librmcs/board/common.hpp"

namespace librmcs::host::transport {

Expand Down Expand Up @@ -141,7 +141,7 @@ class Transport {

namespace usb {

using ConnectionOptions = agent::AdvancedOptions;
using ConnectionOptions = board::AdvancedOptions;

std::unique_ptr<Transport> create_transport(
uint16_t usb_vid, int32_t usb_pid, std::string_view serial_filter,
Expand Down
Loading