YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ShmemInputStreamImpl Class Reference

#include <shmem_carrier/ShmemInputStream.h>

Public Member Functions

 ShmemInputStreamImpl ()
 
 ~ShmemInputStreamImpl ()
 
bool isOk () const
 
bool open (int port, shmem::Socket *pSock)
 
yarp::conf::ssize_t read (yarp::os::Bytes &b)
 
void close ()
 

Protected Member Functions

int read (char *data, int len)
 
bool Resize ()
 

Protected Attributes

bool m_bOpen
 
std::atomic< bool > m_bInterrupt
 
int m_ResizeNum
 
int m_Port
 
shmem::NamedSemaphore m_AccessMutex
 
shmem::NamedSemaphore m_WaitDataSem
 
std::mutex m_ReadSerializerMutex
 
std::recursive_mutex m_generalMutex
 
std::unique_ptr< shmem::SharedMemory > m_pMap
 
char * m_pData
 
ShmemHeader_t * m_pHeader
 
shmem::Socket * m_pSock
 

Detailed Description

Definition at line 21 of file ShmemInputStream.h.

Constructor & Destructor Documentation

◆ ShmemInputStreamImpl()

ShmemInputStreamImpl::ShmemInputStreamImpl ( )

Definition at line 15 of file ShmemInputStream.cpp.

◆ ~ShmemInputStreamImpl()

ShmemInputStreamImpl::~ShmemInputStreamImpl ( )

Definition at line 26 of file ShmemInputStream.cpp.

Member Function Documentation

◆ close()

void ShmemInputStreamImpl::close ( )

Definition at line 190 of file ShmemInputStream.cpp.

◆ isOk()

bool ShmemInputStreamImpl::isOk ( ) const

Definition at line 31 of file ShmemInputStream.cpp.

◆ open()

bool ShmemInputStreamImpl::open ( int  port,
shmem::Socket *  pSock 
)

Definition at line 36 of file ShmemInputStream.cpp.

◆ read() [1/2]

int ShmemInputStreamImpl::read ( char *  data,
int  len 
)
protected

Definition at line 109 of file ShmemInputStream.cpp.

◆ read() [2/2]

yarp::conf::ssize_t ShmemInputStreamImpl::read ( yarp::os::Bytes &  b)

Definition at line 155 of file ShmemInputStream.cpp.

◆ Resize()

bool ShmemInputStreamImpl::Resize ( )
protected

Definition at line 84 of file ShmemInputStream.cpp.

Member Data Documentation

◆ m_AccessMutex

shmem::NamedSemaphore ShmemInputStreamImpl::m_AccessMutex
protected

Definition at line 46 of file ShmemInputStream.h.

◆ m_bInterrupt

std::atomic<bool> ShmemInputStreamImpl::m_bInterrupt
protected

Definition at line 39 of file ShmemInputStream.h.

◆ m_bOpen

bool ShmemInputStreamImpl::m_bOpen
protected

Definition at line 35 of file ShmemInputStream.h.

◆ m_generalMutex

std::recursive_mutex ShmemInputStreamImpl::m_generalMutex
protected

Definition at line 56 of file ShmemInputStream.h.

◆ m_pData

char* ShmemInputStreamImpl::m_pData
protected

Definition at line 59 of file ShmemInputStream.h.

◆ m_pHeader

ShmemHeader_t* ShmemInputStreamImpl::m_pHeader
protected

Definition at line 60 of file ShmemInputStream.h.

◆ m_pMap

std::unique_ptr<shmem::SharedMemory> ShmemInputStreamImpl::m_pMap
protected

Definition at line 58 of file ShmemInputStream.h.

◆ m_Port

int ShmemInputStreamImpl::m_Port
protected

Definition at line 42 of file ShmemInputStream.h.

◆ m_pSock

shmem::Socket* ShmemInputStreamImpl::m_pSock
protected

Definition at line 62 of file ShmemInputStream.h.

◆ m_ReadSerializerMutex

std::mutex ShmemInputStreamImpl::m_ReadSerializerMutex
protected

Definition at line 53 of file ShmemInputStream.h.

◆ m_ResizeNum

int ShmemInputStreamImpl::m_ResizeNum
protected

Definition at line 41 of file ShmemInputStream.h.

◆ m_WaitDataSem

shmem::NamedSemaphore ShmemInputStreamImpl::m_WaitDataSem
protected

Definition at line 51 of file ShmemInputStream.h.


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