| helics 3.6.1

Translators.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2025,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC. See the top-level NOTICE for
4 additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7
14 #ifndef HELICS_APISHARED_MESSAGE_TRANSLATOR_FUNCTIONS_H_
15 #define HELICS_APISHARED_MESSAGE_TRANSLATOR_FUNCTIONS_H_
16
17 #include "helicsCore.h"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
38 HELICS_EXPORT HelicsTranslator helicsFederateRegisterTranslator(HelicsFederate fed,
39 HelicsTranslatorTypes type,
40 const char* name,
41 HelicsError* err);
57 HELICS_EXPORT HelicsTranslator helicsFederateRegisterGlobalTranslator(HelicsFederate fed,
58 HelicsTranslatorTypes type,
59 const char* name,
60 HelicsError* err);
61
77 HELICS_EXPORT HelicsTranslator helicsCoreRegisterTranslator(HelicsCore core,
78 HelicsTranslatorTypes type,
79 const char* name,
80 HelicsError* err);
81
89 HELICS_EXPORT int helicsFederateGetTranslatorCount(HelicsFederate fed);
90
103 HELICS_EXPORT HelicsTranslator helicsFederateGetTranslator(HelicsFederate fed, const char* name, HelicsError* err);
115 HELICS_EXPORT HelicsTranslator helicsFederateGetTranslatorByIndex(HelicsFederate fed, int index, HelicsError* err);
116
124 HELICS_EXPORT HelicsBool helicsTranslatorIsValid(HelicsTranslator trans);
125
133 HELICS_EXPORT const char* helicsTranslatorGetName(HelicsTranslator trans);
134
145 HELICS_EXPORT void helicsTranslatorSet(HelicsTranslator trans, const char* prop, double val, HelicsError* err);
146
157 HELICS_EXPORT void helicsTranslatorSetString(HelicsTranslator trans, const char* prop, const char* val, HelicsError* err);
158
170 HELICS_EXPORT void helicsTranslatorAddInputTarget(HelicsTranslator trans, const char* input, HelicsError* err);
171
185 HELICS_EXPORT void helicsTranslatorAddPublicationTarget(HelicsTranslator trans, const char* pub, HelicsError* err);
186
198 HELICS_EXPORT void helicsTranslatorAddSourceEndpoint(HelicsTranslator trans, const char* ept, HelicsError* err);
199
212 HELICS_EXPORT void helicsTranslatorAddDestinationEndpoint(HelicsTranslator trans, const char* ept, HelicsError* err);
213
230 HELICS_EXPORT void helicsTranslatorRemoveTarget(HelicsTranslator trans, const char* target, HelicsError* err);
231
239 HELICS_EXPORT const char* helicsTranslatorGetInfo(HelicsTranslator trans);
249 HELICS_EXPORT void helicsTranslatorSetInfo(HelicsTranslator trans, const char* info, HelicsError* err);
250
258 HELICS_EXPORT const char* helicsTranslatorGetTag(HelicsTranslator trans, const char* tagname);
259
270 HELICS_EXPORT void helicsTranslatorSetTag(HelicsTranslator trans, const char* tagname, const char* tagvalue, HelicsError* err);
271
283 HELICS_EXPORT void helicsTranslatorSetOption(HelicsTranslator trans, int option, int value, HelicsError* err);
284
291 HELICS_EXPORT int helicsTranslatorGetOption(HelicsTranslator trans, int option);
292
297 #ifdef __cplusplus
298 } /* end of extern "C" { */
299 #endif
300
301 #endif /* HELICS_APISHARED_MESSAGE_TRANSLATOR_FUNCTIONS_H_*/
helicsFederateRegisterTranslator
HelicsTranslator helicsFederateRegisterTranslator(HelicsFederate fed, HelicsTranslatorTypes type, const char *name, HelicsError *err)
Definition: TranslatorExport.cpp:107
helicsTranslatorSetString
void helicsTranslatorSetString(HelicsTranslator trans, const char *prop, const char *val, HelicsError *err)
Definition: TranslatorExport.cpp:276
helicsTranslatorAddDestinationEndpoint
void helicsTranslatorAddDestinationEndpoint(HelicsTranslator trans, const char *ept, HelicsError *err)
Definition: TranslatorExport.cpp:325
helicsTranslatorGetName
const char * helicsTranslatorGetName(HelicsTranslator trans)
Definition: TranslatorExport.cpp:251
helicsFederateGetTranslatorCount
int helicsFederateGetTranslatorCount(HelicsFederate fed)
Definition: TranslatorExport.cpp:200
helicsTranslatorAddInputTarget
void helicsTranslatorAddInputTarget(HelicsTranslator trans, const char *input, HelicsError *err)
Definition: TranslatorExport.cpp:291
helicsTranslatorAddPublicationTarget
void helicsTranslatorAddPublicationTarget(HelicsTranslator trans, const char *pub, HelicsError *err)
Definition: TranslatorExport.cpp:308
helicsFederateGetTranslatorByIndex
HelicsTranslator helicsFederateGetTranslatorByIndex(HelicsFederate fed, int index, HelicsError *err)
Definition: TranslatorExport.cpp:209
helicsFederateRegisterGlobalTranslator
HelicsTranslator helicsFederateRegisterGlobalTranslator(HelicsFederate fed, HelicsTranslatorTypes type, const char *name, HelicsError *err)
Definition: TranslatorExport.cpp:131
helicsTranslatorSet
void helicsTranslatorSet(HelicsTranslator trans, const char *prop, double val, HelicsError *err)
Definition: TranslatorExport.cpp:261
helicsTranslatorIsValid
HelicsBool helicsTranslatorIsValid(HelicsTranslator trans)
Definition: TranslatorExport.cpp:241
helicsCoreRegisterTranslator
HelicsTranslator helicsCoreRegisterTranslator(HelicsCore core, HelicsTranslatorTypes type, const char *name, HelicsError *err)
Definition: TranslatorExport.cpp:151
helicsTranslatorAddSourceEndpoint
void helicsTranslatorAddSourceEndpoint(HelicsTranslator trans, const char *ept, HelicsError *err)
Definition: TranslatorExport.cpp:342
helicsFederateGetTranslator
HelicsTranslator helicsFederateGetTranslator(HelicsFederate fed, const char *name, HelicsError *err)
Definition: TranslatorExport.cpp:176
HelicsCore
void * HelicsCore
Definition: api-data.h:54
HelicsTranslator
void * HelicsTranslator
Definition: api-data.h:48
HelicsBool
int HelicsBool
Definition: api-data.h:118
HelicsFederate
void * HelicsFederate
Definition: api-data.h:65
helicsTranslatorSetOption
void helicsTranslatorSetOption(HelicsTranslator trans, int option, int value, HelicsError *err)
Definition: TranslatorExport.cpp:442
helicsTranslatorSetTag
void helicsTranslatorSetTag(HelicsTranslator trans, const char *tagname, const char *tagvalue, HelicsError *err)
Definition: TranslatorExport.cpp:426
helicsTranslatorGetOption
int helicsTranslatorGetOption(HelicsTranslator trans, int option)
Definition: TranslatorExport.cpp:458
helicsTranslatorGetInfo
const char * helicsTranslatorGetInfo(HelicsTranslator trans)
Definition: TranslatorExport.cpp:376
helicsTranslatorRemoveTarget
void helicsTranslatorRemoveTarget(HelicsTranslator trans, const char *target, HelicsError *err)
Definition: TranslatorExport.cpp:359
helicsTranslatorGetTag
const char * helicsTranslatorGetTag(HelicsTranslator trans, const char *tagname)
Definition: TranslatorExport.cpp:409
helicsTranslatorSetInfo
void helicsTranslatorSetInfo(HelicsTranslator trans, const char *info, HelicsError *err)
Definition: TranslatorExport.cpp:393
helicsCore.h
Common functions for the HELICS C api.
HelicsTranslatorTypes
HelicsTranslatorTypes
Definition: helics_enums.h:412
HelicsError
Definition: api-data.h:177