![]() |
helics
3.6.1
|
#include <EndpointInfo.hpp>
Public Member Functions | |
| EndpointInfo (GlobalHandle handle, std::string_view key_, std::string_view 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 | hasConnection () const |
| bool | hasSource () const |
| bool | hasTarget () const |
| bool | updateTimeNextIteration (Time newTime) |
| Time | firstMessageTime () const |
| void | clearQueue () |
| void | addDestination (GlobalHandle dest, std::string_view destName, std::string_view destType) |
| void | addSource (GlobalHandle source, std::string_view sourceName, std::string_view sourceType) |
| void | removeTarget (GlobalHandle targetId) |
| void | disconnectFederate (GlobalFederateId fedToDisconnect) |
| const std::vector< std::pair< GlobalHandle, std::string_view > > & | getTargets () const |
| const std::string & | getSourceTargets () const |
| const std::string & | getDestinationTargets () const |
| void | checkInterfacesForIssues (std::vector< std::pair< int, std::string >> &issues) |
| void | setProperty (int32_t option, int32_t value) |
| int32_t | getProperty (int32_t option) 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 | targetedEndpoint {false} |
| indicator that the endpoint is a targeted endpoint only | |
| bool | sourceOnly {false} |
| the endpoint can only be a source of data and cannot receive data | |
| bool | receiveOnly {false} |
| the endpoint can only receive data and cannot send | |
| int32_t | requiredConnections {0} |
| an exact number of connections required | |
data class containing the information about an endpoint
|
inline |
constructor from all data
| void helics::EndpointInfo::addDestination | ( | GlobalHandle | dest, |
| std::string_view | destName, | ||
| std::string_view | destType | ||
| ) |
add a target to send messages
now update the target information
| void helics::EndpointInfo::addMessage | ( | std::unique_ptr< Message > | message | ) |
add a message to the queue
| void helics::EndpointInfo::addSource | ( | GlobalHandle | source, |
| std::string_view | sourceName, | ||
| std::string_view | sourceType | ||
| ) |
add an endpoint to receive information from
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::checkInterfacesForIssues | ( | std::vector< std::pair< int, std::string >> & | issues | ) |
check the interfaces for specific issues
References key, requiredConnections, and targetedEndpoint.
| void helics::EndpointInfo::clearQueue | ( | ) |
clear all the message queues
| void helics::EndpointInfo::disconnectFederate | ( | GlobalFederateId | fedToDisconnect | ) |
disconnect a federate
| 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
| bool helics::EndpointInfo::hasConnection | ( | ) | const |
check if the endpoint has any connection information source or target
| bool helics::EndpointInfo::hasSource | ( | ) | const |
check if the endpoint has any source connection information
| bool helics::EndpointInfo::hasTarget | ( | ) | const |
check if the endpoint has any target connection information
| 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 |