Apollo 10.0
自动驾驶开放平台
cyber_topology_message.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#ifndef TOOLS_CVT_MONITOR_CYBER_TOPOLOGY_MESSAGE_H_
18#define TOOLS_CVT_MONITOR_CYBER_TOPOLOGY_MESSAGE_H_
19
20#include <map>
21#include <string>
22
24
25namespace apollo {
26namespace cyber {
27namespace proto {
28class ChangeMsg;
29class RoleAttributes;
30} // namespace proto
31} // namespace cyber
32} // namespace apollo
33
35// class GeneralMessage;
36
38 public:
39 explicit CyberTopologyMessage(const std::string& channel);
41
42 int Render(const Screen* s, int key) override;
43 RenderableMessage* Child(int index) const override;
44
47 bool isWriter);
48
49 private:
51 CyberTopologyMessage& operator=(const CyberTopologyMessage&) = delete;
52
53 void ChangeState(const Screen* s, int key);
54 bool IsFromHere(const std::string& node_name);
55
56 std::map<std::string, GeneralChannelMessage*>::const_iterator FindChild(
57 int index) const;
58
59 enum class SecondColumnType { MessageType, MessageFrameRatio };
60 SecondColumnType second_column_;
61
62 int pid_;
63 int col1_width_;
64 const std::string& specified_channel_;
65 std::map<std::string, GeneralChannelMessage*> all_channels_map_;
66};
67
68#endif // TOOLS_CVT_MONITOR_CYBER_TOPOLOGY_MESSAGE_H_
void AddReaderWriter(const apollo::cyber::proto::RoleAttributes &role, bool isWriter)
int Render(const Screen *s, int key) override
RenderableMessage * Child(int index) const override
void TopologyChanged(const apollo::cyber::proto::ChangeMsg &change_msg)
class register implement
Definition arena_queue.h:37