API
This is the Julia API for the HELICS library.
julia> using HELICS; const h = HELICS;
julia> h.helicsGetVersion()
"3.5.2 (2024-04-08)"
Enum
HELICS.HelicsCoreFlags
— TypeEnumeration 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)
HELICS.HelicsCoreTypes
— TypePick 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 asHELICS_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)
HELICS.HelicsDataTypes
— TypeEnumeration 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)
HELICS.HelicsErrorTypes
— TypeEnumeration 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)
HELICS.HelicsFederateFlags
— TypeEnumeration 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)
HELICS.HelicsFederateState
— TypeEnumeration 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)
HELICS.HelicsFilterTypes
— TypeEnumeration 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)
HELICS.HelicsFlags
— Typeenumeration 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)
HELICS.HelicsHandleOptions
— TypeEnumeration 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)
HELICS.HelicsIterationRequest
— TypeEnumeration 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)
HELICS.HelicsIterationResult
— TypeEnumeration 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)
HELICS.HelicsLogLevels
— TypeLog 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)
HELICS.HelicsMultiInputModes
— Typeenumeration 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)
HELICS.HelicsProperties
— TypeEnumeration 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 bothHELICS_PROPERTY_RT_LAG
andHELICS_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 seeHELICS_LOG_LEVELS
(271)HELICS_PROPERTY_INT_FILE_LOG_LEVEL
: integer property controlling the log level for file logging in a federate seeHELICS_LOG_LEVELS
(272)HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL
: integer property controlling the log level for file logging in a federate seeHELICS_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)
HELICS.HelicsSequencingModes
— Typeenumeration 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)
HELICS.HelicsTranslatorTypes
— Typeenumeration 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)
Functions
Broker
Core
Endpoint
FederateInfo
Federate
Filter
Input
Message
Publication
Query
Broker
HELICS.helicsBrokerAddAlias
— MethodhelicsBrokerAddAlias(broker::HELICS.Broker, interfaceName::String, alias::String)
create an alias for an interface
Arguments
broker
: theBroker
to us to set the aliasinterfaceName
: the current name of an interfacealias
: the additional name to use for a given interface
HELICS.helicsBrokerAddDestinationFilterToEndpoint
— MethodhelicsBrokerAddDestinationFilterToEndpoint(broker::HELICS.Broker, filter::String, endpoint::String)
Link a named filter to a destination endpoint
Arguments
HELICS.helicsBrokerAddSourceFilterToEndpoint
— MethodhelicsBrokerAddSourceFilterToEndpoint(broker::HELICS.Broker, filter::String, endpoint::String)
Link a named filter to a source endpoint
Arguments
HELICS.helicsBrokerClearTimeBarrier
— MethodhelicsBrokerClearTimeBarrier(broker::HELICS.Broker)
Clear any time barrier on a broker.
Arguments
broker
: theBroker
to clear the time barrier for
HELICS.helicsBrokerClone
— MethodhelicsBrokerClone(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
broker
: an existingBroker
Returns
- a new reference to the same broker
HELICS.helicsBrokerDataLink
— MethodhelicsBrokerDataLink(broker::HELICS.Broker, source::String, target::String)
Link a named publication and named input using a broker
Arguments
broker
: theBroker
to generate the connection fromsource
: the name of thePublication
(cannot be NULL)target
: the name of the target to send thePublication
data (cannot be NULL)
HELICS.helicsBrokerDestroy
— MethodhelicsBrokerDestroy(broker::HELICS.Broker)
Disconnect and free a broker
HELICS.helicsBrokerDisconnect
— MethodhelicsBrokerDisconnect(broker::HELICS.Broker)
Disconnect a broker
Arguments
broker
: theBroker
to disconnect
HELICS.helicsBrokerFree
— MethodhelicsBrokerFree(broker::HELICS.Broker)
Release the memory associated with a broker
HELICS.helicsBrokerGetAddress
— MethodhelicsBrokerGetAddress(broker::HELICS.Broker) -> String
Get the network address associated with a broker
Arguments
broker
: theBroker
to query
Returns
- a string with the network address of the
Broker
HELICS.helicsBrokerGetIdentifier
— MethodhelicsBrokerGetIdentifier(broker::HELICS.Broker) -> String
Get an identifier for the Broker
Arguments
broker
: theBroker
to query
Returns
- a string containing the identifier for the
Broker
HELICS.helicsBrokerGlobalError
— MethodhelicsBrokerGlobalError(broker::HELICS.Broker, errorCode::Int64, errorString::String)
Generate a global error through a broker. This will terminate the federation.
Arguments
broker
: theBroker
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.
HELICS.helicsBrokerIsConnected
— MethodhelicsBrokerIsConnected(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.
HELICS.helicsBrokerIsValid
— MethodhelicsBrokerIsValid(broker::HELICS.Broker) -> Bool
Check if a broker object is a valid object
Arguments
broker
: theBroker
object to test
HELICS.helicsBrokerMakeConnections
— MethodhelicsBrokerMakeConnections(broker::HELICS.Broker, file::String)
Load a file containing connection information
Arguments
broker
: theBroker
to generate the connections fromfile
: A JSON or TOML file containing connection information
HELICS.helicsBrokerSendCommand
— MethodhelicsBrokerSendCommand(broker::HELICS.Broker, target::String, command::String)
Send a command to another helics object though a broker using asynchronous(fast) operations.
Arguments
broker
: TheBroker
to set the command throughtarget
: The name of the object to send the command tocommand
: the command to send
HELICS.helicsBrokerSendOrderedCommand
— MethodhelicsBrokerSendOrderedCommand(broker::HELICS.Broker, target::String, command::String)
Send a command to another helics object through a broker using ordered sequencing.
Arguments
broker
: TheBroker
to set the command throughtarget
: The name of the object to send the command tocommand
: the command to send
HELICS.helicsBrokerSetGlobal
— MethodhelicsBrokerSetGlobal(broker::HELICS.Broker, valueName::String, value::String)
Set a federation global value
this overwrites any previous value for this name
Arguments
broker
: theBroker
to set the global throughvalueName
: the name of the global to setvalue
: the value of the global
HELICS.helicsBrokerSetLogFile
— MethodhelicsBrokerSetLogFile(broker::HELICS.Broker, logFileName::String)
Set a the log file on a broker
Arguments
broker
: theBroker
to set the global throughlogFileName
: The name of the file to log to
HELICS.helicsBrokerSetLoggingCallback
— MethodhelicsBrokerSetLoggingCallback(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
: theBroker
object in which to create aSubscription
must have been create withhelicsCreateValueFederate
orhelicsCreateCombinationFederate
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 datauserdata
: a point to user data that is passed to the function when executing
HELICS.helicsBrokerSetTimeBarrier
— MethodhelicsBrokerSetTimeBarrier(broker::HELICS.Broker, barrierTime::Union{Float64, Int64})
Set a broker time barrier.
Arguments
broker
: theBroker
to set the time barrier forbarrierTime
: The time to se the barrier at
HELICS.helicsBrokerWaitForDisconnect
— MethodhelicsBrokerWaitForDisconnect(broker::HELICS.Broker, msToWait::Int64) -> Bool
Wait for the Broker
to disconnect
Arguments
broker
: theBroker
to wait formsToWait
: the time out in millisecond (<0 for infinite timeout)
Returns
true
if the disconnect was successful,false
if there was a timeout
Core
HELICS.helicsCoreAddAlias
— MethodhelicsCoreAddAlias(core::HELICS.Core, interfaceName::String, alias::String)
create an alias for an interface
Arguments
core
: theCore
to us to set the aliasinterfaceName
: the current name of an interfacealias
: the additional name to use for a given interface
HELICS.helicsCoreAddDestinationFilterToEndpoint
— MethodhelicsCoreAddDestinationFilterToEndpoint(core::HELICS.Core, filter::String, endpoint::String)
HELICS.helicsCoreAddSourceFilterToEndpoint
— MethodhelicsCoreAddSourceFilterToEndpoint(core::HELICS.Core, filter::String, endpoint::String)
Link a named filter to a source endpoint
Arguments
HELICS.helicsCoreClone
— MethodhelicsCoreClone(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 existingCore
Returns
- a new reference to the same
Core
HELICS.helicsCoreConnect
— MethodhelicsCoreConnect(core::HELICS.Core)
Connect a core to the federate based on current configuration
Arguments
core
: the core object to enable init values for
HELICS.helicsCoreDataLink
— MethodhelicsCoreDataLink(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 fromsource
: the name of thePublication
(cannot be NULL)target
: the named of the target to send thePublication
data (cannot be NULL)
HELICS.helicsCoreDestroy
— MethodhelicsCoreDestroy(core::HELICS.Core)
Disconnect and free a core
HELICS.helicsCoreDisconnect
— MethodhelicsCoreDisconnect(core::HELICS.Core)
Get an identifier for the core
Arguments
core
: the core to query
Returns
- a void enumeration indicating any error condition
HELICS.helicsCoreFree
— MethodhelicsCoreFree(core::HELICS.Core)
Release the memory associated with a core
HELICS.helicsCoreGetAddress
— MethodhelicsCoreGetAddress(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
HELICS.helicsCoreGetIdentifier
— MethodhelicsCoreGetIdentifier(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
HELICS.helicsCoreGlobalError
— MethodhelicsCoreGlobalError(core::HELICS.Core, errorCode::Int64, errorString::String)
Generate a global error through a core. This will terminate the federation.
Arguments
core
: theCore
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.
HELICS.helicsCoreIsConnected
— MethodhelicsCoreIsConnected(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
HELICS.helicsCoreIsValid
— MethodhelicsCoreIsValid(core::HELICS.Core) -> Bool
Check if a core object is a valid object
Arguments
core
: theCore
object to test
HELICS.helicsCoreMakeConnections
— MethodhelicsCoreMakeConnections(core::HELICS.Core, file::String)
Load a file containing connection information
Arguments
core
: The core to generate the connections fromfile
: A JSON or TOML file containing connection information
HELICS.helicsCoreRegisterCloningFilter
— MethodhelicsCoreRegisterCloningFilter(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 throughname
: the name of theFilter
(can be NULL)
Returns
- a
Filter
object
HELICS.helicsCoreRegisterFilter
— MethodhelicsCoreRegisterFilter(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 throughtype
the type of filter to createHelicsFilterTypes
name
the name of theFilter
(can be NULL)
Returns
- a
Filter
object
HELICS.helicsCoreRegisterTranslator
— MethodhelicsCoreRegisterTranslator(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
: theCore
to register through.type
: The type of translator to create /ref HelicsTranslatorTypesname
: The name of the translator, it can be null
Returns
HELICS.helicsCoreSendCommand
— MethodhelicsCoreSendCommand(core::HELICS.Core, target::String, command::String)
Send a command to another helics object though a core using asynchronous(fast) operations.
Arguments
core
: TheCore
to set the command throughtarget
: The name of the object to send the command tocommand
: the command to send
HELICS.helicsCoreSendOrderedCommand
— MethodhelicsCoreSendOrderedCommand(core::HELICS.Core, target::String, command::String)
Send a command to another helics object though a core using ordered operations.
Arguments
core
: TheCore
to set the command throughtarget
: The name of the object to send the command tocommand
: the command to send
HELICS.helicsCoreSetGlobal
— MethodhelicsCoreSetGlobal(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 throughvalueName
: the name of the global to setvalue
: the value of the global
HELICS.helicsCoreSetLogFile
— MethodhelicsCoreSetLogFile(core::HELICS.Core, logFileName::String)
Set a the log file on a core
Arguments
core
: The core to set the global throughlogFileName
: The name of the file to log to
HELICS.helicsCoreSetLoggingCallback
— MethodhelicsCoreSetLoggingCallback(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 aSubscription
must have been create withhelicsCreateValueFederate
orhelicsCreateCombinationFederate
logger
: a callback with signature void(int, const char *, const char *, void *); the function arguments are loglevel, an identifier, and a message stringuserdata
: a point to user data that is passed to the function when executing
HELICS.helicsCoreSetReadyToInit
— MethodhelicsCoreSetReadyToInit(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
HELICS.helicsCoreWaitForDisconnect
— MethodhelicsCoreWaitForDisconnect(core::HELICS.Core, msWait::Int64) -> Int32
Wait for the core to disconnect
Arguments
core
: The core to wait formsToWait
: The time out in millisecond (<0 for infinite timeout)
Returns
true
if the disconnect was successful, false
if there was a timeout
Endpoint
HELICS.helicsEndpointAddDestinationFilter
— MethodhelicsEndpointAddDestinationFilter(endpoint::HELICS.Endpoint, filterName::String)
add a destination filter to an endpoint
endpoint
: TheEndpoint
to modifyfilterName
: the name of the filter to add
HELICS.helicsEndpointAddDestinationTarget
— MethodhelicsEndpointAddDestinationTarget(endpoint::HELICS.Endpoint, targetEndpoint::String)
add a destination target to an endpoint, Specifying an endpoint to send undirected messages to
endpoint
: TheEndpoint
to modifytargetEndpoint
: the name of the endpoint to send messages to
HELICS.helicsEndpointAddSourceFilter
— MethodhelicsEndpointAddSourceFilter(endpoint::HELICS.Endpoint, filterName::String)
add a source Filter to an endpoint
endpoint
: TheEndpoint
to modifyfilterName
: the name of the filter to add
HELICS.helicsEndpointAddSourceTarget
— MethodhelicsEndpointAddSourceTarget(endpoint::HELICS.Endpoint, targetEndpoint::String)
add a source target to an endpoint, Specifying an endpoint to receive undirected messages from
endpoint
: TheEndpoint
to modifytargetEndpoint
: the endpoint name to get messages from
HELICS.helicsEndpointClearMessages
— MethodhelicsEndpointClearMessages(endpoint::HELICS.Endpoint)
Clear all message from an Endpoint
Arguments
endpoint
: TheEndpoint
object to operate on
HELICS.helicsEndpointCreateMessage
— MethodhelicsEndpointCreateMessage(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 theEndpoint
Returns
Message
object
HELICS.helicsEndpointGetDefaultDestination
— MethodhelicsEndpointGetDefaultDestination(endpoint::HELICS.Endpoint) -> String
Get the default destination for an Endpoint
Arguments
endpoint
: TheEndpoint
to set the destination for
Returns
- a string with the default destination
HELICS.helicsEndpointGetInfo
— MethodhelicsEndpointGetInfo(endpoint::HELICS.Endpoint) -> String
Get the data in the info field of an filter
Arguments
endpoint
: TheFilter
to query
Returns
- a string with the info field string
HELICS.helicsEndpointGetMessage
— MethodhelicsEndpointGetMessage(endpoint::HELICS.Endpoint) -> HELICS.Message
Receive a packet from a particular endpoint
Arguments
endpoint
: The identifier for theEndpoint
Returns
Message
object
HELICS.helicsEndpointGetName
— MethodhelicsEndpointGetName(endpoint::HELICS.Endpoint) -> String
get the name of an Endpoint
Arguments
endpoint
: TheEndpoint
object in question
Returns
- the name of the
Endpoint
HELICS.helicsEndpointGetOption
— MethodhelicsEndpointGetOption(endpoint::HELICS.Endpoint, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}) -> Bool
Get a handle option on an Endpoint
endpoint
: TheEndpoint
to modifyoption
: Integer code for the option to setHelicsHandleOptions
HELICS.helicsEndpointGetTag
— MethodhelicsEndpointGetTag(endpoint::HELICS.Endpoint, tagName::String) -> String
Get the data in a specified tag of an endpoint
Arguments
endpoint
: TheEndpoint
to querytagName
: The name of the tag
Returns
- a string with the tag data
HELICS.helicsEndpointGetType
— MethodhelicsEndpointGetType(endpoint::HELICS.Endpoint) -> String
Get the type specified for an Endpoint
Arguments
endpoint
: TheEndpoint
object in question
Returns
- the defined type of the
Endpoint
HELICS.helicsEndpointHasMessage
— MethodhelicsEndpointHasMessage(endpoint::HELICS.Endpoint) -> Bool
Check if a given endpoint has any unread messages
Arguments
endpoint
: TheEndpoint
to check
Returns
true
if theEndpoint
has a message,false
otherwise
HELICS.helicsEndpointIsValid
— MethodhelicsEndpointIsValid(endpoint::HELICS.Endpoint) -> Bool
Check if an endpoint is valid.
Arguments
endpoint
: TheEndpoint
object to check.
Returns
true
if the Endpoint
object represents a valid endpoint.
HELICS.helicsEndpointPendingMessageCount
— MethodhelicsEndpointPendingMessageCount(endpoint::HELICS.Endpoint) -> Int64
Returns the number of pending receives for an endpoint
Arguments
endpoint
: TheEndpoint
to query
HELICS.helicsEndpointRemoveTarget
— MethodhelicsEndpointRemoveTarget(endpoint::HELICS.Endpoint, targetEndpoint::String)
remove an endpoint from being targeted
endpoint
: TheEndpoint
to modifytargetEndpoint
: the name of the target enpoint to remove
HELICS.helicsEndpointSendBytes
— MethodhelicsEndpointSendBytes(endpoint::HELICS.Endpoint, data::String)
Send a message to the targeted destination
Arguments
endpoint
: TheEndpoint
to send the data fromdata
: The data to send
HELICS.helicsEndpointSendBytesAt
— MethodhelicsEndpointSendBytesAt(endpoint::HELICS.Endpoint, data::String, time::Union{Float64, Int64})
Send a message at a specific time to the targeted destinations
Arguments
endpoint
: TheEndpoint
to send the data fromdata
: The data to sendtime
: The time the message should be sent.
HELICS.helicsEndpointSendBytesTo
— MethodhelicsEndpointSendBytesTo(endpoint::HELICS.Endpoint, data::String, dest::String)
Send a message to the specified destination
Arguments
endpoint
: TheEndpoint
to send the data fromdata
: The data to senddest
: The target destination (empty string to use the default destination)
HELICS.helicsEndpointSendBytesToAt
— MethodhelicsEndpointSendBytesToAt(endpoint::HELICS.Endpoint, data::String, dest::String, time::Union{Float64, Int64})
Send a message to the specified destination at a specific time.
Arguments
endpoint
: TheEndpoint
to send the data fromdata
: The data to senddest
: The target destination (empty string to use the default destination)time
: The time the message should be sent.
HELICS.helicsEndpointSendMessage
— MethodhelicsEndpointSendMessage(endpoint::HELICS.Endpoint, message::HELICS.Message)
Send a message object from a specific endpoint
Arguments
HELICS.helicsEndpointSendMessageZeroCopy
— MethodhelicsEndpointSendMessageZeroCopy(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
HELICS.helicsEndpointSetDefaultDestination
— MethodhelicsEndpointSetDefaultDestination(endpoint::HELICS.Endpoint, dest::String)
Set the default destination for an Endpoint
if no other endpoint is given
Arguments
endpoint
: TheEndpoint
to set the destination fordest
: A string naming the desired default endpoint
HELICS.helicsEndpointSetInfo
— MethodhelicsEndpointSetInfo(endpoint::HELICS.Endpoint, info::String)
Set the data in the info field for an filter
Arguments
endpoint
: TheEndpoint
to queryinfo
: The string to set
HELICS.helicsEndpointSetOption
— MethodhelicsEndpointSetOption(endpoint::HELICS.Endpoint, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}, value::Bool)
Set a handle option on an Endpoint
endpoint
: TheEndpoint
to modifyoption
: Integer code for the option to setHelicsHandleOptions
value
: The value to set the option
HELICS.helicsEndpointSetTag
— MethodhelicsEndpointSetTag(endpoint::HELICS.Endpoint, tagName::String, tagValue::String)
Set the data in a specific tag for an endpoint.
Arguments
endpoint
: TheEndpoint
to querytagName
: The name of the tagtagValue
: The string value to associate with the tag
HELICS.helicsEndpointSubscribe
— MethodhelicsEndpointSubscribe(endpoint::HELICS.Endpoint, key::String)
Subscribe an Endpoint
to a Publication
Arguments
endpoint
: TheEndpoint
to usekey
: The name of thePublication
Federate
HELICS.helicsFederateAddAlias
— MethodhelicsFederateAddAlias(fed::HELICS.Federate, interfaceName::String, alias::String)
create an alias for an interface
Arguments
fed
: theFederate
to queryinterfaceName
: The current name of an interfacealias
: the additional name to use for the given interface
HELICS.helicsFederateAddDependency
— MethodhelicsFederateAddDependency(fed::HELICS.Federate, fedName::String)
Add a time dependency for a Federate
. The Federate
will depend on the given named federate for time synchronization
Arguments
HELICS.helicsFederateClearMessages
— MethodhelicsFederateClearMessages(fed::HELICS.Federate)
Clear all stored messages from a Federate
this clears messages retrieved through helicsFederateGetMessage
or helicsFederateGetMessageObject
Arguments
fed
: TheFederate
to clear the message for
HELICS.helicsFederateClearUpdates
— MethodhelicsFederateClearUpdates(fed::HELICS.Federate)
Clear all the update flags from a Federate
s inputs
HELICS.helicsFederateClone
— MethodhelicsFederateClone(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
fed
: an existingFederate
Returns
- a new reference to the same federate
HELICS.helicsFederateCosimulationTerminationCallback
— MethodhelicsFederateCosimulationTerminationCallback(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
: theFederate
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
HELICS.helicsFederateCreateMessage
— MethodhelicsFederateCreateMessage(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
HELICS.helicsFederateDestroy
— MethodhelicsFederateDestroy(fed::HELICS.Federate)
Disconnect and free a broker
HELICS.helicsFederateDisconnect
— MethodhelicsFederateDisconnect(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.
HELICS.helicsFederateDisconnectAsync
— MethodhelicsFederateDisconnectAsync(fed::HELICS.Federate)
Disconnect/finalize the federate in an async call. This call is identical to helicsFederateFinalizeAsync.
HELICS.helicsFederateDisconnectComplete
— MethodhelicsFederateDisconnectComplete(fed::HELICS.Federate)
Complete the asynchronous disconnect/finalize call. This call is identical to helicsFederateFinalizeComplete
HELICS.helicsFederateEnterExecutingMode
— MethodhelicsFederateEnterExecutingMode(fed::HELICS.Federate)
Request that the Federate
enter the Execution mode
this call is blocking until granted entry by the core object for an asynchronous alternative call helicsFederateEnterExecutingModeAsync
on return from this call the Federate
will be at time 0.
Arguments
fed
: aFederate
to change modes
HELICS.helicsFederateEnterExecutingModeAsync
— MethodhelicsFederateEnterExecutingModeAsync(fed::HELICS.Federate)
Request that the Federate
enter the Execution mode
this call is non-blocking and will return immediately. Call helicsFederateEnterExecutingModeComplete
to finish the call sequence.
Arguments
fed
: theFederate
to complete the call
HELICS.helicsFederateEnterExecutingModeComplete
— MethodhelicsFederateEnterExecutingModeComplete(fed::HELICS.Federate)
Complete the call to helicsFederateEnterExecutingModeAsync
Arguments
fed
: theFederate
to complete the call
HELICS.helicsFederateEnterExecutingModeIterative
— MethodhelicsFederateEnterExecutingModeIterative(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
: theFederate
to make the request ofiterate
: the requested iteration mode
Returns
- an iteration structure with field containing the time and iteration status
HELICS.helicsFederateEnterExecutingModeIterativeAsync
— MethodhelicsFederateEnterExecutingModeIterativeAsync(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
: theFederate
to make the request ofiterate
: the requested iteration mode
HELICS.helicsFederateEnterExecutingModeIterativeComplete
— MethodhelicsFederateEnterExecutingModeIterativeComplete(fed::HELICS.Federate) -> HELICS.Lib.HelicsIterationResult
Complete the asynchronous iterative call into ExecutionModel
Arguments
fed
: theFederate
to make the request of
Returns
- an iteration object containing the iteration time and iteration_status
HELICS.helicsFederateEnterInitializingMode
— MethodhelicsFederateEnterInitializingMode(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
fed
: theFederate
to operate on
HELICS.helicsFederateEnterInitializingModeAsync
— MethodhelicsFederateEnterInitializingModeAsync(fed::HELICS.Federate)
Non blocking alternative to helicsFederateEnterInitializingMode
. The function helicsFederateFinalize
must be called to finish the operation
Arguments
fed
: theFederate
to operate on
HELICS.helicsFederateEnterInitializingModeComplete
— MethodhelicsFederateEnterInitializingModeComplete(fed::HELICS.Federate)
Finalize the entry to initialize mode that was initiated with helicsFederateEnterInitializingModeAsync
Arguments
fed
: theFederate
desiring to complete the initialization step function
HELICS.helicsFederateEnterInitializingModeIterative
— MethodhelicsFederateEnterInitializingModeIterative(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
fed
: theFederate
to operate on.
HELICS.helicsFederateEnterInitializingModeIterativeAsync
— MethodhelicsFederateEnterInitializingModeIterativeAsync(fed::HELICS.Federate)
Non blocking alternative to ef helicsFederateEnterInitializingModeIterative. The function helicsFederateEnterInitializationModeIterativeComplete must be called to finish the operation.
Arguments
fed
: theFederate
to operate on.
HELICS.helicsFederateEnterInitializingModeIterativeComplete
— MethodhelicsFederateEnterInitializingModeIterativeComplete(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
fed
: theFederate
to operate on.
HELICS.helicsFederateErrorHandlerCallback
— MethodhelicsFederateErrorHandlerCallback(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
: theFederate
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
HELICS.helicsFederateExecutingEntryCallback
— MethodhelicsFederateExecutingEntryCallback(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
: theFederate
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
HELICS.helicsFederateFinalize
— MethodhelicsFederateFinalize(fed::HELICS.Federate)
Finalize the Federate
this function halts all communication in the Federate
and disconnects it from the core
HELICS.helicsFederateFinalizeAsync
— MethodhelicsFederateFinalizeAsync(fed::HELICS.Federate)
Finalize the Federate
in an async call
HELICS.helicsFederateFinalizeComplete
— MethodhelicsFederateFinalizeComplete(fed::HELICS.Federate)
Complete the asynchronous finalize call
HELICS.helicsFederateFree
— MethodhelicsFederateFree(fed::HELICS.Federate)
Release the memory associated with a Federate
HELICS.helicsFederateGetCommand
— MethodhelicsFederateGetCommand(fed::HELICS.Federate) -> String
Get a command sent to the federate
Arguments
fed
: TheFederate
to get the command for
Returns
- A string with the command for the federate, if the string is empty no command is available.
HELICS.helicsFederateGetCommandSource
— MethodhelicsFederateGetCommandSource(fed::HELICS.Federate) -> String
Get the source of the most recently retrieved command sent to the federate.
Arguments
fed
: TheFederate
to get the command for
Returns
- A string with name of the source who sent the command
HELICS.helicsFederateGetCore
— MethodhelicsFederateGetCore(fed::HELICS.Federate) -> HELICS.Core
Get the core object associated with a Federate
Arguments
fed
: aFederate
object
Returns
- a
Core
object
HELICS.helicsFederateGetCurrentTime
— MethodhelicsFederateGetCurrentTime(fed::HELICS.Federate) -> Float64
Get the current time of the Federate
Arguments
fed
: theFederate
to query
Returns
- the current time of the
Federate
HELICS.helicsFederateGetEndpoint
— MethodhelicsFederateGetEndpoint(fed::HELICS.Federate, name::String) -> HELICS.Endpoint
Get an Endpoint
object from a name
Arguments
Returns
- a
Endpoint
object, the object will not be valid and err will contain an error code if no endpoint with the specified name exists
HELICS.helicsFederateGetEndpointByIndex
— MethodhelicsFederateGetEndpointByIndex(fed::HELICS.Federate, index::Int64) -> HELICS.Endpoint
Get an Endpoint
by its index typically already created via helicsFederateRegisterInterfaces file or something of that nature
Arguments
fed
: theFederate
in which to create aPublication
index
: The index of thePublication
to get
Returns
- a
Endpoint
, which will be NULL if an invalid index
HELICS.helicsFederateGetEndpointCount
— MethodhelicsFederateGetEndpointCount(fed::HELICS.Federate) -> Int64
Get the number of endpoints in a Federate
Arguments
fed
: TheFederate
to query
Returns
- (-1) if fed was not a valid federate otherwise returns the number of endpoints
HELICS.helicsFederateGetFilter
— MethodhelicsFederateGetFilter(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
HELICS.helicsFederateGetFilterByIndex
— MethodhelicsFederateGetFilterByIndex(fed::HELICS.Federate, index::Int64) -> HELICS.Filter
Get a Filter
by its index typically already created via helicsFederateRegisterInterfaces file or something of that nature
Arguments
fed
: theFederate
in which to create aPublication
index
: the index of thePublication
to geta
Filter
, which will be NULL if an invalid index
HELICS.helicsFederateGetFilterCount
— MethodhelicsFederateGetFilterCount(fed::HELICS.Federate) -> Int64
Get a the number of filters registered through a Federate
Arguments
Returns
- a count of the number of filters registered through a
Federate
HELICS.helicsFederateGetFlagOption
— MethodhelicsFederateGetFlagOption(fed::HELICS.Federate, flag::Union{Int64, HELICS.Lib.HelicsFederateFlags, HELICS.Lib.HelicsHandleOptions}) -> Bool
Get a flag value for a Federate
Arguments
fed
: theFederate
to get the flag forflag
: the flag to query
Returns
- the value of the flag
HELICS.helicsFederateGetInput
— MethodhelicsFederateGetInput(fed::HELICS.Federate, key::String) -> HELICS.Input
Get an Input
object from a key
Arguments
fed
: the value federate object to use to get thePublication
key
: the name of theInput
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
HELICS.helicsFederateGetInputByIndex
— MethodhelicsFederateGetInputByIndex(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
fed
: theFederate
in which to create aPublication
index
: the index of thePublication
to get
Returns
- a helics_input, which will be NULL if an invalid index
HELICS.helicsFederateGetInputByTarget
— MethodhelicsFederateGetInputByTarget(fed::HELICS.Federate, target::String) -> HELICS.Input
Get an Input
object from an Input
target
Arguments
fed
: the value federate object to use to get thePublication
target
: the name of thePublication
that anInput
is targeting
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
HELICS.helicsFederateGetInputCount
— MethodhelicsFederateGetInputCount(fed::HELICS.Federate) -> Int64
Get the number of subscriptions in a Federate
Arguments
fed
: an existingFederate
Returns
- (-1) if fed was not a valid federate otherwise returns the number of subscriptions
HELICS.helicsFederateGetIntegerProperty
— MethodhelicsFederateGetIntegerProperty(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
fed
: theFederate
to get the flag forintProperty
: a code for the property to setHelicsHandleOptions
Returns
- the value of the property
HELICS.helicsFederateGetMessage
— MethodhelicsFederateGetMessage(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
HELICS.helicsFederateGetName
— MethodhelicsFederateGetName(fed::HELICS.Federate) -> String
Get the name of the Federate
Arguments
fed
: theFederate
to query
Returns
- a string with the name
HELICS.helicsFederateGetPublication
— MethodhelicsFederateGetPublication(fed::HELICS.Federate, key::String) -> HELICS.Publication
Get a Publication
object from a key
Arguments
fed
: the value federate object to use to get thePublication
key
: the name of thePublication
Returns
- a
Publication
object, the object will not be valid and err will contain an error code if no publication with the
specified key exists
HELICS.helicsFederateGetPublicationByIndex
— MethodhelicsFederateGetPublicationByIndex(fed::HELICS.Federate, index::Int64) -> HELICS.Publication
Get a Publication
by its index typically already created via helicsFederateRegisterInterfaces file or something of that nature
Arguments
fed
: theFederate
in which to create aPublication
index
: the index of thePublication
to get
Returns
- a helics_publication
HELICS.helicsFederateGetPublicationCount
— MethodhelicsFederateGetPublicationCount(fed::HELICS.Federate) -> Int64
Get the number of publications in a Federate
Arguments
fed
: an existingFederate
Returns
- (-1) if fed was not a valid federate otherwise returns the number of publications
HELICS.helicsFederateGetState
— MethodhelicsFederateGetState(fed::HELICS.Federate) -> HELICS.Lib.HelicsFederateState
Get the current state of a Federate
Arguments
fed
: theFederate
to query
Returns
- state the resulting state if void return helics_ok
HELICS.helicsFederateGetSubscription
— MethodhelicsFederateGetSubscription(fed::HELICS.Federate, key::String) -> HELICS.Input
Get an Input
object from a Subscription
target
Arguments
fed
: the value federate object to use to get thePublication
key
: the name of thePublication
that aSubscription
is targeting
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
HELICS.helicsFederateGetTag
— MethodhelicsFederateGetTag(fed::HELICS.Federate, tagName::String) -> String
Get a federate tag value.
Arguments
fed
: theFederate
to get the tag fortagName
: the name of the tag to get
HELICS.helicsFederateGetTimeProperty
— MethodhelicsFederateGetTimeProperty(fed::HELICS.Federate, timeProperty::Union{Int64, HELICS.Lib.HelicsProperties}) -> Float64
Get the current value of a time based property in a Federate
Arguments
fed
: theFederate
querytimeProperty
: the property to query
HELICS.helicsFederateGetTranslator
— MethodhelicsFederateGetTranslator(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
: theFederate
to get the translator fromname
: The name of the translator to get
Returns
HELICS.helicsFederateGetTranslatorByIndex
— MethodhelicsFederateGetTranslatorByIndex(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
: theFederate
to get the translator fromindex
: The index of the translator to get
Returns
HELICS.helicsFederateGetTranslatorCount
— MethodhelicsFederateGetTranslatorCount(fed::HELICS.Federate) -> Int64
Get the number of translators registered through a federate.
Arguments
fed
: theFederate
to register through.
Returns
- a count of the number of translators registered through a federate.
HELICS.helicsFederateGlobalError
— MethodhelicsFederateGlobalError(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
: theFederate
to create an error inerror_code
: the integer code for the errorerror_string
: a string describing the error
HELICS.helicsFederateHasMessage
— MethodhelicsFederateHasMessage(fed::HELICS.Federate) -> Bool
Check if the Federate
has any outstanding messages
Arguments
fed
: TheFederate
to check if it has
Returns
true
if theFederate
has a message waitingfalse
otherwise
HELICS.helicsFederateInitializingEntryCallback
— MethodhelicsFederateInitializingEntryCallback(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
: theFederate
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
HELICS.helicsFederateIsAsyncOperationCompleted
— MethodhelicsFederateIsAsyncOperationCompleted(fed::HELICS.Federate) -> Bool
Check if the current Asynchronous operation has completed
Arguments
fed
: theFederate
to operate on
Returns
false
if not completed,true
if completed
HELICS.helicsFederateIsProtected
— MethodhelicsFederateIsProtected(fedName::String)
checks if an existing federate is protected
Arguments
fedName
: The name of an existing HelicsFederate.
HELICS.helicsFederateIsValid
— MethodhelicsFederateIsValid(fed::HELICS.Federate) -> Bool
Check if a Federate
_object is valid
Returns
true
if theFederate
is a valid active federate,false
otherwise
HELICS.helicsFederateLocalError
— MethodhelicsFederateLocalError(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
: theFederate
to create an error inerror_code
: the integer code for the errorerror_string
: a string describing the error
HELICS.helicsFederateLogDebugMessage
— MethodhelicsFederateLogDebugMessage(fed::HELICS.Federate, logmessage::String)
Log a message through a Federate
Arguments
fed
: TheFederate
to set the global throughlogmessage
: The message to put in the log
HELICS.helicsFederateLogErrorMessage
— MethodhelicsFederateLogErrorMessage(fed::HELICS.Federate, logmessage::String)
Log an error message through a Federate
Arguments
fed
: TheFederate
to set the global throughlogmessage
: The message to put in the log
HELICS.helicsFederateLogInfoMessage
— MethodhelicsFederateLogInfoMessage(fed::HELICS.Federate, logmessage::String)
Log a message through a Federate
Arguments
fed
: TheFederate
to set the global throughlogmessage
: The message to put in the log
HELICS.helicsFederateLogLevelMessage
— MethodhelicsFederateLogLevelMessage(fed::HELICS.Federate, loglevel::Union{Int64, HELICS.Lib.HelicsLogLevels}, logmessage::String)
Log a message through a Federate
Arguments
fed
: TheFederate
to set the global throughloglevel
: The level of the message to log. SeeHelicsLogLevels
logmessage
: The message to put in the log
HELICS.helicsFederateLogWarningMessage
— MethodhelicsFederateLogWarningMessage(fed::HELICS.Federate, logmessage::String)
Log a warning message through a Federate
Arguments
fed
: TheFederate
to set the global throughlogmessage
: The message to put in the log
HELICS.helicsFederatePendingMessageCount
— MethodhelicsFederatePendingMessageCount(fed::HELICS.Federate) -> Int64
Returns the number of pending receives for a federate
Arguments
fed
: TheFederate
to get the number of waiting messages
HELICS.helicsFederateProcessCommunications
— MethodhelicsFederateProcessCommunications(fed::HELICS.Federate, period::Union{Float64, Int64})
Tell helics to process internal communications for a period of time.
Arguments
fed
: theFederate
to tell to process- `period1: The length of time to process communications and then return control.
HELICS.helicsFederateProtect
— MethodhelicsFederateProtect(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.
HELICS.helicsFederatePublishJSON
— MethodhelicsFederatePublishJSON(fed::HELICS.Federate, json::String)
Publish data contained in a json file or string
Arguments
fed
: TheFederate
json
: json file or string
HELICS.helicsFederateRegisterCloningFilter
— MethodhelicsFederateRegisterCloningFilter(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 throughname
: the name of theFilter
(can be NULL)
Returns
- a
Filter
object
HELICS.helicsFederateRegisterEndpoint
— MethodhelicsFederateRegisterEndpoint(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
fed
: theFederate
in which to create anEndpoint
must have been create withhelicsCreateMessageFederate
orhelicsCreateCombinationFederate
name
: the identifier for theEndpoint
, this will be prepended with theFederate
name for the global identifiertype
: a string describing the expected type of thePublication
may be NULL
Returns
HELICS.helicsFederateRegisterFilter
— MethodhelicsFederateRegisterFilter(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 throughtype
: the type of filter to createHelicsFilterTypes
name
: the name of theFilter
(can be NULL)
Returns
- a
Filter
object
HELICS.helicsFederateRegisterFromPublicationJSON
— MethodhelicsFederateRegisterFromPublicationJSON(fed::HELICS.Federate, json::String)
Register the Publication
s via JSON publication string
This would be the same JSON that would be used to publish data
Arguments
fed
: theFederate
json
: json string
HELICS.helicsFederateRegisterGlobalCloningFilter
— MethodhelicsFederateRegisterGlobalCloningFilter(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 throughname
: the name of theFilter
(can be NULL)
Returns
- a
Filter
object
HELICS.helicsFederateRegisterGlobalEndpoint
— MethodhelicsFederateRegisterGlobalEndpoint(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
fed
: theFederate
in which to create anEndpoint
must have been create withhelicsCreateMessageFederate
orhelicsCreateCombinationFederate
name
: the identifier for theEndpoint
, the given name is the global identifiertype
: a string describing the expected type of thePublication
may be NULL
Returns
HELICS.helicsFederateRegisterGlobalFilter
— MethodhelicsFederateRegisterGlobalFilter(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 throughtype
: the type of filter to createHelicsFilterTypes
name
: the name of theFilter
(can be NULL)
Returns
- a
Filter
object
HELICS.helicsFederateRegisterGlobalInput
— FunctionhelicsFederateRegisterGlobalInput(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
fed
: theFederate
in which to create aPublication
key
: the identifier for thePublication
type
: a code identifying the type of theInput
seeHelicsDataTypes
for available optionsunits
: a string listing the units of theSubscription
maybe NULL
Returns
- the
Publication
HELICS.helicsFederateRegisterGlobalPublication
— FunctionhelicsFederateRegisterGlobalPublication(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
fed
: theFederate
in which to create aPublication
key
: the identifier for thePublication
type
: a code identifying the type of theInput
seeHelicsDataTypes
for available optionsunits
: a string listing the units of theSubscription
maybe NULL
Returns
- the
Publication
HELICS.helicsFederateRegisterGlobalTargetedEndpoint
— MethodhelicsFederateRegisterGlobalTargetedEndpoint(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
fed
: theFederate
in which to create anEndpoint
must have been create withhelicsCreateMessageFederate
orhelicsCreateCombinationFederate
name
: the identifier for theEndpoint
, the given name is the global identifiertype
: a string describing the expected type of thePublication
may be NULL
Returns
HELICS.helicsFederateRegisterGlobalTranslator
— MethodhelicsFederateRegisterGlobalTranslator(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
: theFederate
to register through.type
: The type of translator to create /ref HelicsTranslatorTypesname
: The name of the translator, it can be null
Returns
HELICS.helicsFederateRegisterGlobalTypeInput
— FunctionhelicsFederateRegisterGlobalTypeInput(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
fed
: theFederate
in which to create aPublication
key
: the identifier for thePublication
type
: a string defining the type of theInput
units
: a string listing the units of theSubscription
maybe NULL
Returns
- the
Publication
HELICS.helicsFederateRegisterGlobalTypePublication
— FunctionhelicsFederateRegisterGlobalTypePublication(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
fed
: theFederate
in which to create aPublication
key
: the identifier for thePublication
type
: a string describing the expected type of thePublication
units
: a string listing the units of theSubscription
maybe NULL
Returns
- the
Publication
HELICS.helicsFederateRegisterInput
— FunctionhelicsFederateRegisterInput(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
: theFederate
in which to create anInput
key
: the identifier for thePublication
the global input key will be prepended with theFederate
nametype
: a code identifying the type of theInput
seeHelicsDataTypes
for available optionsunits
: a string listing the units of theInput
maybe NULL
Returns
- the
Input
HELICS.helicsFederateRegisterInterfaces
— MethodhelicsFederateRegisterInterfaces(fed::HELICS.Federate, file::String)
Load interfaces from a file
Arguments
fed
: theFederate
to which to load interfacesfile
: the name of a file to load the interfaces from either JSON, or TOML
HELICS.helicsFederateRegisterPublication
— FunctionhelicsFederateRegisterPublication(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
fed
: theFederate
in which to create aPublication
key
: the identifier for thePublication
the global publication key will be prepended with theFederate
nametype
: a code identifying the type of theInput
seeHelicsDataTypes
for available optionsunits
: a string listing the units of theSubscription
maybe NULL
Returns
- the
Publication
HELICS.helicsFederateRegisterSubscription
— FunctionhelicsFederateRegisterSubscription(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
fed
: theFederate
in which to create aSubscription
must have been create withhelicsCreateValueFederate
orhelicsCreateCombinationFederate
key
: the identifier matching aPublication
to get aSubscription
forunits
: a string listing the units of theSubscription
maybe NULL
Returns
- the
Subscription
HELICS.helicsFederateRegisterTargetedEndpoint
— MethodhelicsFederateRegisterTargetedEndpoint(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
fed
: theFederate
in which to create anEndpoint
must have been create withhelicsCreateMessageFederate
orhelicsCreateCombinationFederate
name
: the identifier for theEndpoint
. This will be prepended with the federate name for the global identifier.type
: a string describing the expected type of thePublication
may be NULL
Returns
HELICS.helicsFederateRegisterTranslator
— MethodhelicsFederateRegisterTranslator(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
: theFederate
to register through.type
: The type of translator to create /ref HelicsTranslatorTypesname
: The name of the translator, it can be null
Returns
HELICS.helicsFederateRegisterTypeInput
— FunctionhelicsFederateRegisterTypeInput(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
: theFederate
in which to create anInput
key
: the identifier for theInput
type
: a string describing the expected type of theInput
units
: a string listing the units of theInput
maybe NULL
Returns
- the
Publication
HELICS.helicsFederateRegisterTypePublication
— FunctionhelicsFederateRegisterTypePublication(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
fed
: theFederate
in which to create aPublication
key
: the identifier for thePublication
type
: a string labeling the type of thePublication
units
: a string listing the units of theSubscription
maybe NULL
Returns
- the
Publication
HELICS.helicsFederateRequestNextStep
— MethodhelicsFederateRequestNextStep(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
: theFederate
to make the request of
Returns
- the time granted to the
Federate
HELICS.helicsFederateRequestTime
— MethodhelicsFederateRequestTime(fed::HELICS.Federate, requestTime::Union{Float64, Int64}) -> Float64
Request the next time for federate execution
Arguments
fed
: theFederate
to make the request ofrequestTime
: the next requested time
Returns
- the time granted to the
Federate
invalid
HELICS.helicsFederateRequestTimeAdvance
— MethodhelicsFederateRequestTimeAdvance(fed::HELICS.Federate, timeDelta::Union{Float64, Int64}) -> Float64
Request the next time for federate execution
Arguments
fed
: TheFederate
to make the request oftimeDelta
: The requested amount of time to advance
Returns
- the time granted to the
Federate
, will return maximum time if the simulation has terminated invalid
HELICS.helicsFederateRequestTimeAsync
— MethodhelicsFederateRequestTimeAsync(fed::HELICS.Federate, requestTime::Union{Float64, Int64})
Request the next time for federate execution in an asynchronous call Call helicsFederateRequestTimeComplete
to finish the call
Arguments
fed
: theFederate
to make the request ofrequestTime
: the next requested time
HELICS.helicsFederateRequestTimeComplete
— MethodhelicsFederateRequestTimeComplete(fed::HELICS.Federate) -> Float64
Complete an asynchronous requestTime call
Arguments
fed
: theFederate
to make the request of
Returns
- the time granted to the
Federate
HELICS.helicsFederateRequestTimeIterative
— MethodhelicsFederateRequestTimeIterative(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
: theFederate
to make the request ofrequestTime
: the next desired timeiterate
: the requested iteration mode
Returns
- the granted time
- the iteration specification of the result
HELICS.helicsFederateRequestTimeIterativeAsync
— MethodhelicsFederateRequestTimeIterativeAsync(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
: theFederate
to make the request ofrequestTime
: the next desired timeiterate
: the requested iteration mode
Returns
- a void object with a return code of the result
HELICS.helicsFederateRequestTimeIterativeComplete
— MethodhelicsFederateRequestTimeIterativeComplete(fed::HELICS.Federate) -> Tuple{Float64, HELICS.Lib.HelicsIterationResult}
Complete an iterative time request asynchronous call
Arguments
fed
: theFederate
to make the request of
Returns
- the granted time
outIterate
the iteration specification of the result
HELICS.helicsFederateSendCommand
— MethodhelicsFederateSendCommand(fed::HELICS.Federate, target::String, command::String)
Send a command to another helics object through a federate.
Arguments
fed
: TheFederate
to set the command throughtarget
: The name of the object to send the command tocommand
: the command to send
HELICS.helicsFederateSetFlagOption
— MethodhelicsFederateSetFlagOption(fed::HELICS.Federate, flag::Union{Int64, HELICS.Lib.HelicsFederateFlags, HELICS.Lib.HelicsHandleOptions}, flagValue::Bool)
Set a flag for the Federate
Arguments
fed
: theFederate
to alter a flag forflag
: the flag to changeflagValue
: the new value of the flag 0 for false !=0 for true
HELICS.helicsFederateSetGlobal
— MethodhelicsFederateSetGlobal(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
: theFederate
to set the global throughvalueName
: the name of the global to setvalue
: the value of the global
HELICS.helicsFederateSetIntegerProperty
— MethodhelicsFederateSetIntegerProperty(fed::HELICS.Federate, intProperty::Union{Int64, HELICS.Lib.HelicsProperties}, propertyVal::Int64)
Set an integer based property of a Federate
Arguments
fed
: theFederate
to change the property forintProperty
: the property to setpropertyVal
: the value of the property
HELICS.helicsFederateSetLogFile
— MethodhelicsFederateSetLogFile(fed::HELICS.Federate, logFile::String)
Set the logging file for a Federate
(actually on the core associated with a federate)
Arguments
fed
: theFederate
to set the log file forlogFile
: the name of the log file
HELICS.helicsFederateSetLoggingCallback
— MethodhelicsFederateSetLoggingCallback(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
: theFederate
in which to create aSubscription
must have been create withhelicsCreateValueFederate
orhelicsCreateCombinationFederate
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 datauserdata
: a point to user data that is passed to the function when executing
HELICS.helicsFederateSetQueryCallback
— MethodhelicsFederateSetQueryCallback(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
: theFederate
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
HELICS.helicsFederateSetSeparator
— MethodhelicsFederateSetSeparator(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
: theFederate
object to alterseparator
: the character to use as a separator
HELICS.helicsFederateSetStateChangeCallback
— MethodhelicsFederateSetStateChangeCallback(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
: theFederate
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
HELICS.helicsFederateSetTag
— MethodhelicsFederateSetTag(fed::HELICS.Federate, tagName::String, value::String)
Set a federate tag value. This overwrites any previous value for this tag.
Arguments
fed
: theFederate
to set the tag fortagName
: the name of the tag to setvalue
: the value of the tag
HELICS.helicsFederateSetTimeProperty
— MethodhelicsFederateSetTimeProperty(fed::HELICS.Federate, timeProperty::Union{Int64, HELICS.Lib.HelicsProperties}, time::Union{Float64, Int64})
Set a time based property for a Federate
Arguments
fed
: theFederate
set the property fortimeProperty
: a integer code for a time propertytime
: the requested value of the property
HELICS.helicsFederateSetTimeRequestEntryCallback
— MethodhelicsFederateSetTimeRequestEntryCallback(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
: theFederate
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
HELICS.helicsFederateSetTimeRequestReturnCallback
— MethodhelicsFederateSetTimeRequestReturnCallback(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
: theFederate
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
HELICS.helicsFederateSetTimeUpdateCallback
— MethodhelicsFederateSetTimeUpdateCallback(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
: theFederate
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
HELICS.helicsFederateUnProtect
— MethodhelicsFederateUnProtect(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.
HELICS.helicsFederateWaitCommand
— MethodhelicsFederateWaitCommand(fed::HELICS.Federate) -> String
Get a command sent to the federate. Blocks until a command is received.
Arguments
fed
: TheFederate
to get the command for
Returns
- A string with the command.
FederateInfo
HELICS.helicsFederateInfoClone
— MethodhelicsFederateInfoClone(fi::HELICS.FederateInfo) -> HELICS.FederateInfo
Create a FederateInfo
object from an existing one and clone the information
Arguments
fi
: aFederateInfo
object to duplicate
Returns
- a
FederateInfo
object which is a reference to the created object
HELICS.helicsFederateInfoFree
— MethodhelicsFederateInfoFree(fi::HELICS.FederateInfo)
Delete the memory associated with a FederateInfo
object
HELICS.helicsFederateInfoLoadFromArgs
— MethodhelicsFederateInfoLoadFromArgs(fi::HELICS.FederateInfo, argv::Vector{<:AbstractString})
Load a FederateInfo
from command line arguments
Arguments
fi
: aFederateInfo
objectargc
: the number of command line argumentsargv
: an array of strings from the command line
HELICS.helicsFederateInfoLoadFromString
— MethodhelicsFederateInfoLoadFromString(fi::HELICS.FederateInfo, args::String)
Load a FederateInfo
from command line arguments contained in a string.
Arguments
fi
: aFederateInfo
objectargs
: Command line arguments specified in a string
HELICS.helicsFederateInfoSetBroker
— MethodhelicsFederateInfoSetBroker(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
: theFederateInfo
object to alterbroker
: a string which defined the connection information for a broker either a name or an address
HELICS.helicsFederateInfoSetBrokerInitString
— MethodhelicsFederateInfoSetBrokerInitString(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
: TheFederate
info object to alterbrokerInit
: A string with command line arguments for a generated broker
HELICS.helicsFederateInfoSetBrokerKey
— MethodhelicsFederateInfoSetBrokerKey(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
HELICS.helicsFederateInfoSetBrokerPort
— MethodhelicsFederateInfoSetBrokerPort(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
: theFederateInfo
object to alterbrokerPort
: the integer port number to use for connection with a broker
HELICS.helicsFederateInfoSetCoreInitString
— MethodhelicsFederateInfoSetCoreInitString(fi::HELICS.FederateInfo, coreInit::String)
Set the initialization string for the core usually in the form of command line arguments
Arguments
fi
: theFederateInfo
object to altercoreInit
: a string with the core initialization strings
HELICS.helicsFederateInfoSetCoreName
— MethodhelicsFederateInfoSetCoreName(fi::HELICS.FederateInfo, corename::String)
Set the name of the core to link to for a Federate
Arguments
fi
: theFederateInfo
object to altercorename
: the identifier for a core to link to
HELICS.helicsFederateInfoSetCoreType
— MethodhelicsFederateInfoSetCoreType(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
: theFederateInfo
object to altercoretype
: an numerical code for a core type see /ref HelicsCoreTypes
HELICS.helicsFederateInfoSetCoreTypeFromString
— MethodhelicsFederateInfoSetCoreTypeFromString(fi::HELICS.FederateInfo, coretype::String)
Set the core type from a string
Arguments
fi
: theFederateInfo
object to altercoretype
: a string naming a core type
HELICS.helicsFederateInfoSetFlagOption
— MethodhelicsFederateInfoSetFlagOption(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
: theFederateInfo
object to alterflag
: a numerical index for a flagvalue
: the desired value of the flagtrue
orfalse
HELICS.helicsFederateInfoSetIntegerProperty
— MethodhelicsFederateInfoSetIntegerProperty(fi::HELICS.FederateInfo, intProperty::Union{Int64, HELICS.Lib.HelicsProperties}, propertyValue::Int64)
HELICS.helicsFederateInfoSetLocalPort
— MethodhelicsFederateInfoSetLocalPort(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
: theFederateInfo
object to alterlocalPort
: a string with the port information to use as the local server port can be a number or "auto" or "os_local"
HELICS.helicsFederateInfoSetSeparator
— MethodhelicsFederateInfoSetSeparator(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
: theFederateInfo
object to alterseparator
: the character to use as a separator
HELICS.helicsFederateInfoSetTimeProperty
— MethodhelicsFederateInfoSetTimeProperty(fi::HELICS.FederateInfo, timeProperty::Union{Int64, HELICS.Lib.HelicsProperties}, propertyValue::Union{Float64, Int64})
Filter
HELICS.helicsFilterAddDeliveryEndpoint
— MethodhelicsFilterAddDeliveryEndpoint(filt::HELICS.Filter, deliveryEndpoint::String)
Add a delivery endpoint to a cloning filter
All cloned messages are sent to the delivery address(es)
Arguments
HELICS.helicsFilterAddDestinationTarget
— MethodhelicsFilterAddDestinationTarget(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
HELICS.helicsFilterAddSourceTarget
— MethodhelicsFilterAddSourceTarget(filt::HELICS.Filter, source::String)
Add a source target to a Filter
All messages coming from a source are copied to the delivery address(es)
HELICS.helicsFilterGetInfo
— MethodhelicsFilterGetInfo(filt::HELICS.Filter) -> String
Get the data in the info field of an filter
Arguments
filt
: the givenFilter
Returns
- a string with the info field string
HELICS.helicsFilterGetName
— MethodhelicsFilterGetName(filt::HELICS.Filter) -> String
Get the name of the Filter
and store in the given string
Arguments
filt
: the givenFilter
Returns
- a string with the name of the
Filter
HELICS.helicsFilterGetOption
— MethodhelicsFilterGetOption(filt::HELICS.Filter, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}) -> Bool
Get a handle option for the Filter
Arguments
filt
: the givenFilter
to queryoption
: the option to queryHelicsHandleOptions
HELICS.helicsFilterGetTag
— MethodhelicsFilterGetTag(filt::HELICS.Filter, tagName::String) -> String
Get the data in a specified tag of a filter.
Arguments
filt
: the givenFilter
tagName
: The name of the tag to query.
Returns
- A string withthe tag data
HELICS.helicsFilterIsValid
— MethodhelicsFilterIsValid(filt::HELICS.Filter) -> Bool
Check if a Filter
is valid.
Arguments
filt
: TheFilter
object to check.
Returns
@return true
if the Filter
object represents a valid filter.
HELICS.helicsFilterRemoveDeliveryEndpoint
— MethodhelicsFilterRemoveDeliveryEndpoint(filt::HELICS.Filter, deliveryEndpoint::String)
Remove a delivery destination from a cloning filter
Arguments
filt
: the givenFilter
(must be a cloning filter)deliveryEndpoint
: a string with the deliverEndpoint to remove
HELICS.helicsFilterRemoveTarget
— MethodhelicsFilterRemoveTarget(filt::HELICS.Filter, target::String)
Remove a destination target from a Filter
filt
: the givenFilter
target
: the named endpoint to remove as a target
HELICS.helicsFilterSet
— MethodhelicsFilterSet(filt::HELICS.Filter, prop::String, val::Float64)
Set a property on a Filter
Arguments
filt
: theFilter
to modifyprop
: a string containing the property to setval
: a numerical value of the property
HELICS.helicsFilterSetCustomCallback
— MethodhelicsFilterSetCustomCallback(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
HELICS.helicsFilterSetInfo
— MethodhelicsFilterSetInfo(filt::HELICS.Filter, info::String)
Set the data in the info field for an filter
Arguments
filt
: the givenFilter
info
: the string to set
HELICS.helicsFilterSetOption
— MethodhelicsFilterSetOption(filt::HELICS.Filter, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}, value::Bool)
Set the data in the info field for an filter
Arguments
filt
: the givenFilter
option
: the option to setHelicsHandleOptions
value
: the value of the option (helicstrue or helicsfalse)
HELICS.helicsFilterSetString
— MethodhelicsFilterSetString(filt::HELICS.Filter, prop::String, val::String)
Set a string property on a Filter
Arguments
filt
: theFilter
to modifyprop
: a string containing the property to setval
: a string containing the new value
HELICS.helicsFilterSetTag
— MethodhelicsFilterSetTag(filt::HELICS.Filter, tagName::String, tagValue::String)
Get the data in a specified tag of a filter.
Arguments
filt
: the givenFilter
tagName
: The name of the tag to query.tagValue
: A string with the tag data
Input
HELICS.helicsInputAddTarget
— MethodhelicsInputAddTarget(ipt::HELICS.Input, target::String)
Add a Publication
to the list of data that an Input
subscribes to
Arguments
ipt
: the named input to modifytarget
: the name of aPublication
that anInput
should subscribe to
HELICS.helicsInputClearUpdate
— MethodhelicsInputClearUpdate(ipt::HELICS.Input)
Clear the updated flag from an Input
HELICS.helicsInputGetBoolean
— MethodhelicsInputGetBoolean(ipt::HELICS.Input) -> Bool
Get a boolean value from a Subscription
Arguments
ipt
: theInput
to get the data for
Returns
- a boolean value of current input value
HELICS.helicsInputGetByteCount
— MethodhelicsInputGetByteCount(ipt::HELICS.Input) -> Int64
Get the size of the raw value for subscription
Returns
- the size of the raw data/string in bytes
HELICS.helicsInputGetBytes
— MethodhelicsInputGetBytes(ipt::HELICS.Input) -> String
Get the raw data for the latest value of a Subscription
HELICS.helicsInputGetChar
— MethodhelicsInputGetChar(ipt::HELICS.Input) -> Char
Get a single character value from an Input
Arguments
ipt
: theInput
to get the data for
Returns
- the resulting character value
HELICS.helicsInputGetComplex
— MethodhelicsInputGetComplex(ipt::HELICS.Input) -> ComplexF64
Get a pair of double forming a complex number from a Subscription
s
Arguments
ipt
: theInput
to get the data for
Returns
- ComplexF64
HELICS.helicsInputGetComplexObject
— MethodhelicsInputGetComplexObject(ipt::HELICS.Input) -> ComplexF64
Get a complex object from an Input
object
Arguments
ipt
: theInput
to get the data for
Returns
ComplexF64
HELICS.helicsInputGetComplexVector
— MethodhelicsInputGetComplexVector(ipt::HELICS.Input) -> Vector{ComplexF64}
Get a complex vector from a Subscription
Arguments
ipt
: theInput
to get the result for
HELICS.helicsInputGetDouble
— MethodhelicsInputGetDouble(ipt::HELICS.Input) -> Float64
Get a double value from a Subscription
Arguments
ipt
: theInput
to get the data for
Returns
- the double value of the
Input
HELICS.helicsInputGetExtractionUnits
— MethodhelicsInputGetExtractionUnits(ipt::HELICS.Input) -> String
Get the units of an Input
The same as helicsInputGetUnits
Arguments
ipt
: theInput
to query
Returns
- a void enumeration, helics_ok if everything worked
HELICS.helicsInputGetInfo
— MethodhelicsInputGetInfo(inp::HELICS.Input) -> String
Get the data in the info field of an Input
Arguments
inp
: theInput
to query
Returns
- a string with the info field string
HELICS.helicsInputGetInjectionUnits
— MethodhelicsInputGetInjectionUnits(ipt::HELICS.Input) -> String
Get the units of the Publication
that an Input
is linked to
Arguments
ipt
: theInput
to query
Returns
- a void enumeration, helics_ok if everything worked
HELICS.helicsInputGetInteger
— MethodhelicsInputGetInteger(ipt::HELICS.Input) -> Int64
Get an integer value from a Subscription
Arguments
ipt
: theInput
to get the data for
Returns
- an int64_t value with the current value of the
Input
HELICS.helicsInputGetName
— MethodhelicsInputGetName(ipt::HELICS.Input) -> String
Get the name of an Input
Arguments
ipt
: theInput
to query
Returns
- A string of the input name
HELICS.helicsInputGetNamedPoint
— MethodhelicsInputGetNamedPoint(ipt::HELICS.Input) -> Tuple{String, Float64}
Get a named point from a Subscription
Arguments
ipt
: theInput
to get the result for
Returns
- outputString storage for copying a null terminated string
- val the double value for the named point
HELICS.helicsInputGetOption
— MethodhelicsInputGetOption(inp::HELICS.Input, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}) -> Bool
Get the data in the info field of an Input
Arguments
inp
: theInput
to queryoption
: integer representation of the option in question seeHelicsHandleOptions
Returns
- a string with the info field string
HELICS.helicsInputGetPublicationDataType
— MethodhelicsInputGetPublicationDataType(ipt::HELICS.Input) -> Int64
Get the type of the publisher to an Input
is sending
Arguments
ipt
: theInput
to query
Returns
- An int containing the enumeration value of the publication type.
HELICS.helicsInputGetPublicationType
— MethodhelicsInputGetPublicationType(ipt::HELICS.Input) -> String
Get the type of the publisher to an Input
is sending
Arguments
ipt
: theInput
to query
Returns
- A string with the type name
HELICS.helicsInputGetString
— MethodhelicsInputGetString(ipt::HELICS.Input) -> String
Get a string value from a Subscription
Arguments
ipt
: theInput
to get the data for
HELICS.helicsInputGetStringSize
— MethodhelicsInputGetStringSize(ipt::HELICS.Input) -> Int64
Get the size of a value for subscription assuming return as a string
Returns
- the size of the string
HELICS.helicsInputGetTag
— MethodhelicsInputGetTag(inp::HELICS.Input, tagName::String) -> String
Get the data in the tag field of an Input
Arguments
inp
: theInput
to querytagName
: the name of the tage to the get the value for
Returns
- a string with the tag data
HELICS.helicsInputGetTarget
— MethodhelicsInputGetTarget(ipt::HELICS.Input) -> String
Get the target of an Input
Arguments
ipt
: theInput
to query
Returns
- A string of the input target
HELICS.helicsInputGetTime
— MethodhelicsInputGetTime(ipt::HELICS.Input) -> Float64
Get a double value from a Subscription
Arguments
ipt
: theInput
to get the data for
Returns
- the resulting double value
HELICS.helicsInputGetType
— MethodhelicsInputGetType(ipt::HELICS.Input) -> String
Get the type of an Input
Arguments
ipt
: theInput
to query
Returns
- A string with the type name
HELICS.helicsInputGetUnits
— MethodhelicsInputGetUnits(ipt::HELICS.Input) -> String
Get the units of an Input
Arguments
ipt
: theInput
to query
Returns
- a void enumeration, helics_ok if everything worked
HELICS.helicsInputGetVector
— MethodhelicsInputGetVector(ipt::HELICS.Input) -> Vector{Float64}
Get a vector from a Subscription
Arguments
ipt
: theInput
to get the result for
HELICS.helicsInputGetVectorSize
— MethodhelicsInputGetVectorSize(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
HELICS.helicsInputIsUpdated
— MethodhelicsInputIsUpdated(ipt::HELICS.Input) -> Bool
Check if a particular subscription was updated
Arguments
ipt
: theInput
to query
Returns
- true if it has been updated since the last value retrieval
HELICS.helicsInputIsValid
— MethodhelicsInputIsValid(ipt) -> Bool
Check if a Input
is valid.
Arguments
ipt
: TheInput
object to check.
Returns
@return true
if the Input
object represents a valid input.
HELICS.helicsInputLastUpdateTime
— MethodhelicsInputLastUpdateTime(ipt::HELICS.Input) -> Float64
Get the last time a Subscription
was updated
Arguments
ipt
: theInput
to query
Returns
- Float64
HELICS.helicsInputSetDefaultBoolean
— MethodhelicsInputSetDefaultBoolean(ipt::HELICS.Input, val::Bool)
Set the default as a boolean
Arguments
ipt
: theInput
to set the default forval
: the default boolean value
HELICS.helicsInputSetDefaultBytes
— MethodhelicsInputSetDefaultBytes(ipt::HELICS.Input, data::String)
Set the default as a raw data array
Arguments
ipt
: theInput
to set the default fordata
: a pointer to the raw data to use for the default
HELICS.helicsInputSetDefaultChar
— MethodhelicsInputSetDefaultChar(ipt::HELICS.Input, val::Char)
Set the default as a double
Arguments
ipt
: theInput
to set the default forval
: the default double value
HELICS.helicsInputSetDefaultComplex
— MethodhelicsInputSetDefaultComplex(ipt::HELICS.Input, c::ComplexF64)
Set the default as a complex number
Arguments
ipt
: theInput
to set the default forc
: the default ComplexF64
HELICS.helicsInputSetDefaultComplexVector
— MethodhelicsInputSetDefaultComplexVector(ipt::HELICS.Input, vectorInput::Vector{ComplexF64})
Set the default as a vector of complex doubles
Arguments
ipt
: theInput
to set the default forvectorInput
: an array of complex double data
HELICS.helicsInputSetDefaultDouble
— MethodhelicsInputSetDefaultDouble(ipt::HELICS.Input, val::Float64)
Set the default as a double
Arguments
ipt
: theInput
to set the default forval
: the default double value
HELICS.helicsInputSetDefaultInteger
— MethodhelicsInputSetDefaultInteger(ipt::HELICS.Input, val::Int64)
Set the default as an integer
Arguments
ipt
: theInput
to set the default forval
: the default integer
HELICS.helicsInputSetDefaultNamedPoint
— MethodhelicsInputSetDefaultNamedPoint(ipt::HELICS.Input, str::String, val::Float64)
Set the default as a NamedPoint
Arguments
ipt
: theInput
to set the default forstr
: a pointer to a string representing the nameval
: a double value for the value of the named point
HELICS.helicsInputSetDefaultString
— MethodhelicsInputSetDefaultString(ipt::HELICS.Input, str::String)
Set the default as a string
Arguments
ipt
: theInput
to set the default forstr
: a pointer to the default string
HELICS.helicsInputSetDefaultTime
— MethodhelicsInputSetDefaultTime(ipt::HELICS.Input, val::Union{Float64, Int64})
Set the default as a double
Arguments
ipt
: theInput
to set the default forval
: the default double value
HELICS.helicsInputSetDefaultVector
— MethodhelicsInputSetDefaultVector(ipt::HELICS.Input, vectorInput::Vector{Float64})
Set the default as a vector of doubles
Arguments
ipt
: theInput
to set the default forvectorInput
: an array of double data
HELICS.helicsInputSetInfo
— MethodhelicsInputSetInfo(inp::HELICS.Input, info::String)
Set the data in the info field for an Input
Arguments
inp
: theInput
to queryinfo
: the string to set
HELICS.helicsInputSetMinimumChange
— MethodhelicsInputSetMinimumChange(inp::HELICS.Input, tolerance::Float64)
Set the minimum change detection tolerance
Arguments
inp
: theInput
to modifytolerance
: the tolerance level for registering an update, values changing less than this value will not show as being updated
HELICS.helicsInputSetOption
— MethodhelicsInputSetOption(inp::HELICS.Input, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}, value::Bool)
Set the data in the info field for an Input
Arguments
inp
: theInput
to queryoption
: the option to set for theInput
HelicsHandleOptions
value
: the value to set the option to
HELICS.helicsInputSetTag
— MethodhelicsInputSetTag(inp::HELICS.Input, tagName::String, tagValue::String)
Set the data in the tag field for an Input
Arguments
inp
: theInput
to querytagName
: the name of the tag to settagValue
: the string value to associate with a tag
Message
HELICS.helicsMessageAppendData
— MethodhelicsMessageAppendData(message::HELICS.Message, data::String)
Append data to the payload
Arguments
message
: The message object in questiondata
: A string containing the message data to appendinputDataLength
: The length of the data to input
HELICS.helicsMessageClearFlags
— MethodhelicsMessageClearFlags(message::HELICS.Message)
Clear the flags of a message
Arguments
message
: The message object in question
HELICS.helicsMessageCopy
— MethodhelicsMessageCopy(srcMessage::HELICS.Message, dstMessage::HELICS.Message)
Clopy a message object.
Arguments
srcMessage
: The message object to copy fromdstMessage
: The message object to copy to.
HELICS.helicsMessageGetByteCount
— MethodhelicsMessageGetByteCount(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
HELICS.helicsMessageGetBytes
— MethodhelicsMessageGetBytes(message::HELICS.Message) -> String
Get the raw data for a message object
message
: A message object to get the data fordata
: The memory location of the datamaxMessagelen
: The maximum size of information that data can holdactualSize
: The actual length of data copied to data
HELICS.helicsMessageGetBytesPointer
— MethodhelicsMessageGetBytesPointer(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
HELICS.helicsMessageGetDestination
— MethodhelicsMessageGetDestination(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
HELICS.helicsMessageGetFlagOption
— MethodhelicsMessageGetFlagOption(message::HELICS.Message, flag::Int64) -> Bool
Check if a flag is set on a message.
Arguments
message
: The message object in questionflag
: The flag to check should be between [0,15]
Returns
- true if set otherwise false
HELICS.helicsMessageGetMessageID
— MethodhelicsMessageGetMessageID(message::HELICS.Message) -> Int64
Get the messageID of a message
Arguments
message
: The message object in question
Returns
- the messageID
HELICS.helicsMessageGetOriginalDestination
— MethodhelicsMessageGetOriginalDestination(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
HELICS.helicsMessageGetOriginalSource
— MethodhelicsMessageGetOriginalSource(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
HELICS.helicsMessageGetSource
— MethodhelicsMessageGetSource(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
HELICS.helicsMessageGetString
— MethodhelicsMessageGetString(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
HELICS.helicsMessageGetTime
— MethodhelicsMessageGetTime(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
HELICS.helicsMessageIsValid
— MethodhelicsMessageIsValid(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
HELICS.helicsMessageReserve
— MethodhelicsMessageReserve(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 questionreserveSize
: The number of bytes to reserve in the message object
HELICS.helicsMessageResize
— MethodhelicsMessageResize(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 questionnewSize
: The new size in bytes of the buffer
HELICS.helicsMessageSetData
— MethodhelicsMessageSetData(message::HELICS.Message, data::String)
Set the data payload of a message as raw data
Arguments
message
: The message object in questiondata
: A string containing the message datainputDataLength
: The length of the data to input
HELICS.helicsMessageSetDestination
— MethodhelicsMessageSetDestination(message::HELICS.Message, dest::String)
Set the destination of a message
Arguments
message
: The message object in questiondest
: A string containing the new destination
HELICS.helicsMessageSetFlagOption
— MethodhelicsMessageSetFlagOption(message::HELICS.Message, flag::Union{Int64, HELICS.Lib.HelicsFederateFlags}, flagValue::Bool)
Set a flag on a message
Arguments
message
: The message object in questionflag
: An index of a flag to set on the messageflagValue
: The desired value of the flag
HELICS.helicsMessageSetMessageID
— MethodhelicsMessageSetMessageID(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 questionmessageID
: A new message ID
HELICS.helicsMessageSetOriginalDestination
— MethodhelicsMessageSetOriginalDestination(message::HELICS.Message, dest::String)
Set the original destination of a message
Arguments
message
: The message object in questiondest
: A string containing the new original source
HELICS.helicsMessageSetOriginalSource
— MethodhelicsMessageSetOriginalSource(message::HELICS.Message, src::String)
Set the original source of a message
Arguments
message
: The message object in questionsrc
: A string containing the new original source
HELICS.helicsMessageSetSource
— MethodhelicsMessageSetSource(message::HELICS.Message, src::String)
Set the source of a message
Arguments
message
: The message object in questionsrc
: A string containing the source
HELICS.helicsMessageSetString
— MethodhelicsMessageSetString(message::HELICS.Message, str::String)
Set the data payload of a message as a string
Arguments
message
: The message object in questionstr
: A string containing the message data
HELICS.helicsMessageSetTime
— MethodhelicsMessageSetTime(message::HELICS.Message, time::Union{Float64, Int64})
Set the delivery time for a message
Arguments
message
: The message object in questiontime
: The time the message should be delivered
Publication
HELICS.helicsPublicationAddTarget
— MethodhelicsPublicationAddTarget(pub::HELICS.Publication, target::String)
Add a named input to the list of targets a Publication
publishes to
Arguments
pub
: thePublication
to add the target fortarget
: the name of anInput
that the data should be sent to
HELICS.helicsPublicationGetInfo
— MethodhelicsPublicationGetInfo(pub::HELICS.Publication) -> String
Get the data in the info field of an publication
Arguments
pub
: thePublication
to query
Returns
- a string with the info field string
HELICS.helicsPublicationGetName
— MethodhelicsPublicationGetName(pub::HELICS.Publication) -> String
Get the name of a Publication
this will be the global name used to identify the Publication
to the federation
Arguments
pub
: thePublication
to query
Returns
- a string of the publication name
HELICS.helicsPublicationGetOption
— MethodhelicsPublicationGetOption(pub::HELICS.Publication, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}) -> Bool
Get the data in the info field of an publication
Arguments
pub
: thePublication
to queryoption
: the value to query seeHelicsHandleOptions
Arguments
- a string with the info field string
HELICS.helicsPublicationGetTag
— MethodhelicsPublicationGetTag(pub::HELICS.Publication, tagName::String) -> String
Get the data in the tag field of a Publication
Arguments
pub
: thePublication
to querytagName
: the name of the tage to the get the value for
Returns
- a string with the tag data
HELICS.helicsPublicationGetType
— MethodhelicsPublicationGetType(pub::HELICS.Publication) -> String
Get the type of a Publication
Arguments
pub
: thePublication
to query
Returns
- A string with the type name
HELICS.helicsPublicationGetUnits
— MethodhelicsPublicationGetUnits(pub::HELICS.Publication) -> String
Get the units of the Publication
that an Input
is linked to
Arguments
ipt
: theInput
to query
Returns
- a void enumeration, helics_ok if everything worked
HELICS.helicsPublicationIsValid
— MethodhelicsPublicationIsValid(pub::HELICS.Publication) -> Bool
Check if a Publication
is valid.
Arguments
pub
: ThePublication
object to check.
Returns
@return true
if the Publication
object represents a valid publication.
HELICS.helicsPublicationPublishBoolean
— MethodhelicsPublicationPublishBoolean(pub::HELICS.Publication, val::Bool)
Publish a Boolean Value
Arguments
pub
: thePublication
to publish forval
: the boolean value to publish eithertrue
orfalse
HELICS.helicsPublicationPublishBytes
— MethodhelicsPublicationPublishBytes(pub::HELICS.Publication, data::String)
Publish raw bytes from string
Arguments
pub
: thePublication
to publish fordata
: the raw data
HELICS.helicsPublicationPublishChar
— MethodhelicsPublicationPublishChar(pub::HELICS.Publication, val::Char)
Publish a single character
Arguments
pub
: thePublication
to publish forval
: the numerical value to publish
HELICS.helicsPublicationPublishComplex
— MethodhelicsPublicationPublishComplex(pub::HELICS.Publication, c::ComplexF64)
Publish a complex value (or pair of values)
Arguments
pub
: thePublication
to publish forc
: the complex number to publish
HELICS.helicsPublicationPublishComplexVector
— MethodhelicsPublicationPublishComplexVector(pub::HELICS.Publication, vectorInput::Vector{ComplexF64})
Publish a vector of complex doubles
Arguments
pub
: thePublication
to publish forvectorInput
: Vector of ComplexF64 data
HELICS.helicsPublicationPublishDouble
— MethodhelicsPublicationPublishDouble(pub::HELICS.Publication, val::Float64)
Publish a double floating point value
Arguments
pub
thePublication
to publish forval
the numerical value to publish
HELICS.helicsPublicationPublishInteger
— MethodhelicsPublicationPublishInteger(pub::HELICS.Publication, val::Int64)
Publish an integer value
Arguments
pub
: thePublication
to publish forval
: the numerical value to publish
HELICS.helicsPublicationPublishNamedPoint
— MethodhelicsPublicationPublishNamedPoint(pub::HELICS.Publication, str::String, val::Float64)
Publish a named point
Arguments
pub
: thePublication
to publish forstr
: a Stringval
: a Float64 to publish
HELICS.helicsPublicationPublishString
— MethodhelicsPublicationPublishString(pub::HELICS.Publication, str::String)
Publish a string
Arguments
pub
: thePublication
to publish forstr
: String
HELICS.helicsPublicationPublishTime
— MethodhelicsPublicationPublishTime(pub::HELICS.Publication, val::Union{Float64, Int64})
Publish a time value
Arguments
pub
: thePublication
to publish forval
: the numerical value to publish
HELICS.helicsPublicationPublishVector
— MethodhelicsPublicationPublishVector(pub::HELICS.Publication, vectorInput::Vector{Float64})
Publish a vector of doubles
Arguments
pub
: thePublication
to publish forvectorInput
: Vector of Float64 data
HELICS.helicsPublicationSetInfo
— MethodhelicsPublicationSetInfo(pub::HELICS.Publication, info::String)
Set the data in the info field for an publication
Arguments
pub
: thePublication
to set the info field forinfo
: the string to set
HELICS.helicsPublicationSetMinimumChange
— MethodhelicsPublicationSetMinimumChange(pub::HELICS.Publication, tolerance::Float64)
Set the minimum change detection tolerance
Arguments
pub
: thePublication
to modifytolerance
: the tolerance level for thePublication
, values changing less than this value will not be published
HELICS.helicsPublicationSetOption
— MethodhelicsPublicationSetOption(pub::HELICS.Publication, option::Union{Int64, HELICS.Lib.HelicsHandleOptions}, val::Bool)
Set the data in the info field for an publication
Arguments
pub
: thePublication
to queryoption
: integer code for the option to setHelicsHandleOptions
val
: the value to set the option to
HELICS.helicsPublicationSetTag
— MethodhelicsPublicationSetTag(pub::HELICS.Publication, tagName::String, tagValue::String)
Set the data in the tag field for an Publication
Arguments
pub
: thePublication
to querytagName
: the name of the tag to settagValue
: the string value to associate with a tag
Query
HELICS.helicsQueryBrokerExecute
— MethodhelicsQueryBrokerExecute(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
HELICS.helicsQueryBufferFill
— MethodhelicsQueryBufferFill(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
: theQueryBuffer
to set a callback for.queryResult
: A callback with signature HelicsIterationRequest(void *userdata)
HELICS.helicsQueryCoreExecute
— MethodhelicsQueryCoreExecute(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
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
HELICS.helicsQueryExecute
— MethodhelicsQueryExecute(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
HELICS.helicsQueryExecuteAsync
— MethodhelicsQueryExecuteAsync(query::HELICS.Query, fed::HELICS.Federate)
Execute a Query
in a non-blocking call
Arguments
HELICS.helicsQueryExecuteComplete
— MethodhelicsQueryExecuteComplete(query::HELICS.Query) -> String
Complete the return from a Query
called with helicsQueryExecuteAsync
the function will block until the Query
completes helicsQueryIsCompleted
can be called to determine if a Query
has completed or not.
Arguments
query
: theQuery
to complete execution of
Returns
- a string. String will remain valid until the
Query
is freed or executed again
the return will be nullptr if Query
is an invalid object
HELICS.helicsQueryFree
— MethodhelicsQueryFree(query::HELICS.Query)
Free the memory associated with a Query
HELICS.helicsQueryIsCompleted
— MethodhelicsQueryIsCompleted(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
: theQuery
to check if completed
Returns
HELICS.helicsQuerySetOrdering
— MethodhelicsQuerySetOrdering(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.
Others
HELICS.helicsAbort
— MethodhelicsAbort(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.
HELICS.helicsBooleanToBytes
— MethodhelicsBooleanToBytes(value::Bool, data::HELICS.DataBuffer) -> Int32
convert a boolean to serialized bytes
Arguments
value
: the boolean to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsCallbackFederateInitializeCallback
— MethodhelicsCallbackFederateInitializeCallback(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
: theFederate
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
HELICS.helicsCallbackFederateNextTimeCallback
— MethodhelicsCallbackFederateNextTimeCallback(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
: theFederate
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
HELICS.helicsCallbackFederateNextTimeIterativeCallback
— MethodhelicsCallbackFederateNextTimeIterativeCallback(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
: theFederate
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
HELICS.helicsCharToBytes
— MethodhelicsCharToBytes(value::Char, data::HELICS.DataBuffer) -> Int32
convert a char to serialized bytes
Arguments
value
: the char to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsCleanupLibrary
— MethodhelicsCleanupLibrary()
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.
HELICS.helicsClearSignalHandler
— MethodhelicsClearSignalHandler()
Clear HELICS based signal handlers.
HELICS.helicsCloseLibrary
— MethodhelicsCloseLibrary()
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,
HELICS.helicsComplexToBytes
— MethodhelicsComplexToBytes(value::ComplexF64, data::HELICS.DataBuffer) -> Int32
convert a complex to serialized bytes
Arguments
value
: the complex to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsComplexVectorToBytes
— MethodhelicsComplexVectorToBytes(value::Vector{ComplexF64}, data::HELICS.DataBuffer) -> Int32
convert a vector of complex values to serialized bytes
Arguments
value
: the vector to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsCreateBroker
— MethodhelicsCreateBroker(kind::String, name::String, initString::String) -> HELICS.Broker
Create a broker object
Arguments
type
: the type ofBroker
to createname
: the name ofBroker
, may be a empty string to have a name automatically assignedinitString
: 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
HELICS.helicsCreateBrokerFromArgs
— MethodhelicsCreateBrokerFromArgs(kind::String, name::String, argv::Vector{<:AbstractString}) -> HELICS.Broker
HELICS.helicsCreateCallbackFederate
— MethodhelicsCreateCallbackFederate(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
HELICS.helicsCreateCallbackFederateFromConfig
— MethodhelicsCreateCallbackFederateFromConfig(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
HELICS.helicsCreateCombinationFederate
— MethodhelicsCreateCombinationFederate(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 theFederate
, can be NULL or an empty string to pull the default name from fifi
: theFederateInfo
object that contains details on theFederate
Returns
HELICS.helicsCreateCombinationFederateFromConfig
— MethodhelicsCreateCombinationFederateFromConfig(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
HELICS.helicsCreateCore
— MethodhelicsCreateCore(kind::String, name::String, initString::String) -> HELICS.Core
Create a core object
Arguments
type
: the type of the core to createname
: the name of the core , may be a empty string to have a name automatically assignedinitString
: 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
HELICS.helicsCreateCoreFromArgs
— MethodhelicsCreateCoreFromArgs(kind::String, name::String, argv::Vector{<:AbstractString}) -> HELICS.Core
HELICS.helicsCreateDataBuffer
— MethodhelicsCreateDataBuffer(initialCapacity::Int32) -> HELICS.DataBuffer
Create an DataBuffer
Arguments
initialCapaciy
: the initial capacity of theDataBuffer
Returns
HELICS.helicsCreateFederateInfo
— MethodhelicsCreateFederateInfo() -> HELICS.FederateInfo
Create a FederateInfo
object for specifying federate information when constructing a Federate
Returns
- a
FederateInfo
object which is a reference to the created object
HELICS.helicsCreateMessageFederate
— MethodhelicsCreateMessageFederate(fedName::String, fi::HELICS.FederateInfo) -> HELICS.MessageFederate
Create a MessageFederate
from a FederateInfo
object
MessageFederate
objects can be used in all functions that take a MessageFederate
or Federate
object as an argument
Arguments
fedName
: the name of theFederate
to createfi
: theFederateInfo
object that contains details on theFederate
Returns
HELICS.helicsCreateMessageFederateFromConfig
— MethodhelicsCreateMessageFederateFromConfig(configFile::String) -> HELICS.MessageFederate
Create a MessageFederate
from a JSON file or JSON string or TOML file
MessageFederate
objects can be used in all functions that take a MessageFederate
or Federate
object as an argument
Arguments
configFile
: a Config(JSON,TOML) file or a JSON string that contains setup and configuration information
Returns
HELICS.helicsCreateQuery
— MethodhelicsCreateQuery(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 queryquery
: the query string to make of the target
HELICS.helicsCreateValueFederate
— MethodhelicsCreateValueFederate(fedName::String, fi::HELICS.FederateInfo) -> HELICS.ValueFederate
Create a value federate from a FederateInfo
object
Federate
objects can be used in all functions that take a Federate
object as an argument
Arguments
fedName
: the name of theFederate
to create, can NULL or an empty string to use the default name from fi or an assigned namefi
: theFederateInfo
object that contains details on theFederate
Returns
HELICS.helicsCreateValueFederateFromConfig
— MethodhelicsCreateValueFederateFromConfig(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
HELICS.helicsDataBufferCapacity
— MethodhelicsDataBufferCapacity(data::HELICS.DataBuffer) -> Int32
Get capacity of aDataBuffer
Arguments
data
: theDataBuffer
Returns
- Int32
HELICS.helicsDataBufferClone
— MethodhelicsDataBufferClone(data::HELICS.DataBuffer) -> HELICS.DataBuffer
copy and existing DataBuffer to and new one
Arguments
data
: theDataBuffer
to copy
Returns
HELICS.helicsDataBufferConvertToType
— MethodhelicsDataBufferConvertToType(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
HELICS.helicsDataBufferData
— MethodhelicsDataBufferData(data::HELICS.DataBuffer) -> Ptr{Nothing}
Get a pointer to the raw data in a DataBuffer
Arguments
data
: theDataBuffer
Returns
- Ptr{Cvoid}
HELICS.helicsDataBufferFree
— MethodHELICS.helicsDataBufferIsValid
— MethodhelicsDataBufferIsValid(data::HELICS.DataBuffer) -> Bool
Check if DataBuffer
is valid
Arguments
data
: theDataBuffer
to check
Returns
- a boolean
HELICS.helicsDataBufferReserve
— MethodhelicsDataBufferReserve(data::HELICS.DataBuffer, newCapacity::Int32)
Increase DataBuffer
capacity without reallocating memory
Arguments
data
: theDataBuffer
newCapacity
: the new capacity
Returns
- true is successful else false
HELICS.helicsDataBufferSize
— MethodhelicsDataBufferSize(data::HELICS.DataBuffer) -> Int32
Get size of aDataBuffer
Arguments
data
: theDataBuffer
Returns
- Int32
HELICS.helicsDataBufferStringSize
— MethodhelicsDataBufferStringSize(data::HELICS.DataBuffer) -> Int64
Get size of string data size from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- Int
HELICS.helicsDataBufferToBoolean
— MethodhelicsDataBufferToBoolean(data::HELICS.DataBuffer) -> Bool
Get data from DataBuffer as a boolean.
Arguments
data
: the DataBuffer
Returns
- Bool
HELICS.helicsDataBufferToChar
— MethodhelicsDataBufferToChar(data::HELICS.DataBuffer) -> Char
Get data from DataBuffer as a single char.
Arguments
data
: the DataBuffer
Returns
- Char
HELICS.helicsDataBufferToComplex
— MethodhelicsDataBufferToComplex(data::HELICS.DataBuffer) -> ComplexF64
Get data from DataBuffer as a complex.
Arguments
data
: the DataBuffer
Returns
- ComplexF64
HELICS.helicsDataBufferToComplexObject
— MethodhelicsDataBufferToComplexObject(data::HELICS.DataBuffer)
Get HelicsComplex data from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- ComplexF64
HELICS.helicsDataBufferToComplexVector
— MethodhelicsDataBufferToComplexVector(data::HELICS.DataBuffer) -> Vector{ComplexF64}
Get vector of complex values from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- Vector{ComplexF64}
HELICS.helicsDataBufferToDouble
— MethodhelicsDataBufferToDouble(data::HELICS.DataBuffer) -> Float64
Get data from DataBuffer as a double.
Arguments
data
: the DataBuffer
Returns
- Float64
HELICS.helicsDataBufferToInteger
— MethodhelicsDataBufferToInteger(data::HELICS.DataBuffer) -> Int64
Get data from DataBuffer as an integer.
Arguments
data
: the DataBuffer
Returns
- Int64
HELICS.helicsDataBufferToNamedPoint
— MethodhelicsDataBufferToNamedPoint(data::HELICS.DataBuffer) -> Tuple{String, Float64}
Get a named point from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- Tuple{String, Float64}
HELICS.helicsDataBufferToRawString
— MethodhelicsDataBufferToRawString(data::HELICS.DataBuffer) -> String
Get raw string data from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- String
HELICS.helicsDataBufferToString
— MethodhelicsDataBufferToString(data::HELICS.DataBuffer) -> String
Get string data from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- String
HELICS.helicsDataBufferToTime
— MethodhelicsDataBufferToTime(data::HELICS.DataBuffer) -> Float64
Get data from DataBuffer as a HELICS.HelicsTime.
Arguments
data
: the DataBuffer
Returns
- Float64
HELICS.helicsDataBufferToVector
— MethodhelicsDataBufferToVector(data::HELICS.DataBuffer) -> Vector{Float64}
Get vector of doubles from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- Vector{Float64}
HELICS.helicsDataBufferType
— MethodhelicsDataBufferType(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.
HELICS.helicsDataBufferVectorSize
— MethodhelicsDataBufferVectorSize(data::HELICS.DataBuffer) -> Int64
Get size of vector data size from DataBuffer.
Arguments
data
: the DataBuffer
Returns
- Int
HELICS.helicsDoubleToBytes
— MethodhelicsDoubleToBytes(value::Float64, data::HELICS.DataBuffer) -> Int32
convert a double to serialized bytes
Arguments
value
: the Float64 to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsErrorClear
— MethodhelicsErrorClear(err::Ref{HELICS.Lib.HelicsError})
Clear an error object
HELICS.helicsErrorInitialize
— MethodhelicsErrorInitialize() -> HELICS.Lib.HelicsError
Return an initialized error object
HELICS.helicsGetFederateByName
— MethodhelicsGetFederateByName(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 theFederate
to retrieve
Returns
- NULL if no fed is available by that name otherwise a
Federate
with that name
HELICS.helicsGetOptionIndex
— MethodhelicsGetOptionIndex(val::String) -> Int64
Get an option index for use in helicsPublicationSetOption
, helicsInputSetOption
, helicsEndpointSetOption
, helicsFilterSetOption
, and the corresponding get functions
Arguments
val
: a string with the option name
Returns
- an int with the option index (-1) if not a valid property
HELICS.helicsGetPropertyIndex
— MethodhelicsGetPropertyIndex(val::String) -> Int64
Get a property index for use in helicsFederateInfoSetFlagOption
, helicsFederateInfoSetTimeProperty
, helicsFederateInfoSetIntegerProperty
Arguments
val
: a string with the property name
Returns
- an int with the property code (-1) if not a valid property
HELICS.helicsGetVersion
— MethodhelicsGetVersion() -> String
Get a version string for HELICS
HELICS.helicsIntegerToBytes
— MethodhelicsIntegerToBytes(value::Int64, data::HELICS.DataBuffer) -> Int32
convert an integer to serialized bytes
Arguments
value
: the Int64 to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsIsCoreTypeAvailable
— MethodhelicsIsCoreTypeAvailable(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"
HELICS.helicsLoadSignalHandler
— MethodhelicsLoadSignalHandler()
Load a signal handler that handles Ctrl-C and shuts down all HELICS brokers, cores, and federates then exits the process
HELICS.helicsLoadSignalHandlerCallback
— MethodhelicsLoadSignalHandlerCallback(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).
HELICS.helicsLoadSignalHandlerCallbackNoExit
— MethodhelicsLoadSignalHandlerCallbackNoExit(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).
HELICS.helicsLoadThreadedSignalHandler
— MethodhelicsLoadThreadedSignalHandler()
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.
HELICS.helicsNamedPointToBytes
— MethodhelicsNamedPointToBytes(name::String, value::Int64, data::HELICS.DataBuffer)
convert a named point to serialized bytes
Arguments
name
: the name of the point of doubles to convertvalue
: the integer value of the point to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsRawStringToBytes
— MethodhelicsRawStringToBytes(value::String, data::HELICS.DataBuffer)
convert a raw string to serialized bytes
Arguments
value
: the raw string to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsStringToBytes
— MethodhelicsStringToBytes(value::String, data::HELICS.DataBuffer) -> Int32
convert a string to serialized bytes
Arguments
value
: the string to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsSubscriptionGetTarget
— MethodhelicsSubscriptionGetTarget(ipt::HELICS.Input) -> String
Get the target of an Input
Arguments
ipt
: theInput
to query
Returns
- A string of the input target
HELICS.helicsTimeToBytes
— MethodhelicsTimeToBytes(value::Union{Float64, Int64}, data::HELICS.DataBuffer) -> Int32
convert a HelicsTime to serialized bytes
Arguments
value
: the HelicsTime to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsTranslatorAddDestinationEndpoint
— MethodhelicsTranslatorAddDestinationEndpoint(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
: theTranslator
to modifyept
: The name of the endpoint the translator sends data to.
HELICS.helicsTranslatorAddInputTarget
— MethodhelicsTranslatorAddInputTarget(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
: theTranslator
to add a destination target to.input
: The name of the input which will be receiving translated messages
HELICS.helicsTranslatorAddPublicationTarget
— MethodhelicsTranslatorAddPublicationTarget(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
: theTranslator
to modifypub
: The name of the publication to subscribe.
HELICS.helicsTranslatorAddSourceEndpoint
— MethodhelicsTranslatorAddSourceEndpoint(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
: theTranslator
to modifyept
: The name of the endpoint which will send the endpoint data
HELICS.helicsTranslatorGetInfo
— MethodhelicsTranslatorGetInfo(trans::HELICS.Translator) -> String
Get the data in the info field of a translator.
Arguments
trans
: theTranslator
to get the info from.
Returns
- the info field string.
HELICS.helicsTranslatorGetName
— MethodhelicsTranslatorGetName(trans::HELICS.Translator) -> String
Get the name of the translator and store in the given string.
Arguments
trans
: theTranslator
to check
Returns
- a string with the name of the translator
HELICS.helicsTranslatorGetOption
— MethodhelicsTranslatorGetOption(trans::HELICS.Translator, option::Int64) -> Int64
Get a handle option for the translator.
Arguments
trans
: theTranslator
to set the info field for.option
: The option to query /ref HelicsHandleOptions.
HELICS.helicsTranslatorGetTag
— MethodhelicsTranslatorGetTag(trans::HELICS.Translator, tagName::String) -> String
Get the data in a specified tag of a translator.
Arguments
trans
: theTranslator
to get the tag from.
-tagName
: The name of the tag to query.
Returns
- the string with the tag data.
HELICS.helicsTranslatorIsValid
— MethodhelicsTranslatorIsValid(trans::HELICS.Translator) -> Bool
Check if a translator is valid.
Arguments
trans
: theTranslator
to check
Returns
- true if valid, false otherwise
HELICS.helicsTranslatorRemoveTarget
— MethodhelicsTranslatorRemoveTarget(trans::HELICS.Translator, target::String)
Remove a target from a translator.
Arguments
trans
: theTranslator
to modifytarget
: The name of the interface to remove as a target.
HELICS.helicsTranslatorSet
— MethodhelicsTranslatorSet(trans::HELICS.Translator, prop::String, val::Float64)
Set a double property on a translator.
Arguments
trans
: theTranslator
to modifyprop
: A string containing the property to set.val
: A numerical value for the property.
HELICS.helicsTranslatorSetCustomCallback
— MethodhelicsTranslatorSetCustomCallback(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
: theTranslator
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
HELICS.helicsTranslatorSetInfo
— MethodhelicsTranslatorSetInfo(trans::HELICS.Translator, info::String)
Set the data in the info field for a translator.
Arguments
trans
: theTranslator
to set the info field for.info
: the string to set.
HELICS.helicsTranslatorSetOption
— MethodhelicsTranslatorSetOption(trans::HELICS.Translator, option::Int64, value::Int64)
Set an option value for a translator.
Arguments
trans
: theTranslator
to set the option foroption
: The option to set /ref HelicsHandleOptions.value
: The value of the option, commonly 0 for false or 1 for true.
HELICS.helicsTranslatorSetString
— MethodhelicsTranslatorSetString(trans::HELICS.Translator, prop::String, val::String)
Set a string property on a translator.
Arguments
trans
: theTranslator
to modifyprop
: A string containing the property to set.val
: A string value for the property.
HELICS.helicsTranslatorSetTag
— MethodhelicsTranslatorSetTag(trans::HELICS.Translator, tagName::String, tagValue::String)
Set the data in a specific tag for a translator.
Arguments
trans
: theTranslator
to set the tag for.tagName
: the tag to set.tagValue
: the string value to assocate with the tag.
HELICS.helicsVectorToBytes
— MethodhelicsVectorToBytes(value::Vector{Float64}, data::HELICS.DataBuffer) -> Int32
convert a vector of doubles to serialized bytes
Arguments
value
: the vector of doubles to convertdata
: the DataBuffer to hold the serialized bytes
Returns
- Int32 Bytes serialized.
HELICS.helicsWrapDataInBuffer
— MethodhelicsWrapDataInBuffer(data::String)
Wrap data in DataBuffer
Arguments
data
: the data to place in aDataBuffer
Returns
Types
HELICS.Broker
— TypeSummary
struct HELICS.Broker
<: HELICS.CWrapper
HELICS.CWrapper
— TypeSummary
abstract type HELICS.CWrapper
HELICS.CallbackFederate
— TypeSummary
struct HELICS.CallbackFederate
<: HELICS.Federate
HELICS.CombinationFederate
— TypeSummary
struct HELICS.CombinationFederate
<: HELICS.Federate
HELICS.Core
— TypeSummary
struct HELICS.Core
<: HELICS.CWrapper
HELICS.DataBuffer
— TypeSummary
struct HELICS.DataBuffer
<: HELICS.CWrapper
HELICS.Endpoint
— TypeSummary
struct HELICS.Endpoint
<: HELICS.CWrapper
HELICS.Federate
— TypeSummary
abstract type HELICS.Federate <: HELICS.CWrapper
Subtypes
Supertype Hierarchy
HELICS.Federate <: HELICS.CWrapper <: Any
HELICS.FederateInfo
— TypeSummary
struct HELICS.FederateInfo
<: HELICS.CWrapper
HELICS.Filter
— TypeSummary
struct HELICS.Filter
<: HELICS.CWrapper
HELICS.Input
— TypeSummary
struct HELICS.Input
<: HELICS.CWrapper
HELICS.Message
— TypeSummary
struct HELICS.Message
<: HELICS.CWrapper
HELICS.MessageFederate
— TypeSummary
struct HELICS.MessageFederate
<: HELICS.Federate
HELICS.Publication
— TypeSummary
struct HELICS.Publication
<: HELICS.CWrapper
HELICS.Query
— TypeSummary
struct HELICS.Query
<: HELICS.CWrapper
HELICS.QueryBuffer
— TypeSummary
struct HELICS.QueryBuffer
<: HELICS.CWrapper
HELICS.Translator
— TypeSummary
struct HELICS.Translator
<: HELICS.CWrapper
HELICS.ValueFederate
— TypeSummary
struct HELICS.ValueFederate
<: HELICS.Federate
Index
HELICS.Broker
HELICS.CWrapper
HELICS.CallbackFederate
HELICS.CombinationFederate
HELICS.Core
HELICS.DataBuffer
HELICS.Endpoint
HELICS.Federate
HELICS.FederateInfo
HELICS.Filter
HELICS.HelicsCoreFlags
HELICS.HelicsCoreTypes
HELICS.HelicsDataTypes
HELICS.HelicsErrorTypes
HELICS.HelicsFederateFlags
HELICS.HelicsFederateState
HELICS.HelicsFilterTypes
HELICS.HelicsFlags
HELICS.HelicsHandleOptions
HELICS.HelicsIterationRequest
HELICS.HelicsIterationResult
HELICS.HelicsLogLevels
HELICS.HelicsMultiInputModes
HELICS.HelicsProperties
HELICS.HelicsSequencingModes
HELICS.HelicsTranslatorTypes
HELICS.Input
HELICS.Message
HELICS.MessageFederate
HELICS.Publication
HELICS.Query
HELICS.QueryBuffer
HELICS.Translator
HELICS.ValueFederate
HELICS.helicsAbort
HELICS.helicsBooleanToBytes
HELICS.helicsBrokerAddAlias
HELICS.helicsBrokerAddDestinationFilterToEndpoint
HELICS.helicsBrokerAddSourceFilterToEndpoint
HELICS.helicsBrokerClearTimeBarrier
HELICS.helicsBrokerClone
HELICS.helicsBrokerDataLink
HELICS.helicsBrokerDestroy
HELICS.helicsBrokerDisconnect
HELICS.helicsBrokerFree
HELICS.helicsBrokerGetAddress
HELICS.helicsBrokerGetIdentifier
HELICS.helicsBrokerGlobalError
HELICS.helicsBrokerIsConnected
HELICS.helicsBrokerIsValid
HELICS.helicsBrokerMakeConnections
HELICS.helicsBrokerSendCommand
HELICS.helicsBrokerSendOrderedCommand
HELICS.helicsBrokerSetGlobal
HELICS.helicsBrokerSetLogFile
HELICS.helicsBrokerSetLoggingCallback
HELICS.helicsBrokerSetTimeBarrier
HELICS.helicsBrokerWaitForDisconnect
HELICS.helicsCallbackFederateInitializeCallback
HELICS.helicsCallbackFederateNextTimeCallback
HELICS.helicsCallbackFederateNextTimeIterativeCallback
HELICS.helicsCharToBytes
HELICS.helicsCleanupLibrary
HELICS.helicsClearSignalHandler
HELICS.helicsCloseLibrary
HELICS.helicsComplexToBytes
HELICS.helicsComplexVectorToBytes
HELICS.helicsCoreAddAlias
HELICS.helicsCoreAddDestinationFilterToEndpoint
HELICS.helicsCoreAddSourceFilterToEndpoint
HELICS.helicsCoreClone
HELICS.helicsCoreConnect
HELICS.helicsCoreDataLink
HELICS.helicsCoreDestroy
HELICS.helicsCoreDisconnect
HELICS.helicsCoreFree
HELICS.helicsCoreGetAddress
HELICS.helicsCoreGetIdentifier
HELICS.helicsCoreGlobalError
HELICS.helicsCoreIsConnected
HELICS.helicsCoreIsValid
HELICS.helicsCoreMakeConnections
HELICS.helicsCoreRegisterCloningFilter
HELICS.helicsCoreRegisterFilter
HELICS.helicsCoreRegisterTranslator
HELICS.helicsCoreSendCommand
HELICS.helicsCoreSendOrderedCommand
HELICS.helicsCoreSetGlobal
HELICS.helicsCoreSetLogFile
HELICS.helicsCoreSetLoggingCallback
HELICS.helicsCoreSetReadyToInit
HELICS.helicsCoreWaitForDisconnect
HELICS.helicsCreateBroker
HELICS.helicsCreateBrokerFromArgs
HELICS.helicsCreateCallbackFederate
HELICS.helicsCreateCallbackFederateFromConfig
HELICS.helicsCreateCombinationFederate
HELICS.helicsCreateCombinationFederateFromConfig
HELICS.helicsCreateCore
HELICS.helicsCreateCoreFromArgs
HELICS.helicsCreateDataBuffer
HELICS.helicsCreateFederateInfo
HELICS.helicsCreateMessageFederate
HELICS.helicsCreateMessageFederateFromConfig
HELICS.helicsCreateQuery
HELICS.helicsCreateValueFederate
HELICS.helicsCreateValueFederateFromConfig
HELICS.helicsDataBufferCapacity
HELICS.helicsDataBufferClone
HELICS.helicsDataBufferConvertToType
HELICS.helicsDataBufferData
HELICS.helicsDataBufferFree
HELICS.helicsDataBufferIsValid
HELICS.helicsDataBufferReserve
HELICS.helicsDataBufferSize
HELICS.helicsDataBufferStringSize
HELICS.helicsDataBufferToBoolean
HELICS.helicsDataBufferToChar
HELICS.helicsDataBufferToComplex
HELICS.helicsDataBufferToComplexObject
HELICS.helicsDataBufferToComplexVector
HELICS.helicsDataBufferToDouble
HELICS.helicsDataBufferToInteger
HELICS.helicsDataBufferToNamedPoint
HELICS.helicsDataBufferToRawString
HELICS.helicsDataBufferToString
HELICS.helicsDataBufferToTime
HELICS.helicsDataBufferToVector
HELICS.helicsDataBufferType
HELICS.helicsDataBufferVectorSize
HELICS.helicsDoubleToBytes
HELICS.helicsEndpointAddDestinationFilter
HELICS.helicsEndpointAddDestinationTarget
HELICS.helicsEndpointAddSourceFilter
HELICS.helicsEndpointAddSourceTarget
HELICS.helicsEndpointClearMessages
HELICS.helicsEndpointCreateMessage
HELICS.helicsEndpointGetDefaultDestination
HELICS.helicsEndpointGetInfo
HELICS.helicsEndpointGetMessage
HELICS.helicsEndpointGetName
HELICS.helicsEndpointGetOption
HELICS.helicsEndpointGetTag
HELICS.helicsEndpointGetType
HELICS.helicsEndpointHasMessage
HELICS.helicsEndpointIsValid
HELICS.helicsEndpointPendingMessageCount
HELICS.helicsEndpointRemoveTarget
HELICS.helicsEndpointSendBytes
HELICS.helicsEndpointSendBytesAt
HELICS.helicsEndpointSendBytesTo
HELICS.helicsEndpointSendBytesToAt
HELICS.helicsEndpointSendMessage
HELICS.helicsEndpointSendMessageZeroCopy
HELICS.helicsEndpointSetDefaultDestination
HELICS.helicsEndpointSetInfo
HELICS.helicsEndpointSetOption
HELICS.helicsEndpointSetTag
HELICS.helicsEndpointSubscribe
HELICS.helicsErrorClear
HELICS.helicsErrorInitialize
HELICS.helicsFederateAddAlias
HELICS.helicsFederateAddDependency
HELICS.helicsFederateClearMessages
HELICS.helicsFederateClearUpdates
HELICS.helicsFederateClone
HELICS.helicsFederateCosimulationTerminationCallback
HELICS.helicsFederateCreateMessage
HELICS.helicsFederateDestroy
HELICS.helicsFederateDisconnect
HELICS.helicsFederateDisconnectAsync
HELICS.helicsFederateDisconnectComplete
HELICS.helicsFederateEnterExecutingMode
HELICS.helicsFederateEnterExecutingModeAsync
HELICS.helicsFederateEnterExecutingModeComplete
HELICS.helicsFederateEnterExecutingModeIterative
HELICS.helicsFederateEnterExecutingModeIterativeAsync
HELICS.helicsFederateEnterExecutingModeIterativeComplete
HELICS.helicsFederateEnterInitializingMode
HELICS.helicsFederateEnterInitializingModeAsync
HELICS.helicsFederateEnterInitializingModeComplete
HELICS.helicsFederateEnterInitializingModeIterative
HELICS.helicsFederateEnterInitializingModeIterativeAsync
HELICS.helicsFederateEnterInitializingModeIterativeComplete
HELICS.helicsFederateErrorHandlerCallback
HELICS.helicsFederateExecutingEntryCallback
HELICS.helicsFederateFinalize
HELICS.helicsFederateFinalizeAsync
HELICS.helicsFederateFinalizeComplete
HELICS.helicsFederateFree
HELICS.helicsFederateGetCommand
HELICS.helicsFederateGetCommandSource
HELICS.helicsFederateGetCore
HELICS.helicsFederateGetCurrentTime
HELICS.helicsFederateGetEndpoint
HELICS.helicsFederateGetEndpointByIndex
HELICS.helicsFederateGetEndpointCount
HELICS.helicsFederateGetFilter
HELICS.helicsFederateGetFilterByIndex
HELICS.helicsFederateGetFilterCount
HELICS.helicsFederateGetFlagOption
HELICS.helicsFederateGetInput
HELICS.helicsFederateGetInputByIndex
HELICS.helicsFederateGetInputByTarget
HELICS.helicsFederateGetInputCount
HELICS.helicsFederateGetIntegerProperty
HELICS.helicsFederateGetMessage
HELICS.helicsFederateGetName
HELICS.helicsFederateGetPublication
HELICS.helicsFederateGetPublicationByIndex
HELICS.helicsFederateGetPublicationCount
HELICS.helicsFederateGetState
HELICS.helicsFederateGetSubscription
HELICS.helicsFederateGetTag
HELICS.helicsFederateGetTimeProperty
HELICS.helicsFederateGetTranslator
HELICS.helicsFederateGetTranslatorByIndex
HELICS.helicsFederateGetTranslatorCount
HELICS.helicsFederateGlobalError
HELICS.helicsFederateHasMessage
HELICS.helicsFederateInfoClone
HELICS.helicsFederateInfoFree
HELICS.helicsFederateInfoLoadFromArgs
HELICS.helicsFederateInfoLoadFromString
HELICS.helicsFederateInfoSetBroker
HELICS.helicsFederateInfoSetBrokerInitString
HELICS.helicsFederateInfoSetBrokerKey
HELICS.helicsFederateInfoSetBrokerPort
HELICS.helicsFederateInfoSetCoreInitString
HELICS.helicsFederateInfoSetCoreName
HELICS.helicsFederateInfoSetCoreType
HELICS.helicsFederateInfoSetCoreTypeFromString
HELICS.helicsFederateInfoSetFlagOption
HELICS.helicsFederateInfoSetIntegerProperty
HELICS.helicsFederateInfoSetLocalPort
HELICS.helicsFederateInfoSetSeparator
HELICS.helicsFederateInfoSetTimeProperty
HELICS.helicsFederateInitializingEntryCallback
HELICS.helicsFederateIsAsyncOperationCompleted
HELICS.helicsFederateIsProtected
HELICS.helicsFederateIsValid
HELICS.helicsFederateLocalError
HELICS.helicsFederateLogDebugMessage
HELICS.helicsFederateLogErrorMessage
HELICS.helicsFederateLogInfoMessage
HELICS.helicsFederateLogLevelMessage
HELICS.helicsFederateLogWarningMessage
HELICS.helicsFederatePendingMessageCount
HELICS.helicsFederateProcessCommunications
HELICS.helicsFederateProtect
HELICS.helicsFederatePublishJSON
HELICS.helicsFederateRegisterCloningFilter
HELICS.helicsFederateRegisterEndpoint
HELICS.helicsFederateRegisterFilter
HELICS.helicsFederateRegisterFromPublicationJSON
HELICS.helicsFederateRegisterGlobalCloningFilter
HELICS.helicsFederateRegisterGlobalEndpoint
HELICS.helicsFederateRegisterGlobalFilter
HELICS.helicsFederateRegisterGlobalInput
HELICS.helicsFederateRegisterGlobalPublication
HELICS.helicsFederateRegisterGlobalTargetedEndpoint
HELICS.helicsFederateRegisterGlobalTranslator
HELICS.helicsFederateRegisterGlobalTypeInput
HELICS.helicsFederateRegisterGlobalTypePublication
HELICS.helicsFederateRegisterInput
HELICS.helicsFederateRegisterInterfaces
HELICS.helicsFederateRegisterPublication
HELICS.helicsFederateRegisterSubscription
HELICS.helicsFederateRegisterTargetedEndpoint
HELICS.helicsFederateRegisterTranslator
HELICS.helicsFederateRegisterTypeInput
HELICS.helicsFederateRegisterTypePublication
HELICS.helicsFederateRequestNextStep
HELICS.helicsFederateRequestTime
HELICS.helicsFederateRequestTimeAdvance
HELICS.helicsFederateRequestTimeAsync
HELICS.helicsFederateRequestTimeComplete
HELICS.helicsFederateRequestTimeIterative
HELICS.helicsFederateRequestTimeIterativeAsync
HELICS.helicsFederateRequestTimeIterativeComplete
HELICS.helicsFederateSendCommand
HELICS.helicsFederateSetFlagOption
HELICS.helicsFederateSetGlobal
HELICS.helicsFederateSetIntegerProperty
HELICS.helicsFederateSetLogFile
HELICS.helicsFederateSetLoggingCallback
HELICS.helicsFederateSetQueryCallback
HELICS.helicsFederateSetSeparator
HELICS.helicsFederateSetStateChangeCallback
HELICS.helicsFederateSetTag
HELICS.helicsFederateSetTimeProperty
HELICS.helicsFederateSetTimeRequestEntryCallback
HELICS.helicsFederateSetTimeRequestReturnCallback
HELICS.helicsFederateSetTimeUpdateCallback
HELICS.helicsFederateUnProtect
HELICS.helicsFederateWaitCommand
HELICS.helicsFilterAddDeliveryEndpoint
HELICS.helicsFilterAddDestinationTarget
HELICS.helicsFilterAddSourceTarget
HELICS.helicsFilterGetInfo
HELICS.helicsFilterGetName
HELICS.helicsFilterGetOption
HELICS.helicsFilterGetTag
HELICS.helicsFilterIsValid
HELICS.helicsFilterRemoveDeliveryEndpoint
HELICS.helicsFilterRemoveTarget
HELICS.helicsFilterSet
HELICS.helicsFilterSetCustomCallback
HELICS.helicsFilterSetInfo
HELICS.helicsFilterSetOption
HELICS.helicsFilterSetString
HELICS.helicsFilterSetTag
HELICS.helicsGetFederateByName
HELICS.helicsGetOptionIndex
HELICS.helicsGetPropertyIndex
HELICS.helicsGetVersion
HELICS.helicsInputAddTarget
HELICS.helicsInputClearUpdate
HELICS.helicsInputGetBoolean
HELICS.helicsInputGetByteCount
HELICS.helicsInputGetBytes
HELICS.helicsInputGetChar
HELICS.helicsInputGetComplex
HELICS.helicsInputGetComplexObject
HELICS.helicsInputGetComplexVector
HELICS.helicsInputGetDouble
HELICS.helicsInputGetExtractionUnits
HELICS.helicsInputGetInfo
HELICS.helicsInputGetInjectionUnits
HELICS.helicsInputGetInteger
HELICS.helicsInputGetName
HELICS.helicsInputGetNamedPoint
HELICS.helicsInputGetOption
HELICS.helicsInputGetPublicationDataType
HELICS.helicsInputGetPublicationType
HELICS.helicsInputGetString
HELICS.helicsInputGetStringSize
HELICS.helicsInputGetTag
HELICS.helicsInputGetTarget
HELICS.helicsInputGetTime
HELICS.helicsInputGetType
HELICS.helicsInputGetUnits
HELICS.helicsInputGetVector
HELICS.helicsInputGetVectorSize
HELICS.helicsInputIsUpdated
HELICS.helicsInputIsValid
HELICS.helicsInputLastUpdateTime
HELICS.helicsInputSetDefaultBoolean
HELICS.helicsInputSetDefaultBytes
HELICS.helicsInputSetDefaultChar
HELICS.helicsInputSetDefaultComplex
HELICS.helicsInputSetDefaultComplexVector
HELICS.helicsInputSetDefaultDouble
HELICS.helicsInputSetDefaultInteger
HELICS.helicsInputSetDefaultNamedPoint
HELICS.helicsInputSetDefaultString
HELICS.helicsInputSetDefaultTime
HELICS.helicsInputSetDefaultVector
HELICS.helicsInputSetInfo
HELICS.helicsInputSetMinimumChange
HELICS.helicsInputSetOption
HELICS.helicsInputSetTag
HELICS.helicsIntegerToBytes
HELICS.helicsIsCoreTypeAvailable
HELICS.helicsLoadSignalHandler
HELICS.helicsLoadSignalHandlerCallback
HELICS.helicsLoadSignalHandlerCallbackNoExit
HELICS.helicsLoadThreadedSignalHandler
HELICS.helicsMessageAppendData
HELICS.helicsMessageClearFlags
HELICS.helicsMessageCopy
HELICS.helicsMessageGetByteCount
HELICS.helicsMessageGetBytes
HELICS.helicsMessageGetBytesPointer
HELICS.helicsMessageGetDestination
HELICS.helicsMessageGetFlagOption
HELICS.helicsMessageGetMessageID
HELICS.helicsMessageGetOriginalDestination
HELICS.helicsMessageGetOriginalSource
HELICS.helicsMessageGetSource
HELICS.helicsMessageGetString
HELICS.helicsMessageGetTime
HELICS.helicsMessageIsValid
HELICS.helicsMessageReserve
HELICS.helicsMessageResize
HELICS.helicsMessageSetData
HELICS.helicsMessageSetDestination
HELICS.helicsMessageSetFlagOption
HELICS.helicsMessageSetMessageID
HELICS.helicsMessageSetOriginalDestination
HELICS.helicsMessageSetOriginalSource
HELICS.helicsMessageSetSource
HELICS.helicsMessageSetString
HELICS.helicsMessageSetTime
HELICS.helicsNamedPointToBytes
HELICS.helicsPublicationAddTarget
HELICS.helicsPublicationGetInfo
HELICS.helicsPublicationGetName
HELICS.helicsPublicationGetOption
HELICS.helicsPublicationGetTag
HELICS.helicsPublicationGetType
HELICS.helicsPublicationGetUnits
HELICS.helicsPublicationIsValid
HELICS.helicsPublicationPublishBoolean
HELICS.helicsPublicationPublishBytes
HELICS.helicsPublicationPublishChar
HELICS.helicsPublicationPublishComplex
HELICS.helicsPublicationPublishComplexVector
HELICS.helicsPublicationPublishDouble
HELICS.helicsPublicationPublishInteger
HELICS.helicsPublicationPublishNamedPoint
HELICS.helicsPublicationPublishString
HELICS.helicsPublicationPublishTime
HELICS.helicsPublicationPublishVector
HELICS.helicsPublicationSetInfo
HELICS.helicsPublicationSetMinimumChange
HELICS.helicsPublicationSetOption
HELICS.helicsPublicationSetTag
HELICS.helicsQueryBrokerExecute
HELICS.helicsQueryBufferFill
HELICS.helicsQueryCoreExecute
HELICS.helicsQueryExecute
HELICS.helicsQueryExecuteAsync
HELICS.helicsQueryExecuteComplete
HELICS.helicsQueryFree
HELICS.helicsQueryIsCompleted
HELICS.helicsQuerySetOrdering
HELICS.helicsRawStringToBytes
HELICS.helicsStringToBytes
HELICS.helicsSubscriptionGetTarget
HELICS.helicsTimeToBytes
HELICS.helicsTranslatorAddDestinationEndpoint
HELICS.helicsTranslatorAddInputTarget
HELICS.helicsTranslatorAddPublicationTarget
HELICS.helicsTranslatorAddSourceEndpoint
HELICS.helicsTranslatorGetInfo
HELICS.helicsTranslatorGetName
HELICS.helicsTranslatorGetOption
HELICS.helicsTranslatorGetTag
HELICS.helicsTranslatorIsValid
HELICS.helicsTranslatorRemoveTarget
HELICS.helicsTranslatorSet
HELICS.helicsTranslatorSetCustomCallback
HELICS.helicsTranslatorSetInfo
HELICS.helicsTranslatorSetOption
HELICS.helicsTranslatorSetString
HELICS.helicsTranslatorSetTag
HELICS.helicsVectorToBytes
HELICS.helicsWrapDataInBuffer