helics  2.8.1
Functions
Publication functions

Functions

helics_bool helicsPublicationIsValid (helics_publication pub)
 
void helicsPublicationPublishRaw (helics_publication pub, const void *data, int inputDataLength, helics_error *err)
 
void helicsPublicationPublishString (helics_publication pub, const char *str, helics_error *err)
 
void helicsPublicationPublishInteger (helics_publication pub, int64_t val, helics_error *err)
 
void helicsPublicationPublishBoolean (helics_publication pub, helics_bool val, helics_error *err)
 
void helicsPublicationPublishDouble (helics_publication pub, double val, helics_error *err)
 
void helicsPublicationPublishTime (helics_publication pub, helics_time val, helics_error *err)
 
void helicsPublicationPublishChar (helics_publication pub, char val, helics_error *err)
 
void helicsPublicationPublishComplex (helics_publication pub, double real, double imag, helics_error *err)
 
void helicsPublicationPublishVector (helics_publication pub, const double *vectorInput, int vectorLength, helics_error *err)
 
void helicsPublicationPublishNamedPoint (helics_publication pub, const char *str, double val, helics_error *err)
 
void helicsPublicationAddTarget (helics_publication pub, const char *target, helics_error *err)
 
helics_bool helicsInputIsValid (helics_input ipt)
 
void helicsInputAddTarget (helics_input ipt, const char *target, helics_error *err)
 

Detailed Description

Functions for publishing data of various kinds. The data will get translated to the type specified when the publication was constructed automatically regardless of the function used to publish the data.

Function Documentation

◆ helicsInputAddTarget()

void helicsInputAddTarget ( helics_input  ipt,
const char *  target,
helics_error err 
)

Add a publication to the list of data that an input subscribes to.

Parameters
iptThe named input to modify.
targetThe name of a publication that an input should subscribe to. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Input::addTarget().

◆ helicsInputIsValid()

helics_bool helicsInputIsValid ( helics_input  ipt)

Check if an input is valid.

Parameters
iptThe input to check.
Returns
helics_true if the Input object represents a valid input.

References helics_false, and helics_true.

Referenced by helicscpp::Input::isValid().

◆ helicsPublicationAddTarget()

void helicsPublicationAddTarget ( helics_publication  pub,
const char *  target,
helics_error err 
)

Add a named input to the list of targets a publication publishes to.

Parameters
pubThe publication to add the target for.
targetThe name of an input that the data should be sent to. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

◆ helicsPublicationIsValid()

helics_bool helicsPublicationIsValid ( helics_publication  pub)

Check if a publication is valid.

Parameters
pubThe publication to check.
Returns
helics_true if the publication is a valid publication.

References helics_false, and helics_true.

Referenced by helicscpp::Publication::isValid().

◆ helicsPublicationPublishBoolean()

void helicsPublicationPublishBoolean ( helics_publication  pub,
helics_bool  val,
helics_error err 
)

Publish a Boolean Value.

Parameters
pubThe publication to publish for.
valThe boolean value to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

References helics_false.

Referenced by helicscpp::Publication::publish().

◆ helicsPublicationPublishChar()

void helicsPublicationPublishChar ( helics_publication  pub,
char  val,
helics_error err 
)

Publish a single character.

Parameters
pubThe publication to publish for.
valThe numerical value to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

◆ helicsPublicationPublishComplex()

void helicsPublicationPublishComplex ( helics_publication  pub,
double  real,
double  imag,
helics_error err 
)

Publish a complex value (or pair of values).

Parameters
pubThe publication to publish for.
realThe real part of a complex number to publish.
imagThe imaginary part of a complex number to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Publication::publish().

◆ helicsPublicationPublishDouble()

void helicsPublicationPublishDouble ( helics_publication  pub,
double  val,
helics_error err 
)

Publish a double floating point value.

Parameters
pubThe publication to publish for.
valThe numerical value to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Publication::publish().

◆ helicsPublicationPublishInteger()

void helicsPublicationPublishInteger ( helics_publication  pub,
int64_t  val,
helics_error err 
)

Publish an integer value.

Parameters
pubThe publication to publish for.
valThe numerical value to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Publication::publish().

◆ helicsPublicationPublishNamedPoint()

void helicsPublicationPublishNamedPoint ( helics_publication  pub,
const char *  str,
double  val,
helics_error err 
)

Publish a named point.

Parameters
pubThe publication to publish for.
strA string for the name to publish.
valA double for the value to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Publication::publish().

◆ helicsPublicationPublishRaw()

void helicsPublicationPublishRaw ( helics_publication  pub,
const void *  data,
int  inputDataLength,
helics_error err 
)

Publish raw data from a char * and length.

Parameters
pubThe publication to publish for.
dataA pointer to the raw data.
inputDataLengthThe size in bytes of the data to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

References data.

Referenced by helicscpp::Publication::publish().

◆ helicsPublicationPublishString()

void helicsPublicationPublishString ( helics_publication  pub,
const char *  str,
helics_error err 
)

Publish a string.

Parameters
pubThe publication to publish for.
strThe string to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Publication::publish().

◆ helicsPublicationPublishTime()

void helicsPublicationPublishTime ( helics_publication  pub,
helics_time  val,
helics_error err 
)

Publish a time value.

Parameters
pubThe publication to publish for.
valThe numerical value to publish. @forcpponly
[in,out]errA pointer to an error object for catching errors. @endforcpponly

◆ helicsPublicationPublishVector()

void helicsPublicationPublishVector ( helics_publication  pub,
const double *  vectorInput,
int  vectorLength,
helics_error err 
)

Publish a vector of doubles.

Parameters
pubThe publication to publish for.
vectorInputA pointer to an array of double data. @forcpponly
vectorLengthThe number of points to publish.
[in,out]errA pointer to an error object for catching errors. @endforcpponly

Referenced by helicscpp::Publication::publish().