9 namespace itk::itkpix::endec {
72 concept OutputCallback =
73 std::destructible<T> and
74 requires(T
self, uint8_t tag) {
75 {
self.out_init(tag) } -> std::same_as<void>;
76 {
self.out_next(tag) } -> std::same_as<void>;
77 {
self.out_done() } -> std::same_as<void>;
79 requires(T
self, uint64_t data) {
80 {
self.out_data(data) } -> std::same_as<void>;
82 requires(T
self, OutputError error) {
83 {
self.on_error(error) } -> std::same_as<uint8_t>;
Callback interface for output.
Definition: outcallback.hpp:39
virtual void out_data(uint64_t data)=0
Output 64-bit data word for current event.
virtual void out_next(uint8_t nbits)=0
Complete the event and start the next one.
virtual void out_init()=0
Create a new stream and start a new event.
virtual void out_done(uint8_t nbits)=0
Complete the event and finalize the stream.
virtual ~OutputCallback()=default
Destructor.
virtual uint8_t on_error(OutputError error)=0
Callback on encoding error.
Callback on event decoding error.
Definition: outcallback.hpp:15
error_t
Encoding errors.
Definition: outcallback.hpp:18
@ UNDEFINED
undefined
Definition: outcallback.hpp:19
@ TOT_NOHIT_ERROR
appeared "no hit" ToT = 0xF, which should never appear
Definition: outcallback.hpp:24
@ QCOL_RANGE_ERROR
qcol out of range
Definition: outcallback.hpp:20
@ WRONG_STATE_ERROR
wrong state
Definition: outcallback.hpp:23
@ QROW_ORDER_ERROR
incorrect order of qrow
Definition: outcallback.hpp:22
@ QROW_RANGE_ERROR
qrow out of range
Definition: outcallback.hpp:21
error_t code
error code
Definition: outcallback.hpp:27
uint8_t qcol
error qcol
Definition: outcallback.hpp:28
uint8_t qrow
error qrow
Definition: outcallback.hpp:29