helics
3.5.2
|
#include <PublicationInfo.hpp>
Public Member Functions | |
PublicationInfo (GlobalHandle pid, std::string_view pkey, std::string_view ptype, std::string_view punits) | |
bool | CheckSetValue (const char *dataToCheck, uint64_t len, Time currentTime, bool forceChangeCheck) |
bool | addSubscriber (GlobalHandle newSubscriber, std::string_view inputName) |
void | removeSubscriber (GlobalHandle subscriberToRemove) |
void | disconnectFederate (GlobalFederateId fedToDisconnect) |
void | setProperty (int32_t option, int32_t value) |
int32_t | getProperty (int32_t option) const |
const std::string & | getTargets () const |
Public Attributes | |
const GlobalHandle | id |
std::vector< SubscriberInformation > | subscribers |
container for all the subscribers of a publication | |
const std::string | key |
the key identifier for the publication | |
const std::string | type |
the type of the publication data | |
const std::string | units |
the units of the publication data | |
SmallBuffer | data |
the most recent publication data | |
Time | lastPublishTime {timeZero} |
the time of the last publication | |
bool | has_update {false} |
indicator that the publication has updates | |
bool | only_update_on_change {false} |
bool | required {false} |
indicator that it is required to be output someplace | |
bool | buffer_data {false} |
indicator that the publication should buffer data | |
int32_t | requiredConnections {0} |
the number of required connections 0 is no requirement | |
Time | minTimeGap {timeZero} |
a time restriction on amount of publishing | |
data class containing the information about a publication
|
inline |
constructor from the basic information
bool helics::PublicationInfo::addSubscriber | ( | GlobalHandle | newSubscriber, |
std::string_view | inputName | ||
) |
add a new subscriber to the publication
References subscribers.
bool helics::PublicationInfo::CheckSetValue | ( | const char * | dataToCheck, |
uint64_t | len, | ||
Time | currentTime, | ||
bool | forceChangeCheck | ||
) |
check if the value should be published or not
References helics::SmallBuffer::assign(), buffer_data, data, lastPublishTime, minTimeGap, helics::timeZero, and helics::SmallBuffer::to_string().
Referenced by helics::FederateState::checkAndSetValue().
void helics::PublicationInfo::disconnectFederate | ( | GlobalFederateId | fedToDisconnect | ) |
disconnect a federate from the subscriber
References subscribers.
void helics::PublicationInfo::removeSubscriber | ( | GlobalHandle | subscriberToRemove | ) |
remove a subscriber
References subscribers.
const GlobalHandle helics::PublicationInfo::id |
the identifier for the containing federate