One user-space repair task per eligible HWE debug-diag / compile-deploy base ID: 320 admitted (C 218, C++ 97, build scripts 5), 1 skipped by the content filter. Each ships a public spec with a check-to-basis table, at least two defects with single-fix fixtures, a symptom-masking fixture and an alternative correct implementation. Claude re-checked all 320: structure, the HWE quality items and trace6 Docker calibration receipts against current digests (320/320 USABLE). Difficulty is unmeasured. Known follow-up: 212 tasks use 120 ad-hoc family names; the next batch maps them to the canonical list. The batch's 1,256-line progress log stays in its factory report and the 36-local branch batch15-hwe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
#ifndef TIMER_ADAPTER_HPP
|
|
#define TIMER_ADAPTER_HPP
|
|
#include "service_port.hpp"
|
|
#include <vector>
|
|
namespace timerlab {
|
|
struct Result {
|
|
std::uint64_t sequence = 0;
|
|
std::int64_t payload = 0;
|
|
int status = 0;
|
|
std::int64_t value = 0;
|
|
};
|
|
struct AdapterView {
|
|
bool running = false;
|
|
bool pending = false;
|
|
std::uint64_t next_sequence = 1;
|
|
std::uint64_t callbacks = 0;
|
|
std::uint64_t launched = 0;
|
|
std::uint64_t skipped = 0;
|
|
std::uint64_t rejected = 0;
|
|
std::uint64_t succeeded = 0;
|
|
std::uint64_t failed = 0;
|
|
std::uint64_t timed_out = 0;
|
|
std::uint64_t canceled = 0;
|
|
};
|
|
class TimerAdapter {
|
|
public:
|
|
explicit TimerAdapter(ServicePort &port);
|
|
~TimerAdapter();
|
|
TimerAdapter(const TimerAdapter &) = delete;
|
|
TimerAdapter &operator=(const TimerAdapter &) = delete;
|
|
int start(int timeout, int gain, int route);
|
|
int callback(std::int64_t payload, int delay, int failure);
|
|
void collect();
|
|
void stop();
|
|
AdapterView view() const;
|
|
const std::vector<Result> &results() const;
|
|
private:
|
|
void finish(int status, std::int64_t value);
|
|
ServicePort &port_;
|
|
AdapterView state_;
|
|
Token client_ = 0;
|
|
Tick deadline_ = 0;
|
|
unsigned timeout_ = 1;
|
|
int gain_ = 1;
|
|
unsigned route_ = 0;
|
|
Result current_;
|
|
std::vector<Result> journal_;
|
|
};
|
|
}
|
|
#endif
|