Android-cuttlefish cvd tool
Namespaces | Classes | Typedefs | Enumerations | Functions
cuttlefish::monitor Namespace Reference

Namespaces

namespace  anonymous_namespace{kernel_log_server.cc}
 
namespace  anonymous_namespace{main.cc}
 

Classes

class  KernelLogServer
 
struct  ReadEventResult
 

Typedefs

using EventCallback = std::function< SubscriptionAction(Json::Value)>
 

Enumerations

enum  Event : int32_t {
  BootStarted = 0 , BootCompleted = 1 , BootFailed = 2 , WifiNetworkConnected = 3 ,
  MobileNetworkConnected = 4 , AdbdStarted = 5 , ScreenChanged = 6 , EthernetNetworkConnected = 7 ,
  KernelLoaded = 8 , BootloaderLoaded = 9 , DisplayPowerModeChanged = 10 , FastbootStarted = 11 ,
  BootPending = 12 , HibernationExited = 13
}
 
enum class  SubscriptionAction { ContinueSubscription , CancelSubscription }
 

Functions

Result< std::optional< ReadEventResult > > ReadEvent (SharedFD fd)
 
bool WriteEvent (SharedFD fd, const Json::Value &event_message)
 

Typedef Documentation

◆ EventCallback

using cuttlefish::monitor::EventCallback = typedef std::function<SubscriptionAction(Json::Value)>

Enumeration Type Documentation

◆ Event

Enumerator
BootStarted 
BootCompleted 
BootFailed 
WifiNetworkConnected 
MobileNetworkConnected 
AdbdStarted 
ScreenChanged 
EthernetNetworkConnected 
KernelLoaded 
BootloaderLoaded 
DisplayPowerModeChanged 
FastbootStarted 
BootPending 
HibernationExited 

◆ SubscriptionAction

Enumerator
ContinueSubscription 
CancelSubscription 

Function Documentation

◆ ReadEvent()

Result< std::optional< ReadEventResult > > cuttlefish::monitor::ReadEvent ( SharedFD  fd)

Read a kernel log event from fd. A failed result indicates an error occurred while reading the event, while an empty optional indicates EOF.

◆ WriteEvent()

bool cuttlefish::monitor::WriteEvent ( SharedFD  fd,
const Json::Value &  event_message 
)