btftoolchain
os.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include "common.h"
6 
7 namespace btf
8 {
9 
17 class OS
18 {
19  public:
23  enum class Events
24  {
28 
30  set_event,
31 
33  wait_event,
34 
36  unknown
37  };
38 
44  static std::string eventToString(Events ev);
45 
51  static Events stringToEvent(const std::string& str);
52 
58  bool isWait(OS::Events e) const;
59 };
60 } // namespace btf
Class for OS (EVENT) Events (see BTF Specification Chapter 2.3.5).
Definition: os.h:18
Events
Possible types of OS events.
Definition: os.h:24
@ unknown
Default value.
@ wait_event
The wait_event event indicates that a task calls a system service to wait for an OS-Event.
@ set_event
The set_event event indicates that an OS-Event (target) gets set by a process or a stimulus (source).
static Events stringToEvent(const std::string &str)
Converts a string into the enum Events.
Definition: os.cpp:24
bool isWait(OS::Events e) const
Checks, if the current OS event is wait_event.
Definition: os.cpp:44
static std::string eventToString(Events ev)
Converts the enum Events into string.
Definition: os.cpp:5
Definition: btf.h:43