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

#include <py_record.h>

apollo::cyber::record::PyRecordReader 的协作图:

Public 成员函数

 PyRecordReader (const std::string &file)
 
BagMessage ReadMessage (uint64_t begin_time=0, uint64_t end_time=std::numeric_limits< uint64_t >::max())
 
uint64_t GetMessageNumber (const std::string &channel_name)
 
std::string GetMessageType (const std::string &channel_name)
 
std::string GetProtoDesc (const std::string &channel_name)
 
std::string GetHeaderString ()
 
void Reset ()
 
std::set< std::string > GetChannelList () const
 

详细描述

在文件 py_record.h50 行定义.

构造及析构函数说明

◆ PyRecordReader()

apollo::cyber::record::PyRecordReader::PyRecordReader ( const std::string &  file)
inlineexplicit

在文件 py_record.h52 行定义.

52 {
53 record_reader_.reset(new RecordReader(file));
54 }

成员函数说明

◆ GetChannelList()

std::set< std::string > apollo::cyber::record::PyRecordReader::GetChannelList ( ) const
inline

在文件 py_record.h95 行定义.

95 {
96 return record_reader_->GetChannelList();
97 }

◆ GetHeaderString()

std::string apollo::cyber::record::PyRecordReader::GetHeaderString ( )
inline

在文件 py_record.h87 行定义.

87 {
88 std::string org_data;
89 record_reader_->GetHeader().SerializeToString(&org_data);
90 return org_data;
91 }

◆ GetMessageNumber()

uint64_t apollo::cyber::record::PyRecordReader::GetMessageNumber ( const std::string &  channel_name)
inline

在文件 py_record.h75 行定义.

75 {
76 return record_reader_->GetMessageNumber(channel_name);
77 }

◆ GetMessageType()

std::string apollo::cyber::record::PyRecordReader::GetMessageType ( const std::string &  channel_name)
inline

在文件 py_record.h79 行定义.

79 {
80 return record_reader_->GetMessageType(channel_name);
81 }

◆ GetProtoDesc()

std::string apollo::cyber::record::PyRecordReader::GetProtoDesc ( const std::string &  channel_name)
inline

在文件 py_record.h83 行定义.

83 {
84 return record_reader_->GetProtoDesc(channel_name);
85 }

◆ ReadMessage()

BagMessage apollo::cyber::record::PyRecordReader::ReadMessage ( uint64_t  begin_time = 0,
uint64_t  end_time = std::numeric_limits<uint64_t>::max() 
)
inline

在文件 py_record.h56 行定义.

58 {
59 BagMessage ret_msg;
60 RecordMessage record_message;
61 if (!record_reader_->ReadMessage(&record_message, begin_time, end_time)) {
62 ret_msg.end = true;
63 return ret_msg;
64 }
65
66 ret_msg.end = false;
67 ret_msg.channel_name = record_message.channel_name;
68 ret_msg.data = record_message.content;
69 ret_msg.timestamp = record_message.time;
70 ret_msg.data_type =
71 record_reader_->GetMessageType(record_message.channel_name);
72 return ret_msg;
73 }

◆ Reset()

void apollo::cyber::record::PyRecordReader::Reset ( )
inline

在文件 py_record.h93 行定义.

93{ record_reader_->Reset(); }

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