Cern
LibTmsApi 2.3.0

This class provides an interface for polling a number of file descriptors. It uses round robin polling. More...

#include <BPoll.h>

Public Types

typedef struct pollfd PollFd
 

Public Member Functions

 BPoll ()
 
 ~BPoll ()
 
void append (int fd, int events=POLLIN|POLLERR|POLLHUP|POLLNVAL)
 Append a file descriptor to polling list.
 
void delFd (int fd)
 Remove a file descriptor from polling list.
 
BError doPoll (int &fd, int timeoutUs=-1)
 Perform polling operation.
 
BError doPollEvents (int &fd, int &events, int timeoutUs=-1)
 Perform polling operation and return events.
 
int getPollFdsNum ()
 
PollFdgetPollFds ()
 
void clear ()
 

Private Member Functions

int nextFd (int i)
 

Private Attributes

int ofdsNum
 The number of FD's in list.
 
PollFdofds
 The list of poll fd's.
 
int ofdsNext
 The next list entry for round robin polling.
 

Detailed Description

This class provides an interface for polling a number of file descriptors. It uses round robin polling.

Member Typedef Documentation

◆ PollFd

typedef struct pollfd BPoll::PollFd

Constructor & Destructor Documentation

◆ BPoll()

BPoll::BPoll ( )

◆ ~BPoll()

BPoll::~BPoll ( )

Member Function Documentation

◆ append()

void BPoll::append ( int  fd,
int  events = POLLIN|POLLERR|POLLHUP|POLLNVAL 
)

Append a file descriptor to polling list.

◆ clear()

void BPoll::clear ( )

◆ delFd()

void BPoll::delFd ( int  fd)

Remove a file descriptor from polling list.

◆ doPoll()

BError BPoll::doPoll ( int &  fd,
int  timeoutUs = -1 
)

Perform polling operation.

◆ doPollEvents()

BError BPoll::doPollEvents ( int &  fd,
int &  events,
int  timeoutUs = -1 
)

Perform polling operation and return events.

◆ getPollFds()

BPoll::PollFd * BPoll::getPollFds ( )

◆ getPollFdsNum()

int BPoll::getPollFdsNum ( )

◆ nextFd()

int BPoll::nextFd ( int  i)
private

Member Data Documentation

◆ ofds

PollFd* BPoll::ofds
private

The list of poll fd's.

◆ ofdsNext

int BPoll::ofdsNext
private

The next list entry for round robin polling.

◆ ofdsNum

int BPoll::ofdsNum
private

The number of FD's in list.


The documentation for this class was generated from the following files:
  • /src/cern/tms/tms/beam/libBeam/BPoll.h
  • /src/cern/tms/tms/beam/libBeam/BPoll.cpp