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

#include <EndpointInfo.hpp>

Public Member Functions

 EndpointInfo (global_handle 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 ()
 

Public Attributes

const global_handle 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}
 

Detailed Description

data class containing the information about an endpoint

Constructor & Destructor Documentation

◆ EndpointInfo()

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

constructor from all data

Member Function Documentation

◆ addMessage()

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

add a message to the queue

◆ 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

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

◆ 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

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