Line data Source code
1 : #include "wibmod/WIB1/WIB.hh"
2 :
3 : std::vector<uint32_t>
4 0 : WIB::CaptureHistory(std::string const& address)
5 : {
6 0 : std::vector<uint32_t> ret;
7 0 : uint32_t val;
8 0 : while ((val = Read(address)) & 0x1) {
9 0 : ret.push_back(val);
10 : }
11 0 : return ret;
12 0 : }
13 :
14 : std::vector<uint128_t>
15 0 : WIB::CaptureHistory(std::string const& address, size_t wordCount)
16 : {
17 0 : std::vector<uint128_t> ret;
18 0 : bool capture = true;
19 0 : uint16_t addr = GetItem(address)->address;
20 0 : while (capture) {
21 0 : uint128_t val = 0;
22 : // Read address last since it causes the incr.
23 0 : for (size_t offset = wordCount; offset > 0; offset--) {
24 0 : val |= uint128_t(Read(addr + (offset - 1)) << 32 * (offset - 1));
25 : }
26 0 : ret.push_back(val);
27 0 : if (!(val & 0x1)) {
28 : break;
29 : }
30 : }
31 0 : return ret;
32 0 : }
|