Closed lpetre-ulb closed 4 years ago
In addition to some nitpicking, I'd like to see a clear test plan for
float
since it's not covered bygetVFAT3ChipIDs
.
I would have liked to write a test suite, but I have no idea how to build it... If one write the following RPC method:
void vfat3::logFloats::operator()(const std::vector<float> &value) const
{
for (const auto& i : value)
LOG4CPLUS_WARN(logger, i);
}
and trivially calls it within the templated RPC framework: xhal::common::rpc::call<vfat3::logFloats>(conn, std::vector<float>{3.14, 42.42});
, the log output fully matches the expectations:
Mar 11 08:54:51 CTP7 user.warn rpcsvc: eagle48[9449] - void vfat3::logFloats::operator()(const std::vector<float>&) const - 3.14
Mar 11 08:54:51 CTP7 user.warn rpcsvc: eagle48[9449] - void vfat3::logFloats::operator()(const std::vector<float>&) const - 42.42
(Notice that it also test std::vector<T>
.)
All comments should have been addressed.
Description
This PR mainly introduces default new type (de)serializers for the templated RPC calls. In order to fix #138, the following additional types are now supported:
bool
;std::uint8_t
;std::uin16_t
;float
;std::vector<T>
whereT
is a (de)serializable type.To get the best support, split (de)serializers can now be created with the names
save
andload
. Please refer to the documentation and commit message for more information.Compilation has also been fixed. Previously, the xDAQ headers for the DAQ machine were searched for during compilation for the CTP7, leading to un-resolvable symbols at run-time.
Types of changes
Motivation and Context
See https://github.com/cms-gem-daq-project/xhal/issues/138; used in https://github.com/cms-gem-daq-project/ctp7_modules/pull/169.
How Has This Been Tested?
Works with https://github.com/cms-gem-daq-project/ctp7_modules/pull/169. More thorough tests should be perform in the future.
Checklist: