X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fclock-class.hpp;fp=src%2Fbin%2Flttng-sessiond%2Fclock-class.hpp;h=3a4755d07cb08a682b57675e69546ee61af88b82;hb=0220be14254fac4f7af642fd6630282b29776a70;hp=0000000000000000000000000000000000000000;hpb=f1ca0880a86b9fc2af3d246adcacfaf4554b2ecb;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/clock-class.hpp b/src/bin/lttng-sessiond/clock-class.hpp new file mode 100644 index 000000000..3a4755d07 --- /dev/null +++ b/src/bin/lttng-sessiond/clock-class.hpp @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2022 Jérémie Galarneau + * + * SPDX-License-Identifier: GPL-2.0-only + * + */ + +#ifndef LTTNG_CLOCK_CLASS_H +#define LTTNG_CLOCK_CLASS_H + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace lttng { +namespace sessiond { +namespace trace { + +class trace_class_visitor; + +class clock_class { +public: + using cycles_t = uint64_t; + using scycles_t = int64_t; + + const std::string name; + const std::string description; + const nonstd::optional uuid; + const scycles_t offset; + const cycles_t frequency; + + virtual void accept(trace_class_visitor& visitor) const; + virtual ~clock_class() = default; + +protected: + clock_class(std::string name, + std::string description, + nonstd::optional uuid, + scycles_t offset, + cycles_t frequency); +}; + +} /* namespace trace */ +} /* namespace sessiond */ +} /* namespace lttng */ + +#endif /* LTTNG_CLOCK_CLASS_H */