Files

1.9 KiB

Task 3 Report

status: DONE_WITH_CONCERNS

Files created/modified

  • CMakeLists.txt
  • include/mag160c/mag160c.h
  • src/core/transport.hpp
  • src/core/tcm_device.hpp
  • src/core/tcm_device.cpp
  • src/c_api.cpp
  • tests/cpp/test_c_api.cpp
  • tests/cpp/test_tcm_device.cpp
  • progress.md

Commands run

g++ -std=c++17 -DMAG160C_STATIC -DMAG160C_HAS_LIBUSB=0 -Iinclude -Isrc src\core\error.cpp src\core\context.cpp src\core\tcm_frame.cpp src\core\tcm_device.cpp src\c_api.cpp tests\cpp\test_c_api.cpp -o build_task3_c_api_test.exe
.\build_task3_c_api_test.exe
g++ -std=c++17 -DMAG160C_STATIC -DMAG160C_HAS_LIBUSB=0 -Iinclude -Isrc src\core\error.cpp src\core\context.cpp src\core\tcm_frame.cpp src\core\tcm_device.cpp src\c_api.cpp tests\cpp\test_tcm_frame.cpp -o build_task3_tcm_frame_test.exe
.\build_task3_tcm_frame_test.exe
g++ -std=c++17 -DMAG160C_STATIC -DMAG160C_HAS_LIBUSB=0 -Iinclude -Isrc src\core\error.cpp src\core\context.cpp src\core\tcm_frame.cpp src\core\tcm_device.cpp src\c_api.cpp tests\cpp\test_tcm_device.cpp -o build_task3_tcm_device_test.exe
.\build_task3_tcm_device_test.exe

Test results

  • Direct MinGW C++17 compile/run verification passed for test_c_api.
  • Direct MinGW C++17 compile/run verification passed for test_tcm_frame.
  • Direct MinGW C++17 compile/run verification passed for test_tcm_device.

Concerns

  • CMake/CTest verification remains unavailable because cmake is not installed or not on PATH.
  • Generated local executables build_task3_c_api_test.exe, build_task3_tcm_frame_test.exe, and build_task3_tcm_device_test.exe exist from substitute verification.

Self-review notes

  • TcmCommandBuilder starts frame ids at 1 and increments them.
  • Rotate frames clamp to [-128, 128] and encode [direction, magnitude].
  • Light frames encode [on, red, green, blue] with 0xff channel values.
  • C ABI dry-run builders report required size on too-small buffers and validate invalid light color/mode.