w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Retro::ReventLoop Class Reference

FIXME_docs. More...

#include <ReventLoop.hpp>

Inheritance diagram for Retro::ReventLoop:
[legend]
Collaboration diagram for Retro::ReventLoop:
[legend]

Classes

struct  PollDsc
 

Public Types

typedef std::function< int(const pollfd &)> pollhdl_t
 

Public Member Functions

 ReventLoop ()
 FIXME_docs.
 
virtual ~ReventLoop ()
 FIXME_docs.
 
 ReventLoop (const ReventLoop &)=delete
 
ReventLoopoperator= (const ReventLoop &)=delete
 
void AddPollHandler (pollhdl_t &&pollhdl, int fd, short events=POLLIN)
 FIXME_docs.
 
bool TestPollHandler (int fd, short events=POLLIN)
 FIXME_docs.
 
void RemovePollHandler (int fd, short events, bool nothrow=false)
 FIXME_docs.
 
void RemovePollHandler (int fd)
 FIXME_docs.
 
void SetLogFile (const std::shared_ptr< RlogFile > &splog)
 FIXME_docs.
 
void SetTraceLevel (uint32_t level)
 FIXME_docs.
 
uint32_t TraceLevel () const
 FIXME_docs.
 
void Stop ()
 FIXME_docs.
 
void UnStop ()
 FIXME_docs.
 
bool StopPending ()
 FIXME_docs.
 
virtual void EventLoop ()
 FIXME_docs.
 
virtual void Dump (std::ostream &os, int ind=0, const char *text=0, int detail=0) const
 FIXME_docs.
 

Protected Member Functions

int DoPoll (int timeout=-1)
 FIXME_docs.
 
void DoCall (void)
 FIXME_docs.
 

Protected Attributes

bool fStopPending
 
bool fUpdatePoll
 
std::mutex fPollDscMutex
 
std::vector< PollDscfPollDsc
 
std::vector< pollfd > fPollFd
 
std::vector< pollhdl_tfPollHdl
 
uint32_t fTraceLevel
 trace level
 
std::shared_ptr< RlogFilefspLog
 log file ptr
 

Detailed Description

FIXME_docs.

Definition at line 39 of file ReventLoop.hpp.

Member Typedef Documentation

◆ pollhdl_t

typedef std::function<int(const pollfd&)> Retro::ReventLoop::pollhdl_t

Definition at line 41 of file ReventLoop.hpp.

Constructor & Destructor Documentation

◆ ReventLoop() [1/2]

Retro::ReventLoop::ReventLoop ( )

FIXME_docs.

Definition at line 52 of file ReventLoop.cpp.

◆ ~ReventLoop()

Retro::ReventLoop::~ReventLoop ( )
virtual

FIXME_docs.

Definition at line 66 of file ReventLoop.cpp.

◆ ReventLoop() [2/2]

Retro::ReventLoop::ReventLoop ( const ReventLoop )
delete

Member Function Documentation

◆ operator=()

ReventLoop & Retro::ReventLoop::operator= ( const ReventLoop )
delete

◆ AddPollHandler()

void Retro::ReventLoop::AddPollHandler ( pollhdl_t &&  pollhdl,
int  fd,
short  events = POLLIN 
)

◆ TestPollHandler()

bool Retro::ReventLoop::TestPollHandler ( int  fd,
short  events = POLLIN 
)

FIXME_docs.

Definition at line 124 of file ReventLoop.cpp.

References fPollDsc, and fPollDscMutex.

Referenced by Retro::RlinkServer::StartOrResume(), and Retro::RlinkServer::TestPollHandler().

◆ RemovePollHandler() [1/2]

void Retro::ReventLoop::RemovePollHandler ( int  fd,
short  events,
bool  nothrow = false 
)

FIXME_docs.

Definition at line 101 of file ReventLoop.cpp.

References fPollDsc, fPollDscMutex, fspLog, fTraceLevel, fUpdatePoll, and Retro::RosPrintf().

Referenced by DoCall(), and Retro::RlinkServer::RemovePollHandler().

◆ RemovePollHandler() [2/2]

void Retro::ReventLoop::RemovePollHandler ( int  fd)

FIXME_docs.

Definition at line 140 of file ReventLoop.cpp.

References fPollDsc, fPollDscMutex, and fUpdatePoll.

◆ SetLogFile()

void Retro::ReventLoop::SetLogFile ( const std::shared_ptr< RlogFile > &  splog)
inline

FIXME_docs.

Definition at line 50 of file ReventLoop.ipp.

References fspLog.

Referenced by Retro::RlinkServer::SetConnect().

◆ SetTraceLevel()

void Retro::ReventLoop::SetTraceLevel ( uint32_t  level)
inline

FIXME_docs.

Definition at line 59 of file ReventLoop.ipp.

References fTraceLevel.

Referenced by Retro::RlinkServer::SetTraceLevel().

◆ TraceLevel()

uint32_t Retro::ReventLoop::TraceLevel ( ) const
inline

FIXME_docs.

Definition at line 68 of file ReventLoop.ipp.

References fTraceLevel.

◆ Stop()

void Retro::ReventLoop::Stop ( )
inline

FIXME_docs.

Definition at line 24 of file ReventLoop.ipp.

References fStopPending.

Referenced by Retro::RlinkServer::Stop().

◆ UnStop()

void Retro::ReventLoop::UnStop ( )
inline

FIXME_docs.

Definition at line 33 of file ReventLoop.ipp.

References fStopPending.

Referenced by Retro::RlinkServer::StartOrResume().

◆ StopPending()

bool Retro::ReventLoop::StopPending ( )
inline

FIXME_docs.

Definition at line 42 of file ReventLoop.ipp.

References fStopPending.

Referenced by EventLoop(), and Retro::RlinkServerEventLoop::EventLoop().

◆ EventLoop()

void Retro::ReventLoop::EventLoop ( )
virtual

FIXME_docs.

Reimplemented in Retro::RlinkServerEventLoop.

Definition at line 157 of file ReventLoop.cpp.

References DoCall(), DoPoll(), fPollFd, fspLog, fUpdatePoll, and StopPending().

◆ Dump()

void Retro::ReventLoop::Dump ( std::ostream &  os,
int  ind = 0,
const char *  text = 0,
int  detail = 0 
) const
virtual

FIXME_docs.

Definition at line 181 of file ReventLoop.cpp.

References fPollDsc, fPollDscMutex, fPollFd, fPollHdl, fspLog, fStopPending, fTraceLevel, fUpdatePoll, and Retro::RosPrintf().

Referenced by Retro::RlinkServer::Dump().

◆ DoPoll()

int Retro::ReventLoop::DoPoll ( int  timeout = -1)
protected

◆ DoCall()

void Retro::ReventLoop::DoCall ( void  )
protected

Member Data Documentation

◆ fStopPending

bool Retro::ReventLoop::fStopPending
protected

Definition at line 82 of file ReventLoop.hpp.

Referenced by Dump(), Stop(), StopPending(), and UnStop().

◆ fUpdatePoll

bool Retro::ReventLoop::fUpdatePoll
protected

◆ fPollDscMutex

std::mutex Retro::ReventLoop::fPollDscMutex
protected

Definition at line 84 of file ReventLoop.hpp.

Referenced by AddPollHandler(), DoPoll(), Dump(), RemovePollHandler(), and TestPollHandler().

◆ fPollDsc

std::vector<PollDsc> Retro::ReventLoop::fPollDsc
protected

Definition at line 85 of file ReventLoop.hpp.

Referenced by AddPollHandler(), DoPoll(), Dump(), RemovePollHandler(), and TestPollHandler().

◆ fPollFd

std::vector<pollfd> Retro::ReventLoop::fPollFd
protected

◆ fPollHdl

std::vector<pollhdl_t> Retro::ReventLoop::fPollHdl
protected

Definition at line 87 of file ReventLoop.hpp.

Referenced by DoCall(), DoPoll(), and Dump().

◆ fTraceLevel

uint32_t Retro::ReventLoop::fTraceLevel
protected

◆ fspLog

std::shared_ptr<RlogFile> Retro::ReventLoop::fspLog
protected

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