helics
3.5.2
|
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.
void helicsInputAddTarget | ( | HelicsInput | ipt, |
const char * | target, | ||
HelicsError * | err | ||
) |
Add a publication to the list of data that an input subscribes to.
ipt | The named input to modify. | |
target | The name of a publication that an input should subscribe to. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Input::addTarget().
HelicsBool helicsInputIsValid | ( | HelicsInput | ipt | ) |
Check if an input is valid.
ipt | The input to check. |
References HELICS_FALSE, and HELICS_TRUE.
Referenced by helicscpp::Input::isValid().
void helicsPublicationAddTarget | ( | HelicsPublication | pub, |
const char * | target, | ||
HelicsError * | err | ||
) |
Add a named input to the list of targets a publication publishes to.
pub | The publication to add the target for. | |
target | The name of an input that the data should be sent to. | |
[in,out] | err | A pointer to an error object for catching errors. |
HelicsBool helicsPublicationIsValid | ( | HelicsPublication | pub | ) |
Check if a publication is valid.
pub | The publication to check. |
References HELICS_FALSE, and HELICS_TRUE.
Referenced by helicscpp::Publication::isValid().
void helicsPublicationPublishBoolean | ( | HelicsPublication | pub, |
HelicsBool | val, | ||
HelicsError * | err | ||
) |
Publish a Boolean Value.
pub | The publication to publish for. | |
val | The boolean value to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
References HELICS_FALSE.
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishBytes | ( | HelicsPublication | pub, |
const void * | data, | ||
int | inputDataLength, | ||
HelicsError * | err | ||
) |
Publish raw data from a char * and length.
pub | The publication to publish for. | |
data | A pointer to the raw data. | |
inputDataLength | The size in bytes of the data to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishChar | ( | HelicsPublication | pub, |
char | val, | ||
HelicsError * | err | ||
) |
Publish a single character.
pub | The publication to publish for. | |
val | The numerical value to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
void helicsPublicationPublishComplex | ( | HelicsPublication | pub, |
double | real, | ||
double | imag, | ||
HelicsError * | err | ||
) |
Publish a complex value (or pair of values).
pub | The publication to publish for. | |
real | The real part of a complex number to publish. | |
imag | The imaginary part of a complex number to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishComplexVector | ( | HelicsPublication | pub, |
const double * | vectorInput, | ||
int | vectorLength, | ||
HelicsError * | err | ||
) |
Publish a vector of complex doubles.
pub | The publication to publish for. | |
vectorInput | A pointer to an array of complex double data (alternating real and imaginary values). | |
vectorLength | The number of values to publish; vectorInput must contain 2xvectorLength values. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish(), and helicscpp::Publication::publishComplex().
void helicsPublicationPublishDataBuffer | ( | HelicsPublication | pub, |
HelicsDataBuffer | buffer, | ||
HelicsError * | err | ||
) |
Publish the contents of a helicsDataBuffer.
pub | The publication to publish for. | |
buffer | a HelicsDataBuffer object containing the data to publish | |
[in,out] | err | A pointer to an error object for catching errors. |
References helics::valueExtract().
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishDouble | ( | HelicsPublication | pub, |
double | val, | ||
HelicsError * | err | ||
) |
Publish a double floating point value.
pub | The publication to publish for. | |
val | The numerical value to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishInteger | ( | HelicsPublication | pub, |
int64_t | val, | ||
HelicsError * | err | ||
) |
Publish an integer value.
pub | The publication to publish for. | |
val | The numerical value to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishNamedPoint | ( | HelicsPublication | pub, |
const char * | field, | ||
double | val, | ||
HelicsError * | err | ||
) |
Publish a named point.
pub | The publication to publish for. | |
field | A null terminated string for the field name of the namedPoint to publish. | |
val | A double for the value to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishString | ( | HelicsPublication | pub, |
const char * | val, | ||
HelicsError * | err | ||
) |
Publish a string.
pub | The publication to publish for. | |
val | The null terminated string to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish().
void helicsPublicationPublishTime | ( | HelicsPublication | pub, |
HelicsTime | val, | ||
HelicsError * | err | ||
) |
Publish a time value.
pub | The publication to publish for. | |
val | The numerical value to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
void helicsPublicationPublishVector | ( | HelicsPublication | pub, |
const double * | vectorInput, | ||
int | vectorLength, | ||
HelicsError * | err | ||
) |
Publish a vector of doubles.
pub | The publication to publish for. | |
vectorInput | A pointer to an array of double data. | |
vectorLength | The number of points to publish. | |
[in,out] | err | A pointer to an error object for catching errors. |
Referenced by helicscpp::Publication::publish().