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

#include <EndpointInfo.hpp>

Public Member Functions

 EndpointInfo (GlobalHandle handle, const std::string &key_, const std::string &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 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
 

Detailed Description

data class containing the information about an endpoint

Constructor & Destructor Documentation

◆ EndpointInfo()

helics::EndpointInfo::EndpointInfo ( GlobalHandle  handle,
const std::string &  key_,
const std::string &  type_ 
)
inline

constructor from all data

Member Function Documentation

◆ addDestinationTarget()

void helics::EndpointInfo::addDestinationTarget ( GlobalHandle  dest,
const std::string &  destName,
const std::string &  destType 
)

add a target target

now update the target information

◆ addMessage()

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

add a message to the queue

◆ addSourceTarget()

void helics::EndpointInfo::addSourceTarget ( GlobalHandle  dest,
const std::string &  sourceName,
const std::string &  sourceType 
)

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().

◆ clearQueue()

void helics::EndpointInfo::clearQueue ( )

clear all the message queues

◆ 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

◆ 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: