Apollo  6.0
Open source self driving car software
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
GeneralChannelMessage Class Reference

#include <general_channel_message.h>

Inheritance diagram for GeneralChannelMessage:
Inheritance graph
Collaboration diagram for GeneralChannelMessage:
Collaboration graph

Public Types

enum  ErrorCode {
  ErrorCode::NewSubClassFailed = -1, ErrorCode::CreateNodeFailed = -2, ErrorCode::CreateReaderFailed = -3, ErrorCode::MessageTypeIsEmpty = -4,
  ErrorCode::ChannelNameOrNodeNameIsEmpty = -5, ErrorCode::NoCloseChannel = -6
}
 

Public Member Functions

 ~GeneralChannelMessage ()
 
std::string GetChannelName (void) const
 
void set_message_type (const std::string &msgTypeName)
 
const std::string & message_type (void) const
 
bool is_enabled (void) const
 
bool has_message_come (void) const
 
double frame_ratio (void) override
 
const std::string & NodeName (void) const
 
void add_reader (const std::string &reader)
 
void del_reader (const std::string &reader)
 
void add_writer (const std::string &writer)
 
void del_writer (const std::string &writer)
 
int Render (const Screen *s, int key) override
 
void CloseChannel (void)
 
- Public Member Functions inherited from RenderableMessage
 RenderableMessage (RenderableMessage *parent=nullptr, int line_no=0)
 
virtual ~RenderableMessage ()
 
RenderableMessageparent (void) const
 
void set_parent (RenderableMessage *parent)
 
int page_item_count (void) const
 

Static Public Member Functions

static const char * ErrCode2Str (ErrorCode errCode)
 
static bool IsErrorCode (void *ptr)
 
static ErrorCode CastPtr2ErrorCode (void *ptr)
 
static GeneralChannelMessageCastErrorCode2Ptr (ErrorCode errCode)
 

Friends

class CyberTopologyMessage
 
class GeneralMessage
 

Additional Inherited Members

- Static Public Attributes inherited from RenderableMessage
static constexpr int FrameRatio_Precision = 2
 
- Protected Member Functions inherited from GeneralMessageBase
void InsertRepeatedMessage (int line_no, GeneralMessageBase *item)
 
RenderableMessageChild (int line_no) const override
 
 GeneralMessageBase (RenderableMessage *parent=nullptr)
 
 ~GeneralMessageBase (void)
 
void clear (void)
 
 GeneralMessageBase (const GeneralMessageBase &)=delete
 
GeneralMessageBaseoperator= (const GeneralMessageBase &)=delete
 
- Protected Member Functions inherited from RenderableMessage
int * line_no (void)
 
void set_line_no (int line_no)
 
void reset_line_page (void)
 
void SplitPages (int key)
 
- Static Protected Member Functions inherited from GeneralMessageBase
static void PrintMessage (GeneralMessageBase *baseMsg, const google::protobuf::Message &msg, int *jump_lines, const Screen *s, int *line_no, int indent)
 
static void PrintField (GeneralMessageBase *baseMsg, const google::protobuf::Message &msg, int *jump_lines, const Screen *s, int *line_no, int indent, const google::protobuf::Reflection *ref, const google::protobuf::FieldDescriptor *field, int index)
 
static int LineCount (const google::protobuf::Message &msg, int screen_width)
 
static int LineCountOfField (const google::protobuf::Message &msg, int screen_width, const google::protobuf::FieldDescriptor *field, const google::protobuf::Reflection *reflection, bool is_folded=true)
 
- Protected Attributes inherited from GeneralMessageBase
std::map< const int, GeneralMessageBase * > children_map_
 
- Protected Attributes inherited from RenderableMessage
int line_no_
 
int pages_
 
int page_index_
 
int page_item_count_
 
RenderableMessageparent_
 
double frame_ratio_
 

Member Enumeration Documentation

◆ ErrorCode

Enumerator
NewSubClassFailed 
CreateNodeFailed 
CreateReaderFailed 
MessageTypeIsEmpty 
ChannelNameOrNodeNameIsEmpty 
NoCloseChannel 

Constructor & Destructor Documentation

◆ ~GeneralChannelMessage()

GeneralChannelMessage::~GeneralChannelMessage ( )
inline

Member Function Documentation

◆ add_reader()

void GeneralChannelMessage::add_reader ( const std::string &  reader)
inline

◆ add_writer()

void GeneralChannelMessage::add_writer ( const std::string &  writer)
inline

◆ CastErrorCode2Ptr()

static GeneralChannelMessage* GeneralChannelMessage::CastErrorCode2Ptr ( ErrorCode  errCode)
inlinestatic

◆ CastPtr2ErrorCode()

static ErrorCode GeneralChannelMessage::CastPtr2ErrorCode ( void *  ptr)
inlinestatic

◆ CloseChannel()

void GeneralChannelMessage::CloseChannel ( void  )
inline

◆ del_reader()

void GeneralChannelMessage::del_reader ( const std::string &  reader)
inline

◆ del_writer()

void GeneralChannelMessage::del_writer ( const std::string &  writer)
inline

◆ ErrCode2Str()

static const char* GeneralChannelMessage::ErrCode2Str ( ErrorCode  errCode)
static

◆ frame_ratio()

double GeneralChannelMessage::frame_ratio ( void  )
overridevirtual

Reimplemented from RenderableMessage.

◆ GetChannelName()

std::string GeneralChannelMessage::GetChannelName ( void  ) const
inline

◆ has_message_come()

bool GeneralChannelMessage::has_message_come ( void  ) const
inline

◆ is_enabled()

bool GeneralChannelMessage::is_enabled ( void  ) const
inline

◆ IsErrorCode()

static bool GeneralChannelMessage::IsErrorCode ( void *  ptr)
static

◆ message_type()

const std::string& GeneralChannelMessage::message_type ( void  ) const
inline

◆ NodeName()

const std::string& GeneralChannelMessage::NodeName ( void  ) const
inline

◆ Render()

int GeneralChannelMessage::Render ( const Screen s,
int  key 
)
overridevirtual

Implements RenderableMessage.

◆ set_message_type()

void GeneralChannelMessage::set_message_type ( const std::string &  msgTypeName)
inline

Friends And Related Function Documentation

◆ CyberTopologyMessage

friend class CyberTopologyMessage
friend

◆ GeneralMessage

friend class GeneralMessage
friend

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