Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a7cc61c
SDO: response->value_type = request->value_type
AntonOh May 22, 2026
4fe2bbf
add c++ library for deserializing uint8 arrays
elo0elo May 23, 2026
7358611
sdo_serializer.hpp: add serialization for bool and int8_t
elo0elo May 24, 2026
1325eb1
add tests for sdo_serializer
elo0elo May 24, 2026
6d98330
sdo_serializer.hpp: add serialization for int, uint, float, time and …
elo0elo May 24, 2026
32319e8
sdo_serializer.hpp: merge helper functions into generic function temp…
elo0elo May 24, 2026
a274c2c
sdo_serializer.hpp: add serialization for extended int, extended uint…
elo0elo May 24, 2026
69e3305
test_sdo_serializer.cpp: add tests for int, uint, float, time, domain…
elo0elo May 24, 2026
33dbe3b
sdo_serializer.hpp: add [[nodiscard]] to pure converting functions
elo0elo May 24, 2026
9a551e7
add aliases for EtherCAT and driver data types and enable implicit co…
elo0elo May 25, 2026
49ec361
sdo_serializer.hpp: add STRING data type
elo0elo May 25, 2026
145345e
test_sdo_serializer.cpp: add test for STRING(50) type
elo0elo May 25, 2026
0d715f4
testing_node.cpp: add provisional sdo request
elo0elo May 29, 2026
3af0193
rework handling of runtime errors
elo0elo May 29, 2026
0156313
add support for BIT, BITARR, WSTRING and ARRAY data types
elo0elo May 30, 2026
3411ebb
testing_node.cpp: move sdo_read request into a separate function
elo0elo May 30, 2026
cf6e161
sdo_serializer.hpp: align bool serialization with ETG spec
elo0elo May 30, 2026
7956613
merge #57 c++ sdo serialization lib
elo0elo May 30, 2026
71a2fce
fix integration of sdo_serializer.hpp
elo0elo May 30, 2026
06123a5
testing_node.cpp: add sdo_write method
elo0elo May 31, 2026
f0b4139
sdo_serializer.hpp: make error messages for STRING more verbose
elo0elo Jun 1, 2026
309c648
sdo_serializer.hpp: fix error message
elo0elo Jun 1, 2026
4610a4a
ec_manager.cpp: fix sdo_write
elo0elo Jun 1, 2026
b83a7f5
adapt psize in sdo_read dynamically to actual value
elo0elo Jun 1, 2026
59a2c7e
sdo_serializer.hpp: fix typo in data type alias
elo0elo Jun 3, 2026
a56baef
make sdo_serializer.hpp available to downstream packages
elo0elo Jun 3, 2026
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
31 changes: 31 additions & 0 deletions rise_motion_dev_ws/src/rise_motion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ include_directories(include)

add_subdirectory(SOEM)

# --- sdo_serializer library ---
add_library(sdo_serializer_lib INTERFACE)
target_include_directories(sdo_serializer_lib INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

add_executable(
rise_motion_main
src/main.cpp
Expand Down Expand Up @@ -52,6 +59,7 @@ install(TARGETS
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
find_package(ament_cmake_gtest REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
Expand All @@ -60,6 +68,29 @@ if(BUILD_TESTING)
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()

# --- sdo_serializer test ---
ament_add_gtest(test_sdo_serializer
test/test_sdo_serializer.cpp
)
if(TARGET test_sdo_serializer)
target_link_libraries(test_sdo_serializer sdo_serializer_lib)
endif()

endif()

install(
DIRECTORY include/
DESTINATION include
)

install(
TARGETS sdo_serializer_lib
EXPORT export_sdo_serializer_lib
INCLUDES DESTINATION include
)

ament_export_targets(export_sdo_serializer_lib)
ament_export_include_directories(include)

ament_package()
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ECManager {
bool set_motor_values_apsa(const std::vector<int32_t>& motor_values);

// Wrappers for SOEM ecx_SDOwrite, ecx_SDOread
bool sdo_read(uint16 device_id, uint16 index, uint8 subindex, std::vector<uint8>& value);
bool sdo_read(uint16 device_id, uint16 index, uint8 subindex, std::vector<uint8>& value, uint8 value_size);
bool sdo_write(uint16 device_id, uint16 index, uint8 subindex, std::vector<uint8>& value);

private:
Expand Down
30 changes: 30 additions & 0 deletions rise_motion_dev_ws/src/rise_motion/include/rise_motion/result.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace rise
{
template <typename T, typename E> struct Result
{
T value{};
E error{};
bool hasValue = false;

static Result ok(T v)
{
Result result;
result.value = std::move(v);
result.hasValue = true;
return result;
}

static Result err(E e)
{
Result result;
result.error = std::move(e);
result.hasValue = false;
return result;
}

explicit operator bool() const
{
return hasValue;
}
};
}
Loading
Loading