helics  3.5.1
Classes | Typedefs | Enumerations | Variables
api-data.h File Reference

Data structures for the C api. More...

#include "../helics_enums.h"
#include <stdint.h>

Go to the source code of this file.

Classes

struct  HelicsComplex
 
struct  HelicsError
 

Typedefs

typedef void * HelicsInput
 
typedef void * HelicsPublication
 
typedef void * HelicsEndpoint
 
typedef void * HelicsFilter
 
typedef void * HelicsTranslator
 
typedef void * HelicsCore
 
typedef void * HelicsBroker
 
typedef void * HelicsFederate
 
typedef void * HelicsFederateInfo
 
typedef void * HelicsQuery
 
typedef void * HelicsDataBuffer
 
typedef void * HelicsQueryBuffer
 
typedef void * HelicsMessage
 
typedef double HelicsTime
 
typedef int HelicsBool
 
typedef struct HelicsComplex HelicsComplex
 
typedef struct HelicsError HelicsError
 

Enumerations

enum  HelicsIterationRequest {
  HELICS_ITERATION_REQUEST_NO_ITERATION = 0 , HELICS_ITERATION_REQUEST_FORCE_ITERATION = 1 , HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED = 2 , HELICS_ITERATION_REQUEST_HALT_OPERATIONS = 5 ,
  HELICS_ITERATION_REQUEST_ERROR = 7
}
 
enum  HelicsIterationResult { HELICS_ITERATION_RESULT_NEXT_STEP = 0 , HELICS_ITERATION_RESULT_ERROR = 1 , HELICS_ITERATION_RESULT_HALTED = 2 , HELICS_ITERATION_RESULT_ITERATING = 3 }
 
enum  HelicsFederateState {
  HELICS_STATE_UNKNOWN = -1 , HELICS_STATE_STARTUP = 0 , HELICS_STATE_INITIALIZATION = 1 , HELICS_STATE_EXECUTION = 2 ,
  HELICS_STATE_FINALIZE = 3 , HELICS_STATE_ERROR = 4 , HELICS_STATE_PENDING_INIT = 5 , HELICS_STATE_PENDING_EXEC = 6 ,
  HELICS_STATE_PENDING_TIME = 7 , HELICS_STATE_PENDING_ITERATIVE_TIME = 8 , HELICS_STATE_PENDING_FINALIZE = 9 , HELICS_STATE_FINISHED = 10
}
 

Variables

const HelicsTime HELICS_TIME_ZERO = 0.0
 
const HelicsTime HELICS_TIME_EPSILON = 1.0e-9
 
const HelicsTime HELICS_TIME_INVALID = -1.785e39
 
const HelicsTime HELICS_TIME_MAXTIME = HELICS_BIG_NUMBER
 
const HelicsBool HELICS_TRUE = 1
 
const HelicsBool HELICS_FALSE = 0
 

Detailed Description

Data structures for the C api.

Typedef Documentation

◆ HelicsBool

typedef int HelicsBool

defining a boolean type for use in the helics interface

◆ HelicsBroker

typedef void* HelicsBroker

opaque object representing a broker

◆ HelicsComplex

typedef struct HelicsComplex HelicsComplex

structure defining a basic complex type

◆ HelicsCore

typedef void* HelicsCore

opaque object representing a core

◆ HelicsDataBuffer

typedef void* HelicsDataBuffer

opaque object representing a data buffer in HELICS

◆ HelicsEndpoint

typedef void* HelicsEndpoint

opaque object representing an endpoint

◆ HelicsError

typedef struct HelicsError HelicsError

helics error object

if error_code==0 there is no error, if error_code!=0 there is an error and message will contain a string, otherwise it will be an empty string

◆ HelicsFederate

typedef void* HelicsFederate

opaque object representing a federate

◆ HelicsFederateInfo

typedef void* HelicsFederateInfo

opaque object representing a filter info object structure

◆ HelicsFilter

typedef void* HelicsFilter

opaque object representing a filter

◆ HelicsInput

typedef void* HelicsInput

opaque object representing an input

◆ HelicsMessage

typedef void* HelicsMessage

opaque object representing a message

◆ HelicsPublication

typedef void* HelicsPublication

opaque object representing a publication

◆ HelicsQuery

typedef void* HelicsQuery

opaque object representing a query

◆ HelicsQueryBuffer

typedef void* HelicsQueryBuffer

opaque object representing a string buffer for a query

◆ HelicsTime

typedef double HelicsTime

time definition used in the C interface to helics

◆ HelicsTranslator

typedef void* HelicsTranslator

opaque object representing a translator

Enumeration Type Documentation

◆ HelicsFederateState

enumeration of possible federate states

Enumerator
HELICS_STATE_STARTUP 

used when no information is available about the federate state when created the federate is in startup state

HELICS_STATE_INITIALIZATION 

entered after the enterInitializingMode call has returned

HELICS_STATE_EXECUTION 

entered after the enterExectuationState call has returned

HELICS_STATE_FINALIZE 

the federate has finished executing normally final values may be retrieved

HELICS_STATE_ERROR 

error state no core communication is possible but values can be retrieved

HELICS_STATE_PENDING_INIT 

indicator that the federate is pending entry to initialization state

HELICS_STATE_PENDING_EXEC 

state pending EnterExecution State

HELICS_STATE_PENDING_TIME 

state that the federate is pending a timeRequest

HELICS_STATE_PENDING_ITERATIVE_TIME 

state that the federate is pending an iterative time request

HELICS_STATE_PENDING_FINALIZE 

state that the federate is pending a finalize request

HELICS_STATE_FINISHED 

state that the federate is finished simulating but still connected

◆ HelicsIterationRequest

enumeration of the different iteration results

Enumerator
HELICS_ITERATION_REQUEST_NO_ITERATION 

no iteration is requested

HELICS_ITERATION_REQUEST_FORCE_ITERATION 

force iteration return when able

HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED 

only return an iteration if necessary

HELICS_ITERATION_REQUEST_HALT_OPERATIONS 

halt the federate

HELICS_ITERATION_REQUEST_ERROR 

indicate there was an error

◆ HelicsIterationResult

enumeration of possible return values from an iterative time request

Enumerator
HELICS_ITERATION_RESULT_NEXT_STEP 

the iterations have progressed to the next time

HELICS_ITERATION_RESULT_ERROR 

there was an error

HELICS_ITERATION_RESULT_HALTED 

the federation has halted

HELICS_ITERATION_RESULT_ITERATING 

the federate is iterating at current time

Variable Documentation

◆ HELICS_FALSE

const HelicsBool HELICS_FALSE = 0

indicator used for a false response

Referenced by helicscpp::Federate::getFlagOption(), helicsBrokerIsConnected(), helicsBrokerIsValid(), helicsBrokerWaitForDisconnect(), helicsCoreConnect(), helicsCoreIsConnected(), helicsCoreIsValid(), helicsCoreWaitForDisconnect(), helicsEndpointGetOption(), helicsEndpointHasMessage(), helicsEndpointIsValid(), helicsFederateGetFlagOption(), helicsFederateHasMessage(), helicsFederateInfoSetFlagOption(), helicsFederateInitializingEntryCallback(), helicsFederateIsAsyncOperationCompleted(), helicsFederateIsProtected(), helicsFederateIsValid(), helicsFederateSetFlagOption(), helicsFederateSetTimeRequestEntryCallback(), helicsFederateSetTimeRequestReturnCallback(), helicsFederateSetTimeUpdateCallback(), helicsFilterGetOption(), helicsFilterIsValid(), helicsInputGetBoolean(), helicsInputGetOption(), helicsInputIsUpdated(), helicsInputIsValid(), helicsInputSetDefaultBoolean(), helicsIsCoreTypeAvailable(), helicsLoadSignalHandlerCallback(), helicsLoadSignalHandlerCallbackNoExit(), helicsMessageGetFlagOption(), helicsMessageIsValid(), helicsPublicationGetOption(), helicsPublicationIsValid(), helicsPublicationPublishBoolean(), helicsQueryIsCompleted(), helicsTranslatorGetOption(), helicsTranslatorIsValid(), helicscpp::Federate::isAsyncOperationCompleted(), helicscpp::Broker::isConnected(), helicscpp::Core::isConnected(), helicscpp::Publication::publish(), helicscpp::Input::setDefault(), helicscpp::Message::setFlag(), helicscpp::Federate::setFlagOption(), helicscpp::FederateInfo::setFlagOption(), helicscpp::Broker::waitForDisconnect(), and helicscpp::Core::waitForDisconnect().

◆ HELICS_TIME_EPSILON

const HelicsTime HELICS_TIME_EPSILON = 1.0e-9

definition of the minimum time resolution

◆ HELICS_TIME_INVALID

const HelicsTime HELICS_TIME_INVALID = -1.785e39

◆ HELICS_TIME_MAXTIME

const HelicsTime HELICS_TIME_MAXTIME = HELICS_BIG_NUMBER

◆ HELICS_TIME_ZERO

const HelicsTime HELICS_TIME_ZERO = 0.0

definition of time zero-the beginning of simulation

◆ HELICS_TRUE

const HelicsBool HELICS_TRUE = 1

indicator used for a true response

Referenced by helicscpp::Broker::Broker(), helicscpp::DataBuffer::convertToType(), helicscpp::Input::getBoolean(), helicscpp::Message::getFlagOption(), helicsBrokerIsConnected(), helicsBrokerIsValid(), helicsBrokerWaitForDisconnect(), helicsCoreConnect(), helicsCoreIsConnected(), helicsCoreIsValid(), helicsCoreWaitForDisconnect(), helicsEndpointHasMessage(), helicsEndpointIsValid(), helicsFederateGetFlagOption(), helicsFederateHasMessage(), helicsFederateInitializingEntryCallback(), helicsFederateIsAsyncOperationCompleted(), helicsFederateIsProtected(), helicsFederateIsValid(), helicsFederateSetTimeRequestEntryCallback(), helicsFederateSetTimeRequestReturnCallback(), helicsFederateSetTimeUpdateCallback(), helicsFilterIsValid(), helicsInputGetBoolean(), helicsInputIsUpdated(), helicsInputIsValid(), helicsIsCoreTypeAvailable(), helicsMessageGetFlagOption(), helicsMessageIsValid(), helicsMessageSetFlagOption(), helicsPublicationIsValid(), helicsQueryIsCompleted(), helicsTranslatorIsValid(), helicscpp::DataBuffer::isValid(), helicscpp::Message::isValid(), helicscpp::Endpoint::isValid(), helicscpp::Filter::isValid(), helicscpp::Input::isValid(), helicscpp::Publication::isValid(), helicscpp::Translator::isValid(), helicscpp::Publication::publish(), helicscpp::DataBuffer::reserve(), helicscpp::Input::setDefault(), helicscpp::Message::setFlag(), helicscpp::Federate::setFlagOption(), helicscpp::FederateInfo::setFlagOption(), and helicscpp::DataBuffer::toBoolean().