Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
FdHubPortService Class Referenceabstract

Shared base class for thread-based and select-based hub devices. More...

#include <Hub.hxx>

Inheritance diagram for FdHubPortService:
FdHubPortInterface Service Destructable HubDeviceSelect< HFlow, ReadFlow >

Public Member Functions

virtual void report_write_error ()=0
 Callback from the write flow when it encounters an error.
 
virtual void report_read_error ()=0
 Callback from the readflow when it encounters an error.
 
- Public Member Functions inherited from FdHubPortInterface
int fd ()
 
- Public Member Functions inherited from Service
 Service (ExecutorBase *e)
 Constructor.
 
 ~Service ()
 Destructor.
 
ExecutorBaseexecutor ()
 

Protected Member Functions

 FdHubPortService (ExecutorBase *exec, int fd)
 Constructor.
 
- Protected Member Functions inherited from FdHubPortInterface
 FdHubPortInterface (int fd)
 

Protected Attributes

BarrierNotifiable barrier_
 This notifiable will be called (if not NULL) upon read or write error.
 
- Protected Attributes inherited from FdHubPortInterface
int fd_ {-1}
 The device file descriptor.
 

Friends

template<class HFlow >
class HubDeviceSelectReadFlow
 
class openlcb::FdToTcpParser
 

Detailed Description

Shared base class for thread-based and select-based hub devices.

Definition at line 242 of file Hub.hxx.

Constructor & Destructor Documentation

◆ FdHubPortService()

FdHubPortService::FdHubPortService ( ExecutorBase exec,
int  fd 
)
inlineprotected

Constructor.

Parameters
execexecutor for the service.
fdthe device file descriptor

Definition at line 259 of file Hub.hxx.

Member Function Documentation

◆ report_read_error()

virtual void FdHubPortService::report_read_error ( )
pure virtual

Callback from the readflow when it encounters an error.

Implemented in HubDeviceSelect< HFlow, ReadFlow >.

◆ report_write_error()

virtual void FdHubPortService::report_write_error ( )
pure virtual

Callback from the write flow when it encounters an error.

Implemented in HubDeviceSelect< HFlow, ReadFlow >.

Friends And Related Symbol Documentation

◆ HubDeviceSelectReadFlow

template<class HFlow >
friend class HubDeviceSelectReadFlow
friend

Definition at line 253 of file Hub.hxx.

◆ openlcb::FdToTcpParser

friend class openlcb::FdToTcpParser
friend

Definition at line 254 of file Hub.hxx.

Member Data Documentation

◆ barrier_

BarrierNotifiable FdHubPortService::barrier_
protected

This notifiable will be called (if not NULL) upon read or write error.

Definition at line 266 of file Hub.hxx.


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