Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
FdHubPortBase::ReadThreadBase Class Referenceabstract

Read thread implementation with template-inspecific methods. More...

#include <HubDevice.hxx>

Inheritance diagram for FdHubPortBase::ReadThreadBase:
OSThread FdHubPort< HFlow >::ReadThread

Public Member Functions

 ReadThreadBase (FdHubPortBase *port)
 Constructor.
 
virtual int unit ()=0
 
virtual int buf_size ()=0
 
virtual void send_message (const void *buf, int size)=0
 Sends off a buffer.
 
void * entry () OVERRIDE
 User entry point for the created thread.
 
- Public Member Functions inherited from OSThread
 OSThread (const char *name, int priority, size_t stack_size, void *(*start_routine)(void *), void *arg)
 Create a thread.
 
 OSThread ()
 Creates a thread via inheritance.
 
void start (const char *name, int priority, size_t stack_size)
 Starts the thread.
 
virtual ~OSThread ()
 Default destructor.
 
bool is_created ()
 
void inherit ()
 Inherits the current thread.
 
os_thread_t get_handle ()
 
void lock_to_thread ()
 Sets the thread handle to the current calling thread's.
 
void unlock_from_thread ()
 Resets the thread handle to none.
 

Protected Attributes

FdHubPortBaseport_
 Parent port.
 

Additional Inherited Members

- Static Public Member Functions inherited from OSThread
static int getpriority (OSThread *thread)
 Return the current thread priority.
 
static int get_priority (OSThread *thread)
 Return the current thread priority.
 
static int get_priority_min ()
 Get the minimum thread priority.
 
static int get_priority_max ()
 Get the maximum thread priority.
 

Detailed Description

Read thread implementation with template-inspecific methods.

Definition at line 128 of file HubDevice.hxx.

Constructor & Destructor Documentation

◆ ReadThreadBase()

FdHubPortBase::ReadThreadBase::ReadThreadBase ( FdHubPortBase port)
inline

Constructor.

Parameters
portis the parent flow.

Definition at line 132 of file HubDevice.hxx.

Member Function Documentation

◆ buf_size()

virtual int FdHubPortBase::ReadThreadBase::buf_size ( )
pure virtual
Returns
we will allocate this many bytes for read buffer. This is the maximum number of bytes that we'll send.

Implemented in FdHubPort< HFlow >::ReadThread.

◆ entry()

void * FdHubPortBase::ReadThreadBase::entry ( )
inlinevirtual

User entry point for the created thread.

Returns
exit status

Reimplemented from OSThread.

Definition at line 143 of file HubDevice.hxx.

◆ send_message()

virtual void FdHubPortBase::ReadThreadBase::send_message ( const void *  buf,
int  size 
)
pure virtual

◆ unit()

virtual int FdHubPortBase::ReadThreadBase::unit ( )
pure virtual
Returns
the minimum number of bytes that we will send.

Implemented in FdHubPort< HFlow >::ReadThread.

Member Data Documentation

◆ port_

FdHubPortBase* FdHubPortBase::ReadThreadBase::port_
protected

Parent port.

Definition at line 191 of file HubDevice.hxx.


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