helics  3.5.2
Functions
Publication functions

Functions

HelicsBool helicsPublicationIsValid (HelicsPublication pub)
 
void helicsPublicationPublishBytes (HelicsPublication pub, const void *data, int inputDataLength, HelicsError *err)
 
void helicsPublicationPublishString (HelicsPublication pub, const char *val, HelicsError *err)
 
void helicsPublicationPublishInteger (HelicsPublication pub, int64_t val, HelicsError *err)
 
void helicsPublicationPublishBoolean (HelicsPublication pub, HelicsBool val, HelicsError *err)
 
void helicsPublicationPublishDouble (HelicsPublication pub, double val, HelicsError *err)
 
void helicsPublicationPublishTime (HelicsPublication pub, HelicsTime val, HelicsError *err)
 
void helicsPublicationPublishChar (HelicsPublication pub, char val, HelicsError *err)
 
void helicsPublicationPublishComplex (HelicsPublication pub, double real, double imag, HelicsError *err)
 
void helicsPublicationPublishVector (HelicsPublication pub, const double *vectorInput, int vectorLength, HelicsError *err)
 
void helicsPublicationPublishComplexVector (HelicsPublication pub, const double *vectorInput, int vectorLength, HelicsError *err)
 
void helicsPublicationPublishNamedPoint (HelicsPublication pub, const char *field, double val, HelicsError *err)
 
void helicsPublicationPublishDataBuffer (HelicsPublication pub, HelicsDataBuffer buffer, HelicsError *err)
 
void helicsPublicationAddTarget (HelicsPublication pub, const char *target, HelicsError *err)
 
HelicsBool helicsInputIsValid (HelicsInput ipt)
 
void helicsInputAddTarget (HelicsInput ipt, const char *target, HelicsError *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 ( HelicsInput  ipt,
const char *  target,
HelicsError 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.
[in,out]errA pointer to an error object for catching errors.

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

◆ helicsInputIsValid()

HelicsBool helicsInputIsValid ( HelicsInput  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 ( HelicsPublication  pub,
const char *  target,
HelicsError 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.
[in,out]errA pointer to an error object for catching errors.

◆ helicsPublicationIsValid()

HelicsBool helicsPublicationIsValid ( HelicsPublication  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 ( HelicsPublication  pub,
HelicsBool  val,
HelicsError err 
)

Publish a Boolean Value.

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

References HELICS_FALSE.

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

◆ helicsPublicationPublishBytes()

void helicsPublicationPublishBytes ( HelicsPublication  pub,
const void *  data,
int  inputDataLength,
HelicsError 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.
[in,out]errA pointer to an error object for catching errors.

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

◆ helicsPublicationPublishChar()

void helicsPublicationPublishChar ( HelicsPublication  pub,
char  val,
HelicsError err 
)

Publish a single character.

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

◆ helicsPublicationPublishComplex()

void helicsPublicationPublishComplex ( HelicsPublication  pub,
double  real,
double  imag,
HelicsError 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.
[in,out]errA pointer to an error object for catching errors.

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

◆ helicsPublicationPublishComplexVector()

void helicsPublicationPublishComplexVector ( HelicsPublication  pub,
const double *  vectorInput,
int  vectorLength,
HelicsError err 
)

Publish a vector of complex doubles.

Parameters
pubThe publication to publish for.
vectorInputA pointer to an array of complex double data (alternating real and imaginary values).
vectorLengthThe number of values to publish; vectorInput must contain 2xvectorLength values.
[in,out]errA pointer to an error object for catching errors.

Referenced by helicscpp::Publication::publish(), and helicscpp::Publication::publishComplex().

◆ helicsPublicationPublishDataBuffer()

void helicsPublicationPublishDataBuffer ( HelicsPublication  pub,
HelicsDataBuffer  buffer,
HelicsError err 
)

Publish the contents of a helicsDataBuffer.

Parameters
pubThe publication to publish for.
buffera HelicsDataBuffer object containing the data to publish
[in,out]errA pointer to an error object for catching errors.

References helics::valueExtract().

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

◆ helicsPublicationPublishDouble()

void helicsPublicationPublishDouble ( HelicsPublication  pub,
double  val,
HelicsError err 
)

Publish a double floating point value.

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

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

◆ helicsPublicationPublishInteger()

void helicsPublicationPublishInteger ( HelicsPublication  pub,
int64_t  val,
HelicsError err 
)

Publish an integer value.

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

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

◆ helicsPublicationPublishNamedPoint()

void helicsPublicationPublishNamedPoint ( HelicsPublication  pub,
const char *  field,
double  val,
HelicsError err 
)

Publish a named point.

Parameters
pubThe publication to publish for.
fieldA null terminated string for the field name of the namedPoint to publish.
valA double for the value to publish.
[in,out]errA pointer to an error object for catching errors.

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

◆ helicsPublicationPublishString()

void helicsPublicationPublishString ( HelicsPublication  pub,
const char *  val,
HelicsError err 
)

Publish a string.

Parameters
pubThe publication to publish for.
valThe null terminated string to publish.
[in,out]errA pointer to an error object for catching errors.

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

◆ helicsPublicationPublishTime()

void helicsPublicationPublishTime ( HelicsPublication  pub,
HelicsTime  val,
HelicsError err 
)

Publish a time value.

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

◆ helicsPublicationPublishVector()

void helicsPublicationPublishVector ( HelicsPublication  pub,
const double *  vectorInput,
int  vectorLength,
HelicsError err 
)

Publish a vector of doubles.

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

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