17 namespace itk::itkpix::cmd::dummy {
 
   25 template<
typename Callback>
 
   28   using CommandCallback = Callback;
 
   31     log.
info(
"create CommandDecoder()");
 
   34   CommandDecoder(uint8_t chip_id, CommandCallback& cb_cmd) : cb_cmd(cb_cmd) {
 
   35     log.
info(
"create CommandDecoder(chip_id: 0x{:x})", chip_id);
 
   39     log.
info(
"destroy CommandDecoder()");
 
   46   inline void decode(uint16_t cmd) {
 
   47     if (cmd == 0x817e) cb_cmd.sync();
 
   48     if (cmd == 0xAAAA) cb_cmd.idle();
 
   51   inline void decode(
const std::span<const uint16_t> cmds) {
 
   52     log.
info(
"decode(cmds: [{}])", itk::utils::to_string(cmds));
 
   53     for (
auto cmd : cmds) decode(cmd);
 
   56   inline void decode(
const uint16_t* cmds, 
size_t size) {
 
   57     decode({ cmds, 
size });
 
   61   CommandCallback& cb_cmd;
 
Dummy command decoder implementation.
Definition: cmddecoder.hpp:26
 
Logger class definition, wrapper around CoreLogger, adds templated methods for different logging leve...
Definition: logger.hpp:108
 
void info(fmt::format_string< Args... > fmt, Args &&...args)
Logs a message with information level.
Definition: logger.hpp:148
 
Templates for ITkPix emulator.