Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
apollo::cyber::transport::Segment Class Referenceabstract

#include <segment.h>

Inheritance diagram for apollo::cyber::transport::Segment:
Inheritance graph
Collaboration diagram for apollo::cyber::transport::Segment:
Collaboration graph

Public Member Functions

 Segment (uint64_t channel_id)
 
virtual ~Segment ()
 
bool AcquireBlockToWrite (std::size_t msg_size, WritableBlock *writable_block)
 
void ReleaseWrittenBlock (const WritableBlock &writable_block)
 
bool AcquireBlockToRead (ReadableBlock *readable_block)
 
void ReleaseReadBlock (const ReadableBlock &readable_block)
 

Protected Member Functions

virtual bool Destroy ()
 
virtual void Reset ()=0
 
virtual bool Remove ()=0
 
virtual bool OpenOnly ()=0
 
virtual bool OpenOrCreate ()=0
 

Protected Attributes

bool init_
 
ShmConf conf_
 
uint64_t channel_id_
 
Statestate_
 
Blockblocks_
 
void * managed_shm_
 
std::mutex block_buf_lock_
 
std::unordered_map< uint32_t, uint8_t * > block_buf_addrs_
 

Constructor & Destructor Documentation

◆ Segment()

apollo::cyber::transport::Segment::Segment ( uint64_t  channel_id)
explicit

◆ ~Segment()

virtual apollo::cyber::transport::Segment::~Segment ( )
inlinevirtual

Member Function Documentation

◆ AcquireBlockToRead()

bool apollo::cyber::transport::Segment::AcquireBlockToRead ( ReadableBlock readable_block)

◆ AcquireBlockToWrite()

bool apollo::cyber::transport::Segment::AcquireBlockToWrite ( std::size_t  msg_size,
WritableBlock writable_block 
)

◆ Destroy()

virtual bool apollo::cyber::transport::Segment::Destroy ( )
protectedvirtual

◆ OpenOnly()

virtual bool apollo::cyber::transport::Segment::OpenOnly ( )
protectedpure virtual

◆ OpenOrCreate()

virtual bool apollo::cyber::transport::Segment::OpenOrCreate ( )
protectedpure virtual

◆ ReleaseReadBlock()

void apollo::cyber::transport::Segment::ReleaseReadBlock ( const ReadableBlock readable_block)

◆ ReleaseWrittenBlock()

void apollo::cyber::transport::Segment::ReleaseWrittenBlock ( const WritableBlock writable_block)

◆ Remove()

virtual bool apollo::cyber::transport::Segment::Remove ( )
protectedpure virtual

◆ Reset()

virtual void apollo::cyber::transport::Segment::Reset ( )
protectedpure virtual

Member Data Documentation

◆ block_buf_addrs_

std::unordered_map<uint32_t, uint8_t*> apollo::cyber::transport::Segment::block_buf_addrs_
protected

◆ block_buf_lock_

std::mutex apollo::cyber::transport::Segment::block_buf_lock_
protected

◆ blocks_

Block* apollo::cyber::transport::Segment::blocks_
protected

◆ channel_id_

uint64_t apollo::cyber::transport::Segment::channel_id_
protected

◆ conf_

ShmConf apollo::cyber::transport::Segment::conf_
protected

◆ init_

bool apollo::cyber::transport::Segment::init_
protected

◆ managed_shm_

void* apollo::cyber::transport::Segment::managed_shm_
protected

◆ state_

State* apollo::cyber::transport::Segment::state_
protected

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