Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced API to access Registration information #1697

Open
KerstinKeller opened this issue Aug 7, 2024 · 0 comments
Open

Enhanced API to access Registration information #1697

KerstinKeller opened this issue Aug 7, 2024 · 0 comments

Comments

@KerstinKeller
Copy link
Contributor

Context

We currently have different Utils function to receive information about the eCAL System.
E.g. Publishers / Subscribers, Clients / Servers and their attributes.

We need to improve this API to decrease system load in case of many entities.

Proposal

Idea for an API (to be reiterated):

struct EntityId;
enum class Type
{
  Publisher;
  Subscriber;
  Client;
  Service;
  Process;
}

std::vector<EntityId> Utils::GetEntities();

std::string GetTopicName(EntityId id);
std::vector<EntityId> Utils::GetEntityByName(std::string topic_name);
Type                  Utils::GetEntityType(EntityId id);
SDataTypeInformation  Utils::GetEntityDatatypeInformation(EntityId id);

using EntityCallback = std::function<void(const EntityId& id, ....);

Key Utils::AddEntityCallback(const EntityCallback& callback); 
void Utils::RemoveEntityCallback(const Key& key); 

bool IsPublisher(EntityId id);


struct SubscriberState
{
  EntityId id;
  State    state;
}
class Publisher
{
bool IsSubscribed();
// int GetSubscriberCount();
std::vector<SubscriberState> GetSubscribers();
}

Tasks and updates

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant