1#ifndef ROSE_BinaryAnalysis_ModelChecker_WorkerStatus_H
2#define ROSE_BinaryAnalysis_ModelChecker_WorkerStatus_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
6#include <Rose/BinaryAnalysis/ModelChecker/BasicTypes.h>
8#include <Rose/Progress.h>
9#include <boost/filesystem.hpp>
12namespace BinaryAnalysis {
13namespace ModelChecker {
19 using Ptr = WorkerStatusPtr;
22 boost::filesystem::path fileName_;
27 time_t stateChange = 0;
28 Progress::Ptr progress;
29 uint64_t pathHash = 0;
32 std::vector<Status> workers_;
33 time_t lastFileUpdate_ = 0;
35 static constexpr time_t fileUpdatePeriod_ = 1;
36 static constexpr size_t workersPerLine_ = 4;
37 static constexpr size_t barWidth_ = 20;
40 WorkerStatus(
const boost::filesystem::path &fileName);
47 static Ptr instance(
const boost::filesystem::path &fileName);
52 void insert(
size_t workerIdx,
const Progress::Ptr&);
57 void setState(
size_t workerIdx, WorkerState, uint64_t pathHash);
60 const boost::filesystem::path& fileName()
const;
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
const char * WorkerState(int64_t)
Convert Rose::BinaryAnalysis::ModelChecker::WorkerState enum constant to a string.