btftoolchain
btf_signal.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 
19 class Signal
20 {
21  public:
25  enum class Events
26  {
28  read,
30  write,
32  unknown
33  };
34 
40  static std::string eventToString(Events ev);
41 
47  static Events stringToEvent(const std::string& str);
48 };
49 } // namespace btf
Class for Signal (SIG) Events (see BTF Specification Chapter 2.3.6).
Definition: btf_signal.h:20
static std::string eventToString(Events ev)
Converts the enum Events into string.
Definition: btf_signal.cpp:5
Events
Possible types of Signal events.
Definition: btf_signal.h:26
@ unknown
Default value.
@ read
The read event indicates that a signal (target) gets read by a process (source).
@ write
The write event indicates that a signal (target) gets written by a process or stimulus (source).
static Events stringToEvent(const std::string &str)
Converts a string into the enum Events.
Definition: btf_signal.cpp:21
Definition: btf.h:43