API

This is the Julia API for the HELICS library.

julia> using HELICS; const h = HELICS;
julia> h.helicsGetVersion()"3.4.0 (2023-01-19)"

Enum

HELICS.HelicsCoreFlagsType

Enumeration of additional core flags

  • HELICS_FLAG_DELAY_INIT_ENTRY: used to delay a core from entering initialization mode even if it would otherwise be ready (45)
  • HELICS_FLAG_ENABLE_INIT_ENTRY: used to clear the HELICSDELAYINIT_ENTRY flag in cores (47)
  • HELICS_FLAG_IGNORE: ignored flag used to test some code paths (999)
source
HELICS.HelicsCoreTypesType

Pick a core type depending on compile configuration

  • HELICS_CORE_TYPE_DEFAULT: a default core type that will default to something available (0)
  • HELICS_CORE_TYPE_ZMQ: use the Zero MQ networking protocol (1)
  • HELICS_CORE_TYPE_MPI: use MPI for operation on a parallel cluster (2)
  • HELICS_CORE_TYPE_TEST: use the Test core if all federates are in the same process (3)
  • HELICS_CORE_TYPE_INTERPROCESS: interprocess uses memory mapped files to transfer data (for use when all federates are on the same machine (4)
  • HELICS_CORE_TYPE_IPC: interprocess uses memory mapped files to transfer data (for use when all federates are on the same machine ipc is the same as HELICS_CORE_TYPE_INTERPROCESS (5)
  • HELICS_CORE_TYPE_TCP: use a generic TCP protocol message stream to send messages (6)
  • HELICS_CORE_TYPE_UDP: use UDP packets to send the data (7)
  • HELICS_CORE_TYPE_ZMQ_SS: single socket version of ZMQ core usually for high fed count on the same system (10)
  • HELICS_CORE_TYPE_NNG: for using the nanomsg communications (9)
  • HELICS_CORE_TYPE_TCP_SS: a single socket version of the TCP core for more easily handling firewalls (11)
  • HELICS_CORE_TYPE_HTTP: a core type using http for communication (12)
  • HELICS_CORE_TYPE_WEBSOCKET: a core using websockets for communication (14)
  • HELICS_CORE_TYPE_INPROC: an in process core type for handling communications in shared memory it is pretty similar to the test core but stripped from the "test" components (18)
  • HELICS_CORE_TYPE_NULL: an explicit core type that is recognized but explicitly doesn't exist, for testing and a few other assorted reasons (66)
  • HELICS_CORE_TYPE_EMPTY: an explicit core type exists but does nothing but return empty values or sink calls (77)
source
HELICS.HelicsDataTypesType

Enumeration of allowable data types for publications and inputs

  • HELICS_DATA_TYPE_UNKNOWN: unknown type (-1)
  • HELICS_DATA_TYPE_STRING: a sequence of characters (0)
  • HELICS_DATA_TYPE_DOUBLE: a double precision floating point number (1)
  • HELICS_DATA_TYPE_INT: a 64 bit integer (2)
  • HELICS_DATA_TYPE_COMPLEX: a pair of doubles representing a complex number (3)
  • HELICS_DATA_TYPE_VECTOR: an array of doubles (4)
  • HELICS_DATA_TYPE_COMPLEX_VECTOR: a complex vector object (5)
  • HELICS_DATA_TYPE_NAMED_POINT: a named point consisting of a string and a double (6)
  • HELICS_DATA_TYPE_BOOLEAN: a boolean data type (7)
  • HELICS_DATA_TYPE_TIME: time data type (8)
  • HELICS_DATA_TYPE_CHAR: data type for a single character (9)
  • HELICS_DATA_TYPE_RAW: raw data type (25)
  • HELICS_DATA_TYPE_JSON: type converts to a valid json string (30)
  • HELICS_DATA_TYPE_MULTI: the data type can change (33)
  • HELICS_DATA_TYPE_ANY: open type that can be anything (25262)
source
HELICS.HelicsErrorTypesType

Enumeration of return values from the C interface functions

  • HELICS_ERROR_FATAL: global fatal error for federation (-404)
  • HELICS_ERROR_EXTERNAL_TYPE: an unknown non-helics error was produced (-203)
  • HELICS_ERROR_OTHER: the function produced a helics error of some other type (-101)
  • HELICS_USER_EXCEPTION: user code generated exception (-29)
  • HELICS_ERROR_INSUFFICIENT_SPACE: insufficient space is available to store requested data (-18)
  • HELICS_ERROR_EXECUTION_FAILURE: the function execution has failed (-14)
  • HELICS_ERROR_INVALID_FUNCTION_CALL: the call made was invalid in the present state of the calling object (-10)
  • HELICS_ERROR_INVALID_STATE_TRANSITION: error issued when an invalid state transition occurred (-9)
  • HELICS_WARNING: the function issued a warning of some kind (-8)
  • HELICS_ERROR_SYSTEM_FAILURE: the federate has terminated unexpectedly and the call cannot be completed (-6)
  • HELICS_ERROR_DISCARD: the input was discarded and not used for some reason (-5)
  • HELICS_ERROR_INVALID_ARGUMENT: the parameter passed was invalid and unable to be used (-4)
  • HELICS_ERROR_INVALID_OBJECT: indicator that the object used was not a valid object (-3)
  • HELICS_ERROR_CONNECTION_FAILURE: the operation to connect has failed (-2)
  • HELICS_ERROR_REGISTRATION_FAILURE: registration has failed (-1)
  • HELICS_OK: the function executed successfully (0)
  • HELICS_ERROR_USER_ABORT: user system abort to match typical SIGINT value (130)
  • HELICS_ERROR_TERMINATED: force termination to match typical SIGKILL value (143)
source
HELICS.HelicsFederateFlagsType

Enumeration of possible federate flags

  • HELICS_FLAG_OBSERVER: flag indicating that a federate is observe only (0)
  • HELICS_FLAG_UNINTERRUPTIBLE: flag indicating that a federate can only return requested times (1)
  • HELICS_FLAG_INTERRUPTIBLE: flag indicating that a federate can be interrupted (2)
  • HELICS_FLAG_SOURCE_ONLY: flag indicating that a federate/interface is a signal generator only (4)
  • HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE: flag indicating a federate/interface should only transmit values if they have changed(binary equivalence) (6)
  • HELICS_FLAG_ONLY_UPDATE_ON_CHANGE: flag indicating a federate/interface should only trigger an update if a value has changed (binary equivalence) (8)
  • HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE: flag indicating a federate should only grant time if all other federates have already passed the requested time (10)
  • HELICS_FLAG_RESTRICTIVE_TIME_POLICY: flag indicating a federate should operate on a restrictive time policy, which disallows some 2nd order time evaluation and can be useful for certain types of dependency cycles and update patterns, but generally shouldn't be used as it can lead to some very slow update conditions (11)
  • HELICS_FLAG_ROLLBACK: flag indicating that a federate has rollback capability (12)
  • HELICS_FLAG_FORWARD_COMPUTE: flag indicating that a federate performs forward computation and does internal rollback (14)
  • HELICS_FLAG_REALTIME: flag indicating that a federate needs to run in real time (16)
  • HELICS_FLAG_SINGLE_THREAD_FEDERATE: flag indicating that the federate will only interact on a single thread (27)
  • HELICS_FLAG_MULTI_THREAD_CORE: flag indicating use of a thread safe core (28)
  • HELICS_FLAG_SINGLE_THREAD_CORE: flag indicating use of a single threaded core (29)
  • HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS: used to not display warnings on mismatched requested times (67)
  • HELICS_FLAG_STRICT_CONFIG_CHECKING: specify that checking on configuration files should be strict and throw and error on any invalid values (75)
  • HELICS_FLAG_USE_JSON_SERIALIZATION: specify that the federate should use json serialization for all data types (79)
  • HELICS_FLAG_EVENT_TRIGGERED: specify that the federate is event triggered-meaning (all/most) events are triggered by incoming events (81)
  • HELICS_FLAG_LOCAL_PROFILING_CAPTURE: specify that federate should capture the profiling data to the local federate logging system (96)
  • HELICS_FLAG_CALLBACK_FEDERATE: specify that the federate is a callback based federate using callbacks for execution (103)
  • HELICS_FLAG_AUTOMATED_TIME_REQUEST: specify that a federate should automatically call timeRequest on completion of current request (106)
source
HELICS.HelicsFederateStateType

Enumeration of possible federate states

  • HELICS_STATE_UNKNOWN: used when no information is available about the federate state (-1)
  • HELICS_STATE_STARTUP: when created the federate is in startup state (0)
  • HELICS_STATE_INITIALIZATION: entered after the enterInitializingMode call has returned (1)
  • HELICS_STATE_EXECUTION: entered after the enterExectuationState call has returned (2)
  • HELICS_STATE_FINALIZE: the federate has finished executing normally final values may be retrieved (3)
  • HELICS_STATE_ERROR: error state no core communication is possible but values can be retrieved the following states are for asynchronous operations (4)
  • HELICS_STATE_PENDING_INIT: indicator that the federate is pending entry to initialization state (5)
  • HELICS_STATE_PENDING_EXEC: state pending EnterExecution State (6)
  • HELICS_STATE_PENDING_TIME: state that the federate is pending a timeRequest (7)
  • HELICS_STATE_PENDING_ITERATIVE_TIME: state that the federate is pending an iterative time request (8)
  • HELICS_STATE_PENDING_FINALIZE: state that the federate is pending a finalize request (9)
  • HELICS_STATE_FINISHED: state that the federate is finished simulating but still connected (10)
source
HELICS.HelicsFilterTypesType

Enumeration of the predefined filter types

  • HELICS_FILTER_TYPE_CUSTOM: a custom filter type that executes a user defined callback (0)
  • HELICS_FILTER_TYPE_DELAY: a filter type that executes a fixed delay on a message (1)
  • HELICS_FILTER_TYPE_RANDOM_DELAY: a filter type that executes a random delay on the messages (2)
  • HELICS_FILTER_TYPE_RANDOM_DROP: a filter type that randomly drops messages (3)
  • HELICS_FILTER_TYPE_REROUTE: a filter type that reroutes a message to a different destination than originally specified (4)
  • HELICS_FILTER_TYPE_CLONE: a filter type that duplicates a message and sends the copy to a different destination (5)
  • HELICS_FILTER_TYPE_FIREWALL: a customizable filter type that can perform different actions on a message based on firewall like rules (6)
source
HELICS.HelicsFlagsType

enumeration of general flags that can be used in federates/cores/brokers

  • HELICS_FLAG_SLOW_RESPONDING: flag specifying that a federate, core, or broker may be slow to respond to pings. If the federate goes offline there is no good way to detect it so use with caution (29)
  • HELICS_FLAG_DEBUGGING: flag specifying the federate/core/broker is operating in a user debug mode so deadlock timers and timeout are disabled this flag is a combination of slow_responding and disabling of some timeouts (31)
  • HELICS_FLAG_TERMINATE_ON_ERROR: specify that a federate error should terminate the federation (72)
  • HELICS_FLAG_FORCE_LOGGING_FLUSH: specify that the log files should be flushed on every log message (88)
  • HELICS_FLAG_DUMPLOG: specify that a full log should be dumped into a file* (89)
  • HELICS_FLAG_PROFILING: specify that helics should capture profiling data (93)
  • HELICS_FLAG_PROFILING_MARKER: flag trigger for generating a profiling marker (95)
  • HELICS_FLAG_ALLOW_REMOTE_CONTROL: specify that the federate/core/broker should allow some remote control operations such as finalize (109)
  • HELICS_FLAG_DISABLE_REMOTE_CONTROL: specify that the federate/core/broker should NOT allow some remote control operations such as finalize (110)
source
HELICS.HelicsHandleOptionsType

Enumeration of options that apply to handles

  • HELICS_HANDLE_OPTION_CONNECTION_REQUIRED: specify that a connection is required for an interface and will generate an error if not available (397)
  • HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL: specify that a connection is NOT required for an interface and will only be made if available no warning will be issues if not available (402)
  • HELICS_HANDLE_OPTION_SINGLE_CONNECTION_ONLY: specify that only a single connection is allowed for an interface (407)
  • HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED: specify that multiple connections are allowed for an interface (409)
  • HELICS_HANDLE_OPTION_BUFFER_DATA: specify that the last data should be buffered and send on subscriptions after init (411)
  • HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING: specify that the types should be checked strictly for pub/sub and filters (414)
  • HELICS_HANDLE_OPTION_RECEIVE_ONLY: specify that the handle is receive only (422)
  • HELICS_HANDLE_OPTION_SOURCE_ONLY: specify that the handle is source only (423)
  • HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH: specify that the mismatching units should be ignored (447)
  • HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE: specify that an interface will only transmit on change (only applicable to publications) (452)
  • HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE: specify that an interface will only update if the value has actually changed (454)
  • HELICS_HANDLE_OPTION_IGNORE_INTERRUPTS: specify that an interface does not participate in determining time interrupts (475)
  • HELICS_HANDLE_OPTION_MULTI_INPUT_HANDLING_METHOD: specify the multi-input processing method for inputs (507)
  • HELICS_HANDLE_OPTION_INPUT_PRIORITY_LOCATION: specify the source index with the highest priority (510)
  • HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST: specify that the priority list should be cleared or question if it is cleared (512)
  • HELICS_HANDLE_OPTION_CONNECTIONS: specify the required number of connections or get the actual number of connections (522)
  • HELICS_HANDLE_OPTION_TIME_RESTRICTED: specify that the interface only sends or receives data at specified intervals (557)
source
HELICS.HelicsIterationRequestType

Enumeration of the different iteration results

  • HELICS_ITERATION_REQUEST_NO_ITERATION: No iteration is requested (0)
  • HELICS_ITERATION_REQUEST_FORCE_ITERATION: Force iteration return when able (1)
  • HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED: Only return an iteration if necessary (2)
  • HELICS_ITERATION_REQUEST_HALT_OPERATIONS: Halt the federate (5)
  • HELICS_ITERATION_REQUEST_ERROR: Indicate there was an error (7)
source
HELICS.HelicsIterationResultType

Enumeration of possible return values from an iterative time request

  • HELICS_ITERATION_RESULT_NEXT_STEP: the iterations have progressed to the next time (0)
  • HELICS_ITERATION_RESULT_ERROR: there was an error (1)
  • HELICS_ITERATION_RESULT_HALTED: the federation has halted (2)
  • HELICS_ITERATION_RESULT_ITERATING: the federate is iterating at current time (3)
source
HELICS.HelicsLogLevelsType

Log level definitions

  • HELICS_LOG_LEVEL_DUMPLOG: log level for dumping log messages (-10)
  • HELICS_LOG_LEVEL_NO_PRINT: don't print anything except a few catastrophic errors (-4)
  • HELICS_LOG_LEVEL_ERROR: only print error level indicators (0)
  • HELICS_LOG_LEVEL_PROFILING: profiling log level (2)
  • HELICS_LOG_LEVEL_WARNING: only print warnings and errors (3)
  • HELICS_LOG_LEVEL_SUMMARY: warning errors and summary level information (6)
  • HELICS_LOG_LEVEL_CONNECTIONS: summary+ notices about federate and broker connections +messages about network connections (9)
  • HELICS_LOG_LEVEL_INTERFACES: connections+ interface definitions (12)
  • HELICS_LOG_LEVEL_TIMING: interfaces + timing message (15)
  • HELICS_LOG_LEVEL_DATA: timing+ data transfer notices (18)
  • HELICS_LOG_LEVEL_DEBUG: data+ additional debug message (21)
  • HELICS_LOG_LEVEL_TRACE: all internal messages (24)
source
HELICS.HelicsMultiInputModesType

enumeration of the multi_input operations

  • HELICS_MULTI_INPUT_NO_OP: time and priority order the inputs from the core library (0)
  • HELICS_MULTI_INPUT_VECTORIZE_OPERATION: vectorize the inputs either double vector or string vector (1)
  • HELICS_MULTI_INPUT_AND_OPERATION: all inputs are assumed to be boolean and all must be true to return true (2)
  • HELICS_MULTI_INPUT_OR_OPERATION: all inputs are assumed to be boolean and at least one must be true to return true (3)
  • HELICS_MULTI_INPUT_SUM_OPERATION: sum all the inputs (4)
  • HELICS_MULTI_INPUT_DIFF_OPERATION: do a difference operation on the inputs, first-sum(rest) for double input, vector diff for vector input (5)
  • HELICS_MULTI_INPUT_MAX_OPERATION: find the max of the inputs (6)
  • HELICS_MULTI_INPUT_MIN_OPERATION: find the min of the inputs (7)
  • HELICS_MULTI_INPUT_AVERAGE_OPERATION: take the average of the inputs (8)
source
HELICS.HelicsPropertiesType

Enumeration of properties that apply to federates

  • HELICS_PROPERTY_TIME_DELTA: the property controlling the minimum time delta for a federate (137)
  • HELICS_PROPERTY_TIME_PERIOD: the property controlling the period for a federate (140)
  • HELICS_PROPERTY_TIME_OFFSET: the property controlling time offset for the period of federate (141)
  • HELICS_PROPERTY_TIME_RT_LAG: the property controlling real time lag for a federate the max time a federate can lag real time (143)
  • HELICS_PROPERTY_TIME_RT_LEAD: the property controlling real time lead for a federate the max time a federate can be ahead of real time (144)
  • HELICS_PROPERTY_TIME_RT_TOLERANCE: the property controlling real time tolerance for a federate sets both HELICS_PROPERTY_RT_LAG and HELICS_PROPERTY_RT_LEAD (145)
  • HELICS_PROPERTY_TIME_INPUT_DELAY: the property controlling input delay for a federate (148)
  • HELICS_PROPERTY_TIME_OUTPUT_DELAY: the property controlling output delay for a federate (150)
  • HELICS_PROPERTY_TIME_STOPTIME: specify the maximum time of a federate (152)
  • HELICS_PROPERTY_TIME_GRANT_TIMEOUT: the property specifying a timeout to trigger actions if the time for granting exceeds a certain threshold (161)
  • HELICS_PROPERTY_INT_CURRENT_ITERATION: read only property getting the current iteration count (258)
  • HELICS_PROPERTY_INT_MAX_ITERATIONS: integer property controlling the maximum number of iterations in a federate (259)
  • HELICS_PROPERTY_INT_LOG_LEVEL: integer property controlling the log level in a federate see HELICS_LOG_LEVELS (271)
  • HELICS_PROPERTY_INT_FILE_LOG_LEVEL: integer property controlling the log level for file logging in a federate see HELICS_LOG_LEVELS (272)
  • HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL: integer property controlling the log level for file logging in a federate see HELICS_LOG_LEVELS (274)
  • HELICS_PROPERTY_INT_LOG_BUFFER: integer property controlling the size of the log buffer (276)
  • HELICS_PROPERTY_INT_INDEX_GROUP: integer property specifying an index group (282)
source
HELICS.HelicsSequencingModesType

enumeration of sequencing modes for queries and commands fast is the default, meaning the query travels along priority channels and takes precedence of over existing messages; ordered means it follows normal priority patterns and will be ordered along with existing messages

  • HELICS_SEQUENCING_MODE_FAST: sequencing mode to operate on priority channels (0)
  • HELICS_SEQUENCING_MODE_ORDERED: sequencing mode to operate on the normal channels (1)
  • HELICS_SEQUENCING_MODE_DEFAULT: select the default channel (2)
source
HELICS.HelicsTranslatorTypesType

enumeration of the predefined translator types

  • HELICS_TRANSLATOR_TYPE_CUSTOM: a custom filter type that executes a user defined callback (0)
  • HELICS_TRANSLATOR_TYPE_JSON: a translator type that converts to and from JSON (11)
  • HELICS_TRANSLATOR_TYPE_BINARY: a translator type that just encodes the message again in binary (12)
source

Functions

  1. Broker
  2. Core
  3. Endpoint
  4. FederateInfo
  5. Federate
  6. Filter
  7. Input
  8. Message
  9. Publication
  10. Query

Broker

HELICS.helicsBrokerAddAliasMethod
helicsBrokerAddAlias(broker::HELICS.Broker, interfaceName::String, alias::String)

create an alias for an interface

Arguments

  • broker: the Broker to us to set the alias
  • interfaceName: the current name of an interface
  • alias: the additional name to use for a given interface
source
HELICS.helicsBrokerAddDestinationFilterToEndpointMethod
helicsBrokerAddDestinationFilterToEndpoint(broker::HELICS.Broker, filter::String, endpoint::String)

Link a named filter to a destination endpoint

Arguments

  • broker the Broker to generate the connection from
  • filter the name of the Filter (cannot be NULL)
  • endpoint the name of the Endpoint to filter the data going to (cannot be NULL)
source
HELICS.helicsBrokerAddSourceFilterToEndpointMethod
helicsBrokerAddSourceFilterToEndpoint(broker::HELICS.Broker, filter::String, endpoint::String)

Link a named filter to a source endpoint

Arguments

  • broker the Broker to generate the connection from
  • filter the name of the Filter (cannot be NULL)
  • endpoint the name of the Endpoint to filter the data from (cannot be NULL)
source
HELICS.helicsBrokerCloneMethod
helicsBrokerClone(broker::HELICS.Broker) -> HELICS.Broker

Create a new reference to an existing broker

this will create a new broker object that references the existing broker it must be freed as well

Arguments

Returns

  • a new reference to the same broker
source
HELICS.helicsBrokerDataLinkMethod
helicsBrokerDataLink(broker::HELICS.Broker, source::String, target::String)

Link a named publication and named input using a broker

Arguments

  • broker: the Broker to generate the connection from
  • source: the name of the Publication (cannot be NULL)
  • target: the name of the target to send the Publication data (cannot be NULL)
source
HELICS.helicsBrokerGetAddressMethod
helicsBrokerGetAddress(broker::HELICS.Broker) -> String

Get the network address associated with a broker

Arguments

Returns

  • a string with the network address of the Broker
source
HELICS.helicsBrokerGlobalErrorMethod
helicsBrokerGlobalError(broker::HELICS.Broker, errorCode::Int64, errorString::String)

Generate a global error through a broker. This will terminate the federation.

Arguments

  • broker: the Broker to generate the global error on.
  • errorCode: the integer error code to associate with the global error.
  • errorString: an error message to associate withthe global error.
source
HELICS.helicsBrokerIsConnectedMethod
helicsBrokerIsConnected(broker::HELICS.Broker) -> Bool

Check if a broker is connected. A connected broker implies is attached to cores or cores could reach out to communicate. return 0 if not connected , something else if it is connected.

source
HELICS.helicsBrokerMakeConnectionsMethod
helicsBrokerMakeConnections(broker::HELICS.Broker, file::String)

Load a file containing connection information

Arguments

  • broker: the Broker to generate the connections from
  • file: A JSON or TOML file containing connection information
source
HELICS.helicsBrokerSendCommandMethod
helicsBrokerSendCommand(broker::HELICS.Broker, target::String, command::String)

Send a command to another helics object though a broker using asynchronous(fast) operations.

Arguments

  • broker: The Broker to set the command through
  • target: The name of the object to send the command to
  • command: the command to send
source
HELICS.helicsBrokerSendOrderedCommandMethod
helicsBrokerSendOrderedCommand(broker::HELICS.Broker, target::String, command::String)

Send a command to another helics object through a broker using ordered sequencing.

Arguments

  • broker: The Broker to set the command through
  • target: The name of the object to send the command to
  • command: the command to send
source
HELICS.helicsBrokerSetGlobalMethod
helicsBrokerSetGlobal(broker::HELICS.Broker, valueName::String, value::String)

Set a federation global value

this overwrites any previous value for this name

Arguments

  • broker: the Broker to set the global through
  • valueName: the name of the global to set
  • value: the value of the global
source
HELICS.helicsBrokerSetLogFileMethod
helicsBrokerSetLogFile(broker::HELICS.Broker, logFileName::String)

Set a the log file on a broker

Arguments

  • broker: the Broker to set the global through
  • logFileName: The name of the file to log to
source
HELICS.helicsBrokerSetLoggingCallbackMethod
helicsBrokerSetLoggingCallback(broker::HELICS.Broker, logger::Ptr{Nothing}, userdata)

Set the logging callback to a broker

Add a logging callback function for the C The logging callback will be called when a message flows into a broker from the core or from a broker

Arguments

  • broker: the Broker object in which to create a Subscription must have been create with helicsCreateValueFederate or helicsCreateCombinationFederate
  • logger: a callback with signature void(int, const char *, const char *, void *); the function arguments are loglevel, an identifier, and a message string, and a pointer to user data
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsBrokerSetTimeBarrierMethod
helicsBrokerSetTimeBarrier(broker::HELICS.Broker, barrierTime::Union{Float64, Int64})

Set a broker time barrier.

Arguments

  • broker: the Broker to set the time barrier for
  • barrierTime: The time to se the barrier at
source
HELICS.helicsBrokerWaitForDisconnectMethod
helicsBrokerWaitForDisconnect(broker::HELICS.Broker, msToWait::Int64) -> Bool

Wait for the Broker to disconnect

Arguments

  • broker: the Broker to wait for
  • msToWait: the time out in millisecond (<0 for infinite timeout)

Returns

  • true if the disconnect was successful, false if there was a timeout
source

Core

HELICS.helicsCoreAddAliasMethod
helicsCoreAddAlias(core::HELICS.Core, interfaceName::String, alias::String)

create an alias for an interface

Arguments

  • core: the Core to us to set the alias
  • interfaceName: the current name of an interface
  • alias: the additional name to use for a given interface
source
HELICS.helicsCoreAddSourceFilterToEndpointMethod
helicsCoreAddSourceFilterToEndpoint(core::HELICS.Core, filter::String, endpoint::String)

Link a named filter to a source endpoint

Arguments

  • core: the core to generate the connection from
  • filter: the name of the Filter (cannot be NULL)
  • endpoint: the name of the Endpoint to filter the data from (cannot be NULL)
source
HELICS.helicsCoreCloneMethod
helicsCoreClone(core::HELICS.Core) -> HELICS.Core

Create a new reference to an existing core

this will create a new broker object that references the existing broker it must be freed as well

Arguments

  • core: an existing Core

Returns

  • a new reference to the same Core
source
HELICS.helicsCoreConnectMethod
helicsCoreConnect(core::HELICS.Core)

Connect a core to the federate based on current configuration

Arguments

  • core: the core object to enable init values for
source
HELICS.helicsCoreDataLinkMethod
helicsCoreDataLink(core::HELICS.Core, source::String, target::String)

Link a named publication and named input using a core

Arguments

  • core: the core to generate the connection from
  • source: the name of the Publication (cannot be NULL)
  • target: the named of the target to send the Publication data (cannot be NULL)
source
HELICS.helicsCoreDisconnectMethod
helicsCoreDisconnect(core::HELICS.Core)

Get an identifier for the core

Arguments

  • core: the core to query

Returns

  • a void enumeration indicating any error condition
source
HELICS.helicsCoreGetAddressMethod
helicsCoreGetAddress(core::HELICS.Core) -> String

Get the network address associated with a core

Arguments

  • core: The core to query

Returns

  • a string with the network address of the Broker
source
HELICS.helicsCoreGetIdentifierMethod
helicsCoreGetIdentifier(core::HELICS.Core) -> String

Get an identifier for the core

Arguments

  • core: the core to query

Returns

  • a string with the identifier of the core
source
HELICS.helicsCoreGlobalErrorMethod
helicsCoreGlobalError(core::HELICS.Core, errorCode::Int64, errorString::String)

Generate a global error through a core. This will terminate the federation.

Arguments

  • core: the Core to generate the global error on.
  • errorCode: the integer error code to associate with the global error.
  • errorString: an error message to associate withthe global error.
source
HELICS.helicsCoreIsConnectedMethod
helicsCoreIsConnected(core::HELICS.Core) -> Bool

Check if a core is connected. A connected core implies is attached to federate or federates could be attached to it.

Returns

  • false if not connected, true if it is connected
source
HELICS.helicsCoreMakeConnectionsMethod
helicsCoreMakeConnections(core::HELICS.Core, file::String)

Load a file containing connection information

Arguments

  • core: The core to generate the connections from
  • file: A JSON or TOML file containing connection information
source
HELICS.helicsCoreRegisterCloningFilterMethod
helicsCoreRegisterCloningFilter(core::HELICS.Core, name::String) -> HELICS.Filter

Create a cloning Filter on the specified core

Cloning filters copy a message and send it to multiple locations source and destination can be added through other functions

Arguments

  • core: the core to register through
  • name: the name of the Filter (can be NULL)

Returns

source
HELICS.helicsCoreRegisterFilterMethod
helicsCoreRegisterFilter(core::HELICS.Core, kind::Union{Int64, HELICS.Lib.HelicsFilterTypes}, name::String) -> HELICS.Filter

Create a source Filter on the specified core

Filters can be created through a Federate or a core , linking through a federate allows a few extra features of name matching to function on the Federate interface but otherwise equivalent behavior

Arguments

  • core the core to register through
  • type the type of filter to create HelicsFilterTypes
  • name the name of the Filter (can be NULL)

Returns

source
HELICS.helicsCoreRegisterTranslatorMethod
helicsCoreRegisterTranslator(core::HELICS.Core, type::Int64, name::String)

Create a Translator on the specified core.

Translators can be created through a federate or a core. Linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise have equivalent behavior.

Arguments

  • core: the Core to register through.
  • type: The type of translator to create /ref HelicsTranslatorTypes
  • name: The name of the translator, it can be null

Returns

source
HELICS.helicsCoreSendCommandMethod
helicsCoreSendCommand(core::HELICS.Core, target::String, command::String)

Send a command to another helics object though a core using asynchronous(fast) operations.

Arguments

  • core: The Core to set the command through
  • target: The name of the object to send the command to
  • command: the command to send
source
HELICS.helicsCoreSendOrderedCommandMethod
helicsCoreSendOrderedCommand(core::HELICS.Core, target::String, command::String)

Send a command to another helics object though a core using ordered operations.

Arguments

  • core: The Core to set the command through
  • target: The name of the object to send the command to
  • command: the command to send
source
HELICS.helicsCoreSetGlobalMethod
helicsCoreSetGlobal(core::HELICS.Core, valueName::String, value::String)

Set a global value in a core

this overwrites any previous value for this name

Arguments

  • core: the core to set the global through
  • valueName: the name of the global to set
  • value: the value of the global
source
HELICS.helicsCoreSetLogFileMethod
helicsCoreSetLogFile(core::HELICS.Core, logFileName::String)

Set a the log file on a core

Arguments

  • core: The core to set the global through
  • logFileName: The name of the file to log to
source
HELICS.helicsCoreSetLoggingCallbackMethod
helicsCoreSetLoggingCallback(core::HELICS.Core, logger::Ptr{Nothing}, userdata)

Set the logging callback for a core

Add a logging callback function for the C The logging callback will be called when a message flows into a core from the core or from a broker

Arguments

  • core: the core object in which to create a Subscription must have been create with helicsCreateValueFederate or helicsCreateCombinationFederate
  • logger: a callback with signature void(int, const char *, const char *, void *); the function arguments are loglevel, an identifier, and a message string
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsCoreSetReadyToInitMethod
helicsCoreSetReadyToInit(core::HELICS.Core)

Set the core to ready for init

this function is used for cores that have filters but no federates so there needs to be a direct signal to the core to trigger the federation initialization

Arguments

  • core: the core object to enable init values for
source
HELICS.helicsCoreWaitForDisconnectMethod
helicsCoreWaitForDisconnect(core::HELICS.Core, msWait::Int64) -> Int32

Wait for the core to disconnect

Arguments

  • core: The core to wait for
  • msToWait: The time out in millisecond (<0 for infinite timeout)

Returns

true if the disconnect was successful, false if there was a timeout

source

Endpoint

HELICS.helicsEndpointAddDestinationTargetMethod
helicsEndpointAddDestinationTarget(endpoint::HELICS.Endpoint, targetEndpoint::String)

add a destination target to an endpoint, Specifying an endpoint to send undirected messages to

  • endpoint: The Endpoint to modify
  • targetEndpoint: the name of the endpoint to send messages to
source
HELICS.helicsEndpointAddSourceTargetMethod
helicsEndpointAddSourceTarget(endpoint::HELICS.Endpoint, targetEndpoint::String)

add a source target to an endpoint, Specifying an endpoint to receive undirected messages from

  • endpoint: The Endpoint to modify
  • targetEndpoint: the endpoint name to get messages from
source
HELICS.helicsEndpointCreateMessageMethod
helicsEndpointCreateMessage(endpoint::HELICS.Endpoint) -> HELICS.Message

Create a new empty message object.

The message is empty and isValid will return false since there is no data associated with the message yet.

Arguments

  • endpoint: The identifier for the Endpoint

Returns

source
HELICS.helicsEndpointGetInfoMethod
helicsEndpointGetInfo(endpoint::HELICS.Endpoint) -> String

Get the data in the info field of an filter

Arguments

Returns

  • a string with the info field string
source
HELICS.helicsEndpointGetTagMethod
helicsEndpointGetTag(endpoint::HELICS.Endpoint, tagName::String) -> String

Get the data in a specified tag of an endpoint

Arguments

  • endpoint: The Endpoint to query
  • tagName: The name of the tag

Returns

  • a string with the tag data
source
HELICS.helicsEndpointIsValidMethod
helicsEndpointIsValid(endpoint::HELICS.Endpoint) -> Bool

Check if an endpoint is valid.

Arguments

Returns

true if the Endpoint object represents a valid endpoint.

source
HELICS.helicsEndpointRemoveTargetMethod
helicsEndpointRemoveTarget(endpoint::HELICS.Endpoint, targetEndpoint::String)

remove an endpoint from being targeted

  • endpoint: The Endpoint to modify
  • targetEndpoint: the name of the target enpoint to remove
source
HELICS.helicsEndpointSendBytesMethod
helicsEndpointSendBytes(endpoint::HELICS.Endpoint, data::String)

Send a message to the targeted destination

Arguments

  • endpoint: The Endpoint to send the data from
  • data: The data to send
source
HELICS.helicsEndpointSendBytesAtMethod
helicsEndpointSendBytesAt(endpoint::HELICS.Endpoint, data::String, time::Union{Float64, Int64})

Send a message at a specific time to the targeted destinations

Arguments

  • endpoint: The Endpoint to send the data from
  • data: The data to send
  • time: The time the message should be sent.
source
HELICS.helicsEndpointSendBytesToMethod
helicsEndpointSendBytesTo(endpoint::HELICS.Endpoint, data::String, dest::String)

Send a message to the specified destination

Arguments

  • endpoint: The Endpoint to send the data from
  • data: The data to send
  • dest: The target destination (empty string to use the default destination)
source
HELICS.helicsEndpointSendBytesToAtMethod
helicsEndpointSendBytesToAt(endpoint::HELICS.Endpoint, data::String, dest::String, time::Union{Float64, Int64})

Send a message to the specified destination at a specific time.

Arguments

  • endpoint: The Endpoint to send the data from
  • data: The data to send
  • dest: The target destination (empty string to use the default destination)
  • time: The time the message should be sent.
source
HELICS.helicsEndpointSendMessageZeroCopyMethod
helicsEndpointSendMessageZeroCopy(endpoint::HELICS.Endpoint, message::HELICS.Message)

Send a message object from a specific endpoint, the message will not be copied and the message object will no longer be valid after the call.

Arguments

source
HELICS.helicsEndpointSetInfoMethod
helicsEndpointSetInfo(endpoint::HELICS.Endpoint, info::String)

Set the data in the info field for an filter

Arguments

  • endpoint: The Endpoint to query
  • info: The string to set
source
HELICS.helicsEndpointSetTagMethod
helicsEndpointSetTag(endpoint::HELICS.Endpoint, tagName::String, tagValue::String)

Set the data in a specific tag for an endpoint.

Arguments

  • endpoint: The Endpoint to query
  • tagName: The name of the tag
  • tagValue: The string value to associate with the tag
source

Federate

HELICS.helicsFederateAddAliasMethod
helicsFederateAddAlias(fed::HELICS.Federate, interfaceName::String, alias::String)

create an alias for an interface

Arguments

  • fed: the Federate to query
  • interfaceName: The current name of an interface
  • alias: the additional name to use for the given interface
source
HELICS.helicsFederateCloneMethod
helicsFederateClone(fed::HELICS.Federate) -> HELICS.Federate

Create a new reference to an existing federate

this will create a new Federate object that references the existing federate it must be freed as well

Arguments

Returns

  • a new reference to the same federate
source
HELICS.helicsFederateCosimulationTerminationCallbackMethod
helicsFederateCosimulationTerminationCallback(fed::HELICS.Federate, cosimTermination::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for cosimulation termination.

This callback will be executed once when the time advancement of the federate/co-simulation has terminated. This may be called as part of the finalize operation, or when a maxTime signal is returned from requestTime or when an error is encountered.

Arguments

  • fed: the Federate to set a callback for.
  • cosimTermination: A callback with signature void(void *userdata)
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateCreateMessageMethod
helicsFederateCreateMessage(fed::HELICS.Federate) -> HELICS.Message

Create a new empty message object.

The message is empty and isValid will return false since there is no data associated with the message yet.

#Arguments

  • fed: a federate object to associate the message with

Returns

  • a Message object containing the message data
source
HELICS.helicsFederateDisconnectMethod
helicsFederateDisconnect(fed::HELICS.Federate)

Disconnect/finalize the federate. This function halts all communication in the federate and disconnects it from the core. This call is identical to helicsFederateFinalize.

source
HELICS.helicsFederateDisconnectAsyncMethod
helicsFederateDisconnectAsync(fed::HELICS.Federate)

Disconnect/finalize the federate in an async call. This call is identical to helicsFederateFinalizeAsync.

source
HELICS.helicsFederateEnterExecutingModeIterativeMethod
helicsFederateEnterExecutingModeIterative(fed::HELICS.Federate, iterate::Union{Int64, HELICS.Lib.HelicsIterationRequest}) -> HELICS.Lib.HelicsIterationResult

Request an iterative time

this call allows for finer grain control of the iterative process then helicsFederateRequestTime it takes a time and iteration request and return a time and iteration status.

Arguments

  • fed: the Federate to make the request of
  • iterate: the requested iteration mode

Returns

  • an iteration structure with field containing the time and iteration status
source
HELICS.helicsFederateEnterExecutingModeIterativeAsyncMethod
helicsFederateEnterExecutingModeIterativeAsync(fed::HELICS.Federate, iterate::Union{Int64, HELICS.Lib.HelicsIterationRequest})

Request an iterative entry to the execution mode

This call allows for finer grain control of the iterative process then helicsFederateRequestTime it takes a time and and iteration request and return a time and iteration status

Arguments

  • fed: the Federate to make the request of
  • iterate: the requested iteration mode
source
HELICS.helicsFederateEnterExecutingModeIterativeCompleteMethod
helicsFederateEnterExecutingModeIterativeComplete(fed::HELICS.Federate) -> HELICS.Lib.HelicsIterationResult

Complete the asynchronous iterative call into ExecutionModel

Arguments

  • fed: the Federate to make the request of

Returns

  • an iteration object containing the iteration time and iteration_status
source
HELICS.helicsFederateEnterInitializingModeMethod
helicsFederateEnterInitializingMode(fed::HELICS.Federate)

Enter the initialization state of a Federate

the initialization state allows initial values to be set and received if the iteration is requested on entry to the execution state. This is a blocking call and will block until the core allows it to proceed.

Arguments

source
HELICS.helicsFederateEnterInitializingModeIterativeMethod
helicsFederateEnterInitializingModeIterative(fed::HELICS.Federate)

Trigger a blocking call and return to created state after all federates have either triggered an iteration or are waiting to enter initializing mode.

This call will return the federate to the created state to allow additional setup to occur with federates either iterating in the mode or waiting.

Arguments

source
HELICS.helicsFederateEnterInitializingModeIterativeAsyncMethod
helicsFederateEnterInitializingModeIterativeAsync(fed::HELICS.Federate)

Non blocking alternative to ef helicsFederateEnterInitializingModeIterative. The function helicsFederateEnterInitializationModeIterativeComplete must be called to finish the operation.

Arguments

source
HELICS.helicsFederateEnterInitializingModeIterativeCompleteMethod
helicsFederateEnterInitializingModeIterativeComplete(fed::HELICS.Federate)

Complete the call to enter initializing mode Iterative that was initiated with /ref heliceEnterInitializingModeIterativeAsync. The federate will be in created or error mode on return

Arguments

source
HELICS.helicsFederateErrorHandlerCallbackMethod
helicsFederateErrorHandlerCallback(fed::HELICS.Federate, errorHandler::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for error handling.

This callback will be called when a federate error is encountered.

Arguments

  • fed: the Federate to set a callback for.
  • errorHandler: A callback with signature void(int errorCode, const char *errorString, void *userdata)
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateExecutingEntryCallbackMethod
helicsFederateExecutingEntryCallback(fed::HELICS.Federate, executingEntry::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the entry to ExecutingMode.

This callback will be executed once on first entry to executingMode

Arguments

  • fed: the Federate to set a callback for.
  • executingEntry: A callback with signature void(void *userdata)
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateGetCommandMethod
helicsFederateGetCommand(fed::HELICS.Federate) -> String

Get a command sent to the federate

Arguments

  • fed: The Federate to get the command for

Returns

  • A string with the command for the federate, if the string is empty no command is available.
source
HELICS.helicsFederateGetCommandSourceMethod
helicsFederateGetCommandSource(fed::HELICS.Federate) -> String

Get the source of the most recently retrieved command sent to the federate.

Arguments

  • fed: The Federate to get the command for

Returns

  • A string with name of the source who sent the command
source
HELICS.helicsFederateGetFilterMethod
helicsFederateGetFilter(fed::HELICS.Federate, name::String) -> HELICS.Filter

Get a Filter by its name typically already created via helicsFederateRegisterInterfaces file or something of that nature

Arguments

Returns

  • a Filter object, the object will not be valid and err will contain an error code if no filter with the specified name exists
source
HELICS.helicsFederateGetFlagOptionMethod
helicsFederateGetFlagOption(fed::HELICS.Federate, flag::Union{Int64, HELICS.Lib.HelicsFederateFlags, HELICS.Lib.HelicsHandleOptions}) -> Bool

Get a flag value for a Federate

Arguments

  • fed: the Federate to get the flag for
  • flag: the flag to query

Returns

  • the value of the flag
source
HELICS.helicsFederateGetInputMethod
helicsFederateGetInput(fed::HELICS.Federate, key::String) -> HELICS.Input

Get an Input object from a key

Arguments

  • fed: the value federate object to use to get the Publication
  • key: the name of the Input

Returns

  • a Subscription object, the object will not be valid and err will contain an error code if no input with the specified key exists
source
HELICS.helicsFederateGetInputByIndexMethod
helicsFederateGetInputByIndex(fed::HELICS.Federate, index::Int64) -> HELICS.Input

Get an Input by its index typically already created via helicsFederateRegisterInterfaces file or something of that nature

Arguments

Returns

  • a helics_input, which will be NULL if an invalid index
source
HELICS.helicsFederateGetInputByTargetMethod
helicsFederateGetInputByTarget(fed::HELICS.Federate, target::String) -> HELICS.Input

Get an Input object from an Input target

Arguments

Returns

  • a Input object, the object will not be valid and err will contain an error code if no input with the specified

key exists

source
HELICS.helicsFederateGetIntegerPropertyMethod
helicsFederateGetIntegerProperty(fed::HELICS.Federate, intProperty::Union{Int64, HELICS.Lib.HelicsHandleOptions, HELICS.Lib.HelicsProperties}) -> Int64

Set the logging level for the Federate

debug and trace only do anything if they were enabled in the compilation

Arguments

Returns

  • the value of the property
source
HELICS.helicsFederateGetMessageMethod
helicsFederateGetMessage(fed::HELICS.Federate) -> HELICS.Message

Receive a communication message for any endpoint in the Federate

The return order will be in order of endpoint creation. So all messages that are available for the first endpoint, then all for the second, and so on within a single endpoint the messages are ordered by time, then source_id, then order of arrival

Returns

  • a Message object containing the message data
source
HELICS.helicsFederateGetTagMethod
helicsFederateGetTag(fed::HELICS.Federate, tagName::String) -> String

Get a federate tag value.

Arguments

  • fed: the Federate to get the tag for
  • tagName: the name of the tag to get
source
HELICS.helicsFederateGetTimePropertyMethod
helicsFederateGetTimeProperty(fed::HELICS.Federate, timeProperty::Union{Int64, HELICS.Lib.HelicsProperties}) -> Float64

Get the current value of a time based property in a Federate

Arguments

  • fed: the Federate query
  • timeProperty: the property to query
source
HELICS.helicsFederateGetTranslatorMethod
helicsFederateGetTranslator(fed::HELICS.Federate, name::String) -> HELICS.Translator

Get a translator by its name, typically already created via registerInterfaces file or something of that nature.

Arguments

  • fed: the Federate to get the translator from
  • name: The name of the translator to get

Returns

source
HELICS.helicsFederateGetTranslatorByIndexMethod
helicsFederateGetTranslatorByIndex(fed::HELICS.Federate, index::Int64) -> HELICS.Translator

Get a translator by its index, typically already created via registerInterfaces file or something of that nature.

Arguments

  • fed: the Federate to get the translator from
  • index: The index of the translator to get

Returns

source
HELICS.helicsFederateGetTranslatorCountMethod
helicsFederateGetTranslatorCount(fed::HELICS.Federate) -> Int64

Get the number of translators registered through a federate.

Arguments

Returns

  • a count of the number of translators registered through a federate.
source
HELICS.helicsFederateGlobalErrorMethod
helicsFederateGlobalError(fed::HELICS.Federate, error_code::Integer, error_string::String)

Generate a global Error from a Federate

A global error halts the co-simulation completely

Arguments

  • fed: the Federate to create an error in
  • error_code: the integer code for the error
  • error_string: a string describing the error
source
HELICS.helicsFederateInitializingEntryCallbackMethod
helicsFederateInitializingEntryCallback(fed::HELICS.Federate, initializingEntry::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the entry to initializingMode.

This callback will be executed when the initializingMode is entered

Arguments

  • fed: the Federate to set a callback for.
  • initializingEntry: A callback with signature void(HelicsBool iterating, void *userdata);
				   the bool parameter is set to true if the entry is iterative, therefore the first time this is called the bool is false
				   and all subsequent times it is true.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateIsProtectedMethod
helicsFederateIsProtected(fedName::String)

checks if an existing federate is protected

Arguments

  • fedName: The name of an existing HelicsFederate.
source
HELICS.helicsFederateLocalErrorMethod
helicsFederateLocalError(fed::HELICS.Federate, error_code::Integer, error_string::String)

Generate a local error in a Federate

This will propagate through the co-simulation but not necessarily halt the co-simulation, it has a similar effect to finalize but does allow some interaction with a core for a brief time.

Arguments

  • fed: the Federate to create an error in
  • error_code: the integer code for the error
  • error_string: a string describing the error
source
HELICS.helicsFederateProcessCommunicationsMethod
helicsFederateProcessCommunications(fed::HELICS.Federate, period::Union{Float64, Int64})

Tell helics to process internal communications for a period of time.

Arguments

  • fed: the Federate to tell to process
  • `period1: The length of time to process communications and then return control.
source
HELICS.helicsFederateProtectMethod
helicsFederateProtect(fedName::String)

Protect a federate from finalizing and closing if all references go out of scope

this function allows a federate to be retrieved on demand, it must be explicitly close later otherwise it will be destroyed when the library is closed

Arguments

  • fedName: The name of an existing HelicsFederate.
source
HELICS.helicsFederateRegisterCloningFilterMethod
helicsFederateRegisterCloningFilter(fed::HELICS.Federate, name::String) -> HELICS.Filter

Create a cloning Filter on the specified federate

Cloning filters copy a message and send it to multiple locations source and destination can be added through other functions

Arguments

  • fed: the fed to register through
  • name: the name of the Filter (can be NULL)

Returns

source
HELICS.helicsFederateRegisterEndpointMethod
helicsFederateRegisterEndpoint(fed::HELICS.Federate, name::String, kind::String) -> HELICS.Endpoint

Create an Endpoint

The Endpoint becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for endpoints.

Arguments

Returns

source
HELICS.helicsFederateRegisterFilterMethod
helicsFederateRegisterFilter(fed::HELICS.Federate, kind::Union{Int64, HELICS.Lib.HelicsFilterTypes}, name::String) -> HELICS.Filter

Create a source Filter on the specified federate

filters can be created through a Federate or a core , linking through a federate allows a few extra features of name matching to function on the Federate interface but otherwise equivalent behavior

Arguments

  • fed: the fed to register through
  • type: the type of filter to create HelicsFilterTypes
  • name: the name of the Filter (can be NULL)

Returns

source
HELICS.helicsFederateRegisterGlobalCloningFilterMethod
helicsFederateRegisterGlobalCloningFilter(fed::HELICS.Federate, name::String) -> HELICS.Filter

Create a global cloning Filter on the specified federate

Cloning filters copy a message and send it to multiple locations source and destination can be added through other functions

Arguments

  • fed: the fed to register through
  • name: the name of the Filter (can be NULL)

Returns

source
HELICS.helicsFederateRegisterGlobalEndpointMethod
helicsFederateRegisterGlobalEndpoint(fed::HELICS.Federate, name::String, type::String) -> HELICS.Endpoint

Create an Endpoint

The Endpoint becomes part of the Federate and is destroyed when the federate is freed so there are no separate free functions for endpoints

Arguments

Returns

source
HELICS.helicsFederateRegisterGlobalFilterMethod
helicsFederateRegisterGlobalFilter(fed::HELICS.Federate, kind::Union{Int64, HELICS.Lib.HelicsFilterTypes}, name::String) -> HELICS.Filter

Create a global source filter through a Federate

Filters can be created through a Federate or a core , linking through a federate allows a few extra features of name matching to function on the Federate interface but otherwise equivalent behavior

Arguments

  • fed: the fed to register through
  • type: the type of filter to create HelicsFilterTypes
  • name: the name of the Filter (can be NULL)

Returns

source
HELICS.helicsFederateRegisterGlobalInputFunction
helicsFederateRegisterGlobalInput(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}) -> HELICS.Input
helicsFederateRegisterGlobalInput(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}, units::String) -> HELICS.Input

Register a global named input

The Publication becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions and publications

Arguments

Returns

source
HELICS.helicsFederateRegisterGlobalPublicationFunction
helicsFederateRegisterGlobalPublication(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}) -> HELICS.Publication
helicsFederateRegisterGlobalPublication(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}, units::String) -> HELICS.Publication

Register a global named publication with an arbitrary type

Arguments

The Publication becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions and publications

Arguments

Returns

source
HELICS.helicsFederateRegisterGlobalTargetedEndpointMethod
helicsFederateRegisterGlobalTargetedEndpoint(fed::HELICS.Federate, name::String, type::String) -> HELICS.Endpoint

Create a global targeted endpoint, Targeted endpoints have specific destinations predefined and do not allow sending messages to other endpoints

@details The endpoint becomes part of the federate and is destroyed when the federate is freed so there are no separate free functions for endpoints.

Arguments

Returns

source
HELICS.helicsFederateRegisterGlobalTranslatorMethod
helicsFederateRegisterGlobalTranslator(fed::HELICS.Federate, type::Int64, name::String)

Create a global translator through a federate.

Translators can be created through a federate or a core. Linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise have equivalent behavior.

Arguments

  • fed: the Federate to register through.
  • type: The type of translator to create /ref HelicsTranslatorTypes
  • name: The name of the translator, it can be null

Returns

source
HELICS.helicsFederateRegisterGlobalTypeInputFunction
helicsFederateRegisterGlobalTypeInput(fed::HELICS.Federate, key::String, kind::String) -> HELICS.Input
helicsFederateRegisterGlobalTypeInput(fed::HELICS.Federate, key::String, kind::String, units::String) -> HELICS.Input

Register a global publication with an arbitrary type

The Publication becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions and publications

Arguments

Returns

source
HELICS.helicsFederateRegisterGlobalTypePublicationFunction
helicsFederateRegisterGlobalTypePublication(fed::HELICS.Federate, key::String, kind::String) -> HELICS.Publication
helicsFederateRegisterGlobalTypePublication(fed::HELICS.Federate, key::String, kind::String, units::String) -> HELICS.Publication

Register a global publication with a defined type

Arguments

The Publication becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions and publications

Returns

source
HELICS.helicsFederateRegisterInputFunction
helicsFederateRegisterInput(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}) -> HELICS.Input
helicsFederateRegisterInput(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}, units::String) -> HELICS.Input

Register a named input

The Input becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions, inputs, and publications

Arguments

  • fed: the Federate in which to create an Input
  • key: the identifier for the Publication the global input key will be prepended with the Federate name
  • type: a code identifying the type of the Input see HelicsDataTypes for available options
  • units: a string listing the units of the Input maybe NULL

Returns

source
HELICS.helicsFederateRegisterInterfacesMethod
helicsFederateRegisterInterfaces(fed::HELICS.Federate, file::String)

Load interfaces from a file

Arguments

  • fed: the Federate to which to load interfaces
  • file: the name of a file to load the interfaces from either JSON, or TOML
source
HELICS.helicsFederateRegisterPublicationFunction
helicsFederateRegisterPublication(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}) -> HELICS.Publication
helicsFederateRegisterPublication(fed::HELICS.Federate, key::String, kind::Union{Int64, HELICS.Lib.HelicsDataTypes}, units::String) -> HELICS.Publication

Register a Publication with a known type

The Publication becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions and publications

Arguments

Returns

source
HELICS.helicsFederateRegisterSubscriptionFunction
helicsFederateRegisterSubscription(fed::HELICS.Federate, key::String) -> HELICS.Input
helicsFederateRegisterSubscription(fed::HELICS.Federate, key::String, units::String) -> HELICS.Input

Create a Subscription

The Subscription becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions and publications

Arguments

Returns

source
HELICS.helicsFederateRegisterTargetedEndpointMethod
helicsFederateRegisterTargetedEndpoint(fed::HELICS.Federate, name::String, type::String) -> HELICS.Endpoint

Create a targeted endpoint. Targeted endpoints have specific destinations predefined and do not allow sending messages to other endpoints

The endpoint becomes part of the federate and is destroyed when the federate is freed so there are no separate free functions for endpoints.

Arguments

Returns

source
HELICS.helicsFederateRegisterTranslatorMethod
helicsFederateRegisterTranslator(fed::HELICS.Federate, type::Int64, name::String)

Create a Translator on the specified federate.

Translators can be created through a federate or a core. Linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise have equivalent behavior.

Arguments

  • fed: the Federate to register through.
  • type: The type of translator to create /ref HelicsTranslatorTypes
  • name: The name of the translator, it can be null

Returns

source
HELICS.helicsFederateRegisterTypeInputFunction
helicsFederateRegisterTypeInput(fed::HELICS.Federate, key::String, kind::String) -> HELICS.Input
helicsFederateRegisterTypeInput(fed::HELICS.Federate, key::String, kind::String, units::String) -> HELICS.Input

Register an Input with a defined type

The Input becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions, inputs and publications

Arguments

  • fed: the Federate in which to create an Input
  • key: the identifier for the Input
  • type: a string describing the expected type of the Input
  • units: a string listing the units of the Input maybe NULL

Returns

source
HELICS.helicsFederateRegisterTypePublicationFunction
helicsFederateRegisterTypePublication(fed::HELICS.Federate, key::String, kind::String) -> HELICS.Publication
helicsFederateRegisterTypePublication(fed::HELICS.Federate, key::String, kind::String, units::String) -> HELICS.Publication

Register a Publication with a defined type

The Publication becomes part of the Federate and is destroyed when the Federate is freed so there are no separate free functions for subscriptions and publications

Arguments

Returns

source
HELICS.helicsFederateRequestNextStepMethod
helicsFederateRequestNextStep(fed::HELICS.Federate) -> Float64

Request the next time step for federate execution

feds should have setup the period or minDelta for this to work well but it will request the next time step which is the current time plus the minimum time step.

Arguments

  • fed: the Federate to make the request of

Returns

source
HELICS.helicsFederateRequestTimeMethod
helicsFederateRequestTime(fed::HELICS.Federate, requestTime::Union{Float64, Int64}) -> Float64

Request the next time for federate execution

Arguments

  • fed: the Federate to make the request of
  • requestTime: the next requested time

Returns

  • the time granted to the Federate invalid
source
HELICS.helicsFederateRequestTimeAdvanceMethod
helicsFederateRequestTimeAdvance(fed::HELICS.Federate, timeDelta::Union{Float64, Int64}) -> Float64

Request the next time for federate execution

Arguments

  • fed: The Federate to make the request of
  • timeDelta: The requested amount of time to advance

Returns

  • the time granted to the Federate, will return maximum time if the simulation has terminated invalid
source
HELICS.helicsFederateRequestTimeIterativeMethod
helicsFederateRequestTimeIterative(fed::HELICS.Federate, requestTime::Union{Float64, Int64}, iterate::Union{Int64, HELICS.Lib.HelicsIterationRequest}) -> Tuple{Float64, HELICS.Lib.HelicsIterationResult}

Request an iterative time

this call allows for finer grain control of the iterative process then helicsFederateRequestTime it takes a time and iteration request and return a time and iteration status.

Arguments

  • fed: the Federate to make the request of
  • requestTime: the next desired time
  • iterate: the requested iteration mode

Returns

  • the granted time
  • the iteration specification of the result
source
HELICS.helicsFederateRequestTimeIterativeAsyncMethod
helicsFederateRequestTimeIterativeAsync(fed::HELICS.Federate, requestTime::Union{Float64, Int64}, iterate::Union{Int64, HELICS.Lib.HelicsIterationRequest})

Request an iterative time through an asynchronous call

this call allows for finer grain control of the iterative process then helicsFederateRequestTime it takes a time an iteration request and returns a time and iteration status call helicsFederateRequestTimeIterativeComplete to finish the process.

Arguments

  • fed: the Federate to make the request of
  • requestTime: the next desired time
  • iterate: the requested iteration mode

Returns

  • a void object with a return code of the result
source
HELICS.helicsFederateRequestTimeIterativeCompleteMethod
helicsFederateRequestTimeIterativeComplete(fed::HELICS.Federate) -> Tuple{Float64, HELICS.Lib.HelicsIterationResult}

Complete an iterative time request asynchronous call

Arguments

  • fed: the Federate to make the request of

Returns

  • the granted time
  • outIterate the iteration specification of the result
source
HELICS.helicsFederateSendCommandMethod
helicsFederateSendCommand(fed::HELICS.Federate, target::String, command::String)

Send a command to another helics object through a federate.

Arguments

  • fed: The Federate to set the command through
  • target: The name of the object to send the command to
  • command: the command to send
source
HELICS.helicsFederateSetFlagOptionMethod
helicsFederateSetFlagOption(fed::HELICS.Federate, flag::Union{Int64, HELICS.Lib.HelicsFederateFlags, HELICS.Lib.HelicsHandleOptions}, flagValue::Bool)

Set a flag for the Federate

Arguments

  • fed: the Federate to alter a flag for
  • flag: the flag to change
  • flagValue: the new value of the flag 0 for false !=0 for true
source
HELICS.helicsFederateSetGlobalMethod
helicsFederateSetGlobal(fed::HELICS.Federate, valueName::String, value::String)

Set a federation global value through a Federate

this overwrites any previous value for this name

Arguments

  • fed: the Federate to set the global through
  • valueName: the name of the global to set
  • value: the value of the global
source
HELICS.helicsFederateSetIntegerPropertyMethod
helicsFederateSetIntegerProperty(fed::HELICS.Federate, intProperty::Union{Int64, HELICS.Lib.HelicsProperties}, propertyVal::Int64)

Set an integer based property of a Federate

Arguments

  • fed: the Federate to change the property for
  • intProperty: the property to set
  • propertyVal: the value of the property
source
HELICS.helicsFederateSetLogFileMethod
helicsFederateSetLogFile(fed::HELICS.Federate, logFile::String)

Set the logging file for a Federate (actually on the core associated with a federate)

Arguments

  • fed: the Federate to set the log file for
  • logFile: the name of the log file
source
HELICS.helicsFederateSetLoggingCallbackMethod
helicsFederateSetLoggingCallback(fed::HELICS.Federate, logger::Ptr{Nothing}, userdata)

Set the logging callback for a Federate

Add a logging callback function for the C The logging callback will be called when a message flows into a Federate from the core or from a federate

Arguments

  • fed: the Federate in which to create a Subscription must have been create with helicsCreateValueFederate or helicsCreateCombinationFederate
  • logger: a callback with signature void(int, const char *, const char *, void *); the function arguments are loglevel, an identifier string, and a message string, and a pointer to user data
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateSetQueryCallbackMethod
helicsFederateSetQueryCallback(fed::HELICS.Federate, queryAnswer::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for queries executed against a federate.

There are many queries that HELICS understands directly, but it is occasionally useful to have a federate be able to respond to specific queries with answers specific to a federate.

Arguments

  • fed: the Federate to set a callback for.
  • queryAnswer: A callback with signature void(const char *query, int querySize, HelicsQueryBuffer buffer, void *userdata); The function arguments include the query string requesting an answer along with its size; the string is not guaranteed to
			 be null terminated. HelicsQueryBuffer is the buffer intended to filled out by the userCallback. The buffer can be empty if the query is not
			 recognized and HELICS will generate the appropriate response.  The buffer is used to ensure memory ownership separation between user code
			 and HELICS code.
			 The HelicsQueryBufferFill method can be used to load a string into the buffer.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateSetSeparatorMethod
helicsFederateSetSeparator(fed::HELICS.Federate, separator::Char)

Set the separator character in a Federate

The separator character is the separation character for local publications/endpoints in creating their global name. for example if the separator character is '/' then a local endpoint would have a globally reachable name of fedName/localName.

Arguments

  • fed: the Federate object to alter
  • separator: the character to use as a separator
source
HELICS.helicsFederateSetStateChangeCallbackMethod
helicsFederateSetStateChangeCallback(fed::HELICS.Federate, stateChange::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the federate mode change.

This callback will be executed every time the operating mode of the federate changes.

Arguments

  • fed: the Federate to set a callback for.
  • stateChange: A callback with signature void(HelicsFederateState newState, HelicsFederateState oldState, void *userdata); The function arguments are the new state, the old state, and pointer to the userdata.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateSetTagMethod
helicsFederateSetTag(fed::HELICS.Federate, tagName::String, value::String)

Set a federate tag value. This overwrites any previous value for this tag.

Arguments

  • fed: the Federate to set the tag for
  • tagName: the name of the tag to set
  • value: the value of the tag
source
HELICS.helicsFederateSetTimePropertyMethod
helicsFederateSetTimeProperty(fed::HELICS.Federate, timeProperty::Union{Int64, HELICS.Lib.HelicsProperties}, time::Union{Float64, Int64})

Set a time based property for a Federate

Arguments

  • fed: the Federate set the property for
  • timeProperty: a integer code for a time property
  • time: the requested value of the property
source
HELICS.helicsFederateSetTimeRequestEntryCallbackMethod
helicsFederateSetTimeRequestEntryCallback(fed::HELICS.Federate, requestTime::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the time request.

This callback will be executed when a valid time request is made. It is intended for the possibility of embedded data grabbers in a callback to simplify user code.

Arguments

  • fed: the Federate to set a callback for.
  • requestTime: A callback with signature void(HelicsTime currentTime, HelicsTime requestTime, bool iterating, void *userdata); The function arguments are the current time value, the requested time value, a bool indicating that the time is
			 iterating, and pointer to the userdata.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateSetTimeRequestReturnCallbackMethod
helicsFederateSetTimeRequestReturnCallback(fed::HELICS.Federate, requestTimeReturn::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the time request return.

This callback will be executed after all other callbacks for a time request return. This callback will be the last thing executed before returning control to the user program. The difference between this and the TimeUpdate callback is the order of execution. The timeUpdate callback is executed prior to individual interface callbacks, this callback is executed after all others.

Arguments

  • fed: the Federate to set a callback for.
  • requestTimeReturn: A callback with signature void(HelicsTime newTime, bool iterating, void *userdata);
				   The function arguments are the new time value, a bool indicating that the time is iterating, and pointer to the userdata.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateSetTimeUpdateCallbackMethod
helicsFederateSetTimeUpdateCallback(fed::HELICS.Federate, timeUpdate::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the time update.

This callback will be executed every time the simulation time is updated starting on entry to executing mode.

Arguments

  • fed: the Federate to set a callback for.
  • timeUpdate: A callback with signature void(HelicsTime newTime, bool iterating, void *userdata); The function arguments are the new time value, a bool indicating that the time is iterating, and pointer to the userdata.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFederateUnProtectMethod
helicsFederateUnProtect(fedName::String)

remove the protection of an existing federate

this function allows a federate to be retrieved on demand, it must be explicitly close later otherwise it will be destroyed when the library is closed

Arguments

  • fedName: The name of an existing HelicsFederate that should not be protected.
source
HELICS.helicsFederateWaitCommandMethod
helicsFederateWaitCommand(fed::HELICS.Federate) -> String

Get a command sent to the federate. Blocks until a command is received.

Arguments

  • fed: The Federate to get the command for

Returns

  • A string with the command.
source

FederateInfo

HELICS.helicsFederateInfoSetBrokerMethod
helicsFederateInfoSetBroker(fi::HELICS.FederateInfo, broker::String)

Set the name or connection information for a broker

this is only used if the core is automatically created, the Broker information will be transferred to the core for connection

Arguments

  • fi: the FederateInfo object to alter
  • broker: a string which defined the connection information for a broker either a name or an address
source
HELICS.helicsFederateInfoSetBrokerInitStringMethod
helicsFederateInfoSetBrokerInitString(fi::HELICS.FederateInfo, brokerInit::String)

Set the initialization string that a core will pass to a generated broker usually in the form of command line arguments

Arguments

  • fi: The Federate info object to alter
  • brokerInit: A string with command line arguments for a generated broker
source
HELICS.helicsFederateInfoSetBrokerKeyMethod
helicsFederateInfoSetBrokerKey(fi::HELICS.FederateInfo, brokerKey::String)

Set the key for a broker connection

this is only used if the core is automatically created, the Broker information will be transferred to the core for connection

Arguments

  • fi: The Federate info object to alter
  • brokerkey: A string containing a key for the Broker to connect
source
HELICS.helicsFederateInfoSetBrokerPortMethod
helicsFederateInfoSetBrokerPort(fi::HELICS.FederateInfo, brokerPort::Int64)

Set the port to use for the Broker

this is only used if the core is automatically created, the Broker information will be transferred to the core for connection this will only be useful for network broker connections

Arguments

  • fi: the FederateInfo object to alter
  • brokerPort: the integer port number to use for connection with a broker
source
HELICS.helicsFederateInfoSetCoreInitStringMethod
helicsFederateInfoSetCoreInitString(fi::HELICS.FederateInfo, coreInit::String)

Set the initialization string for the core usually in the form of command line arguments

Arguments

  • fi: the FederateInfo object to alter
  • coreInit: a string with the core initialization strings
source
HELICS.helicsFederateInfoSetCoreTypeMethod
helicsFederateInfoSetCoreType(fi::HELICS.FederateInfo, coretype::Union{Int64, HELICS.Lib.HelicsCoreTypes})

Set the core type by integer code

valid values available by definitions in api-data.h

Arguments

  • fi: the FederateInfo object to alter
  • coretype: an numerical code for a core type see /ref HelicsCoreTypes
source
HELICS.helicsFederateInfoSetFlagOptionMethod
helicsFederateInfoSetFlagOption(fi::HELICS.FederateInfo, flag::Union{Int64, HELICS.Lib.HelicsFederateFlags}, value::Bool)

Set a flag in the info structure

valid flags are available HelicsFederateFlags

Arguments

  • fi: the FederateInfo object to alter
  • flag: a numerical index for a flag
  • value: the desired value of the flag true or false
source
HELICS.helicsFederateInfoSetLocalPortMethod
helicsFederateInfoSetLocalPort(fi::HELICS.FederateInfo, localPort::String)

Set the local port to use

this is only used if the core is automatically created, the port information will be transferred to the core for connection

Arguments

  • fi: the FederateInfo object to alter
  • localPort: a string with the port information to use as the local server port can be a number or "auto" or "os_local"
source
HELICS.helicsFederateInfoSetSeparatorMethod
helicsFederateInfoSetSeparator(fi::HELICS.FederateInfo, separator::Char)

Set the separator character in the info structure

the separator character is the separation character for local publications/endpoints in creating their global name. for example if the separator character is '/' then a local endpoint would have a globally reachable name of fedName/localName

Arguments

  • fi: the FederateInfo object to alter
  • separator: the character to use as a separator
source

Filter

HELICS.helicsFilterAddDeliveryEndpointMethod
helicsFilterAddDeliveryEndpoint(filt::HELICS.Filter, deliveryEndpoint::String)

Add a delivery endpoint to a cloning filter

All cloned messages are sent to the delivery address(es)

Arguments

  • filt: the given Filter
  • deliveryEndpoint: the name of the Endpoint to deliver messages to
source
HELICS.helicsFilterAddDestinationTargetMethod
helicsFilterAddDestinationTarget(filt::HELICS.Filter, dest::String)

Add a destination target to a Filter

All messages going to a destination are copied to the delivery address(es)

Arguments

  • filt: the given Filter to add a destination target
  • dest: the name of the Endpoint to add as a destination target
source
HELICS.helicsFilterGetInfoMethod
helicsFilterGetInfo(filt::HELICS.Filter) -> String

Get the data in the info field of an filter

Arguments

Returns

  • a string with the info field string
source
HELICS.helicsFilterGetTagMethod
helicsFilterGetTag(filt::HELICS.Filter, tagName::String) -> String

Get the data in a specified tag of a filter.

Arguments

  • filt: the given Filter
  • tagName: The name of the tag to query.

Returns

  • A string withthe tag data
source
HELICS.helicsFilterRemoveDeliveryEndpointMethod
helicsFilterRemoveDeliveryEndpoint(filt::HELICS.Filter, deliveryEndpoint::String)

Remove a delivery destination from a cloning filter

Arguments

  • filt: the given Filter (must be a cloning filter)
  • deliveryEndpoint: a string with the deliverEndpoint to remove
source
HELICS.helicsFilterSetMethod
helicsFilterSet(filt::HELICS.Filter, prop::String, val::Float64)

Set a property on a Filter

Arguments

  • filt: the Filter to modify
  • prop: a string containing the property to set
  • val: a numerical value of the property
source
HELICS.helicsFilterSetCustomCallbackMethod
helicsFilterSetCustomCallback(filter::HELICS.Filter, filtCall::Ptr{Nothing}, userdata::Ptr{Nothing})

Set a general callback for a custom filter.

Add a custom filter callback for creating a custom filter operation in the C shared library.

Arguments

  • filter: the Filter to set a callback for.
  • filtCall: A callback with signature Message(Message, void *); The function arguments are the message to filter and a pointer to user data. The filter should return a new message.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsFilterSetInfoMethod
helicsFilterSetInfo(filt::HELICS.Filter, info::String)

Set the data in the info field for an filter

Arguments

  • filt: the given Filter
  • info: the string to set
source
HELICS.helicsFilterSetOptionMethod
helicsFilterSetOption(filt::HELICS.Filter, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}, value::Bool)

Set the data in the info field for an filter

Arguments

  • filt: the given Filter
  • option: the option to set HelicsHandleOptions
  • value: the value of the option (helicstrue or helicsfalse)
source
HELICS.helicsFilterSetStringMethod
helicsFilterSetString(filt::HELICS.Filter, prop::String, val::String)

Set a string property on a Filter

Arguments

  • filt: the Filter to modify
  • prop: a string containing the property to set
  • val: a string containing the new value
source
HELICS.helicsFilterSetTagMethod
helicsFilterSetTag(filt::HELICS.Filter, tagName::String, tagValue::String)

Get the data in a specified tag of a filter.

Arguments

  • filt: the given Filter
  • tagName: The name of the tag to query.
  • tagValue: A string with the tag data
source

Input

HELICS.helicsInputGetByteCountMethod
helicsInputGetByteCount(ipt::HELICS.Input) -> Int64

Get the size of the raw value for subscription

Returns

  • the size of the raw data/string in bytes
source
HELICS.helicsInputGetCharMethod
helicsInputGetChar(ipt::HELICS.Input) -> Char

Get a single character value from an Input

Arguments

  • ipt: the Input to get the data for

Returns

  • the resulting character value
source
HELICS.helicsInputGetInfoMethod
helicsInputGetInfo(inp::HELICS.Input) -> String

Get the data in the info field of an Input

Arguments

Returns

  • a string with the info field string
source
HELICS.helicsInputGetNamedPointMethod
helicsInputGetNamedPoint(ipt::HELICS.Input) -> Tuple{String, Float64}

Get a named point from a Subscription

Arguments

  • ipt: the Input to get the result for

Returns

  • outputString storage for copying a null terminated string
  • val the double value for the named point
source
HELICS.helicsInputGetOptionMethod
helicsInputGetOption(inp::HELICS.Input, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}) -> Bool

Get the data in the info field of an Input

Arguments

Returns

  • a string with the info field string
source
HELICS.helicsInputGetStringSizeMethod
helicsInputGetStringSize(ipt::HELICS.Input) -> Int64

Get the size of a value for subscription assuming return as a string

Returns

  • the size of the string
source
HELICS.helicsInputGetTagMethod
helicsInputGetTag(inp::HELICS.Input, tagName::String) -> String

Get the data in the tag field of an Input

Arguments

  • inp: the Input to query
  • tagName: the name of the tage to the get the value for

Returns

  • a string with the tag data
source
HELICS.helicsInputGetVectorSizeMethod
helicsInputGetVectorSize(ipt::HELICS.Input) -> Int64

Get the size of a value for subscription assuming return as an array of doubles

Returns

  • the number of double in a return vector
source
HELICS.helicsInputIsUpdatedMethod
helicsInputIsUpdated(ipt::HELICS.Input) -> Bool

Check if a particular subscription was updated

Arguments

Returns

  • true if it has been updated since the last value retrieval
source
HELICS.helicsInputSetDefaultBytesMethod
helicsInputSetDefaultBytes(ipt::HELICS.Input, data::String)

Set the default as a raw data array

Arguments

  • ipt: the Input to set the default for
  • data: a pointer to the raw data to use for the default
source
HELICS.helicsInputSetDefaultComplexVectorMethod
helicsInputSetDefaultComplexVector(ipt::HELICS.Input, vectorInput::Vector{ComplexF64})

Set the default as a vector of complex doubles

Arguments

  • ipt: the Input to set the default for
  • vectorInput: an array of complex double data
source
HELICS.helicsInputSetDefaultNamedPointMethod
helicsInputSetDefaultNamedPoint(ipt::HELICS.Input, str::String, val::Float64)

Set the default as a NamedPoint

Arguments

  • ipt: the Input to set the default for
  • str: a pointer to a string representing the name
  • val: a double value for the value of the named point
source
HELICS.helicsInputSetDefaultTimeMethod
helicsInputSetDefaultTime(ipt::HELICS.Input, val::Union{Float64, Int64})

Set the default as a double

Arguments

  • ipt: the Input to set the default for
  • val: the default double value
source
HELICS.helicsInputSetDefaultVectorMethod
helicsInputSetDefaultVector(ipt::HELICS.Input, vectorInput::Vector{Float64})

Set the default as a vector of doubles

Arguments

  • ipt: the Input to set the default for
  • vectorInput: an array of double data
source
HELICS.helicsInputSetMinimumChangeMethod
helicsInputSetMinimumChange(inp::HELICS.Input, tolerance::Float64)

Set the minimum change detection tolerance

Arguments

  • inp: the Input to modify
  • tolerance: the tolerance level for registering an update, values changing less than this value will not show as being updated
source
HELICS.helicsInputSetTagMethod
helicsInputSetTag(inp::HELICS.Input, tagName::String, tagValue::String)

Set the data in the tag field for an Input

Arguments

  • inp: the Input to query
  • tagName: the name of the tag to set
  • tagValue: the string value to associate with a tag
source

Message

HELICS.helicsMessageAppendDataMethod
helicsMessageAppendData(message::HELICS.Message, data::String)

Append data to the payload

Arguments

  • message: The message object in question
  • data: A string containing the message data to append
  • inputDataLength: The length of the data to input
source
HELICS.helicsMessageCopyMethod
helicsMessageCopy(srcMessage::HELICS.Message, dstMessage::HELICS.Message)

Clopy a message object.

Arguments

  • srcMessage: The message object to copy from
  • dstMessage: The message object to copy to.
source
HELICS.helicsMessageGetByteCountMethod
helicsMessageGetByteCount(message::HELICS.Message) -> Int64

Get the size of the data payload in bytes

Arguments

  • message: The message object in question

Returns

  • the size of the data payload
source
HELICS.helicsMessageGetBytesMethod
helicsMessageGetBytes(message::HELICS.Message) -> String

Get the raw data for a message object

  • message: A message object to get the data for
  • data: The memory location of the data
  • maxMessagelen: The maximum size of information that data can hold
  • actualSize: The actual length of data copied to data
source
HELICS.helicsMessageGetBytesPointerMethod
helicsMessageGetBytesPointer(message::HELICS.Message) -> Ptr{Nothing}

Get a pointer to the raw data of a message

Arguments

  • message: A message object to get the data for

Returns

  • a pointer to the raw data in memory, the

pointer may be NULL if the message is not a valid message

source
HELICS.helicsMessageGetDestinationMethod
helicsMessageGetDestination(message::HELICS.Message) -> String

Get the destination endpoint of a message

Arguments

  • message: The message object in question

Returns

  • a string with the destination endpoint
source
HELICS.helicsMessageGetFlagOptionMethod
helicsMessageGetFlagOption(message::HELICS.Message, flag::Int64) -> Bool

Check if a flag is set on a message.

Arguments

  • message: The message object in question
  • flag: The flag to check should be between [0,15]

Returns

  • true if set otherwise false
source
HELICS.helicsMessageGetMessageIDMethod
helicsMessageGetMessageID(message::HELICS.Message) -> Int64

Get the messageID of a message

Arguments

  • message: The message object in question

Returns

  • the messageID
source
HELICS.helicsMessageGetOriginalDestinationMethod
helicsMessageGetOriginalDestination(message::HELICS.Message) -> String

Get the original destination endpoint of a message, the destination may have been modified by filters or other actions

Arguments

  • message: The message object in question

Returns

  • a string with the original destination of a message
source
HELICS.helicsMessageGetOriginalSourceMethod
helicsMessageGetOriginalSource(message::HELICS.Message) -> String

Get the original source endpoint of a message, the source may have modified by filters or other actions

Arguments

  • message: The message object in question

Returns

  • a string with the source of a message
source
HELICS.helicsMessageGetSourceMethod
helicsMessageGetSource(message::HELICS.Message) -> String

Get the source endpoint of a message

 message operation functions

functions for working with helics message envelopes

Arguments

  • message: The message object in question

Returns

  • a string with the source endpoint
source
HELICS.helicsMessageGetStringMethod
helicsMessageGetString(message::HELICS.Message) -> String

Get the payload of a message as a string

Arguments

  • message: The message object in question

Returns

  • a string representing the payload of a message
source
HELICS.helicsMessageGetTimeMethod
helicsMessageGetTime(message::HELICS.Message) -> Float64

Get the helics time associated with a message

Arguments

  • message: The message object in question

Returns

  • the time associated with a message
source
HELICS.helicsMessageIsValidMethod
helicsMessageIsValid(message::HELICS.Message) -> Bool

A check if the message contains a valid payload

Arguments

  • message: The message object in question

Returns

  • true if the message contains a payload
source
HELICS.helicsMessageReserveMethod
helicsMessageReserve(message::HELICS.Message, reserveSize::Int64)

Reserve space in a buffer but don't actually resize

the message data buffer will be reserved but not resized

Arguments

  • message: The message object in question
  • reserveSize: The number of bytes to reserve in the message object
source
HELICS.helicsMessageResizeMethod
helicsMessageResize(message::HELICS.Message, newSize::Int64)

Resize the data buffer for a message

the message data buffer will be resized there is no guarantees on what is in the buffer in newly allocated space if the allocated space is not sufficient new allocations will occur

Arguments

  • message: The message object in question
  • newSize: The new size in bytes of the buffer
source
HELICS.helicsMessageSetDataMethod
helicsMessageSetData(message::HELICS.Message, data::String)

Set the data payload of a message as raw data

Arguments

  • message: The message object in question
  • data: A string containing the message data
  • inputDataLength: The length of the data to input
source
HELICS.helicsMessageSetDestinationMethod
helicsMessageSetDestination(message::HELICS.Message, dest::String)

Set the destination of a message

Arguments

  • message: The message object in question
  • dest: A string containing the new destination
source
HELICS.helicsMessageSetFlagOptionMethod
helicsMessageSetFlagOption(message::HELICS.Message, flag::Union{Int64, HELICS.Lib.HelicsFederateFlags}, flagValue::Bool)

Set a flag on a message

Arguments

  • message: The message object in question
  • flag: An index of a flag to set on the message
  • flagValue: The desired value of the flag
source
HELICS.helicsMessageSetMessageIDMethod
helicsMessageSetMessageID(message::HELICS.Message, messageID::Int32)

Set the message ID for the message

normally this is not needed and the core of HELICS will adjust as needed

Arguments

  • message: The message object in question
  • messageID: A new message ID
source
HELICS.helicsMessageSetOriginalDestinationMethod
helicsMessageSetOriginalDestination(message::HELICS.Message, dest::String)

Set the original destination of a message

Arguments

  • message: The message object in question
  • dest: A string containing the new original source
source
HELICS.helicsMessageSetOriginalSourceMethod
helicsMessageSetOriginalSource(message::HELICS.Message, src::String)

Set the original source of a message

Arguments

  • message: The message object in question
  • src: A string containing the new original source
source
HELICS.helicsMessageSetSourceMethod
helicsMessageSetSource(message::HELICS.Message, src::String)

Set the source of a message

Arguments

  • message: The message object in question
  • src: A string containing the source
source
HELICS.helicsMessageSetStringMethod
helicsMessageSetString(message::HELICS.Message, str::String)

Set the data payload of a message as a string

Arguments

  • message: The message object in question
  • str: A string containing the message data
source
HELICS.helicsMessageSetTimeMethod
helicsMessageSetTime(message::HELICS.Message, time::Union{Float64, Int64})

Set the delivery time for a message

Arguments

  • message: The message object in question
  • time: The time the message should be delivered
source

Publication

HELICS.helicsPublicationGetTagMethod
helicsPublicationGetTag(pub::HELICS.Publication, tagName::String) -> String

Get the data in the tag field of a Publication

Arguments

  • pub: the Publication to query
  • tagName: the name of the tage to the get the value for

Returns

  • a string with the tag data
source
HELICS.helicsPublicationSetOptionMethod
helicsPublicationSetOption(pub::HELICS.Publication, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}, val::Bool)

Set the data in the info field for an publication

Arguments

source
HELICS.helicsPublicationSetTagMethod
helicsPublicationSetTag(pub::HELICS.Publication, tagName::String, tagValue::String)

Set the data in the tag field for an Publication

Arguments

  • pub: the Publication to query
  • tagName: the name of the tag to set
  • tagValue: the string value to associate with a tag
source

Query

HELICS.helicsQueryBrokerExecuteMethod
helicsQueryBrokerExecute(query::HELICS.Query, broker::HELICS.Broker) -> String

Execute a Query directly on a broker

the call will block until the Query finishes which may require communication or other delays

Arguments

Returns

  • a string. String will remain valid until the Query is freed or executed again

the return will be nullptr if fed or Query is an invalid object, the return string will be "#invalid" if the Query itself was invalid

source
HELICS.helicsQueryBufferFillMethod
helicsQueryBufferFill(buffer::HELICS.QueryBuffer, queryResult::String)

Set the data for a query callback.

There are many queries that HELICS understands directly, but it is occasionally useful to have a federate be able to respond to specific queries with answers specific to a federate.

Arguments

  • buffer: the QueryBuffer to set a callback for.
  • queryResult: A callback with signature HelicsIterationRequest(void *userdata)
source
HELICS.helicsQueryCoreExecuteMethod
helicsQueryCoreExecute(query::HELICS.Query, core::HELICS.Core) -> String

Execute a Query directly on a core

the call will block until the Query finishes which may require communication or other delays

Arguments

  • query: the Query to use in the query
  • core: the core to send the Query to

Returns

  • a string. String will remain valid until the Query is freed or executed again

the return will be nullptr if fed or Query is an invalid object, the return string will be "#invalid" if the Query itself was invalid

source
HELICS.helicsQueryExecuteMethod
helicsQueryExecute(query::HELICS.Query, fed::HELICS.Federate) -> String

Execute a query

the call will block until the Query finishes which may require communication or other delays

Arguments

Returns

  • a string. String will remain valid until the Query is freed or executed again

the return will be nullptr if fed or Query is an invalid object, the return string will be "#invalid" if the Query itself was invalid

source
HELICS.helicsQueryIsCompletedMethod
helicsQueryIsCompleted(query::HELICS.Query) -> Bool

Check if an asynchronously executed Query has completed

this function should usually be called after a QueryExecuteAsync function has been called.

Arguments

  • query: the Query to check if completed

Returns

  • will return true if an asynchronous Query has complete or a regular Query call was made with a result and false if an asynchronous Query has not completed or is invalid
source
HELICS.helicsQuerySetOrderingMethod
helicsQuerySetOrdering(query::HELICS.Query, mode::Int32)

Update the ordering mode of the query, fast runs on priority channels, ordered goes on normal channels but goes in sequence

Arguments

  • query: the query object to change the order for.
  • mode: 0 for fast, 1 for ordered.
source

Others

HELICS.helicsAbortMethod
helicsAbort(errorCode::Int64, errorString::String)

Execute a global abort by sending an error code to all cores, brokers, and federates that were created through the current library instance.

source
HELICS.helicsBooleanToBytesMethod
helicsBooleanToBytes(value::Bool, data::HELICS.DataBuffer) -> Int32

convert a boolean to serialized bytes

Arguments

  • value: the boolean to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsCallbackFederateInitializeCallbackMethod
helicsCallbackFederateInitializeCallback(fed::HELICS.Federate, initialize::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for initialization.

This callback will be executed when computing whether to iterate in initialization mode.

Arguments

  • fed: the Federate to set a callback for.
  • initialize: A callback with signature HelicsIterationRequest(void *userdata)
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsCallbackFederateNextTimeCallbackMethod
helicsCallbackFederateNextTimeCallback(fed::HELICS.Federate, timeUpdate::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the next time update.

This callback will be triggered to compute the next time update for a callback federate.

Arguments

  • fed: the Federate to set a callback for.
  • timeUpdate: A callback with signature HelicsTime(HelicsTime time, void *userdata)
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsCallbackFederateNextTimeIterativeCallbackMethod
helicsCallbackFederateNextTimeIterativeCallback(fed::HELICS.Federate, timeUpdate::Ptr{Nothing}, userdata::Ptr{Nothing})

Set callback for the next time update with iteration capability.

This callback will be triggered to compute the next time update for a callback federate.

Arguments

  • fed: the Federate to set a callback for.
  • timeUpdate: A callback with signature HelicsTime(HelicsTime time, HelicsIterationResult result, HelicsIterationRequest* iteration, void *userdata)
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsCharToBytesMethod
helicsCharToBytes(value::Char, data::HELICS.DataBuffer) -> Int32

convert a char to serialized bytes

Arguments

  • value: the char to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsCleanupLibraryMethod
helicsCleanupLibrary()

Function to do some housekeeping work

this runs some cleanup routines and tries to close out any residual thread that haven't been shutdown yet.

source
HELICS.helicsCloseLibraryMethod
helicsCloseLibrary()

Call when done using the helics library, this function will ensure the threads are closed properly if possible this should be the last call before exiting,

source
HELICS.helicsComplexToBytesMethod
helicsComplexToBytes(value::ComplexF64, data::HELICS.DataBuffer) -> Int32

convert a complex to serialized bytes

Arguments

  • value: the complex to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsComplexVectorToBytesMethod
helicsComplexVectorToBytes(value::Vector{ComplexF64}, data::HELICS.DataBuffer) -> Int32

convert a vector of complex values to serialized bytes

Arguments

  • value: the vector to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsCreateBrokerMethod
helicsCreateBroker(kind::String, name::String, initString::String) -> HELICS.Broker

Create a broker object

Arguments

  • type: the type of Broker to create
  • name: the name of Broker, may be a empty string to have a name automatically assigned
  • initString: an initialization string to send to the core-the format is similar to command line arguments. Typical options include a broker address –broker="XSSAF" if this is a subbroker or the number of federates or the address

Returns

  • a Broker object, will be NULL if there was an error indicated in the err object
source
HELICS.helicsCreateCallbackFederateMethod
helicsCreateCallbackFederate(fedName::String, fi::HELICS.FederateInfo) -> HELICS.CallbackFederate

Create a callback federate from a federate info object.

Arguments

  • fedName: A string with the name of the federate, can be NULL or an empty string to pull the default name from fi.
  • fi: fi The federate info object that contains details on the federate.

Returns

source
HELICS.helicsCreateCallbackFederateFromConfigMethod
helicsCreateCallbackFederateFromConfig(configFile::String) -> HELICS.CallbackFederate

Create a callback federate from a JSON file or JSON string or TOML file.

Arguments

  • configFile: A JSON file or a JSON string or TOML file that contains setup and configuration information.

Returns

source
HELICS.helicsCreateCombinationFederateMethod
helicsCreateCombinationFederate(fedName::String, fi::HELICS.FederateInfo) -> HELICS.CombinationFederate

Create a CombinationFederate from a FederateInfo object

CombinationFederate are both ValueFederate and MessageFederate, objects can be used in all functions that take a Federate, MessageFederate or ValueFederate object as an argument

Arguments

  • fedName: a string with the name of the Federate, can be NULL or an empty string to pull the default name from fi
  • fi: the FederateInfo object that contains details on the Federate

Returns

source
HELICS.helicsCreateCombinationFederateFromConfigMethod
helicsCreateCombinationFederateFromConfig(configFile::String) -> HELICS.CombinationFederate

Create a CombinationFederate from a JSON file or JSON string

CombinationFederate are both ValueFederate and MessageFederate, objects can be used in all functions that take a Federate, MessageFederate or ValueFederate object as an argument

Arguments

  • configFile: a JSON file or a JSON string or TOML file that contains setup and configuration information

Returns

source
HELICS.helicsCreateCoreMethod
helicsCreateCore(kind::String, name::String, initString::String) -> HELICS.Core

Create a core object

Arguments

  • type: the type of the core to create
  • name: the name of the core , may be a empty string to have a name automatically assigned
  • initString: an initialization string to send to the core-the format is similar to command line arguments. Typical options include a broker address –broker="XSSAF" or the number of federates or the address

Returns

  • a Core object if the core is invalid err will contain some indication
source
HELICS.helicsCreateQueryMethod
helicsCreateQuery(target::String, query::String) -> HELICS.Query

Create a Query

a Query consists of a target and query string

Arguments

  • target: the name of the target to query
  • query: the query string to make of the target
source
HELICS.helicsCreateValueFederateFromConfigMethod
helicsCreateValueFederateFromConfig(configFile::String) -> HELICS.ValueFederate

Create a value federate from a JSON file, JSON string, or TOML file

Federate objects can be used in all functions that take a Federate object as an argument

Arguments

  • configFile: a JSON file or a JSON string or TOML file that contains setup and configuration information

Returns

source
HELICS.helicsDataBufferConvertToTypeMethod
helicsDataBufferConvertToType(data::HELICS.DataBuffer, newDataType::Int64) -> Bool

change data type of DataBuffer.

Arguments

  • data: the DataBuffer

-newDataType: integer of data type you want to change data to.

Returns

  • Bool, true if successful otherwise false
source
HELICS.helicsDataBufferStringSizeMethod
helicsDataBufferStringSize(data::HELICS.DataBuffer) -> Int64

Get size of string data size from DataBuffer.

Arguments

  • data: the DataBuffer

Returns

  • Int
source
HELICS.helicsDataBufferToCharMethod
helicsDataBufferToChar(data::HELICS.DataBuffer) -> Char

Get data from DataBuffer as a single char.

Arguments

  • data: the DataBuffer

Returns

  • Char
source
HELICS.helicsDataBufferToComplexMethod
helicsDataBufferToComplex(data::HELICS.DataBuffer) -> ComplexF64

Get data from DataBuffer as a complex.

Arguments

  • data: the DataBuffer

Returns

  • ComplexF64
source
HELICS.helicsDataBufferToComplexVectorMethod
helicsDataBufferToComplexVector(data::HELICS.DataBuffer) -> Vector{ComplexF64}

Get vector of complex values from DataBuffer.

Arguments

  • data: the DataBuffer

Returns

  • Vector{ComplexF64}
source
HELICS.helicsDataBufferToDoubleMethod
helicsDataBufferToDouble(data::HELICS.DataBuffer) -> Float64

Get data from DataBuffer as a double.

Arguments

  • data: the DataBuffer

Returns

  • Float64
source
HELICS.helicsDataBufferToNamedPointMethod
helicsDataBufferToNamedPoint(data::HELICS.DataBuffer) -> Tuple{String, Float64}

Get a named point from DataBuffer.

Arguments

  • data: the DataBuffer

Returns

  • Tuple{String, Float64}
source
HELICS.helicsDataBufferToTimeMethod
helicsDataBufferToTime(data::HELICS.DataBuffer) -> Float64

Get data from DataBuffer as a HELICS.HelicsTime.

Arguments

  • data: the DataBuffer

Returns

  • Float64
source
HELICS.helicsDataBufferToVectorMethod
helicsDataBufferToVector(data::HELICS.DataBuffer) -> Vector{Float64}

Get vector of doubles from DataBuffer.

Arguments

  • data: the DataBuffer

Returns

  • Vector{Float64}
source
HELICS.helicsDataBufferTypeMethod
helicsDataBufferType(data::HELICS.DataBuffer) -> Int64

return the an integer value of the data type of a DataBuffer.

Arguments

  • data: the DataBuffer

Returns

  • Int data type integer value.
source
HELICS.helicsDataBufferVectorSizeMethod
helicsDataBufferVectorSize(data::HELICS.DataBuffer) -> Int64

Get size of vector data size from DataBuffer.

Arguments

  • data: the DataBuffer

Returns

  • Int
source
HELICS.helicsDoubleToBytesMethod
helicsDoubleToBytes(value::Float64, data::HELICS.DataBuffer) -> Int32

convert a double to serialized bytes

Arguments

  • value: the Float64 to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsGetFederateByNameMethod
helicsGetFederateByName(fedName::String) -> HELICS.CombinationFederate

Get an existing Federate from a core by name

the Federate must have been created by one of the other functions and at least one of the objects referencing the created federate must still be active in the process

Arguments

  • fedName: the name of the Federate to retrieve

Returns

  • NULL if no fed is available by that name otherwise a Federate with that name
source
HELICS.helicsIntegerToBytesMethod
helicsIntegerToBytes(value::Int64, data::HELICS.DataBuffer) -> Int32

convert an integer to serialized bytes

Arguments

  • value: the Int64 to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsIsCoreTypeAvailableMethod
helicsIsCoreTypeAvailable(kind::String) -> Bool

Returns true if core/broker type specified is available in current compilation.

Arguments

  • type: a string representing a core type

Returns

  • a Bool

possible options include "test","zmq","udp","ipc","interprocess","tcp","default", "mpi"

source
HELICS.helicsLoadSignalHandlerMethod
helicsLoadSignalHandler()

Load a signal handler that handles Ctrl-C and shuts down all HELICS brokers, cores, and federates then exits the process

source
HELICS.helicsLoadSignalHandlerCallbackMethod
helicsLoadSignalHandlerCallback(handler::Ptr{Nothing}, useSeparateThread::Bool)

Load a custom signal handler to execute prior to the abort signal handler. @details This function is not 100% reliable it will most likely work but uses some functions and techniques that are not 100% guaranteed to work in a signal handler and in worst case it could deadlock. That is somewhat unlikely given usage patterns but it is possible. The callback has signature HelicsBool(*handler)(int) and it will take the SIGINT as an argument and return a boolean. If the boolean return value is HELICSTRUE (or the callback is null) the default signal handler is run after the callback finishes; if it is HELICSFALSE the default callback is not run and the default signal handler is executed. If the second argument is set to HELICSTRUE the default signal handler will execute in a separate thread(this may be a bad idea).

source
HELICS.helicsLoadSignalHandlerCallbackNoExitMethod
helicsLoadSignalHandlerCallbackNoExit(handler::Ptr{Nothing}, useSeparateThread::Bool)

Load a custom signal handler to execute prior to the abort signal handler. The signal handler does not call exit. @details This function is not 100% reliable. It will most likely work but uses some functions and techniques that are not 100% guaranteed to work in a signal handler and in worst case it could deadlock. That is somewhat unlikely given usage patterns but it is possible. The callback has signature HelicsBool(*handler)(int) and it will take the SIGINT as an argument and return a boolean. If the boolean return value is HELICSTRUE (or the callback is null) the no exit signal handler is run after the callback finishes; if it is HELICSFALSE the default callback is not run and the default signal handler is executed. If the second argument is set to HELICSTRUE the default signal handler will execute in a separate thread (this may be a bad idea).

source
HELICS.helicsLoadThreadedSignalHandlerMethod
helicsLoadThreadedSignalHandler()

Load a signal handler that handles Ctrl-C and shuts down all HELICS brokers, cores, and federates then exits the process. This operation will execute in a newly created and detached thread returning control back to the calling program before completing operations.

source
HELICS.helicsNamedPointToBytesMethod
helicsNamedPointToBytes(name::String, value::Int64, data::HELICS.DataBuffer)

convert a named point to serialized bytes

Arguments

  • name: the name of the point of doubles to convert
  • value: the integer value of the point to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsRawStringToBytesMethod
helicsRawStringToBytes(value::String, data::HELICS.DataBuffer)

convert a raw string to serialized bytes

Arguments

  • value: the raw string to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsStringToBytesMethod
helicsStringToBytes(value::String, data::HELICS.DataBuffer) -> Int32

convert a string to serialized bytes

Arguments

  • value: the string to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsTimeToBytesMethod
helicsTimeToBytes(value::Union{Float64, Int64}, data::HELICS.DataBuffer) -> Int32

convert a HelicsTime to serialized bytes

Arguments

  • value: the HelicsTime to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source
HELICS.helicsTranslatorAddDestinationEndpointMethod
helicsTranslatorAddDestinationEndpoint(trans::HELICS.Translator, ept::String)

Add a destination target endpoint to a translator.

The translator will "translate" all message sent to it. This method adds an endpoint which will receive data published to the translator.

Arguments

  • trans: the Translator to modify
  • ept: The name of the endpoint the translator sends data to.
source
HELICS.helicsTranslatorAddInputTargetMethod
helicsTranslatorAddInputTarget(trans::HELICS.Translator, input::String)

Add an input to send a translator output.

All messages sent to a translator endpoint get translated and published to the translators target inputs. This method adds an input to a translators which will receive translated messages.

Arguments

  • trans: the Translator to add a destination target to.
  • input: The name of the input which will be receiving translated messages
source
HELICS.helicsTranslatorAddPublicationTargetMethod
helicsTranslatorAddPublicationTarget(trans::HELICS.Translator, pub::String)

Add a source publication target to a translator.

When a publication publishes data the translator will receive it and convert it to a message sent to a translators destination endpoints. This method adds a publication which publishes data the translator receives and sends to its destination endpoints.

Arguments

  • trans: the Translator to modify
  • pub: The name of the publication to subscribe.
source
HELICS.helicsTranslatorAddSourceEndpointMethod
helicsTranslatorAddSourceEndpoint(trans::HELICS.Translator, ept::String)

Add a source endpoint target to a translator.

The translator will "translate" all message sent to it. This method adds an endpoint which can send the translator data.

Arguments

  • trans: the Translator to modify
  • ept: The name of the endpoint which will send the endpoint data
source
HELICS.helicsTranslatorGetInfoMethod
helicsTranslatorGetInfo(trans::HELICS.Translator) -> String

Get the data in the info field of a translator.

Arguments

Returns

  • the info field string.
source
HELICS.helicsTranslatorGetNameMethod
helicsTranslatorGetName(trans::HELICS.Translator) -> String

Get the name of the translator and store in the given string.

Arguments

Returns

  • a string with the name of the translator
source
HELICS.helicsTranslatorGetOptionMethod
helicsTranslatorGetOption(trans::HELICS.Translator, option::Int64) -> Int64

Get a handle option for the translator.

Arguments

  • trans: the Translator to set the info field for.
  • option: The option to query /ref HelicsHandleOptions.
source
HELICS.helicsTranslatorGetTagMethod
helicsTranslatorGetTag(trans::HELICS.Translator, tagName::String) -> String

Get the data in a specified tag of a translator.

Arguments

-tagName: The name of the tag to query.

Returns

  • the string with the tag data.
source
HELICS.helicsTranslatorSetMethod
helicsTranslatorSet(trans::HELICS.Translator, prop::String, val::Float64)

Set a double property on a translator.

Arguments

  • trans: the Translator to modify
  • prop: A string containing the property to set.
  • val: A numerical value for the property.
source
HELICS.helicsTranslatorSetCustomCallbackMethod
helicsTranslatorSetCustomCallback(translator::HELICS.Translator, toMessageCall::Ptr{Nothing}, toValueCall::Ptr{Nothing}, userdata::Ptr{Nothing})

Set a general callback for a custom translator.

Add a pair of custom callbacks for running a translator operation in the C shared library.

Arguments

  • translator: the Translator to set a callback for.
  • toMessageCall: A callback with signature void(DataBuffer, HelicsMessage, void *); The function arguments are raw Value data, the messageObject to fill out and a pointer to user data.
  • toValueCall: A callback with signature void(HelicsMessage, DataBuffer, void *);
  •             The function arguments are a message object, the data buffer to fill out and a pointer to user data.
  • userdata: a point to user data that is passed to the function when executing
source
HELICS.helicsTranslatorSetInfoMethod
helicsTranslatorSetInfo(trans::HELICS.Translator, info::String)

Set the data in the info field for a translator.

Arguments

  • trans: the Translator to set the info field for.
  • info: the string to set.
source
HELICS.helicsTranslatorSetOptionMethod
helicsTranslatorSetOption(trans::HELICS.Translator, option::Int64, value::Int64)

Set an option value for a translator.

Arguments

  • trans: the Translator to set the option for
  • option: The option to set /ref HelicsHandleOptions.
  • value: The value of the option, commonly 0 for false or 1 for true.
source
HELICS.helicsTranslatorSetStringMethod
helicsTranslatorSetString(trans::HELICS.Translator, prop::String, val::String)

Set a string property on a translator.

Arguments

  • trans: the Translator to modify
  • prop: A string containing the property to set.
  • val: A string value for the property.
source
HELICS.helicsTranslatorSetTagMethod
helicsTranslatorSetTag(trans::HELICS.Translator, tagName::String, tagValue::String)

Set the data in a specific tag for a translator.

Arguments

  • trans: the Translator to set the tag for.
  • tagName: the tag to set.
  • tagValue: the string value to assocate with the tag.
source
HELICS.helicsVectorToBytesMethod
helicsVectorToBytes(value::Vector{Float64}, data::HELICS.DataBuffer) -> Int32

convert a vector of doubles to serialized bytes

Arguments

  • value: the vector of doubles to convert
  • data: the DataBuffer to hold the serialized bytes

Returns

  • Int32 Bytes serialized.
source

Types

Index