helics  3.5.1
Public Member Functions | Public Attributes | List of all members
helics::EndpointInfo Class Reference

#include <EndpointInfo.hpp>

Public Member Functions

 EndpointInfo (GlobalHandle handle, std::string_view key_, std::string_view type_)
 
std::unique_ptr< MessagegetMessage (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
 

Detailed Description

data class containing the information about an endpoint

Constructor & Destructor Documentation

◆ EndpointInfo()

helics::EndpointInfo::EndpointInfo ( GlobalHandle  handle,
std::string_view  key_,
std::string_view  type_ 
)
inline

constructor from all data

Member Function Documentation

◆ addDestination()

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

◆ addMessage()

void helics::EndpointInfo::addMessage ( std::unique_ptr< Message message)

add a message to the queue

◆ addSource()

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

◆ availableMessages()

int32_t helics::EndpointInfo::availableMessages ( ) const

get the number of messages in the queue up to the specified time

Referenced by helics::FederateState::getQueueSize().

◆ checkInterfacesForIssues()

void helics::EndpointInfo::checkInterfacesForIssues ( std::vector< std::pair< int, std::string >> &  issues)

check the interfaces for specific issues

References key, requiredConnections, and targetedEndpoint.

◆ clearQueue()

void helics::EndpointInfo::clearQueue ( )

clear all the message queues

◆ disconnectFederate()

void helics::EndpointInfo::disconnectFederate ( GlobalFederateId  fedToDisconnect)

disconnect a federate

◆ firstMessageTime()

Time helics::EndpointInfo::firstMessageTime ( ) const

get the timestamp of the first message in the queue

◆ getDestinationTargets()

const std::string & helics::EndpointInfo::getDestinationTargets ( ) const

get a string with the names of the destination endpoints

Referenced by helics::CommonCore::getDestinationTargets().

◆ getMessage()

std::unique_ptr< Message > helics::EndpointInfo::getMessage ( Time  maxTime)

get the next message up to the specified time

Referenced by helics::FederateState::receive(), and helics::FederateState::receiveAny().

◆ getSourceTargets()

const std::string & helics::EndpointInfo::getSourceTargets ( ) const

get a string with the names of the source endpoints

Referenced by helics::CommonCore::getSourceTargets().

◆ getTargets()

const std::vector<std::pair<GlobalHandle, std::string_view> >& helics::EndpointInfo::getTargets ( ) const
inline

get the vector of endpoint targets

◆ hasConnection()

bool helics::EndpointInfo::hasConnection ( ) const

check if the endpoint has any connection information source or target

◆ hasSource()

bool helics::EndpointInfo::hasSource ( ) const

check if the endpoint has any source connection information

◆ hasTarget()

bool helics::EndpointInfo::hasTarget ( ) const

check if the endpoint has any target connection information

◆ queueSize()

int32_t helics::EndpointInfo::queueSize ( Time  maxTime) const

get the number of messages available up to a specific time inclusive

◆ queueSizeUpTo()

int32_t helics::EndpointInfo::queueSizeUpTo ( Time  maxTime) const

get the number of messages available prior to a specific time

◆ removeTarget()

void helics::EndpointInfo::removeTarget ( GlobalHandle  targetId)

remove a target from connection

◆ updateTimeInclusive()

bool helics::EndpointInfo::updateTimeInclusive ( Time  newTime)

update current data to all new data at newTime

Parameters
newTimethe time to move the subscription to
Returns
true if the value has changed

◆ updateTimeNextIteration()

bool helics::EndpointInfo::updateTimeNextIteration ( Time  newTime)

update current data to get all data through the first iteration at newTime

Parameters
newTimethe time to move the subscription to
Returns
true if the value has changed

◆ updateTimeUpTo()

bool helics::EndpointInfo::updateTimeUpTo ( Time  newTime)

update current data not including data at the specified time

Parameters
newTimethe time to move the subscription to
Returns
true if the value has changed

The documentation for this class was generated from the following files: