Android-cuttlefish cvd tool
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine Class Reference
Inheritance diagram for cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine:
Collaboration graph
[legend]

Public Member Functions

 INJECT (CvdBootStateMachine(const CuttlefishConfig &config, AutoSetup< ProcessLeader >::Type &process_leader, KernelLogPipeProvider &kernel_log_pipe_provider, const vm_manager::VmManager &vm_manager, const CuttlefishConfig::InstanceSpecific &instance))
 
 ~CvdBootStateMachine ()
 
std::string Name () const override
 
- Public Member Functions inherited from cuttlefish::SetupFeature
virtual ~SetupFeature ()
 
virtual bool Enabled () const
 
- Public Member Functions inherited from cuttlefish::Feature< SetupFeature >
virtual ~Feature ()=default
 
virtual std::string Name () const=0
 

Private Member Functions

std::unordered_set< SetupFeature * > Dependencies () const override
 
Result< void > ResultSetup () override
 
void ThreadLoop (SharedFD boot_events_pipe, SharedFD restore_complete_pipe)
 
void DrainBootEventPipe (SharedFD boot_events_pipe)
 
bool OnBootEvtReceived (SharedFD boot_events_pipe)
 
bool BootCompleted () const
 
bool BootFailed () const
 
void SendExitCode (RunnerExitCodes exit_code, SharedFD fd)
 
bool MaybeWriteNotification ()
 

Private Attributes

const CuttlefishConfigconfig_
 
AutoSetup< ProcessLeader >::Type & process_leader_
 
KernelLogPipeProviderkernel_log_pipe_provider_
 
const vm_manager::VmManagervm_manager_
 
const CuttlefishConfig::InstanceSpecificinstance_
 
std::thread boot_event_handler_
 
std::thread restore_complete_handler_
 
SharedFD restore_complete_stop_write_
 
SharedFD fg_launcher_pipe_
 
SharedFD reboot_notification_
 
SharedFD interrupt_fd_read_
 
SharedFD interrupt_fd_write_
 
int state_
 

Static Private Attributes

static const int kBootStarted = 0
 
static const int kGuestBootCompleted = 1 << 0
 
static const int kGuestBootFailed = 1 << 1
 

Additional Inherited Members

- Static Public Member Functions inherited from cuttlefish::SetupFeature
static Result< void > RunSetup (const std::vector< SetupFeature * > &features)
 
- Static Public Member Functions inherited from cuttlefish::Feature< SetupFeature >
static Result< void > TopologicalVisit (const std::unordered_set< SetupFeature * > &features, const std::function< Result< void >(SetupFeature *)> &callback)
 

Constructor & Destructor Documentation

◆ ~CvdBootStateMachine()

cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::~CvdBootStateMachine ( )
inline

Member Function Documentation

◆ BootCompleted()

bool cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::BootCompleted ( ) const
inlineprivate

◆ BootFailed()

bool cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::BootFailed ( ) const
inlineprivate

◆ Dependencies()

std::unordered_set< SetupFeature * > cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::Dependencies ( ) const
inlineoverrideprivatevirtual

◆ DrainBootEventPipe()

void cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::DrainBootEventPipe ( SharedFD  boot_events_pipe)
inlineprivate

◆ INJECT()

cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::INJECT ( CvdBootStateMachine(const CuttlefishConfig &config, AutoSetup< ProcessLeader >::Type &process_leader, KernelLogPipeProvider &kernel_log_pipe_provider, const vm_manager::VmManager &vm_manager, const CuttlefishConfig::InstanceSpecific &instance)  )
inline

◆ MaybeWriteNotification()

bool cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::MaybeWriteNotification ( )
inlineprivate

◆ Name()

std::string cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::Name ( ) const
inlineoverridevirtual

◆ OnBootEvtReceived()

bool cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::OnBootEvtReceived ( SharedFD  boot_events_pipe)
inlineprivate

◆ ResultSetup()

Result< void > cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::ResultSetup ( )
inlineoverrideprivatevirtual

◆ SendExitCode()

void cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::SendExitCode ( RunnerExitCodes  exit_code,
SharedFD  fd 
)
inlineprivate

◆ ThreadLoop()

void cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::ThreadLoop ( SharedFD  boot_events_pipe,
SharedFD  restore_complete_pipe 
)
inlineprivate

Member Data Documentation

◆ boot_event_handler_

std::thread cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::boot_event_handler_
private

◆ config_

const CuttlefishConfig& cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::config_
private

◆ fg_launcher_pipe_

SharedFD cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::fg_launcher_pipe_
private

◆ instance_

const CuttlefishConfig::InstanceSpecific& cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::instance_
private

◆ interrupt_fd_read_

SharedFD cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::interrupt_fd_read_
private

◆ interrupt_fd_write_

SharedFD cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::interrupt_fd_write_
private

◆ kBootStarted

const int cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::kBootStarted = 0
staticprivate

◆ kernel_log_pipe_provider_

KernelLogPipeProvider& cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::kernel_log_pipe_provider_
private

◆ kGuestBootCompleted

const int cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::kGuestBootCompleted = 1 << 0
staticprivate

◆ kGuestBootFailed

const int cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::kGuestBootFailed = 1 << 1
staticprivate

◆ process_leader_

AutoSetup<ProcessLeader>::Type& cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::process_leader_
private

◆ reboot_notification_

SharedFD cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::reboot_notification_
private

◆ restore_complete_handler_

std::thread cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::restore_complete_handler_
private

◆ restore_complete_stop_write_

SharedFD cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::restore_complete_stop_write_
private

◆ state_

int cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::state_
private

◆ vm_manager_

const vm_manager::VmManager& cuttlefish::anonymous_namespace{boot_state_machine.cc}::CvdBootStateMachine::vm_manager_
private

The documentation for this class was generated from the following file: