FreeNOS
Public Member Functions | Private Member Functions | Private Attributes
RecoveryClient Class Reference

RecoveryClient provides a simple interface to the local core's RecoveryServer. More...

#include <RecoveryClient.h>

Public Member Functions

 RecoveryClient (const ProcessID pid=RECOVERY_PID)
 Class constructor function. More...
 
Recovery::Result restartProcess (const ProcessID pid) const
 Restart a process. More...
 

Private Member Functions

Recovery::Result request (RecoveryMessage &msg) const
 Send an IPC request to the RecoveryServer. More...
 

Private Attributes

const ProcessID m_pid
 ProcessID of the RecoveryServer. More...
 

Detailed Description

RecoveryClient provides a simple interface to the local core's RecoveryServer.

See also
RecoveryServer

Definition at line 40 of file RecoveryClient.h.

Constructor & Destructor Documentation

◆ RecoveryClient()

RecoveryClient::RecoveryClient ( const ProcessID  pid = RECOVERY_PID)

Class constructor function.

Parameters
pidOptional ProcessID of the RecoveryServer.

Definition at line 22 of file RecoveryClient.cpp.

Member Function Documentation

◆ request()

Recovery::Result RecoveryClient::request ( RecoveryMessage msg) const
inlineprivate

Send an IPC request to the RecoveryServer.

Parameters
msgReference to the RecoveryMessage to send
Returns
Result code

Definition at line 27 of file RecoveryClient.cpp.

References StrictSingleton< ChannelClient >::instance(), Recovery::IpcError, m_pid, RecoveryMessage::result, and ChannelClient::Success.

Referenced by restartProcess().

◆ restartProcess()

Recovery::Result RecoveryClient::restartProcess ( const ProcessID  pid) const

Restart a process.

Parameters
pidProcess identifier of the program to restart.
Returns
Result code

Definition at line 39 of file RecoveryClient.cpp.

References RecoveryMessage::action, RecoveryMessage::pid, ChannelMessage::Request, request(), Recovery::RestartProcess, and ChannelMessage::type.

Referenced by SysControl::restartProcess().

Field Documentation

◆ m_pid

const ProcessID RecoveryClient::m_pid
private

ProcessID of the RecoveryServer.

Definition at line 74 of file RecoveryClient.h.

Referenced by request().


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