Apollo 10.0
自动驾驶开放平台
|
The record writer. 更多...
#include <record_writer.h>
Public 类型 | |
using | MessageNumberMap = std::unordered_map< std::string, uint64_t > |
using | MessageTypeMap = std::unordered_map< std::string, std::string > |
using | MessageProtoDescMap = std::unordered_map< std::string, std::string > |
using | FileWriterPtr = std::unique_ptr< RecordFileWriter > |
Public 成员函数 | |
RecordWriter () | |
The default constructor. | |
RecordWriter (const proto::Header &header) | |
The constructor with record header as parameter. | |
virtual | ~RecordWriter () |
Virtual Destructor. | |
bool | Open (const std::string &file) |
Open a record to write. | |
void | Close () |
Clean the record. | |
bool | WriteChannel (const std::string &channel_name, const std::string &message_type, const std::string &proto_desc) |
Write a channel to record. | |
template<typename MessageT > | |
bool | WriteMessage (const std::string &channel_name, const MessageT &message, const uint64_t time_nanosec, const std::string &proto_desc="") |
Write a message to record. | |
bool | SetSizeOfFileSegmentation (uint64_t size_kilobytes) |
Set max size (KB) to segment record file | |
bool | SetIntervalOfFileSegmentation (uint64_t time_sec) |
Set max interval (Second) to segment record file. | |
uint64_t | GetMessageNumber (const std::string &channel_name) const override |
Get message number by channel name. | |
const std::string & | GetMessageType (const std::string &channel_name) const override |
Get message type by channel name. | |
const std::string & | GetProtoDesc (const std::string &channel_name) const override |
Get proto descriptor string by channel name. | |
std::set< std::string > | GetChannelList () const override |
Get channel list. | |
bool | IsNewChannel (const std::string &channel_name) const |
Is a new channel recording or not. | |
template<> | |
bool | WriteMessage (const std::string &channel_name, const std::string &message, const uint64_t time_nanosec, const std::string &proto_desc) |
template<> | |
bool | WriteMessage (const std::string &channel_name, const std::shared_ptr< message::RawMessage > &message, const uint64_t time_nanosec, const std::string &proto_desc) |
![]() | |
virtual | ~RecordBase ()=default |
Destructor. | |
const proto::Header & | GetHeader () const |
Get record header. | |
const std::string | GetFile () const |
Get record file path. | |
额外继承的成员函数 | |
![]() | |
std::string | file_ |
proto::Header | header_ |
bool | is_opened_ = false |
The record writer.
在文件 record_writer.h 第 44 行定义.
using apollo::cyber::record::RecordWriter::FileWriterPtr = std::unique_ptr<RecordFileWriter> |
在文件 record_writer.h 第 49 行定义.
using apollo::cyber::record::RecordWriter::MessageNumberMap = std::unordered_map<std::string, uint64_t> |
在文件 record_writer.h 第 46 行定义.
using apollo::cyber::record::RecordWriter::MessageProtoDescMap = std::unordered_map<std::string, std::string> |
在文件 record_writer.h 第 48 行定义.
using apollo::cyber::record::RecordWriter::MessageTypeMap = std::unordered_map<std::string, std::string> |
在文件 record_writer.h 第 47 行定义.
apollo::cyber::record::RecordWriter::RecordWriter | ( | ) |
The default constructor.
在文件 record_writer.cc 第 33 行定义.
|
explicit |
The constructor with record header as parameter.
header |
在文件 record_writer.cc 第 35 行定义.
|
virtual |
Virtual Destructor.
在文件 record_writer.cc 第 37 行定义.
void apollo::cyber::record::RecordWriter::Close | ( | ) |
|
overridevirtual |
Get channel list.
实现了 apollo::cyber::record::RecordBase.
在文件 record_writer.cc 第 222 行定义.
|
overridevirtual |
Get message number by channel name.
channel_name |
实现了 apollo::cyber::record::RecordBase.
在文件 record_writer.cc 第 196 行定义.
|
overridevirtual |
Get message type by channel name.
channel_name |
实现了 apollo::cyber::record::RecordBase.
在文件 record_writer.cc 第 204 行定义.
|
overridevirtual |
Get proto descriptor string by channel name.
channel_name |
实现了 apollo::cyber::record::RecordBase.
在文件 record_writer.cc 第 213 行定义.
bool apollo::cyber::record::RecordWriter::IsNewChannel | ( | const std::string & | channel_name | ) | const |
Is a new channel recording or not.
在文件 record_writer.cc 第 176 行定义.
bool apollo::cyber::record::RecordWriter::Open | ( | const std::string & | file | ) |
Open a record to write.
file |
在文件 record_writer.cc 第 39 行定义.
bool apollo::cyber::record::RecordWriter::SetIntervalOfFileSegmentation | ( | uint64_t | time_sec | ) |
Set max interval (Second) to segment record file.
time_sec |
在文件 record_writer.cc 第 167 行定义.
bool apollo::cyber::record::RecordWriter::SetSizeOfFileSegmentation | ( | uint64_t | size_kilobytes | ) |
Set max size (KB) to segment record file
size_kilobytes |
在文件 record_writer.cc 第 158 行定义.
bool apollo::cyber::record::RecordWriter::WriteChannel | ( | const std::string & | channel_name, |
const std::string & | message_type, | ||
const std::string & | proto_desc | ||
) |
Write a channel to record.
channel_name | |
message_type | |
proto_desc |
在文件 record_writer.cc 第 107 行定义.
bool apollo::cyber::record::RecordWriter::WriteMessage | ( | const std::string & | channel_name, |
const MessageT & | message, | ||
const uint64_t | time_nanosec, | ||
const std::string & | proto_desc = "" |
||
) |
Write a message to record.
MessageT |
channel_name | |
message | |
time_nanosec | |
proto_desc |
在文件 record_writer.h 第 218 行定义.
|
inline |
在文件 record_writer.h 第 206 行定义.
|
inline |
在文件 record_writer.h 第 194 行定义.