Open-source C++ library for the SpaceWire and RMAP protocols