Apollo 10.0
自动驾驶开放平台
apollo::cyber::transport::SegmentFactory类 参考

#include <segment_factory.h>

apollo::cyber::transport::SegmentFactory 的协作图:

静态 Public 成员函数

static SegmentPtr CreateSegment (uint64_t channel_id)
 

详细描述

在文件 segment_factory.h26 行定义.

成员函数说明

◆ CreateSegment()

auto apollo::cyber::transport::SegmentFactory::CreateSegment ( uint64_t  channel_id)
static

在文件 segment_factory.cc33 行定义.

33 {
34 std::string segment_type(XsiSegment::Type());
35 auto& shm_conf = GlobalData::Instance()->Config();
36 if (shm_conf.has_transport_conf() &&
37 shm_conf.transport_conf().has_shm_conf() &&
38 shm_conf.transport_conf().shm_conf().has_shm_type()) {
39 segment_type = shm_conf.transport_conf().shm_conf().shm_type();
40 }
41
42 ADEBUG << "segment type: " << segment_type;
43
44 if (segment_type == PosixSegment::Type()) {
45 return std::make_shared<PosixSegment>(channel_id);
46 }
47
48 return std::make_shared<XsiSegment>(channel_id);
49}
#define ADEBUG
Definition log.h:41

该类的文档由以下文件生成: