w11 - cpp 0.794
Backend server for Rlink and w11
|
FIXME_docs. More...
#include <ReventLoop.hpp>
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 | |
ReventLoop & | operator= (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< PollDsc > | fPollDsc |
std::vector< pollfd > | fPollFd |
std::vector< pollhdl_t > | fPollHdl |
uint32_t | fTraceLevel |
trace level | |
std::shared_ptr< RlogFile > | fspLog |
log file ptr | |
FIXME_docs.
Definition at line 39 of file ReventLoop.hpp.
typedef std::function<int(const pollfd&)> Retro::ReventLoop::pollhdl_t |
Definition at line 41 of file ReventLoop.hpp.
Retro::ReventLoop::ReventLoop | ( | ) |
FIXME_docs.
Definition at line 52 of file ReventLoop.cpp.
|
virtual |
FIXME_docs.
Definition at line 66 of file ReventLoop.cpp.
|
delete |
|
delete |
void Retro::ReventLoop::AddPollHandler | ( | pollhdl_t && | pollhdl, |
int | fd, | ||
short | events = POLLIN |
||
) |
FIXME_docs.
Definition at line 75 of file ReventLoop.cpp.
References fPollDsc, fPollDscMutex, fspLog, fTraceLevel, fUpdatePoll, and Retro::RosPrintf().
Referenced by Retro::RlinkServer::AddPollHandler(), Retro::RlinkServer::RlinkServer(), and Retro::RlinkServer::StartOrResume().
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().
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().
void Retro::ReventLoop::RemovePollHandler | ( | int | fd | ) |
FIXME_docs.
Definition at line 140 of file ReventLoop.cpp.
References fPollDsc, fPollDscMutex, and fUpdatePoll.
|
inline |
FIXME_docs.
Definition at line 50 of file ReventLoop.ipp.
References fspLog.
Referenced by Retro::RlinkServer::SetConnect().
|
inline |
FIXME_docs.
Definition at line 59 of file ReventLoop.ipp.
References fTraceLevel.
Referenced by Retro::RlinkServer::SetTraceLevel().
|
inline |
|
inline |
FIXME_docs.
Definition at line 24 of file ReventLoop.ipp.
References fStopPending.
Referenced by Retro::RlinkServer::Stop().
|
inline |
FIXME_docs.
Definition at line 33 of file ReventLoop.ipp.
References fStopPending.
Referenced by Retro::RlinkServer::StartOrResume().
|
inline |
FIXME_docs.
Definition at line 42 of file ReventLoop.ipp.
References fStopPending.
Referenced by EventLoop(), and Retro::RlinkServerEventLoop::EventLoop().
|
virtual |
FIXME_docs.
Reimplemented in Retro::RlinkServerEventLoop.
Definition at line 157 of file ReventLoop.cpp.
References DoCall(), DoPoll(), fPollFd, fspLog, fUpdatePoll, and StopPending().
|
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().
|
protected |
FIXME_docs.
Definition at line 210 of file ReventLoop.cpp.
References fPollDsc, fPollDscMutex, fPollFd, fPollHdl, fspLog, fTraceLevel, fUpdatePoll, and Retro::RosPrintf().
Referenced by EventLoop(), and Retro::RlinkServerEventLoop::EventLoop().
|
protected |
FIXME_docs.
Definition at line 259 of file ReventLoop.cpp.
References fPollFd, fPollHdl, fspLog, fTraceLevel, fUpdatePoll, RemovePollHandler(), and Retro::RosPrintf().
Referenced by EventLoop(), and Retro::RlinkServerEventLoop::EventLoop().
|
protected |
Definition at line 82 of file ReventLoop.hpp.
Referenced by Dump(), Stop(), StopPending(), and UnStop().
|
protected |
Definition at line 83 of file ReventLoop.hpp.
Referenced by AddPollHandler(), DoCall(), DoPoll(), Dump(), EventLoop(), Retro::RlinkServerEventLoop::EventLoop(), and RemovePollHandler().
|
protected |
Definition at line 84 of file ReventLoop.hpp.
Referenced by AddPollHandler(), DoPoll(), Dump(), RemovePollHandler(), and TestPollHandler().
|
protected |
Definition at line 85 of file ReventLoop.hpp.
Referenced by AddPollHandler(), DoPoll(), Dump(), RemovePollHandler(), and TestPollHandler().
|
protected |
Definition at line 86 of file ReventLoop.hpp.
Referenced by DoCall(), DoPoll(), Dump(), EventLoop(), and Retro::RlinkServerEventLoop::EventLoop().
|
protected |
Definition at line 87 of file ReventLoop.hpp.
|
protected |
trace level
Definition at line 88 of file ReventLoop.hpp.
Referenced by AddPollHandler(), DoCall(), DoPoll(), Dump(), Retro::RlinkServerEventLoop::EventLoop(), RemovePollHandler(), SetTraceLevel(), and TraceLevel().
|
protected |
log file ptr
Definition at line 89 of file ReventLoop.hpp.
Referenced by AddPollHandler(), DoCall(), DoPoll(), Dump(), EventLoop(), Retro::RlinkServerEventLoop::EventLoop(), RemovePollHandler(), and SetLogFile().