Project
Loading...
Searching...
No Matches
DeviceInfo.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#ifndef O2_FRAMEWORK_DEVICEINFO_H_
12#define O2_FRAMEWORK_DEVICEINFO_H_
13
17
18#include <cstddef>
19#include <string>
20#include <vector>
21// For pid_t
22#include <unistd.h>
23#include <array>
24#include <boost/property_tree/ptree.hpp>
25
26namespace o2::framework
27{
28
34struct DeviceInfo {
36 pid_t pid;
41 int exitStatus = -1;
43 size_t historyPos;
49 LogParsingHelpers::LogLevel logLevel{LogParsingHelpers::LogLevel::Info};
50
53
56 std::vector<std::string> history;
59 std::vector<LogParsingHelpers::LogLevel> historyLevel;
60 std::string firstSevereError;
61 std::string lastError;
63 std::string unprinted;
65 bool active;
67 bool readyToQuit = false;
73 std::string deviceState;
80
82 boost::property_tree::ptree currentConfig;
84 boost::property_tree::ptree currentProvenance;
86 size_t lastSignal;
89};
90
91} // namespace o2::framework
92#endif // O2_FRAMEWORK_DEVICEINFO_H_
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
@ Streaming
Data is being processed.
std::vector< std::string > history
Definition DeviceInfo.h:56
bool active
Whether the device is active (running) or not.
Definition DeviceInfo.h:65
size_t historySize
The size of the history circular buffer.
Definition DeviceInfo.h:45
boost::property_tree::ptree currentConfig
Current configuration for the device.
Definition DeviceInfo.h:82
std::vector< LogParsingHelpers::LogLevel > historyLevel
Definition DeviceInfo.h:59
pid_t pid
The pid of the device associated to this device.
Definition DeviceInfo.h:36
LogParsingHelpers::LogLevel minFailureLevel
The minimum level after which the device will exit with 0.
Definition DeviceInfo.h:52
bool readyToQuit
Whether the device is ready to quit.
Definition DeviceInfo.h:67
boost::property_tree::ptree currentProvenance
Current provenance for the configuration keys.
Definition DeviceInfo.h:84
std::string unprinted
An unterminated string which is not ready to be printed yet.
Definition DeviceInfo.h:63
Metric2DViewIndex inputChannelMetricsViewIndex
Definition DeviceInfo.h:76
LogParsingHelpers::LogLevel logLevel
The minimum log level for log messages sent/displayed by this device.
Definition DeviceInfo.h:49
int providedState
An incremental number for the state of the device.
Definition DeviceInfo.h:88
LogParsingHelpers::LogLevel maxLogLevel
The maximum log level ever seen by this device.
Definition DeviceInfo.h:47
StreamingState streamingState
The current state of the device, as reported by it.
Definition DeviceInfo.h:69
size_t historyPos
The position inside the history circular buffer of this device.
Definition DeviceInfo.h:43
Metric2DViewIndex outputChannelMetricsViewIndex
Definition DeviceInfo.h:79
std::string firstSevereError
Definition DeviceInfo.h:60
size_t lastSignal
Timestamp of the last signal received.
Definition DeviceInfo.h:86
LogLevel
Possible log levels for device log entries.