![]() |
helics
3.0.1
|
#include <EndpointInfo.hpp>
Public Member Functions | |
EndpointInfo (GlobalHandle handle, const std::string &key_, const std::string &type_) | |
std::unique_ptr< Message > | getMessage (Time maxTime) |
int32_t | availableMessages () const |
int32_t | queueSize (Time maxTime) const |
int32_t | queueSizeUpTo (Time maxTime) const |
void | addMessage (std::unique_ptr< Message > message) |
bool | updateTimeUpTo (Time newTime) |
bool | updateTimeInclusive (Time newTime) |
bool | updateTimeNextIteration (Time newTime) |
Time | firstMessageTime () const |
void | clearQueue () |
void | addDestinationTarget (GlobalHandle dest, const std::string &destName, const std::string &destType) |
void | addSourceTarget (GlobalHandle dest, const std::string &sourceName, const std::string &sourceType) |
void | removeTarget (GlobalHandle targetId) |
const std::vector< std::pair< GlobalHandle, std::string_view > > & | getTargets () const |
const std::string & | getSourceTargets () const |
const std::string & | getDestinationTargets () const |
Public Attributes | |
const GlobalHandle | id |
identifier for the handle | |
const std::string | key |
name of the endpoint | |
const std::string | type |
type of the endpoint | |
bool | hasFilter {false} |
indicator that the message has a filter | |
bool | required {false} |
bool | targettedEndpoint {false} |
indicator that the endpoint is a targeted endpoint only | |
data class containing the information about an endpoint
|
inline |
constructor from all data
void helics::EndpointInfo::addDestinationTarget | ( | GlobalHandle | dest, |
const std::string & | destName, | ||
const std::string & | destType | ||
) |
add a target target
now update the target information
void helics::EndpointInfo::addMessage | ( | std::unique_ptr< Message > | message | ) |
add a message to the queue
void helics::EndpointInfo::addSourceTarget | ( | GlobalHandle | dest, |
const std::string & | sourceName, | ||
const std::string & | sourceType | ||
) |
add a source to an endpoint
int32_t helics::EndpointInfo::availableMessages | ( | ) | const |
get the number of messages in the queue up to the specified time
Referenced by helics::FederateState::getQueueSize().
void helics::EndpointInfo::clearQueue | ( | ) |
clear all the message queues
Time helics::EndpointInfo::firstMessageTime | ( | ) | const |
get the timestamp of the first message in the queue
const std::string & helics::EndpointInfo::getDestinationTargets | ( | ) | const |
get a string with the names of the destination endpoints
Referenced by helics::CommonCore::getDestinationTargets().
get the next message up to the specified time
Referenced by helics::FederateState::receive(), and helics::FederateState::receiveAny().
const std::string & helics::EndpointInfo::getSourceTargets | ( | ) | const |
get a string with the names of the source endpoints
Referenced by helics::CommonCore::getSourceTargets().
|
inline |
get the vector of endpoint targets
int32_t helics::EndpointInfo::queueSize | ( | Time | maxTime | ) | const |
get the number of messages available up to a specific time inclusive
int32_t helics::EndpointInfo::queueSizeUpTo | ( | Time | maxTime | ) | const |
get the number of messages available prior to a specific time
void helics::EndpointInfo::removeTarget | ( | GlobalHandle | targetId | ) |
remove a target from connection
bool helics::EndpointInfo::updateTimeInclusive | ( | Time | newTime | ) |
update current data to all new data at newTime
newTime | the time to move the subscription to |
bool helics::EndpointInfo::updateTimeNextIteration | ( | Time | newTime | ) |
update current data to get all data through the first iteration at newTime
newTime | the time to move the subscription to |
bool helics::EndpointInfo::updateTimeUpTo | ( | Time | newTime | ) |
update current data not including data at the specified time
newTime | the time to move the subscription to |