17#ifndef CYBER_SERVICE_DISCOVERY_SPECIFIC_MANAGER_CHANNEL_MANAGER_H_
18#define CYBER_SERVICE_DISCOVERY_SPECIFIC_MANAGER_CHANNEL_MANAGER_H_
22#include <unordered_map>
23#include <unordered_set>
26#include "cyber/proto/role_attributes.pb.h"
35namespace service_discovery {
75 void GetProtoDesc(
const std::string& channel_name, std::string* proto_desc);
83 void GetMsgType(
const std::string& channel_name, std::string* msg_type);
93 bool HasWriter(
const std::string& channel_name);
127 bool HasReader(
const std::string& channel_name);
183 const std::string& rhs_node_name);
197 void Dispose(
const ChangeMsg& msg)
override;
198 void OnTopoModuleLeave(
const std::string& host_name,
int process_id)
override;
203 void ScanMessageType(
const ChangeMsg& msg);
Topology Manager of Service related
void GetMsgType(const std::string &channel_name, std::string *msg_type)
Get the Msg Type of channel_name
void GetProtoDesc(const std::string &channel_name, std::string *proto_desc)
Get the Protocol Desc of channel_name
void GetReadersOfNode(const std::string &node_name, RoleAttrVec *readers)
Get the Readers Of Node object
bool HasWriter(const std::string &channel_name)
Inquire if there is at least one Writer that publishes channel_name
void GetWritersOfChannel(const std::string &channel_name, RoleAttrVec *writers)
Get the Writers Of Channel object
std::vector< proto::RoleAttributes > RoleAttrVec
void GetUpstreamOfNode(const std::string &node_name, RoleAttrVec *upstream_nodes)
Get the Upstream Of Node object.
std::unordered_set< std::string > ExemptedMessageTypes
void GetWritersOfNode(const std::string &node_name, RoleAttrVec *writers)
Get the Writers Of Node object
bool HasReader(const std::string &channel_name)
Inquire if there is at least one Reader that publishes channel_name
void GetReadersOfChannel(const std::string &channel_name, RoleAttrVec *readers)
Get the Readers Of Channel object
bool IsMessageTypeMatching(const std::string &lhs, const std::string &rhs)
Is lhs and rhs have same MessageType
void GetWriters(RoleAttrVec *writers)
Get All Writers object
void GetReaders(RoleAttrVec *readers)
Get All Readers object
void GetChannelNames(std::vector< std::string > *channels)
Get all channel names in the topology
FlowDirection GetFlowDirection(const std::string &lhs_node_name, const std::string &rhs_node_name)
Get the Flow Direction from lhs_node_node to rhs_node_name You can see FlowDirection's description fo...
ChannelManager()
Construct a new Channel Manager object
virtual ~ChannelManager()
Destroy the Channel Manager object
void GetDownstreamOfNode(const std::string &node_name, RoleAttrVec *downstream_nodes)
Get the Downstream Of Node object.
Base class for management of Topology elements.
elements in Cyber – Node, Channel, Service, Writer, Reader, Client and Server's relationship is prese...
FlowDirection
describe the flow direction between nodes As the DAG below A-—>B--—>C<--—D GetDirectionOf(A,...