diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..8f16894e --- /dev/null +++ b/404.html @@ -0,0 +1,452 @@ + + + +
+ + + + + + + + + + + + + + +class HelicsBroker(handle, cleanup=True)
+
helics.capi._HelicsCHandle
address Get the connection address for the broker.
+identifier Get the local identification for the broker.
+name Get the local identification for the broker.
+def add_alias(self, interface_name: str, alias: str)
+
Create an alias for an interface.
+Parameters
+interfaceName
: The current name of an interface.alias
: The additional name to use for the given interface.add_destination_filter_to_endpoint
+def add_destination_filter_to_endpoint(self, filter: str, target: str)
+
Create a filter connection between a named filter and a named endpoint for destination processing.
+Parameters
+filter
: the name of the filter.target
: the name of the source target.def add_source_filter_to_endpoint(self, filter: str, target: str)
+
Create a filter connection between a named filter and a named endpoint for messages coming from that endpoint.
+Parameters
+filter
: the name of the filter.
+target
: the name of the source target.
def data_link(self, source: str, target: str)
+
Create a data link between a named publication and a named input.
+Parameters
+source
: the name of the publication.target
: the name of the input.def disconnect(self)
+
Disconnect the broker from any other brokers and communications.
+def global_error(self, error_code: int, error_string: str)
+
Generate a global error to terminate the federation.
+Parameters
+error_code
: an error code to give to the error.error_string
: a string message associated with the error.def is_connected(self)
+
Check if the broker is connected.
+def query(self, target: str, query: str, mode: HelicsSequencingMode = HelicsSequencingMode.FAST) -> JSONType
+
Make a query of the broker.
+This call is blocking until the value is returned which may take some time depending on the size of the federation and the specific string being queried.
+Parameters
+target
: the target of the query can be “federation”, “federate”, “broker”, “core”, or a specific name of a federate, core, or broker.query
: a string with the query, see other documentation for specific properties to query, can be defined by the federate.Returns: a string with the value requested. This is either going to be a vector of strings value or a JSON string stored in the first element of the vector. The string “#invalid” is returned if the query was not valid.
+def set_global(self, name: str, value: str)
+
Set a federation global value.
+This overwrites any previous value for this name. globals can be queried with a target of “global” and query of the value to Query.
+Parameters
+name
: the name of the global to set.value
: the value of the global.def wait_for_disconnect(self, ms_to_wait: int = -1)
+
Waits in the current thread until the broker is disconnected.
+Parameters
+ms_to_wait
: the timeout to wait for disconnect (-1) implies no timeoutReturns: True
if the disconnect was successful false if it timed out
class HelicsCallbackFederate(handle)
+
core
+current_time
+n_endpoints
+n_filters
+n_inputs
+n_pending_messages Returns the number of pending receives for all endpoints.
+n_publications Get the number of publications in this federate.
+n_subscriptions Get the number of inputs in this federate.
+name
+separator
+state
+class HelicsCloningFilter(handle, cleanup=True)
+
HelicsFilter
info Get the interface information field of the filter.
+name Get the name of the filter.
+class HelicsCombinationFederate(handle)
+
core
+current_time
+n_endpoints
+n_filters
+n_inputs
+n_pending_messages Returns the number of pending receives for all endpoints.
+n_publications Get the number of publications in this federate.
+n_subscriptions Get the number of inputs in this federate.
+name
+separator
+state
+class HelicsCore(handle, cleanup=True)
+
helics.capi._HelicsCHandle
address Get the connection network or connection address for the core.
+identifier Get an identifier string for the core.
+def add_alias(self, interface_name: str, alias: str)
+
Create an alias for an interface.
+Parameters
+interface_name
: The current name of an interface.alias
: The additional name to use for the given interface.def clone(self)
+
def disconnect(self)
+
Disconnect the core from its broker.
+def global_error(self, error_code: int, error_string: str)
+
Generate a global error to terminate the federation.
+Parameters
+error_code
: an error code to give to the error.error_string
: a string message associated with the error.def is_connected(self) -> bool
+
Check if the core is connected to the broker.
+def is_valid(self) -> bool
+
Check if the core is valid.
+def query(self, target: str, query: str, mode: HelicsSequencingMode = HelicsSequencingMode.FAST) -> JSONType
+
Make a query of the core.
+This call is blocking until the value is returned which may take some time depending +on the size of the federation and the specific string being queried
+target
: the target of the query can be “federation”, “federate”, “broker”, “core”, or a specific name of a federate, core, or broker
+query
: a string with the query, see other documentation for specific properties to query, can be defined by the federate
Returns: a string with the value requested. this is either going to be a vector of strings value +or a JSON string stored in the first element of the vector. The string “#invalid” is returned +if the query was not valid
+def register_cloning_filter(self, delivery_endpoint: str) -> HelicsCloningFilter
+
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
+Parameters
+delivery_endpoint
: the specified endpoint to deliver the message
Returns: a helics.HelicsFilter
object.
def register_filter(self, kind: HelicsFilterType, name: str = "") -> HelicsFilter
+
Create a destination 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
+kind
: the type of filter to create
+name
: the name of the filter (can be NULL)
Returns: a helics.HelicsFilter
object.
def set_global(self, name: str, value: str)
+
Set a global federation value.
+Parameters
+name
: the name of the global value to set
+value
: actual value of the global variable
def set_ready_to_init(self)
+
Set the core to ready to enter init.
+This function only needs to be called for cores that don’t have any federates but may have filters for cores with federates it won’t do anything.
+def wait_for_disconnect(self, ms_to_wait: int = -1) -> bool
+
Waits in the current thread until the broker is disconnected
+Parameters
+ms_to_wait
: the timeout to wait for disconnect (-1) implies no timeout
Returns: true if the disconnect was successful false if it timed out.
+class HelicsCoreFlag(*values)
+
Enum where members are also (and must be) ints
+enum.IntEnum
class HelicsCoreType(*values)
+
enum.IntEnum
class HelicsDataBuffer(self, handle, cleanup=False)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
class HelicsDataType(*values)
+
enum.IntEnum
class HelicsEndpoint(handle, cleanup=True)
+
helics.capi._HelicsCHandle
default_destination Get the default destination for an endpoint.
+info Get the interface information field of the filter.
+n_pending_messages Returns the number of pending receives for endpoint.
+name Get the name of the endpoint.
+type Get the specified type of the endpoint.
+def create_message(self) -> HelicsMessage
+
Create a message object.
+def get_message(self) -> HelicsMessage
+
Get a packet from an endpoint.
+def has_message(self) -> bool
+
Checks if endpoint has unread messages.
+def is_valid(self) -> bool
+
Check if the input is valid.
+def send_data(self, data: Union[bytes, HelicsMessage], destination: str = None, time=None)
+
def subscribe(self, name: str)
+
Subscribe an endpoint to a publication.
+class HelicsError(*values)
+
enum.IntEnum
class HelicsException(self, *args, **kwargs)
+
Common base class for all non-exit exceptions.
+builtins.Exception
class HelicsFederate(self, handle, cleanup=True)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
core
+current_time
+n_endpoints
+n_filters
+n_inputs
+n_pending_messages Returns the number of pending receives for all endpoints.
+n_publications
+name
+separator
+state
+def add_alias(self, interface_name: str, alias: str)
+
Create an alias for an interface.
+Parameters
+interface_name
: The current name of an interface.alias
: The additional name to use for the given interface.def add_dependency(self, federate_name)
+
Add a dependency for this federate.
+Adds an additional internal time dependency for the federate.
+Parameters
+fed_name
: the name of the federate to add a dependency on.def disconnect(self)
+
Terminate the simulation.
+Call is will block until the disconnect has been acknowledged, no commands that interact with the core may be called after this function function.
+def disconnect_async(self)
+
Terminate the simulation in a non-blocking call.
+self.disconnect_complete()
must be called after this call to complete the disconnect procedure.
def disconnect_complete(self)
+
Complete the asynchronous terminate pair.
+def enter_executing_mode(self, iterate: HelicsIterationRequest = HelicsIterationRequest.NO_ITERATION)
+
Enter the normal execution mode.
+Call will block until all federates have entered this mode.
+Parameters
+iterate
: An optional flag indicating the desired iteration mode.def enter_executing_mode_async(self, iterate: HelicsIterationRequest = HelicsIterationRequest.NO_ITERATION)
+
Enter the normal execution mode.
+Call will return immediately but enter_executing_mode_complete
should be called to complete the operation.
Parameters
+iterate
: An optional flag indicating the desired iteration mode.def enter_executing_mode_complete(self)
+
Complete the async call for entering Execution state.
+Call will not block but will return quickly.
+The enter_initializing_mode_complete
must be called before doing other operations.
def enter_initializing_mode(self)
+
Enter the initialization mode after all interfaces have been defined.
+The call will block until all federates have entered initialization mode.
+def enter_initializing_mode_async(self)
+
Enter the initialization mode after all interfaces have been defined.
+The call will not block but a call to enter_initializing_mode_complete
should be made to complete the call sequence.
enter_initializing_mode_complete
+def enter_initializing_mode_complete(self)
+
Second part of the async process for entering initializationState call after a call to enter_initializing_mode_async
if call any other time it will throw an InvalidFunctionCall
exception
enter_initializing_mode_iterative
+def enter_initializing_mode_iterative(self)
+
Trigger a blocking call and return to created state after all federates have either triggered an iteration or are waiting to enter initializing mode.
+enter_initializing_mode_iterative_async
+def enter_initializing_mode_iterative_async(self)
+
Non-blocking alternative to enter_initializing_mode_async
.
A call to enter_initializing_mode_iterative_complete
should be made to complete the call sequence.
enter_initializing_mode_iterative_complete
+def enter_initializing_mode_iterative_complete(self)
+
Complete the call to enter initializing mode iterative that was initiated with enter_initializing_mode_iterative_async
.
def finalize(self)
+
Terminate the simulation.
+Call is will block until the finalize has been acknowledged, no commands that interact with the core may be called after this function function.
+DEPRECATED
+def finalize_async(self)
+
Terminate the simulation in a non-blocking call.
+self.finalize_complete()
must be called after this call to complete the finalize procedure.
DEPRECATED
+def finalize_complete(self)
+
Complete the asynchronous terminate pair.
+DEPRECATED
+def get_filter_by_index(self, filter_index)
+
Get a filter by index.
+Parameters
+index
: the index of a filter.Returns: A reference to a filter object which could be invalid if filter_name
is not valid.
def get_filter_by_name(self, filter_name)
+
Get the id of a source filter from the name of the endpoint.
+Parameters
+filter_name
: the name of the filter.Returns: a reference to a filter object which could be invalid if filter_name
is not valid.
def global_error(self, error_code: int, error_string: str)
+
Generate a global error to terminate the federation.
+Parameters
+error_code
: an error code to give to the error.error_string
: a string message associated with the error.def is_async_operation_completed(self)
+
Called after one of the async calls and will indicate true if an async operation has completed. +Only call from the same thread as the one that called the initial async call and will return false if called when no aysnc operation is in flight
+def local_error(self, error_code: int, error_string: str)
+
Generate a local federate error.
+Parameters
+error_code
: an error code to give to the error.error_string
: a string message associated with the error.def log_message(self, message: str, level: HelicsLogLevel)
+
Log an message.
+def query(self, target: str, query: str, mode: HelicsSequencingMode = HelicsSequencingMode.FAST) -> JSONType
+
Make a query of the federate.
+This call is blocking until the value is returned which make take some time depending on the size of the federation and the specific string being queried.
+Parameters
+target
: the target of the query can be “federation”, “federate”, “broker”, “core”, or a specific name of a federate, core, or broker.query
: a string with the query see other documentation for specific properties to query, can be defined by the federate.Returns: a string with the value requested. +this is either going to be a vector of strings value or a JSON string stored in the first element of the vector. The string “#invalid” is returned if the query was not valid.
+def register_cloning_filter(self, delivery_endpoint: str) -> HelicsCloningFilter
+
Create a HelicsCloningFilter
on the specified federate.
Cloning filters copy a message and send it to multiple locations source and destination can be added through other functions.
+Parameters
+delivery_endpoint
: the specified endpoint to deliver the message.Returns: A HelicsCloningFilter
object.
def register_filter(self, kind: HelicsFilterType, filter_name: str) -> HelicsFilter
+
Define a filter interface.
+A filter will modify messages coming from or going to target endpoints.
+Parameters
+kind
: the type of the filter to register.filter_name
: the name of the filter.register_global_cloning_filter
+def register_global_cloning_filter(self, delivery_endpoint: str) -> HelicsCloningFilter
+
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.
+Parameters
+delivery_endpoint
: the specified endpoint to deliver the message.Returns: A CloningFilter object.
+def register_global_filter(self, kind: HelicsFilterType, filter_name: str) -> HelicsFilter
+
Define a filter interface.
+A filter will modify messages coming from or going to target endpoints.
+Parameters
+kind
: the type of the filter to register.filter_name
: the name of the filter.def register_interfaces(self, config)
+
Register a set of interfaces defined in a file.
+Call is only valid in startup mode
+Parameters
+configString
: the location of the file or config String to load to generate the interfacesdef request_next_step(self) -> HelicsTime
+
Request a time advancement to the next allowed time.
+Returns: The granted time step.
+def request_time(self, time: HelicsTime) -> HelicsTime
+
Parameters
+time
: the next requested time step.Returns: The granted time step.
+def request_time_advance(self, time_delta: HelicsTime) -> HelicsTime
+
Request a time advancement to the next allowed time.
+Parameters
+timeDelta
: The amount of time requested to advance.Returns: The granted time step.
+def request_time_async(self, time: HelicsTime)
+
Request a time advancement and return immediately for asynchronous function.
+self.request_time_complete()
should be called to finish the operation and get the result.
Parameters
+time
: the next requested time stepdef request_time_complete(self) -> HelicsTime
+
Request a time advancement.
+Returns: the granted time step.
+def request_time_iterative(self, time: float, iterate: HelicsIterationRequest) -> Tuple[HelicsTime, HelicsIterationResult]
+
Request a time advancement.
+Parameters
+time
: the next requested time step.iterate
: a requested iteration mode.Returns: The granted time step in a structure containing a return time and an iteration_result.
+def request_time_iterative_async(self, time: float, iterate: HelicsIterationRequest)
+
Request a time advancement with iterative call and return for asynchronous function.
+self.request_time_iterative_complete()
should be called to finish the operation and get the result.
Parameters
+time
: the next requested time step.iterate
: a requested iteration level (none, require, optional).request_time_iterative_complete
+def request_time_iterative_complete(self) -> Tuple[HelicsTime, HelicsIterationResult]
+
Finalize the time advancement request.
+Returns: the granted time step and iteration result.
+def set_global(self, name: str, value: str)
+
Set a federation global value.
+This overwrites any previous value for this name.
+Parameters
+name
: the name of the global to set.value
: the value of the global.class HelicsFederateFlag(*values)
+
enum.IntEnum
class HelicsFederateInfo(self, handle, cleanup=True)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
broker
+broker_init
+broker_key
+broker_port
+core_init
+core_name
+core_type
+local_port
+separator
+class HelicsFederateState(*values)
+
enum.IntEnum
class HelicsFilter(self, handle, cleanup=True)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
info Get the interface information field of the filter.
+name Get the name of the filter.
+def add_delivery_endpoint(self, delivery_endpoint: str)
+
Add a delivery destination from a filter.
+Parameters
+delivery_endpoint
- A string with the delivery endpoint to add.def add_destination_target(self, destination: str)
+
Add a destination target to a cloning filter. +All messages going to a destination are copied to the delivery address(es).
+def add_source_target(self, source: str)
+
Add a source target to a cloning filter. +All messages coming from a source are copied to the delivery address(es).
+def remove_delivery_endpoint(self, delivery_endpoint: str)
+
Remove a delivery destination from a filter.
+Parameters
+delivery_endpoint
- A string with the delivery endpoint to remove.def remove_destination_target(self, destination: str)
+
remove a destination target from a cloning filter.
+def set(self, property: str, value: float)
+
Set a property on a filter.
+class HelicsFilterType(*values)
+
enum.IntEnum
class HelicsFlag(*values)
+
Enum where members are also (and must be) ints
+enum.IntEnum
class HelicsHandleOption(*values)
+
enum.IntEnum
class HelicsInput(self, handle)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
boolean Get the value as a boolean.
+bytes Get a raw value as a character vector.
+complex Get the value as a complex number.
+complex_vector get the current value as a vector of complex.
+double Get the value as a double.
+info Get the interface information field of the filter.
+injection_units Get the units associated with an inputs publication.
+integer Get the current value as a 64 bit integer.
+json Get a raw value as a character vector.
+key Get the name/key for the input +the name is the local name if given, key is the full key name.
+DEPRECATED
+name Get the name/key for the input +the name is the local name if given, key is the full key name.
+named_point Get the current value as a named point.
+publication_type Get the units associated with a publication of an input.
+string Get the current value as a string.
+target Get the target of the input.
+type Get the type of the input.
+units Get the units associated with a input.
+value
+vector get the current value as a vector of doubles.
+def add_target(self, target: str)
+
Add a publication target to the input.
+def clear_update(self)
+
Clear the updated flag.
+def get_last_update_time(self) -> HelicsTime
+
Get the last time an input was updated.
+def is_updated(self) -> bool
+
Check if an input is updated.
+def is_valid(self) -> bool
+
Check if the input is valid.
+def set_default(self, data: Union[bytes, str, int, bool, float, complex, List[float], List[complex]])
+
Set the default value as a raw data +Set the default value as a string +Set the default value as an integer +Set the default value as a bool +Set the default value as a double +Set the default value as a vector of doubles
+class HelicsIterationRequest(*values)
+
enum.IntEnum
class HelicsIterationResult(*values)
+
enum.IntEnum
class HelicsLogLevel(*values)
+
enum.IntEnum
class HelicsMessage(self, handle, cleanup=True)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
data
+destination
+message_id
+original_dest
+original_destination
+original_source
+raw_data
+source
+time
+def append(self, data: bytes)
+
def is_valid(self) -> bool
+
class HelicsMessageFederate(self, handle)
+
Initialize self. See help(type(self)) for accurate signature.
+core
+current_time
+n_endpoints
+n_filters
+n_inputs
+n_pending_messages Returns the number of pending receives for all endpoints.
+n_publications
+name
+separator
+state
+def create_message(self) -> HelicsMessage
+
Create a message object.
+def get_endpoint_by_index(self, index: int) -> HelicsEndpoint
+
Get an Endpoint from an index.
+Parameters
+index
: the index of the endpoint to retrieve index is 0 basedReturn an Endpoint
+def get_endpoint_by_name(self, name: str) -> HelicsEndpoint
+
Get an Endpoint from its name.
+Parameters
+name
: the name of the endpoint to retrieve.Returns: an Endpoint
+def get_message(self) -> HelicsMessage
+
Get a packet for any endpoints in the federate.
+def has_message(self) -> bool
+
Checks if federate has any messages.
+def register_endpoint(self, name: str, kind: str = "") -> HelicsEndpoint
+
Register an endpoint.
+Call is only valid in startup mode
+name
: the name of the endpointkind
: the defined type of the interface for endpoint checking if requestedReturns: an Endpoint Object
+def register_global_endpoint(self, name: str, kind: str = "") -> HelicsEndpoint
+
Register an endpoint directly without prepending the federate name.
+name
: the name of the endpointkind
: the defined type of the interface for endpoint checking if requestedReturns: an Endpoint Object
+class HelicsMultiInputMode(*values)
+
enum.IntEnum
class HelicsProperty(*values)
+
enum.IntEnum
class HelicsPublication(self, handle)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
info Get the interface information field of the publication.
+key Get the key for the publication.
+DEPRECATED
+name Get the key for the publication.
+type Get the type for the publication.
+units Get the units of the publication.
+def add_target(self, name: str)
+
Add a named input to the list of targets a publication publishes to.
+def is_valid(self) -> bool
+
Check if the publication is valid.
+def publish(self, data: Union[bytes, str, int, complex, float, List[complex], List[float], Tuple[str, float], bool])
+
publish raw bytes +publish a string +publish an int value +publish a double +publish a complex number +publish a vector of doubles +publish a named point with a string and double +publish a boolean value
+class HelicsQuery(self, handle, cleanup=False)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
class HelicsQueryBuffer(self, handle, cleanup=False)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
class HelicsSequencingMode(*values)
+
Enumeration of sequencing modes for queries +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
+enum.IntEnum
class HelicsTranslator(self, handle, cleanup=True)
+
Initialize self. See help(type(self)) for accurate signature.
+helics.capi._HelicsCHandle
class HelicsTranslatorTypes(*values)
+
Rnumeration of the predefined translator types
+A custom filter type that executes a user defined callback +- ****CUSTOM**** +A translator type that converts to and from JSON +- ****JSON**** +A translator type that just encodes the message again in binary +- ****BINARY****
+enum.IntEnum
class HelicsValueFederate(self, handle)
+
Initialize self. See help(type(self)) for accurate signature.
+core
+current_time
+n_endpoints
+n_filters
+n_inputs
+n_pending_messages Returns the number of pending receives for all endpoints.
+n_publications Get the number of publications in this federate.
+n_subscriptions Get the number of inputs in this federate.
+name
+separator
+state
+def clear_updates(self)
+
Clear all the update flags from all federate inputs.
+def get_publication_by_index(self, index: int) -> HelicsPublication
+
Get a publication by index.
+Parameters
+index
: a 0 based index of the publication to retrieveReturns: a Publication object
+def get_publication_by_name(self, name: str) -> HelicsPublication
+
Get publication by name.
+def get_subscription_by_index(self, index: int) -> HelicsInput
+
Get a subscription by index.
+def get_subscription_by_name(self, name: str) -> HelicsInput
+
Get an input by index.
+def get_subscription_by_target(self, target: str) -> HelicsInput
+
Get an input by target.
+def publish_json(self, data: Union[dict, str])
+
Publish data contained in a JSON file.
+register_from_publication_json
+def register_from_publication_json(self, data: Union[dict, str])
+
Register publications from a JSON output file or string.
+Generates interface based on the data contained in a JSON file or string.
+def register_global_input(self, name: str, kind: Union[str, HelicsDataType], units: str = "") -> HelicsInput
+
Register an input.
+Call is only valid in startup mode.
+Parameters
+name
: the name of the inputkind
: a string defining the type of the inputunits
: a string defining the units of the input [optional]Returns: an input object for use as an identifier.
+def register_global_publication(self, name: str, kind: Union[str, HelicsDataType], units: str = "") -> HelicsPublication
+
Register a publication
+Call is only valid in startup mode
+Parameters
+name
: the name of the publicationkind
: the type of the publicationunits
: a string defining the units of the publication [optional]Returns: a publication object for use as an identifier
+def register_input(self, name: str, kind: Union[str, HelicsDataType], units: str = "") -> HelicsInput
+
Register an input.
+Call is only valid in startup mode.
+Parameters
+name
: the name of the inputkind
: the type of input to registerunits
: a string defining the units of the input [optional]Returns: an input id object for use as an identifier
+def register_publication(self, name: str, kind: Union[str, HelicsDataType], units: str = "", local: bool = True) -> HelicsPublication
+
Register a publication.
+Call is only valid in startup mode.
+Parameters
+name
: the name of the publication.kind
: the type of the publication.units
: a string defining the units of the publication [optional]local
: a bool defining whether the publication is global or not [optional]Returns: a publication id object for use as an identifier
+def register_subscription(self, name: str, units: str = "") -> HelicsInput
+
def cchar(c: str) -> bytes
+
def cdouble(d: float) -> float
+
def cstring(s: str) -> str
+
def generate_cleanup_callback(obj)
+
def helicsAbort(error_code: int, message: str)
+
def helicsBrokerAddAlias(broker: HelicsBroker, interface_name: str, alias: str)
+
Create an alias for an interface.
+Parameters
+interface_name
: The current name of an interface.alias
: The additional name to use for the given interface.def helicsBrokerAddDestinationFilterToEndpoint(broker: HelicsBroker, filter_name: str, endpoint_name: str)
+
Link a named filter to a destination endpoint.
+Parameters
+broker
- The broker to generate the connection from.filter
- The name of the filter.endpoint
- The name of the endpoint to filter the data going to.def helicsBrokerAddSourceFilterToEndpoint(broker: HelicsBroker, filter_name: str, endpoint_name: str)
+
Link a named filter to a source endpoint.
+Parameters
+broker
- The broker to generate the connection from.filter
- The name of the filter.endpoint
- The name of the endpoint to filter the data from.def helicsBrokerClearTimeBarrier(broker: HelicsBroker)
+
def helicsBrokerClone(broker: HelicsBroker) -> HelicsBroker
+
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.
+Parameters
+broker
- An existing helics.HelicsBroker
.Returns: helics.HelicsBroker
.
def helicsBrokerDataLink(broker: HelicsBroker, source_name: str, target_name: str)
+
Link a named publication and named input using a broker.
+Parameters
+broker
- The broker to generate the connection from.source_name
- The name of the publication.target_name
- The name of the target to send the publication data.def helicsBrokerDestroy(broker: HelicsBroker)
+
Disconnect and free a broker.
+def helicsBrokerDisconnect(broker: HelicsBroker)
+
Disconnect a broker.
+Parameters
+broker
- The broker to disconnect.def helicsBrokerFree(broker: HelicsBroker)
+
Release the memory associated with a broker.
+def helicsBrokerGetAddress(broker: HelicsBroker) -> str
+
Get the network address associated with a broker.
+Parameters
+broker
- The broker to query.Returns: A string with the network address of the broker.
+def helicsBrokerGetIdentifier(broker: HelicsBroker) -> str
+
Get an identifier for the broker.
+Parameters
+broker
- The broker to query.Returns: A string containing the identifier for the broker.
+def helicsBrokerGlobalError(broker: HelicsBroker, error_code: int, error_string: str)
+
def helicsBrokerIsConnected(broker: HelicsBroker) -> bool
+
Check if a broker is connected. +A connected broker implies it is attached to cores or cores could reach out to communicate.
+Returns: True
if connected, False
if not connected.
def helicsBrokerIsValid(broker: HelicsBroker) -> bool
+
Check if a broker object is a valid object.
+Parameters
+broker
- The helics.HelicsBroker
object to test.Returns: True
if valid, False
if not valid.
def helicsBrokerMakeConnections(broker: HelicsBroker, file: str)
+
Load a file containing connection information.
+Parameters
+broker
- The broker to generate the connections from.file
- A JSON or TOML file containing connection information.def helicsBrokerSendCommand(broker, target, command, err)
+
Send a command to another helics object through a broker using asynchronous(fast) messages.
+broker
: The broker to send the command through.target
: The name of the object to send the command to.command
: The command to send.def helicsBrokerSendOrderedCommand(broker, target, command, err)
+
Send a command to another helics object through a broker using ordered sequencing.
+broker
: The broker to send the command through.target
: The name of the object to send the command to.command
: The command to send.def helicsBrokerSetGlobal(broker: HelicsBroker, name: str, value: str)
+
Set a federation global value. +This overwrites any previous value for this name.
+Parameters
+broker
- The broker to set the global through.name
- The name of the global to set.value
- The value of the global.def helicsBrokerSetLogFile(broker: HelicsBroker, log_file: str)
+
Set the log file on a broker.
+Parameters
+broker
- The broker to set the log file for.log_file
- The name of the file to log to.def helicsBrokerSetLoggingCallback(broker: HelicsBroker, logger, user_data)
+
Set the logging callback for a helics.HelicsBroker
Add a logging callback function for the C.
+The logging callback will be called when a message flows from helics.HelicsBroker
or from the core.
broker
: the helics.HelicsBroker
that is created with helics.helicsCreateBroker
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 datauser_data
: a pointer to user data that is passed to the function when executingdef helicsBrokerSetTimeBarrier(broker: HelicsBroker, barrier_time: HelicsTime)
+
Set the broker time barrier
+broker
: the helics.HelicsBroker
barrier_time
: the barrier timedef helicsBrokerWaitForDisconnect(broker: HelicsBroker, ms_to_wait: int) -> bool
+
Wait for the broker to disconnect.
+Parameters
+broker
- The broker to wait for.ms_to_wait
- The time out in millisecond (<0 for infinite timeout).def helicsCallbackFederateInitializeCallback(fed: HelicsFederate, initialize, user_data)
+
Set callback for initialization
+This callback will be executed when computing whether to iterate in initialization mode
+fed
: The federate to set the callback for.initialize
: A callback with signature HelicsIterationRequest(void *user_data);user_data
: A pointer to user data that is passed to the function when executing.def helicsCallbackFederateNextTimeCallback(fed: HelicsFederate, time_update, user_data)
+
Set callback for the next time update
+This callback will be triggered to compute the next time update for a callback federate
+fed
: The federate to set the callback for.time_update
: A callback with signature HelicsTime(HelicsTime time, void *user_data);user_data
: A pointer to user data that is passed to the function when executing.def helicsCallbackFederateNextTimeIterativeCallback(fed: HelicsFederate, time_update, user_data)
+
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
+fed
: The federate to set the callback for.time_update
: A callback with signature HelicsTime(HelicsTime time, void *user_data);user_data
: A pointer to user data that is passed to the function when executing.def helicsCleanupLibrary()
+
Function to do some housekeeping work. +This runs some cleanup routines and tries to close out any residual thread that haven’t been shutdown yet.
+def helicsClearSignalHandler()
+
def helicsCloseLibrary()
+
Call when done using the helics library. +This function will ensure the threads are closed properly. If possible this should be the last call before exiting.
+def helicsCoreAddAlias(core: HelicsCore, interface_name: str, alias: str)
+
Create an alias for an interface.
+Parameters
+interface_name
: The current name of an interface.alias
: The additional name to use for the given interface.def helicsCoreAddDestinationFilterToEndpoint(core: HelicsCore, filter_name: str, endpoint_name: str)
+
Link a named filter to a destination endpoint.
+Parameters
+core
- The core to generate the connection from.filter
- The name of the filter.endpoint
- The name of the endpoint to filter the data going to.def helicsCoreAddSourceFilterToEndpoint(core: HelicsCore, filter_name: str, endpoint_name: str)
+
Link a named filter to a source endpoint.
+Parameters
+core
- The core to generate the connection from.filter
- The name of the filter.endpoint
- The name of the endpoint to filter the data from.def helicsCoreClone(core: HelicsCore) -> HelicsCore
+
Create a new reference to an existing core.
+This will create a new helics.HelicsCore
that references the existing core.
+The new helics.HelicsCore
must be freed as well.
Parameters
+core
- An existing helics.HelicsCore
.Returns: helics.HelicsCore
.
def helicsCoreConnect(core: HelicsCore) -> bool
+
Connect a core to the federate based on current configuration.
+Parameters
+core
- The core to connect.Returns: True
if core
is connected successfully, else False
.
def helicsCoreDataLink(core: HelicsCore, source_name: str, target_name: str)
+
Link a named publication and named input using a core.
+Parameters
+core
- The core to generate the connection from.source_name
- The name of the publication.target_name
- The name of the target to send the publication data.def helicsCoreDestroy(core: HelicsCore)
+
Disconnect and free a core.
+def helicsCoreDisconnect(core: HelicsCore)
+
Disconnect a core from the federation.
+Parameters
+core
- The core to query.def helicsCoreFree(core: HelicsCore)
+
Release the memory associated with a core.
+def helicsCoreGetAddress(core: HelicsCore) -> str
+
Get the network address associated with a core.
+Parameters
+core
- The core to query.Returns: A string with the network address of the broker.
+def helicsCoreGetIdentifier(core: HelicsCore) -> str
+
Get an identifier for the core.
+Parameters
+core
- The core to query.Returns: A string with the identifier of the core.
+def helicsCoreGlobalError(core: HelicsCore, error_code: int, error_string: str)
+
def helicsCoreIsConnected(core: HelicsCore) -> bool
+
Check if a core is connected. +A connected core implies it is attached to federates or federates could be attached to it.
+Returns: True
if connected, False
if not connected.
def helicsCoreIsValid(core: HelicsCore) -> bool
+
Check if a helics.HelicsCore
is a valid object.
Parameters
+core
- The helics.HelicsCore
object to test.Returns: True
if valid, False
if not valid.
def helicsCoreMakeConnections(core: HelicsCore, file: str)
+
Load a file containing connection information.
+Parameters
+core
- The core to generate the connections from.file
- A JSON or TOML file containing connection information.def helicsCoreRegisterCloningFilter(core: HelicsCore, name: str) -> HelicsCloningFilter
+
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.
+Parameters
+core
- The core to register through.name
- The name of the filter (can be NULL).Returns: helics.HelicsFilter
.
def helicsCoreRegisterFilter(core: HelicsCore, type: HelicsFilterType, name: str) -> HelicsFilter
+
Create a source Filter on the specified core. +Filters can be created through a federate or a core.handle, linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise equivalent behavior.
+Parameters
+core
- The core to register through.type
- The type of filter to create helics.HelicsFilterType
.name
- The name of the filter (can be NULL).Returns: helics.HelicsFilter
.
def helicsCoreRegisterTranslator(core: HelicsCore, type: HelicsTranslatorTypes, name: str) -> HelicsTranslator
+
Create a source 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 equivalent behavior.
+Parameters
+core
- The core to register through.type
- The type of translator to create /ref HelicsTranslatorTypes.name
- The name of the translator (can be NULL).Returns: helics.HelicsTranslator
.
def helicsCoreSendCommand(core, target, command, err)
+
Send a command to another helics object through a core using asynchronous(fast) messages.
+core
: The broker to send the command through.target
: The name of the object to send the command to.command
: The command to send.def helicsCoreSendOrderedCommand(core, target, command, err)
+
Send a command to another helics object through a core using ordered sequencing.
+core
: The broker to send the command through.target
: The name of the object to send the command to.command
: The command to send.def helicsCoreSetGlobal(core: HelicsCore, name: str, value: str)
+
Set a global value in a core. +This overwrites any previous value for this name.
+Parameters
+core
- The core to set the global through.name
- The name of the global to set.value
- The value of the global.def helicsCoreSetLogFile(core: HelicsCore, log_file: str)
+
Set the log file on a core.
+Parameters
+core
- The core to set the log file for.log_file
- The name of the file to log to.def helicsCoreSetLoggingCallback(core: HelicsCore, logger, user_data)
+
Set the logging callback for a helics.HelicsCore
Add a logging callback function for the C.
+The logging callback will be called when a message flows from helics.HelicsCore
or from the core.
core
: the helics.HelicsCore
that is created with helics.helicsCreateCore
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 datauser_data
: a pointer to user data that is passed to the function when executingdef helicsCoreSetReadyToInit(core: HelicsCore)
+
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.
+Parameters
+core
- The helics.HelicsCore
to enable init values for.def helicsCoreWaitForDisconnect(core: HelicsCore, ms_to_wait: int) -> bool
+
Wait for the core to disconnect.
+Parameters
+core
- The core to wait for.ms_to_wait
- The time out in millisecond (<0 for infinite timeout).def helicsCreateBroker(type: str, name: str = "", init_string: str = "") -> HelicsBroker
+
Create a broker object
+Parameters
+type
- The type of the broker to create.name
- The name of the broker. It can be a nullptr or empty string to have a name automatically assigned.init_string
- An initialization string to send to the core-the format is similar to command line arguments. Typical options include a broker address such as –broker=”XSSAF” if this is a subbroker, or the number of federates, or the address.Returns: helics.HelicsBroker
.
def helicsCreateBrokerFromArgs(type: str, name: str, arguments: List[str]) -> HelicsBroker
+
Create a helics.HelicsCore
by passing command line arguments.
Parameters
+type
- The type of the core to create.name
- The name of the core. It can be a nullptr or empty string to have a name automatically assigned.arguments
- The list of string values from a command line.Returns: helics.HelicsBroker
.
def helicsCreateCallbackFederate(fed_name: str, fedInfo: HelicsFederateInfo = None) -> HelicsCallbackFederate
+
Create a callback federate from helics.HelicsFederateInfo
.
+Callback federates are both value federates and message federates, objects can be used in all functions
+that take a helics.HelicsFederate
object as an argument.
fed_name
- A string with the name of the federate, can be NULL or an empty string to pull the default name from fi.fedInfo
- The federate info object that contains details on the federate.Returns: helics.HelicsCallbackFederate
.
def helicsCreateCallbackFederateFromConfig(config_file: str) -> HelicsCallbackFederate
+
Create a callback federate from a JSON file or JSON string or TOML file.
+Callback federates are both value federates and message federates, objects can be used in all functions
+that take a helics.HelicsFederate
object as an argument.
Parameters
+config_file
- A JSON file or a JSON string or TOML file that contains setup and configuration information.Returns: helics.HelicsCallbackFederate
.
def helicsCreateCombinationFederate(fed_name: str, fedInfo: HelicsFederateInfo = None) -> HelicsCombinationFederate
+
Create a combination federate from helics.HelicsFederateInfo
.
+Combination federates are both value federates and message federates, objects can be used in all functions
+that take a helics.HelicsFederate
object as an argument.
Parameters
+fed_name
- A string with the name of the federate, can be NULL or an empty string to pull the default name from fi.fedInfo
- The federate info object that contains details on the federate.Returns: helics.HelicsCombinationFederate
.
def helicsCreateCombinationFederateFromConfig(config_file: str) -> HelicsCombinationFederate
+
Create a combination federate from a JSON file or JSON string or TOML file.
+Combination federates are both value federates and message federates, objects can be used in all functions
+that take a helics.HelicsFederate
object as an argument.
Parameters
+config_file
- A JSON file or a JSON string or TOML file that contains setup and configuration information.Returns: helics.HelicsCombinationFederate
.
def helicsCreateCore(type: str, name: str = "", init_string: str = "") -> HelicsCore
+
Create a helics.HelicsCore
.
Parameters
+type
- The type of the core to create.name
- The name of the core. It can be a nullptr or empty string to have a name automatically assigned.init_string
- An initialization string to send to the core. The format is similar to command line arguments. Typical options include a broker name, the broker address, the number of federates, etc.Returns: helics.HelicsCore
.
def helicsCreateCoreFromArgs(type: str, name: str, arguments: List[str]) -> HelicsCore
+
Create a helics.HelicsCore
by passing command line arguments.
Parameters
+type
- The type of the core to create.name
- The name of the core. It can be a nullptr or empty string to have a name automatically assigned.arguments
- The list of string values from a command line.Returns: helics.HelicsCore
.
def helicsCreateDataBuffer(initial_capacity: int) -> HelicsDataBuffer
+
Create a helics managed data buffer with initial capacity
+def helicsCreateFederateInfo() -> HelicsFederateInfo
+
Create helics.HelicsFederateInfo
for specifying federate information when constructing a federate.
Returns: helics.HelicsFederateInfo
.
def helicsCreateMessageFederate(fed_name: str, fedInfo: HelicsFederateInfo = None) -> HelicsMessageFederate
+
Create helics.HelicsMessageFederate
from helics.HelicsFederateInfo
.
+helics.HelicsMessageFederate
objects can be used in all functions that take a helics.HelicsFederate
as an argument.
Parameters
+fed_name
- The name of the federate to create.fedInfo
- The federate info object that contains details on the federate.Returns: helics.HelicsMessageFederate
.
def helicsCreateMessageFederateFromConfig(config_file: str) -> HelicsMessageFederate
+
Create helics.HelicsMessageFederate
from a JSON file or JSON string or TOML file.
+helics.HelicsMessageFederate
objects can be used in all functions that take a helics.HelicsFederate
object as an argument.
Parameters
+config_file
- A config (JSON,TOML) file or a JSON string that contains setup and configuration information.Returns: helics.HelicsMessageFederate
.
def helicsCreateQuery(target_name: str, query_string: str) -> HelicsQuery
+
Create a query object. +A query object consists of a target and query string.
+Parameters
+target_name
- The name of the target to query.query_string
- The query to make of the target.Returns: helics.HelicsQuery
.
def helicsCreateValueFederate(fed_name: str, fedInfo: HelicsFederateInfo = None) -> HelicsValueFederate
+
Creation and destruction of Federates.
+Create helics.HelicsValueFederate
from helics.HelicsFederateInfo
.
+helics.HelicsValueFederate
objects can be used in all functions that take a helics.HelicsFederate
as an argument.
Parameters
+fed_name
- The name of the federate to create, can NULL or an empty string to use the default name from fi or an assigned name.fedInfo
- The federate info object that contains details on the federate.Returns: helics.HelicsValueFederate
.
def helicsCreateValueFederateFromConfig(config_file: str) -> HelicsValueFederate
+
Create helics.HelicsValueFederate
from a JSON file, JSON string, or TOML file.
+helics.HelicsValueFederate
objects can be used in all functions that take a helics.HelicsFederate
as an argument.
Parameters
+config_file
- A JSON file or a JSON string or TOML file that contains setup and configuration information.Returns: helics.HelicsValueFederate
.
def helicsDataBufferCapacity(data: HelicsDataBuffer) -> int
+
def helicsDataBufferClone(data: HelicsDataBuffer) -> HelicsDataBuffer
+
def helicsDataBufferConvertToType(data: HelicsDataBuffer, new_data_type: int)
+
def helicsDataBufferData(data: HelicsDataBuffer) -> bytes
+
def helicsDataBufferFillFromBoolean(data: HelicsDataBuffer, value: bool) -> int
+
Convert a bool to serialized bytes
+def helicsDataBufferFillFromChar(data: HelicsDataBuffer, value: str) -> int
+
Convert a bool to serialized bytes
+def helicsDataBufferFillFromComplex(data: HelicsDataBuffer, value: complex) -> int
+
Convert a complex to serialized bytes
+def helicsDataBufferFillFromComplexObject(data: HelicsDataBuffer, value: complex) -> int
+
Convert a complex to serialized bytes
+def helicsDataBufferFillFromComplexVector(data: HelicsDataBuffer, value: List[complex]) -> int
+
Convert a complex to serialized bytes
+def helicsDataBufferFillFromDouble(data: HelicsDataBuffer, value: float) -> int
+
Convert a double to serialized bytes
+def helicsDataBufferFillFromInteger(data: HelicsDataBuffer, value: int) -> int
+
Convert an integer to serialized bytes
+def helicsDataBufferFillFromNamedPoint(data: HelicsDataBuffer, name: str, value: float) -> int
+
Convert a named point to serialized bytes
+def helicsDataBufferFillFromRawString(data: HelicsDataBuffer, string: bytes) -> int
+
Convert a raw string to serialized bytes
+def helicsDataBufferFillFromString(data: HelicsDataBuffer, string: str) -> int
+
Convert a string to serialized bytes
+def helicsDataBufferFillFromTime(data: HelicsDataBuffer, value: HelicsTime)
+
Convert a bool to serialized bytes
+def helicsDataBufferFillFromVector(data: HelicsDataBuffer, value: List[float]) -> int
+
Convert a complex to serialized bytes
+def helicsDataBufferFree(data: HelicsDataBuffer)
+
def helicsDataBufferIsValid(data: HelicsDataBuffer) -> bool
+
def helicsDataBufferReserve(data: HelicsDataBuffer, new_capacity) -> bool
+
def helicsDataBufferSize(data: HelicsDataBuffer) -> int
+
def helicsDataBufferStringSize(data: HelicsDataBuffer) -> int
+
def helicsDataBufferToBoolean(data: HelicsDataBuffer) -> bool
+
def helicsDataBufferToChar(data: HelicsDataBuffer) -> str
+
def helicsDataBufferToComplex(data: HelicsDataBuffer) -> complex
+
def helicsDataBufferToComplexObject(data: HelicsDataBuffer) -> complex
+
def helicsDataBufferToComplexVector(data: HelicsDataBuffer) -> List[complex]
+
def helicsDataBufferToDouble(data: HelicsDataBuffer) -> float
+
def helicsDataBufferToInteger(data: HelicsDataBuffer) -> int
+
def helicsDataBufferToNamedPoint(data: HelicsDataBuffer) -> Tuple[str, float]
+
def helicsDataBufferToRawString(data: HelicsDataBuffer) -> str
+
def helicsDataBufferToString(data: HelicsDataBuffer) -> str
+
def helicsDataBufferToTime(data: HelicsDataBuffer) -> HelicsTime
+
def helicsDataBufferToVector(data: HelicsDataBuffer) -> List[float]
+
def helicsDataBufferType(data: HelicsDataBuffer) -> int
+
def helicsDataBufferVectorSize(data: HelicsDataBuffer) -> int
+
def helicsEndpointAddDestinationFilter(endpoint: HelicsEndpoint, filter_name: str)
+
Add destination filter to endpoint
+endpoint
- The endpoint.filter_name
- The name of the filter.def helicsEndpointAddDestinationTarget(endpoint: HelicsEndpoint, destination_name: str)
+
Add a destination target to a endpoint. +All messages coming from a source are copied to the delivery address(es).
+endpoint
- The given endpoint.source_name
- The name of the endpoint to add as a source target.def helicsEndpointAddSourceFilter(endpoint: HelicsEndpoint, filter_name: str)
+
Add source filter to endpoint
+endpoint
- The endpoint.filter_name
- The name of the filter.def helicsEndpointAddSourceTarget(endpoint: HelicsEndpoint, source_name: str)
+
Add a source target to a endpoint. +All messages coming from a source are copied to the delivery address(es).
+endpoint
- The given endpoint.source_name
- The name of the endpoint to add as a source target.def helicsEndpointClearMessages(endpoint: HelicsEndpoint)
+
Clear all message from an endpoint.
+_**Deprecated: Use helics.helicsFederateClearMessages
to free all messages, or helics.helicsMessageFree
to clear an individual message.
Parameters
+endpoint
- The endpoint object to operate on.DEPRECATED
+def helicsEndpointCreateMessage(endpoint: HelicsEndpoint) -> HelicsMessage
+
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.
+Parameters
+endpoint
- The endpoint object to associate the message with.def helicsEndpointCreateMessageObject(endpoint: HelicsEndpoint) -> HelicsMessage
+
Create a new empty message. +The message is empty and isValid will return false since there is no data associated with the message yet.
+Parameters
+endpoint
- The endpoint object to associate the message with.DEPRECATED
+def helicsEndpointGetDefaultDestination(endpoint: HelicsEndpoint) -> str
+
Get the default destination for an endpoint.
+Parameters
+endpoint
- The endpoint to set the destination for.Returns: A string with the default destination.
+def helicsEndpointGetInfo(endpoint: HelicsEndpoint) -> str
+
Get the data in the info field of a filter.
+Parameters
+end
- The filter to query.Returns: A string with the info field string.
+def helicsEndpointGetMessage(endpoint: HelicsEndpoint) -> HelicsMessage
+
Receive a packet from a particular endpoint.
+Parameters
+endpoint
- The identifier for the endpoint.Returns: A message object.
+def helicsEndpointGetMessageObject(endpoint: HelicsEndpoint) -> HelicsMessage
+
Receive a packet from a particular endpoint.
+Parameters
+endpoint
- The identifier for the endpoint.Returns: A message.
+DEPRECATED
+def helicsEndpointGetName(endpoint: HelicsEndpoint) -> str
+
Get the name of an endpoint.
+Parameters
+endpoint
- The endpoint object in question.Returns: The name of the endpoint.
+def helicsEndpointGetOption(endpoint: HelicsEndpoint, option: HelicsHandleOption) -> int
+
Get the value of handle option on an endpoint.
+Parameters
+endpoint
- The endpoint to modify.option
- Integer code for the option to set helics.HelicsHandleOption
.Returns: the value of the option, for boolean options will be 0 or 1.
+def helicsEndpointGetTag(endpoint: HelicsEndpoint, tagname: str)
+
Get the data in a specified tag of a endpoint.
+Parameters
+endpoint
: The endpoint object to query.tagname
: The name of the tag to query.Returns
+A string with the tag data.
+def helicsEndpointGetType(endpoint: HelicsEndpoint) -> str
+
Get the type specified for an endpoint.
+Parameters
+endpoint
- The endpoint object in question.Returns: The defined type of the endpoint.
+def helicsEndpointHasMessage(endpoint: HelicsEndpoint) -> bool
+
Check if a given endpoint has any unread messages.
+Parameters
+endpoint
- The endpoint to check.Returns: True
if the endpoint has a message, False
otherwise.
def helicsEndpointIsValid(endpoint: HelicsEndpoint) -> bool
+
Check if an endpoint is valid.
+Parameters
+endpoint
- The endpoint object to check.Returns: True
if the Endpoint object represents a valid endpoint.
def helicsEndpointPendingMessageCount(endpoint: HelicsEndpoint) -> int
+
Returns the number of pending receives for all endpoints of a particular federate.
+Parameters
+endpoint
- The endpoint to query.def helicsEndpointPendingMessages(endpoint: HelicsEndpoint) -> int
+
Returns the number of pending receives for all endpoints of a particular federate.
+Parameters
+endpoint
- The endpoint to query.DEPRECATED
+def helicsEndpointRemoveTarget(endpoint: HelicsEndpoint, target: str)
+
Remove target from endpoint
+endpoint
- The given endpoint.target_name
- The name of the endpoint to remove.def helicsEndpointSendBytes(endpoint: HelicsEndpoint, data: bytes)
+
Send a message from a specific endpoint.
+Parameters
+endpoint
- The endpoint to send the data from.data
- The data to senddef helicsEndpointSendBytesAt(endpoint: HelicsEndpoint, data: bytes, time: HelicsTime)
+
Send a message at a specific time to the targeted destinations
+endpoint
: The endpoint to send the data from.data
: The data to send.time
: The time the message should be sent.def helicsEndpointSendBytesTo(endpoint: HelicsEndpoint, data: bytes, destination: str)
+
Send a message to the specified destination.
+Parameters
+endpoint
- The endpoint to send the data from.data
- The data to send.destination
- The target destination.def helicsEndpointSendBytesToAt(endpoint: HelicsEndpoint, data: bytes, destination: str, time: HelicsTime)
+
Send a message at a specific time to the specified destination.
+Parameters
+endpoint
- The endpoint to send the data from.data
- The data to send.destination
- The target destination.time
- The time the message should be sent.def helicsEndpointSendEventRaw(
+ endpoint: HelicsEndpoint,
+ destination: str,
+ data: bytes,
+ time: HelicsTime,
+)
+
Send a message at a specific time to the specified destination.
+Parameters
+endpoint
- The endpoint to send the data from.destination
- The target destination.data
- The data to send.time
- The time the message should be sent.DEPRECATED
+Use helicsEndpointSendBytesToAt
instead.
def helicsEndpointSendMessage(endpoint: HelicsEndpoint, message: HelicsMessage)
+
Send a message object from a specific endpoint.
+Parameters
+endpoint
- The endpoint to send the data from.message
- The actual message to send which will be copied.def helicsEndpointSendMessageObject(endpoint: HelicsEndpoint, message: HelicsMessage)
+
Send a message object from a specific endpoint.
+Parameters
+endpoint
- The endpoint to send the data from.message
- The actual message to send which will be copied.DEPRECATED
+def helicsEndpointSendMessageObjectZeroCopy(endpoint: HelicsEndpoint, message: HelicsMessage)
+
Send a message object from a specific endpoint.
+Parameters
+endpoint
- The endpoint to send the data from.message
- The actual message to send which will be copied.DEPRECATED
+def helicsEndpointSendMessageRaw(endpoint: HelicsEndpoint, destination: str, data: bytes)
+
Send a message to the specified destination.
+Parameters
+endpoint
- The endpoint to send the data from.destination
- The target destination.data
- The data to send.DEPRECATED
+Use helicsEndpointSendBytesTo
instead
def helicsEndpointSendMessageZeroCopy(endpoint: HelicsEndpoint, message: HelicsMessage)
+
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.
+Parameters
+endpoint
- The endpoint to send the data from.message
- The actual message to send which will be copied.def helicsEndpointSetDefaultDestination(endpoint: HelicsEndpoint, destination: str)
+
Set the default destination for an endpoint if no other endpoint is given.
+Parameters
+endpoint
- The endpoint to set the destination for.destination
- A string naming the desired default endpoint.def helicsEndpointSetInfo(endpoint: HelicsEndpoint, info: str)
+
Set the data in the info field for a filter.
+Parameters
+endpoint
- The endpoint to query.info
- The string to set.def helicsEndpointSetOption(endpoint: HelicsEndpoint, option: HelicsHandleOption, value: int)
+
Set a handle option on an endpoint.
+Parameters
+endpoint
- The endpoint to modify.option
- Integer code for the option to set helics.HelicsHandleOption
.value
- The value to set the option to.def helicsEndpointSetTag(endpoint: HelicsEndpoint, tagname: str, tagvalue: str)
+
Set the data in a specific tag for a endpoint.
+endpoint
: The endpoint object to set a tag for.
+tagname
: The name of the tag to set.
+tagvalue
: The string value to associate with a tag.
def helicsEndpointSubscribe(endpoint: HelicsEndpoint, name: str)
+
Subscribe an endpoint to a publication.
+Parameters
+endpoint
- The endpoint to use.name
- The name of the publication.def helicsErrorClear(err: HelicsError)
+
Clear an error object.
+def helicsErrorInitialize()
+
Return an initialized error object.
+def helicsFederateAddAlias(fed: HelicsFederate, interface_name: str, alias: str)
+
Create an alias for an interface.
+Parameters
+interface_name
: The current name of an interface.alias
: The additional name to use for the given interface.def helicsFederateAddDependency(fed: HelicsFederate, name: str)
+
Add a time dependency for a federate. The federate will depend on the given named federate for time synchronization.
+Parameters
+fed
- The federate to add the dependency for.name
- The name of the federate to depend on.def helicsFederateClearMessages(fed: HelicsFederate)
+
Clear all stored messages from a federate.
+This clears messages retrieved through helics.helicsFederateGetMessage
or helics.helicsFederateGetMessageObject
.
Parameters
+fed
- The federate to clear the message for.def helicsFederateClearUpdates(fed: HelicsFederate)
+
Clear all the update flags from a federates inputs.
+Parameters
+fed
- The value helics.HelicsFederate
for which to clear update flags.def helicsFederateClone(fed: HelicsFederate) -> HelicsFederate
+
Create a new reference to an existing federate.
+This will create a new helics.HelicsFederate
object that references the existing federate.
+The new object must be freed as well.
Parameters
+fed
- An existing helics.HelicsFederate
.Returns: helics.HelicsFederate
.
def helicsFederateCosimulationTerminationCallback(fed: HelicsFederate, cosim_termination, user_data)
+
Set callback for cosimulation termination
+This callback will be executed once when the time advance 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
+fed
: The federate to set the callback for.cosim_termination
: A callback with signature void( void *user_data);user_data
: A pointer to user data that is passed to the function when executing.def helicsFederateCreateMessage(fed: HelicsFederate) -> HelicsMessage
+
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.
+Parameters
+fed
- the helics.HelicsFederate
to associate the message with.def helicsFederateCreateMessageObject(fed: HelicsFederate) -> HelicsMessage
+
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.
+Parameters
+fed
- the helics.HelicsFederate
to associate the message with.DEPRECATED
+def helicsFederateDestroy(fed: HelicsFederate)
+
Disconnect and free a federate.
+def helicsFederateDisconnect(fed: HelicsFederate)
+
Disconnect the federate. This function halts all communication in the federate and disconnects it from the core.
+def helicsFederateDisconnectAsync(fed: HelicsFederate)
+
Disconnect the federate in an async call.
+def helicsFederateDisconnectComplete(fed: HelicsFederate)
+
Complete the asynchronous disconnect call.
+def helicsFederateEnterExecutingMode(fed: HelicsFederate)
+
Request that the federate enter the Execution mode.
+This call is blocking until granted entry by the helics.HelicsCore
. On return from this call the federate will be at time 0. For an asynchronous alternative call see helics.helicsFederateEnterExecutingModeAsync
Parameters
+fed
- A federate to change modes.def helicsFederateEnterExecutingModeAsync(fed: HelicsFederate)
+
Request that the federate enter the Execution mode.
+This call is non-blocking and will return immediately. Call helics.helicsFederateEnterExecutingModeComplete
to finish the call sequence
Parameters
+fed
- The helics.HelicsFederate
to complete the call.def helicsFederateEnterExecutingModeComplete(fed: HelicsFederate)
+
Complete the call to helics.helicsFederateEnterExecutingModeAsync
.
Parameters
+fed
- The helics.HelicsFederate
to complete the call.def helicsFederateEnterExecutingModeIterative(fed: HelicsFederate, iterate: HelicsIterationRequest) -> HelicsIterationResult
+
Request an iterative time.
+This call allows for finer grain control of the iterative process than helics.helicsFederateRequestTime
. It takes a time and iteration request, and returns a time and iteration status.
Parameters
+fed
- The federate to make the request of.iterate
- helics.HelicsIterationRequest
, i.e. the requested iteration mode.Returns: helics.HelicsIterationResult
.
def helicsFederateEnterExecutingModeIterativeAsync(fed: HelicsFederate, iterate: HelicsIterationRequest)
+
Request an iterative entry to the execution mode.
+This call allows for finer grain control of the iterative process than helics.helicsFederateRequestTime
. It takes a time and iteration request, and returns a time and iteration status.
Parameters
+fed
- The federate to make the request of.iterate
- helics.HelicsIterationRequest
, i.e. the requested iteration mode.def helicsFederateEnterExecutingModeIterativeComplete(
+ fed: HelicsFederate,
+) -> HelicsIterationResult
+
Complete the asynchronous iterative call into ExecutionMode.
+Parameters
+fed
- The federate to make the request of.Returns: helics.HelicsIterationResult
.
def helicsFederateEnterInitializingMode(fed: HelicsFederate)
+
Initialization, execution, and time requests. +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.
+Parameters
+fed
- The federate to operate on.def helicsFederateEnterInitializingModeAsync(fed: HelicsFederate)
+
Non blocking alternative to helics.helicsFederateEnterInitializingMode
.
+The function helicsFederateEnterInitializationModeFinalize must be called to finish the operation.
Parameters
+fed
- The federate to operate on.def helicsFederateEnterInitializingModeComplete(fed: HelicsFederate)
+
Finalize the entry to initialize mode that was initiated with helics.helicsFederateEnterInitializingModeAsync
.
Parameters
+fed
- The federate desiring to complete the initialization step.def helicsFederateEnterInitializingModeIterative(fed: HelicsFederate)
+
Trigger a blocking call and return to created state after all federates have either triggered an iteration or are waiting to enter initializing mode.
+Parameters
+fed
- The federate to operate on.def helicsFederateEnterInitializingModeIterativeAsync(fed: HelicsFederate)
+
Non-blocking alternative to helics.helicsFederateEnterInitializingModeIterative
.
A call to helics.helicsFederateEnterInitializingModeIterativeComplete
should be made to complete the call sequence.
Parameters
+fed
- The federate to operate on.def helicsFederateEnterInitializingModeIterativeComplete(fed: HelicsFederate)
+
Complete the call to enter initializing mode iterative that was initiated with helics.helicsFederateEnterInitializingModeIterativeAsync
.
Parameters
+fed
- The federate to operate on.def helicsFederateErrorHandlerCallback(fed: HelicsFederate, error_handler, user_data)
+
Set callback for error handling
+This callback will be when a federate error is encountered
+fed
: The federate to set the callback for.error_handler
: A callback with signature void(int errorCode, const char *errorString, void *user_data);user_data
A pointer to user data that is passed to the function when executing.def helicsFederateExecutingEntryCallback(fed: HelicsFederate, executing_entry, user_data)
+
Set callback for the entry to ExecutingMode.
+This callback will be executed once on first entry to executing Mode
+fed
: The federate to set the callback for.executing_entry
: A callback with signature void( void *user_data);user_data
: A pointer to user data that is passed to the function when executing.def helicsFederateFinalize(fed: HelicsFederate)
+
Finalize the federate. This function halts all communication in the federate and disconnects it from the core.
+DEPRECATED
+def helicsFederateFinalizeAsync(fed: HelicsFederate)
+
Finalize the federate in an async call.
+DEPRECATED
+def helicsFederateFinalizeComplete(fed: HelicsFederate)
+
Complete the asynchronous disconnect call.
+DEPRECATED
+def helicsFederateFree(fed: HelicsFederate)
+
Release the memory associated with a federate.
+def helicsFederateGetCommand(fed: HelicsFederate) -> str
+
def helicsFederateGetCommandSource(fed: HelicsFederate) -> str
+
def helicsFederateGetCore(fed: HelicsFederate) -> HelicsCore
+
Get the helics.HelicsCore
associated with a federate.
Parameters
+fed
- helics.HelicsFederate
.Returns: helics.HelicsCore
.
def helicsFederateGetCoreObject(fed: HelicsFederate) -> HelicsCore
+
Get the helics.HelicsCore
associated with a federate.
Parameters
+fed
- helics.HelicsFederate
.Returns: helics.HelicsCore
.
DEPRECATED
+def helicsFederateGetCurrentTime(fed: HelicsFederate) -> HelicsTime
+
Get the current time of the federate.
+Parameters
+fed
- The helics.HelicsFederate
to query.Returns: helics.HelicsTime
.
def helicsFederateGetEndpoint(fed: HelicsFederate, name: str) -> HelicsEndpoint
+
Get an endpoint object from a name.
+Parameters
+fed
- The message helics.HelicsFederate
to use to get the endpoint.name
- The name of the endpoint.Returns: helics.HelicsEndpoint
.
def helicsFederateGetEndpointByIndex(fed: HelicsFederate, index: int) -> HelicsEndpoint
+
Get an endpoint by its index, typically already created via registerInterfaces file or something of that nature.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.index
- The index of the publication to get.Returns: helics.HelicsEndpoint
.
def helicsFederateGetEndpointCount(fed: HelicsFederate) -> int
+
Get the number of endpoints in a federate.
+Parameters
+fed
- The message federate to query.Returns: (-1) if fed was not a valid federate, otherwise returns the number of endpoints.
+def helicsFederateGetFilter(fed: HelicsFederate, name: str) -> HelicsFilter
+
Get a filter by its name, typically already created via registerInterfaces file or something of that nature.
+Parameters
+fed
- The helics.HelicsFederate
to use to get the filter.name
- The name of the filter.Returns: helics.HelicsFilter
.
def helicsFederateGetFilterByIndex(fed: HelicsFederate, index: int) -> HelicsFilter
+
Get a filter by its index, typically already created via registerInterfaces file or something of that nature.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.index
- The index of the publication to get.Returns: helics.HelicsFilter
.
def helicsFederateGetFilterCount(fed: HelicsFederate) -> int
+
Get the number of filters registered through a federate.
+Parameters
+fed
- The helics.HelicsFederate
to use to get the filter.Returns: A count of the number of filters registered through a federate.
+def helicsFederateGetFlagOption(fed: HelicsFederate, flag: Union[int, HelicsFederateFlag, HelicsFlag]) -> bool
+
Get a flag value for a federate.
+Parameters
+fed
- The federate to get the flag for.flag
- The helics.HelicsFederateFlag
to query.def helicsFederateGetInput(fed: HelicsFederate, name: str) -> HelicsInput
+
Get an input object from a name.
+Parameters
+fed
- The value helics.HelicsFederate
to use to get the publication.name
- The name of the input.Returns: helics.HelicsInput
.
def helicsFederateGetInputByIndex(fed: HelicsFederate, index: int) -> HelicsInput
+
Get an input by its index, typically already created via registerInterfaces file or something of that nature.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.index
- The index of the publication to get.Returns: helics.HelicsInput
def helicsFederateGetInputByTarget(fed: HelicsFederate, target: str) -> HelicsInput
+
Get an input object from a target.
+Parameters
+fed
- The value helics.HelicsFederate
to use to get the input.target
- The name of the publication that an input is targeting.Returns: helics.HelicsInput
def helicsFederateGetInputCount(fed: HelicsFederate) -> int
+
Get the number of subscriptions in a federate.
+Returns: (-1) if fed was not a valid federate otherwise returns the number of subscriptions.
+def helicsFederateGetIntegerProperty(fed: HelicsFederate, property: HelicsProperty) -> int
+
Get the current value of an integer property (such as a logging level).
+Parameters
+fed
- The federate to get the flag for.property
- A code for the property to set helics.HelicsProperty
.def helicsFederateGetMessage(fed: HelicsFederate) -> HelicsMessage
+
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.handle, then all for the second, and so on. +Within a single endpoint.handle, the messages are ordered by time, then source_id, then order of arrival.
+Returns: A helics.HelicsMessage
which references the data in the message.
def helicsFederateGetMessageObject(fed: HelicsFederate) -> HelicsMessage
+
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.handle, then all for the second, and so on. +Within a single endpoint.handle, the messages are ordered by time, then source_id, then order of arrival.
+Returns: A helics.HelicsMessage
which references the data in the message.
DEPRECATED
+def helicsFederateGetName(fed: HelicsFederate) -> str
+
Get the name of the federate.
+Parameters
+fed
- The helics.HelicsFederate
to query.Returns: A string with the name.
+def helicsFederateGetPublication(fed: HelicsFederate, name: str) -> HelicsPublication
+
Get a helics.HelicsPublication
from a name.
Parameters
+fed
- The value helics.HelicsFederate
to use to get the publication.name
- The name of the publication.Returns: helics.HelicsPublication
.
def helicsFederateGetPublicationByIndex(fed: HelicsFederate, index: int) -> HelicsPublication
+
Get a publication by its index, typically already created via registerInterfaces file or something of that nature.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.index
- The index of the publication to get.Returns: helics.HelicsPublication
.
def helicsFederateGetPublicationCount(fed: HelicsFederate) -> int
+
Get the number of publications in a federate.
+Returns: (-1) if fed was not a valid federate otherwise returns the number of publications.
+def helicsFederateGetState(fed: HelicsFederate) -> HelicsFederateState
+
Get the current state of a federate.
+Parameters
+fed
- The federate to query.Returns: helics.HelicsFederateState
.
def helicsFederateGetSubscription(fed: HelicsFederate, name: str) -> HelicsInput
+
Get an input object from a subscription target.
+Parameters
+fed
- The value helics.HelicsFederate
to use to get the publication.name
- The name of the publication that a subscription is targeting.Returns: helics.HelicsInput
DEPRECATED
+def helicsFederateGetTag(fed: HelicsFederate, tagname: str)
+
Get the data in a specified tag of a federate.
+Parameters
+fed
: The federate object to query.tagname
: The name of the tag to query.Returns
+A string with the tag data.
+def helicsFederateGetTimeProperty(fed: HelicsFederate, time_property: int) -> HelicsTime
+
Get the current value of a time based property in a federate.
+Parameters
+fed
- The federate query.time_property
- The property to query.Returns: helics.HelicsTime
.
def helicsFederateGetTranslator(fed: HelicsFederate, name: str) -> HelicsTranslator
+
Get a translator by its name, typically already created via registerInterfaces file or something of that nature.
+fed
The federate object to use to get the translator.name
The name of the translator.Returns: A helics.HelicsTranslator
object
def helicsFederateGetTranslatorByIndex(fed: HelicsFederate, index: int) -> HelicsTranslator
+
Get a translator by its name, typically already created via registerInterfaces file or something of that nature.
+fed
The federate object to use to get the translator.index
The index of the translator.Returns: A helics.HelicsTranslator
object
def helicsFederateGetTranslatorCount(fed: HelicsFederate) -> int
+
Get the number of translators registered through a federate.
+Parameters
+fed
- The federate object to use to get the translator.Returns: A count of the number of translators registered through a federate.
+def helicsFederateGlobalError(fed: HelicsFederate, error_code: int, error_string: str)
+
Generate a global error from a federate. +A global error halts the co-simulation completely.
+Parameters
+fed
- The federate to create an error in.error_code
- The integer code for the error.error_string
- A string describing the error.def helicsFederateHasMessage(fed: HelicsFederate) -> bool
+
Check if the federate has any outstanding messages.
+Parameters
+fed
- The federate to check.Returns: True
if the federate has a message waiting, False
otherwise.
def helicsFederateInfoClone(fedInfo: HelicsFederateInfo) -> HelicsFederateInfo
+
Create helics.HelicsFederateInfo
from an existing one and clone the information.
Parameters
+fedInfo
- A federateInfo object to duplicate.Returns: helics.HelicsFederateInfo
.
def helicsFederateInfoFree(fedInfo: HelicsFederateInfo)
+
Delete the memory associated with helics.HelicsFederateInfo
.
def helicsFederateInfoLoadFromArgs(fedInfo: HelicsFederateInfo, arguments: List[str])
+
Load federate info from command line arguments.
+Parameters
+fedInfo
- A federateInfo object.argc
- The number of command line arguments.argv
- An array of strings from the command line.def helicsFederateInfoLoadFromString(fedInfo: HelicsFederateInfo, arguments: str)
+
Load federate info from command line arguments contained in a string.
+Parameters
+fedInfo
- A federateInfo object.arguments
- Command line argument specified in a stringdef helicsFederateInfoSetBroker(fedInfo: HelicsFederateInfo, broker_string: str)
+
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.
+Parameters
+fedInfo
- The federate info object to alter.broker_string
- A string which defines the connection information for a broker either a name or an address.def helicsFederateInfoSetBrokerInitString(fedInfo: HelicsFederateInfo, broker_init_string: str)
+
Set the initialization string that a core will pass to a generated broker usually in the form of command line arguments.
+Parameters
+fedInfo
- The federate info object to alter.broker_init_string
- A string with command line arguments for a generated broker.def helicsFederateInfoSetBrokerKey(fedInfo: HelicsFederateInfo, broker_key: str)
+
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.
+Parameters
+fedInfo
- The federate info object to alter.broker_key
- A string containing a key for the broker to connect.def helicsFederateInfoSetBrokerPort(fedInfo: HelicsFederateInfo, broker_port: Union[int, str])
+
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.
+Parameters
+fedInfo
- The federate info object to alter.broker_port
- The integer port number to use for connection with a broker.def helicsFederateInfoSetCoreInitString(fedInfo: HelicsFederateInfo, core_init_string: str)
+
Set the initialization string for the core usually in the form of command line arguments.
+Parameters
+fedInfo
- The federate info object to alter.core_init_string
- A string containing command line arguments to be passed to the core.def helicsFederateInfoSetCoreName(fedInfo: HelicsFederateInfo, core_name: str)
+
Set the name of the core to link to for a federate.
+Parameters
+fedInfo
- The federate info object to alter.core_name
- The identifier for a core to link to.def helicsFederateInfoSetCoreType(fedInfo: HelicsFederateInfo, core_type: HelicsCoreType)
+
Set the core type by integer code.
+Valid values available by definitions in api-data.h
.
Parameters
+fedInfo
- The federate info object to alter.core_type
- An numerical code for a core type see helics.HelicsCoreType
.def helicsFederateInfoSetCoreTypeFromString(fedInfo: HelicsFederateInfo, core_type: str)
+
Set the core type from a string.
+Parameters
+fedInfo
- The federate info object to alter.core_type
- A string naming a core type.def helicsFederateInfoSetFlagOption(fedInfo: HelicsFederateInfo, flag: Union[int, HelicsFederateFlag, HelicsFlag], value: bool)
+
Set a flag in the info structure
+Valid flags are available helics.HelicsFederateFlag
.
Parameters
+fedInfo
- The federate info object to alter.flag
- A numerical index for a flag.value
- The desired value of the flag True
or False
.def helicsFederateInfoSetIntegerProperty(fedInfo: HelicsFederateInfo, property: HelicsProperty, value: int)
+
Set an integer property for a federate. +Set known properties.
+Parameters
+fedInfo
- The federateInfo object to alter.property
- helics.HelicsProperty
.value
- The value to set the property to.def helicsFederateInfoSetLocalPort(fedInfo: HelicsFederateInfo, local_port: Union[int, str])
+
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.
+Parameters
+fedInfo
- The federate info object to alter.local_port
- A string with the port information to use as the local server port can be a number or “auto” or “os_local”.def helicsFederateInfoSetSeparator(fedInfo: HelicsFederateInfo, separator: str)
+
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.
+Parameters
+fedInfo
- The federate info object to alter.separator
- The character to use as a separator.def helicsFederateInfoSetTimeProperty(fedInfo: HelicsFederateInfo, time_property: HelicsProperty, value: HelicsTime)
+
Set the output delay for a federate.
+Parameters
+fedInfo
- The federate info object to alter.time_property
- An integer representation of the time based property to set see helics.HelicsProperty
.propertyValue
- The value of the property to set the timeProperty to.def helicsFederateInitializingEntryCallback(fed: HelicsFederate, initializing_entry, user_data)
+
Set callback for the entry to initializingMode.
+This callback will be executed when the initializingMode is entered
+fed
: The federate to set the callback for.initializing_entry
: A callback with signature void(HelicsBool iterating, void *user_data); the bool parameter is set to true if the entry is iterative, therefore the first time this is called the bool is false. all subsequent times it is false.user_data
: A pointer to user data that is passed to the function when executing.def helicsFederateIsAsyncOperationCompleted(fed: HelicsFederate) -> bool
+
Check if the current Asynchronous operation has completed.
+Parameters
+fed
- The federate to operate on.Returns: True
if current operation has completed, else False
.
def helicsFederateIsProtected(fed_name: str) -> bool
+
Checks if an existing federate is protected
+Parameters
+fedName
: The name of an existing HelicsFederate.Returns: boolean if existing federate is protected
+def helicsFederateIsValid(fed: HelicsFederate) -> bool
+
Check if a helics.HelicsFederate
is valid.
Returns: True
if the federate is a valid active federate, False
otherwise.
def helicsFederateLocalError(fed: HelicsFederate, error_code: int, error_string: str)
+
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.
+Parameters
+fed
- The federate to create an error in.error_code
- The integer code for the error.error_string
- A string describing the error.def helicsFederateLogDebugMessage(fed: HelicsFederate, log_message: str)
+
Log a debug message through a federate.
+Parameters
+fed
- The federate to log the debug message through.log_message
- The message to put in the log.def helicsFederateLogErrorMessage(fed: HelicsFederate, log_message: str)
+
Log an error message through a federate.
+Parameters
+fed
- The federate to log the error message through.log_message
- The message to put in the log.def helicsFederateLogInfoMessage(fed: HelicsFederate, log_message: str)
+
Log an info message through a federate.
+Parameters
+fed
- The federate to log the info message through.log_message
- The message to put in the log.def helicsFederateLogLevelMessage(fed: HelicsFederate, log_level: HelicsLogLevel, log_message: str)
+
Log a message through a federate.
+Parameters
+fed
- The federate to log the message through.log_level
- The level of the message to log see helics.HelicsLogLevel
.log_message
- The message to put in the log.def helicsFederateLogWarningMessage(fed: HelicsFederate, log_message: str)
+
Log a warning message through a federate.
+Parameters
+fed
- The federate to log the warning message through.log_message
- The message to put in the log.def helicsFederatePendingMessageCount(fed: HelicsFederate) -> int
+
Returns the number of pending receives for the specified destination endpoint.
+Parameters
+fed
- The federate to get the number of waiting messages from.def helicsFederatePendingMessages(fed: HelicsFederate) -> int
+
Returns the number of pending receives for the specified destination endpoint.
+Parameters
+fed
- The federate to get the number of waiting messages from.DEPRECATED
+def helicsFederateProcessCommunications(fed: HelicsFederate, period: HelicsTime)
+
Tell helics to process internal communications for a period of time.
+Parameters
+fed
: The federate to tell to process.period
: The length of time to process communications and then return control.def helicsFederateProtect(fed_name: str)
+
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
+Parameters
+fedName
: The name of an existing HelicsFederate.def helicsFederatePublishJSON(fed: HelicsFederate, json: str)
+
Publish data contained in a JSON file or string.
+Parameters
+fed
- The value helics.HelicsFederate
through which to publish the data.json
- The publication file name or literal JSON data string.def helicsFederateRegisterCloningFilter(fed: HelicsFederate, name: str) -> HelicsCloningFilter
+
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.
+Parameters
+fed
- The federate to register through.name
- The name of the filter (can be NULL).Returns: helics.HelicsCloningFilter
.
def helicsFederateRegisterEndpoint(fed: HelicsFederate, name: str, type: str = "") -> HelicsEndpoint
+
MessageFederate Calls. +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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create an endpoint must have been created with helicsCreateMessageFederate or helicsCreateCombinationFederate.name
- The identifier for the endpoint. This will be prepended with the federate name for the global identifier.type
- A string describing the expected type of the publication (optional).Returns: helics.HelicsEndpoint
.
def helicsFederateRegisterFilter(fed: HelicsFederate, type: HelicsFilterType, name: str) -> HelicsFilter
+
Create a source Filter on the specified federate. +Filters can be created through a federate or a core.handle, linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise equivalent behavior.
+Parameters
+fed
- The federate to register through.type
- The type of filter to create helics.HelicsFilterType
.name
- The name of the filter (can be NULL).Returns: helics.HelicsFilter
.
def helicsFederateRegisterFromPublicationJSON(fed: HelicsFederate, json: str)
+
Register the publications via JSON publication string.
+Parameters
+fed
- The value helics.HelicsFederate
to use to register the publications.json
- The JSON publication string.def helicsFederateRegisterGlobalCloningFilter(fed: HelicsFederate, name: str) -> HelicsCloningFilter
+
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.
+Parameters
+fed
- The federate to register through.name
- The name of the filter (can be NULL).Returns: helics.HelicsFilter
.
def helicsFederateRegisterGlobalEndpoint(fed: HelicsFederate, name: str, type: str = "") -> HelicsEndpoint
+
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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create an endpoint must have been created with helicsCreateMessageFederate or helicsCreateCombinationFederate.name
- The identifier for the endpoint.handle, the given name is the global identifier.type
- A string describing the expected type of the publication (optional).Returns: helics.HelicsEndpoint
.
def helicsFederateRegisterGlobalFilter(fed: HelicsFederate, type: HelicsFilterType, name: str) -> HelicsFilter
+
Create a global source filter through a federate. +Filters can be created through a federate or a core.handle, linking through a federate allows a few extra features of name matching to function on the federate interface but otherwise equivalent behavior.
+Parameters
+fed
- The federate to register through.type
- The type of filter to create helics.HelicsFilterType
.name
- The name of the filter (can be NULL).Returns: helics.HelicsFilter
.
def helicsFederateRegisterGlobalInput(fed: HelicsFederate, name: str, type: HelicsDataType, units: str = "") -> HelicsInput
+
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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.name
- The identifier for the publication.type
- A code identifying the type of the input see helics.HelicsDataType
for available options.units
- A string listing the units of the subscription (optional).Returns: helics.HelicsPublication
.
def helicsFederateRegisterGlobalPublication(fed: HelicsFederate, name: str, type: HelicsDataType, units: str = "") -> HelicsPublication
+
Register a global named 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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.name
- The identifier for the publication.type
- A code identifying the type of the input see helics.HelicsDataType
for available options.units
- A string listing the units of the subscription (optional).Returns: helics.HelicsPublication
.
def helicsFederateRegisterGlobalTargetedEndpoint(fed: HelicsFederate, name: str, type: str = "")
+
Create a globally targeted 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.
+fed
- The helics.HelicsFederate
in which to create an endpoint must have been created with helicsCreateMessageFederate or helicsCreateCombinationFederate.name
- The identifier for the endpoint. This will be prepended with the federate name for the global identifier.type
- A string describing the expected type of the publication (optional).
+Returns: helics.HelicsEndpoint
.def helicsFederateRegisterGlobalTranslator(fed: HelicsFederate, type: HelicsTranslatorTypes, name: str) -> HelicsTranslator
+
Create a source 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 equivalent behavior
+Parameters
+fed
- The federate to register through.type
- The type of translator to create /ref HelicsTranslatorTypes.name
- The name of the translator (can be NULL).Returns: helics.HelicsTranslator
.
def helicsFederateRegisterGlobalTypeInput(fed: HelicsFederate, name: str, type: str, units: str = "") -> HelicsInput
+
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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.name
- The identifier for the publication.type
- A string defining the type of the input.units
- A string listing the units of the subscription (optional).Returns: helics.HelicsPublication
.
def helicsFederateRegisterGlobalTypePublication(fed: HelicsFederate, name: str, type: str, units: str = "") -> HelicsPublication
+
Register a global 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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.name
- The identifier for the publication.type
- A string describing the expected type of the publication.units
- A string listing the units of the subscription (optional).Returns: helics.HelicsPublication
.
def helicsFederateRegisterInput(fed: HelicsFederate, name: str, type: HelicsDataType, units: str = "") -> HelicsInput
+
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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create an input.name
- The identifier for the publication the global input name will be prepended with the federate name.type
- A code identifying the type of the input see helics.HelicsDataType
for available options.units
- A string listing the units of the input (optional).Returns: helics.HelicsInput
.
def helicsFederateRegisterInterfaces(fed: HelicsFederate, file: str)
+
Load interfaces from a file.
+Parameters
+fed
- The federate to which to load interfaces.file
- The name of a file to load the interfaces from either JSON, or TOML.def helicsFederateRegisterPublication(fed: HelicsFederate, name: str, type: HelicsDataType, units: str = "") -> HelicsPublication
+
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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.name
- The identifier for the publication the global publication name will be prepended with the federate name.type
- A code identifying the type of the input see helics.HelicsDataType
for available options.units
- A string listing the units of the subscription (optional).Returns: helics.HelicsPublication
.
def helicsFederateRegisterSubscription(fed: HelicsFederate, name: str, units: str = "") -> HelicsInput
+
Functions related to value federates for the C api. +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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a subscription, must have been created with helics.helicsCreateValueFederate
or
+helics.helicsCreateCombinationFederate
.name
- The identifier matching a publication to get a subscription for.units
- A string listing the units of the subscription (optional).Returns: helics.HelicsSubscription
.
def helicsFederateRegisterTargetedEndpoint(fed: HelicsFederate, name: str, type: str = "")
+
Create an targeted 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.
+fed
- The helics.HelicsFederate
in which to create an endpoint must have been created with helicsCreateMessageFederate or helicsCreateCombinationFederate.name
- The identifier for the endpoint. This will be prepended with the federate name for the global identifier.type
- A string describing the expected type of the publication (optional).
+Returns: helics.HelicsEndpoint
.def helicsFederateRegisterTranslator(fed: HelicsFederate, type: HelicsTranslatorTypes, name: str) -> HelicsTranslator
+
Create a source 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 equivalent behavior
+Parameters
+fed
- The federate to register through.type
- The type of translator to create /ref HelicsTranslatorTypes.name
- The name of the translator (can be NULL).Returns: helics.HelicsTranslator
.
def helicsFederateRegisterTypeInput(fed: HelicsFederate, name: str, type: str, units: str = "") -> HelicsInput
+
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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create an input.name
- The identifier for the input.type
- A string describing the expected type of the input.units
- A string listing the units of the input (optional).Returns: helics.HelicsPublication
.
def helicsFederateRegisterTypePublication(fed: HelicsFederate, name: str, type: str, units: str = "") -> HelicsPublication
+
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.
+Parameters
+fed
- The helics.HelicsFederate
in which to create a publication.name
- The identifier for the publication.type
- A string labeling the type of the publication.units
- A string listing the units of the subscription (optional).Returns: helics.HelicsPublication
.
def helicsFederateRequestNextStep(fed: HelicsFederate) -> HelicsTime
+
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.
Parameters
+fed
- The federate to make the request of.Returns: helics.HelicsTime
.
def helicsFederateRequestTime(fed: HelicsFederate, request_time: HelicsTime) -> HelicsTime
+
Request the next time for federate execution.
+Parameters
+fed
- The federate to make the request of.request_time
- The next requested time.Returns: helics.HelicsTime
.
def helicsFederateRequestTimeAdvance(fed: HelicsFederate, time_delta: HelicsTime) -> HelicsTime
+
Request the next time for federate execution.
+Parameters
+fed
- The federate to make the request of.time_delta
- The requested amount of time to advance.Returns: helics.HelicsTime
.
def helicsFederateRequestTimeAsync(fed: HelicsFederate, request_time: HelicsTime)
+
Request the next time for federate execution in an asynchronous call.
+Call helics.helicsFederateRequestTimeComplete
to finish the call.
Parameters
+fed
- The federate to make the request of.request_time
- The next requested time.def helicsFederateRequestTimeComplete(fed: HelicsFederate) -> HelicsTime
+
Complete an asynchronous requestTime call.
+Parameters
+fed
- The federate to make the request of.def helicsFederateRequestTimeIterative(
+ fed: HelicsFederate, request_time: HelicsTime, iterate: HelicsIterationRequest
+) -> Tuple[HelicsTime, HelicsIterationResult]
+
Request an iterative time.
+This call allows for finer grain control of the iterative process than helics.helicsFederateRequestTime
. It takes a time and iteration request, and returns a time and iteration status.
Parameters
+fed
- The federate to make the request of.request_time
- The next desired time.iterate
- helics.HelicsIterationRequest
, i.e. the requested iteration mode.Returns: (helics.HelicsTime, helics.HelicsIterationResult)
.
def helicsFederateRequestTimeIterativeAsync(fed: HelicsFederate, request_time: HelicsTime, iterate: HelicsIterationRequest)
+
Request an iterative time through an asynchronous call.
+This call allows for finer grain control of the iterative process than helics.helicsFederateRequestTime
. It takes a time and iteration request, and returns a time and iteration status. Call helics.helicsFederateRequestTimeIterativeComplete
to finish the process.
Parameters
+fed
- The federate to make the request of.request_time
- The next desired time.iterate
- helics.HelicsIterationRequest
, i.e. the requested iteration mode.def helicsFederateRequestTimeIterativeComplete(fed: HelicsFederate) -> Tuple[HelicsTime, HelicsIterationResult]
+
Complete an iterative time request asynchronous call.
+Parameters
+fed
- The federate to make the request of.Returns: The iteration specification of the result.
+def helicsFederateSendCommand(fed: HelicsFederate, target: str, command: str)
+
def helicsFederateSetFlagOption(fed: HelicsFederate, flag: Union[int, HelicsFederateFlag, HelicsFlag], value: bool)
+
Set a flag for the federate.
+Parameters
+fed
- The federate to alter a flag for.flag
- The flag to change.value
- The new value of the flag. 0 for false, !=0 for true.def helicsFederateSetGlobal(fed: HelicsFederate, name: str, value: str)
+
Set a federation global value through a federate. +This overwrites any previous value for this name.
+Parameters
+fed
- The federate to set the global through.name
- The name of the global to set.value
- The value of the global.def helicsFederateSetIntegerProperty(fed: HelicsFederate, property: HelicsProperty, value: int)
+
Set an integer based property of a federate.
+Parameters
+fed
- The federate to change the property for.property
- helics.HelicsProperty
.value
- The value of the property.def helicsFederateSetLogFile(fed: HelicsFederate, log_file: str)
+
Set the logging file for a federate (actually on the core associated with a federate).
+Parameters
+fed
- The federate to set the log file for.log_file
- The name of the log file.def helicsFederateSetLoggingCallback(fed: HelicsFederate, logger, user_data)
+
Set the logging callback for a helics.HelicsFederate
Add a logging callback function for the C.
+The logging callback will be called when a message flows into a helics.HelicsFederate
from the core or from a federate.
fed
: the helics.HelicsFederate
that is created with helics.helicsCreateValueFederate
, helics.helicsCreateMessageFederate
or helics.helicsCreateCombinationFederate
logger
: a callback with signature void(int, const char *, const char *, void *); the function arguments are loglevel, an identifier string, and a message string, and a pointer to user datauser_data
: a pointer to user data that is passed to the function when executingdef helicsFederateSetQueryCallback(fed: HelicsFederate, query, user_data)
+
Set the callback for queries executed against a helics.HelicsFederate
Add a logging callback function for the C.
+The logging callback will be called when a message flows from helics.HelicsBroker
or from the core.
fed
: the helics.HelicsFederate
that is created with helics.helicsCreateValueFederate
query
: a callback with signature const char *(const char *query, int querySize, HelicsQueryBuffer buffer, void *user_data); 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.user_data
: a pointer to user data that is passed to the function when executingdef helicsFederateSetSeparator(fed: HelicsFederate, separator: str)
+
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.
+Parameters
+fed
- The federate info object to alter.separator
- The character to use as a separator.def helicsFederateSetStateChangeCallback(fed: HelicsFederate, state_changer, user_data)
+
Set the callback for a helics.HelicsFederate
state change
Add a logging callback function for the C.
+The logging callback will be called when a message flows into a helics.HelicsFederate
from the core or from a federate.
fed
: the helics.HelicsFederate
that is created with helics.helicsCreateValueFederate
, helics.helicsCreateMessageFederate
or helics.helicsCreateCombinationFederate
state_changer
: a callback with signature void(HelicsFederateState newState, HelicsFederateState oldState, void *user_data);user_data
: a pointer to user data that is passed to the function when executingdef helicsFederateSetTag(fed: HelicsFederate, tagname: str, tagvalue: str)
+
Set the data in a specific tag for a federate.
+fed
: The federate object to set a tag for.
+tagname
: The name of the tag to set.
+tagvalue
: The string value to associate with a tag.
def helicsFederateSetTimeProperty(fed: HelicsFederate, time_property: int, time: HelicsTime)
+
Set a time based property for a federate.
+Parameters
+fed
- The helics.HelicsFederate
to set the property for.time_property
- A integer code for a time property.time
- The requested value of the property.def helicsFederateSetTimeRequestEntryCallback(fed: HelicsFederate, request_time, user_data)
+
Set the 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.
+fed
: the helics.HelicsFederate
that is created with helics.helicsCreateValueFederate
request_time
: a callback with signature void(HelicsTime currentTime, HelicsTime requestTime, bool iterating, void *user_data); The function arguments are the current time value, the requested time value, a bool indicating that the time is iterating, and pointer to the user_datauser_data
: a pointer to user data that is passed to the function when executingdef helicsFederateSetTimeRequestReturnCallback(fed: HelicsFederate, request_time_return, user_data)
+
Set the 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.
+fed
: the helics.HelicsFederate
that is created with helics.helicsCreateValueFederate
request_time_return
: a callback with signature void(HelicsTime newTime, bool iterating, void *user_data); The function arguments are the current time value, the requested time value, a bool indicating that the time is iterating, and pointer to the user_datauser_data
: a pointer to user data that is passed to the function when executingdef helicsFederateSetTimeUpdateCallback(fed: HelicsFederate, time_update, user_data)
+
Set the 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.
+fed
: the helics.HelicsFederate
that is created with helics.helicsCreateValueFederate
update_time
: a callback with signature void(HelicsTime newTime, bool iterating, void *user_data); The function arguments are the current time value, the requested time value, a bool indicating that the time is iterating, and pointer to the user_datauser_data
: a pointer to user data that is passed to the function when executingdef helicsFederateUnProtect(fed_name: str)
+
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
+Parameters
+fedName
: The name of an existing HelicsFederate.def helicsFederateWaitCommand(fed: HelicsFederate) -> str
+
def helicsFilterAddDeliveryEndpoint(filter: HelicsFilter, delivery_endpoint: str)
+
Clone filter functions. +Functions that manipulate cloning filters in some way. +Add a delivery endpoint to a cloning filter. +All cloned messages are sent to the delivery address(es).
+Parameters
+filter
- The given filter.delivery_endpoint
- The name of the endpoint to deliver messages to.def helicsFilterAddDestinationTarget(filter: HelicsFilter, destination: str)
+
Add a destination target to a filter. +All messages going to a destination are copied to the delivery address(es).
+Parameters
+filter
- The given filter to add a destination target to.destination
- The name of the endpoint to add as a destination target.def helicsFilterAddSourceTarget(filter: HelicsFilter, source_name: str)
+
Add a source target to a filter. +All messages coming from a source are copied to the delivery address(es).
+Parameters
+filter
- The given filter.source_name
- The name of the endpoint to add as a source target.def helicsFilterGetInfo(filter: HelicsFilter) -> str
+
Get the data in the info field of a filter.
+Parameters
+filter
- The given filter.Returns: A string with the info field string.
+def helicsFilterGetName(filter: HelicsFilter) -> str
+
Get the name of the filter and store in the given string.
+Parameters
+filter
- The given filter.Returns: A string with the name of the filter.
+def helicsFilterGetOption(filter: HelicsFilter, option: HelicsHandleOption) -> int
+
Get a handle option for the filter.
+Parameters
+filter
- The given filter to query.option
- The option to query helics.HelicsHandleOption
.Returns: int
.
def helicsFilterGetTag(filter: HelicsFilter, tagname: str)
+
Get the data in a specified tag of a filter.
+Parameters
+filter
: The filter object to query.tagname
: The name of the tag to query.Returns
+A string with the tag data.
+def helicsFilterIsValid(filter: HelicsFilter) -> bool
+
Check if a filter is valid.
+Parameters
+filter
- The filter object to check.Returns: True
if the Filter object represents a valid filter.
def helicsFilterRemoveDeliveryEndpoint(filter: HelicsFilter, delivery_endpoint: str)
+
Remove a delivery destination from a cloning filter.
+Parameters
+filter
- The given filter (must be a cloning filter).delivery_endpoint
- A string with the delivery endpoint to remove.def helicsFilterRemoveTarget(filter: HelicsFilter, target_name: str)
+
Remove a destination target from a filter.
+Parameters
+filter
- The given filter.target_name
- The named endpoint to remove as a target.def helicsFilterSet(filter: HelicsFilter, property: str, value: float)
+
Set a property on a filter.
+Parameters
+filter
- The filter to modify.property
- A string containing the property to set.value
- A numerical value for the property.def helicsFilterSetCustomCallback(filter: HelicsFilter, callback, user_data)
+
def helicsFilterSetInfo(filter: HelicsFilter, info: str)
+
Set the data in the info field for a filter
+Parameters
+filter
- The given filter.info
- The string to set.def helicsFilterSetOption(filter: HelicsFilter, option: HelicsHandleOption, value: int)
+
Set the data in the info field for a filter.
+Parameters
+filter
- The given filter.option
- The option to set helics.HelicsHandleOption
.value
- The value of the option commonly 0 for false 1 for true.def helicsFilterSetString(filter: HelicsFilter, property: str, value: str)
+
Set a string property on a filter.
+Parameters
+filter
- The filter to modify.property
- A string containing the property to set.value
- A string containing the new value.def helicsFilterSetTag(filter: HelicsFilter, tagname: str, tagvalue: str)
+
Set the data in a specific tag for a filter.
+filter
: The filter object to set a tag for.
+tagname
: The name of the tag to set.
+tagvalue
: The string value to associate with a tag.
def helicsGetBuildFlags() -> str
+
Get the build flags used to compile HELICS.
+def helicsGetCompilerVersion() -> str
+
Get the compiler version used to compile HELICS.
+def helicsGetDataType(value: str) -> int
+
Get the data type for use in helics.helicsFederateRegisterPublication
, helics.helicsFederateRegisterInput
, helics.helicsFilterSetOption
.
Parameters
+value
: A string representing a data type.Returns: An int with the data type or HELICS_DATA_TYPE_UNKNOWN(-1) if not a valid value.
+def helicsGetFederateByName(fed_name: str) -> HelicsFederate
+
Get an existing helics.HelicsFederate
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.
Parameters
+fed_name
- The name of the federate to retrieve.Returns: helics.HelicsFederate
.
def helicsGetFlagIndex(value: str) -> Union[HelicsFlag, HelicsFederateFlag]
+
Get a property index for use in helics.helicsFederateInfoSetFlagOption
, helics.helicsFederateSetFlagOption
.
Parameters
+value
- A string with the option name.Returns: An int with the property code or (-1) if not a valid property.
+def helicsGetOptionIndex(value: str) -> HelicsHandleOption
+
Get an option index for use in helics.helicsPublicationSetOption
, helics.helicsInputSetOption
, helics.helicsEndpointSetOption
,
+helics.helicsFilterSetOption
, and the corresponding get functions
Parameters
+value
- A string with the option nameReturns: An int with the option index or (-1) if not a valid property.
+def helicsGetOptionValue(value: str) -> int
+
Get an option value for use in helics.helicsPublicationSetOption
, helics.helicsInputSetOption
, helics.helicsEndpointSetOption
,
+helics.helicsFilterSetOption
.
Parameters
+value
- A string representing the valueReturns: An int with the option value or (-1) if not a valid value.
+def helicsGetPropertyIndex(value: str) -> HelicsProperty
+
Get a property index for use in helics.helicsFederateInfoSetFlagOption
, helics.helicsFederateInfoSetTimeProperty
, or helics.helicsFederateInfoSetIntegerProperty
.
Parameters
+value
- A string with the property name.Returns: An int with the property code or (-1) if not a valid property.
+def helicsGetSystemInfo() -> JSONType
+
Get a Python dictionary from JSON string containing version info. +The object contains fields with system information like cpu, core count, operating system, and memory, +as well as information about the HELICS build. Used for debugging reports and gathering other information.
+def helicsGetVersion() -> str
+
Get a version string for HELICS.
+def helicsInputAddTarget(ipt: HelicsInput, target_name: str)
+
Add a publication to the list of data that an input subscribes to.
+Parameters
+ipt
- The named input to modify.target_name
- The name of a publication that an input should subscribe to.def helicsInputClearUpdate(ipt: HelicsInput)
+
Clear the updated flag from an input.
+def helicsInputGetBoolean(ipt: HelicsInput) -> bool
+
Get a boolean value from a subscription.
+Parameters
+ipt
- The input to get the data for.Returns: A boolean value of current input value.
+def helicsInputGetByteCount(ipt: HelicsInput) -> int
+
Data can be returned in a number of formats, for instance if data is published as a double it can be returned as a string and vice versa, not all translations make that much sense but they do work. +Get the size of the raw value for subscription.
+Returns: The size of the raw data/string in bytes.
+def helicsInputGetBytes(ipt: HelicsInput) -> bytes
+
Get the raw data for the latest value of a subscription.
+Parameters
+ipt
- The input to get the data for.Returns: Raw string data.
+def helicsInputGetChar(ipt: HelicsInput) -> str
+
Get a single character value from an input.
+Parameters
+ipt
- The input to get the data for.Returns: The resulting character value.
+def helicsInputGetComplex(ipt: HelicsInput) -> complex
+
Get a pair of double forming a complex number from a subscriptions.
+Parameters
+ipt
- The input to get the data for.Returns: a pair of floating point values that represent the real and imag values
+def helicsInputGetComplexObject(ipt: HelicsInput) -> complex
+
Get a complex object from an input object.
+Parameters
+ipt
- The input to get the data for.Returns: complex
.
def helicsInputGetComplexVector(ipt: HelicsInput) -> List[complex]
+
Get a vector of complex from a subscription.
+Parameters
+ipt
- The input to get the result for.Returns: a list of floating point values
+def helicsInputGetDataBuffer(ipt: HelicsInput) -> HelicsDataBuffer
+
Get the size of a value for subscription assuming return as a string.
+Returns: The size of the string.
+def helicsInputGetDouble(ipt: HelicsInput) -> float
+
Get a double value from a subscription..
+Parameters
+ipt
- The input to get the data for.Returns: The double value of the input.
+def helicsInputGetExtractionUnits(ipt: HelicsInput) -> str
+
Get the units of an input.
+The same as helics.helicsInputGetUnits
.
Parameters
+ipt
- The input to query.Returns: A string with the units information.
+def helicsInputGetInfo(ipt: HelicsInput) -> str
+
Get the data in the info field of an input.
+Parameters
+ipt
- The input to query.Returns: A string with the info field string.
+def helicsInputGetInjectionUnits(ipt: HelicsInput) -> str
+
Get the units of the publication that an input is linked to.
+Parameters
+ipt
- The input to query.Returns: A string with the units information.
+def helicsInputGetInteger(ipt: HelicsInput) -> int
+
Get an integer value from a subscription.
+Parameters
+ipt
- The input to get the data for.Returns: An int64_t value with the current value of the input.
+def helicsInputGetKey(ipt: HelicsInput) -> str
+
Get the name of an input.
+Parameters
+ipt
- The input to queryReturns: A string with the name information.
+DEPRECATED
+def helicsInputGetName(ipt: HelicsInput) -> str
+
Get the name of an input.
+Parameters
+ipt
- The input to queryReturns: A string with the name information.
+def helicsInputGetNamedPoint(ipt: HelicsInput) -> Tuple[str, float]
+
Get a named point from a subscription.
+Parameters
+ipt
- The input to get the result for.Returns: a string and a double value for the named point
+def helicsInputGetOption(ipt: HelicsInput, option: HelicsHandleOption) -> int
+
Get the current value of an input handle option.
+Parameters
+ipt
- The input to query.option
- Integer representation of the option in question see helics.HelicsHandleOption
.Returns: An integer value with the current value of the given option.
+def helicsInputGetPublicationDataType(ipt: HelicsInput) -> int
+
Get the data type the publisher to an input is sending.
+Parameters
+ipt
- The input to queryReturns: An int containing the enumeration value of the publication type.
+def helicsInputGetPublicationType(ipt: HelicsInput) -> str
+
Get the type the publisher to an input is sending.
+Parameters
+ipt
- The input to queryReturns: A string with the type information.
+def helicsInputGetRawValue(ipt: HelicsInput) -> bytes
+
Get the raw data for the latest value of a subscription.
+Parameters
+ipt
- The input to get the data for.Returns: Raw string data.
+DEPRECATED
+def helicsInputGetRawValueSize(ipt: HelicsInput) -> int
+
Data can be returned in a number of formats, for instance if data is published as a double it can be returned as a string and vice versa, not all translations make that much sense but they do work. +Get the size of the raw value for subscription.
+Returns: The size of the raw data/string in bytes.
+DEPRECATED
+def helicsInputGetString(ipt: HelicsInput) -> str
+
Get a string value from a subscription.
+Parameters
+ipt
- The input to get the data for.Returns: A string data
+def helicsInputGetStringSize(ipt: HelicsInput) -> int
+
Get the size of a value for subscription assuming return as a string.
+Returns: The size of the string.
+def helicsInputGetTag(input: HelicsInput, tagname: str)
+
Get the data in a specified tag of a input.
+Parameters
+input
: The input object to query.tagname
: The name of the tag to query.Returns
+A string with the tag data.
+def helicsInputGetTarget(ipt: HelicsInput) -> str
+
Get the target of an input.
+Parameters
+ipt
- The input to queryReturns: A string with the input target.
+def helicsInputGetTime(ipt: HelicsInput) -> HelicsTime
+
Get a time value from a subscription.
+Parameters
+ipt
- The input to get the data for.Returns: The resulting time value.
+def helicsInputGetType(ipt: HelicsInput) -> str
+
Get the type of an input.
+Parameters
+ipt
- The input to queryReturns: A string with the type information.
+def helicsInputGetUnits(ipt: HelicsInput) -> str
+
Get the units of an input.
+Parameters
+ipt
- The input to query.Returns: A string with the units information.
+def helicsInputGetVector(ipt: HelicsInput) -> List[float]
+
Get a vector of doubles from a subscription.
+Parameters
+ipt
- The input to get the result for.Returns: a list of floating point values
+def helicsInputGetVectorSize(ipt: HelicsInput) -> int
+
Get the size of a value for subscription assuming return as an array of doubles.
+Returns: The number of doubles in a returned vector.
+def helicsInputIsUpdated(ipt: HelicsInput) -> bool
+
Check if a particular subscription was updated.
+Returns: True
if it has been updated since the last value retrieval.
def helicsInputIsValid(ipt: HelicsInput) -> bool
+
Check if an input is valid.
+Parameters
+ipt
- The input to checkReturns: True
if the Input object represents a valid input.
def helicsInputLastUpdateTime(ipt: HelicsInput) -> HelicsTime
+
Get the last time a subscription was updated.
+def helicsInputSetDefaultBoolean(ipt: HelicsInput, value: bool)
+
Set the default as a boolean.
+Parameters
+ipt
- The input to set the default for.value
- The default boolean value.def helicsInputSetDefaultBytes(ipt: HelicsInput, data: bytes)
+
Default Value functions. +These functions set the default value for a subscription. That is the value returned if nothing was published from elsewhere. +Set the default as a raw data array.
+Parameters
+ipt
- The input to set the default for.data
- A pointer to the raw data to use for the default.def helicsInputSetDefaultChar(ipt: HelicsInput, value: str)
+
Set the default as a char.
+Parameters
+ipt
- The input to set the default for.value
- The default char value.def helicsInputSetDefaultComplex(ipt: HelicsInput, real: float, imag: float = 0)
+
Set the default as a complex number.
+Parameters
+ipt
- The input to set the default for.real
- The default real value.imag
- The default imaginary value.def helicsInputSetDefaultComplexVector(ipt: HelicsInput, vectorInput: List[complex])
+
Set the default as a vector of doubles.
+Parameters
+ipt
- The input to set the default for.vectorInput
- A pointer to an array of double data.def helicsInputSetDefaultDouble(ipt: HelicsInput, value: float)
+
Set the default as a double.
+Parameters
+ipt
- The input to set the default for.value
- The default double value.def helicsInputSetDefaultInteger(ipt: HelicsInput, value: int)
+
Set the default as an integer.
+Parameters
+ipt
- The input to set the default for.value
- The default integer.def helicsInputSetDefaultNamedPoint(ipt: HelicsInput, string: str, value: float)
+
Set the default as a NamedPoint
.
Parameters
+ipt
- The input to set the default for.string
- A pointer to a string representing the name.value
- A double value for the value of the named point.def helicsInputSetDefaultRaw(ipt: HelicsInput, data: bytes)
+
Default Value functions. +These functions set the default value for a subscription. That is the value returned if nothing was published from elsewhere. +Set the default as a raw data array.
+Parameters
+ipt
- The input to set the default for.data
- A pointer to the raw data to use for the default.DEPRECATED
+def helicsInputSetDefaultString(ipt: HelicsInput, string: str)
+
Set the default as a string.
+Parameters
+ipt
- The input to set the default for.string
- A pointer to the default string.def helicsInputSetDefaultTime(ipt: HelicsInput, value: HelicsTime)
+
Set the default as a time.
+Parameters
+ipt
- The input to set the default for.value
- The default time value.def helicsInputSetDefaultVector(ipt: HelicsInput, vectorInput: List[float])
+
Set the default as a vector of doubles.
+Parameters
+ipt
- The input to set the default for.vectorInput
- A pointer to an array of double data.def helicsInputSetInfo(ipt: HelicsInput, info: str)
+
Set the data in the info field for an input.
+Parameters
+ipt
- The input to query.info
- The string to set.def helicsInputSetMinimumChange(ipt: HelicsInput, tolerance: float)
+
Set the minimum change detection tolerance.
+Parameters
+ipt
- The input to modify.tolerance
- The tolerance level for registering an update, values changing less than this value will not show asbeing updated.def helicsInputSetOption(ipt: HelicsInput, option: HelicsHandleOption, value: int)
+
Set an option on an input.
+Parameters
+ipt
- The input to query.option
- The option to set for the input helics.HelicsHandleOption
.value
- The value to set the option to.def helicsInputSetTag(input: HelicsInput, tagname: str, tagvalue: str)
+
Set the data in a specific tag for a input.
+input
: The input object to set a tag for.
+tagname
: The name of the tag to set.
+tagvalue
: The string value to associate with a tag.
def helicsIsCoreTypeAvailable(type: str) -> bool
+
Returns True
if core/broker type specified is available in current compilation.
Parameters
+type
- A string representing a core type. Options include “zmq”, “udp”, “ipc”, “interprocess”, “tcp”, “default”, “mpi”.Returns: True
if type
is available, False
if type
is not available.
def helicsLoadSignalHandler()
+
Load a signal handler that handles Ctrl-C and shuts down the library
+def helicsLoadSignalHandlerCallback()
+
def helicsLoadSignalHandlerCallbackNoExit()
+
def helicsLoadThreadedSignalHandler()
+
Load a threaded signal handler that handles Ctrl-C and shuts down the library
+def helicsMessageAppendData(message: HelicsMessage, data: bytes)
+
Append data to the payload.
+Parameters
+message
- The message object in question.data
- A string containing the message data to append.def helicsMessageCheckFlag(message: HelicsMessage, flag: int) -> bool
+
Check if a flag is set on a message.
+Parameters
+message
- The message object in question.flag
- The flag to check should be between [0,15].Returns: The flags associated with a message.
+DEPRECATED
+def helicsMessageClear(message: HelicsMessage)
+
Reset message to empty state
+Parameters
+message
- The message object in question.def helicsMessageClearFlags(message: HelicsMessage)
+
Clear the flags of a message.
+Parameters
+message
- The message object in question.def helicsMessageClone(message: HelicsMessage) -> HelicsMessage
+
Clone a message object.
+Parameters
+message
- The message object to copy from.Returns: helics.HelicsMessage
.
def helicsMessageCopy(source_message: HelicsMessage, destination_message: HelicsMessage)
+
Copy a message object.
+Parameters
+source_message
- The message object to copy from.destination_message
- The message object to copy to.def helicsMessageDataBuffer(message: HelicsMessage) -> HelicsDataBuffer
+
Get a data buffer to the message object.
+Parameters
+message
- A message object to get the dataBuffer for.Returns: A HelicsDataBuffer object to the data in a message. Modifying the buffer will directly modify the message contents.
+def helicsMessageFree(message: HelicsMessage)
+
Free a message object from memory. Memory for message is managed so not using this function does not create memory leaks, this is an indication to the system that the memory for this message is done being used and can be reused for a new message.
+helics.helicsFederateClearMessages
can also be used to clear up all stored messages at once.
def helicsMessageGetByteCount(message: HelicsMessage) -> int
+
Get the size of the data payload in bytes.
+Parameters
+message
- The message object in question.Returns: The size of the data payload.
+def helicsMessageGetBytes(message: HelicsMessage) -> bytes
+
Get the raw data for a message object.
+Parameters
+message
- A message object to get the data for.Returns: Raw string data.
+def helicsMessageGetBytesPointer(message: HelicsMessage) -> pointer
+
Get a pointer to the raw data of a message.
+Parameters
+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.
+def helicsMessageGetDestination(message: HelicsMessage) -> str
+
Get the destination endpoint of a message.
+Parameters
+message
- The message object in question.Returns: A string with the destination endpoint.
+def helicsMessageGetFlagOption(message: HelicsMessage, flag: int) -> bool
+
Get flag on a message.
+Parameters
+message
- The message object in question.flag
- The flag to check should be between [0,15].Returns: The flags associated with a message.
+def helicsMessageGetMessageID(message: HelicsMessage) -> int
+
Get the messageID of a message.
+Parameters
+message
- The message object in question.Returns: The messageID.
+def helicsMessageGetOriginalDestination(message: HelicsMessage) -> str
+
Get the original destination endpoint of a message, the destination may have been modified by filters or other actions.
+Parameters
+message
- The message object in question.Returns: A string with the original destination of a message.
+def helicsMessageGetOriginalSource(message: HelicsMessage) -> str
+
Get the original source endpoint of a message, the source may have been modified by filters or other actions.
+Parameters
+message
- The message object in question.Returns: A string with the source of a message.
+def helicsMessageGetRawData(message: HelicsMessage) -> bytes
+
Get the raw data for a message object.
+Parameters
+message
- A message object to get the data for.Returns: Raw string data.
+DEPRECATED
+def helicsMessageGetRawDataPointer(message: HelicsMessage) -> pointer
+
Get a pointer to the raw data of a message.
+Parameters
+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.
+DEPRECATED
+def helicsMessageGetRawDataSize(message: HelicsMessage) -> int
+
Get the size of the data payload in bytes.
+Parameters
+message
- The message object in question.Returns: The size of the data payload.
+DEPRECATED
+def helicsMessageGetSource(message: HelicsMessage) -> str
+
Message operation functions. +Functions for working with helics message envelopes. +Get the source endpoint of a message.
+Parameters
+message
- The message object in question.Returns: A string with the source endpoint.
+def helicsMessageGetString(message: HelicsMessage) -> str
+
Get the payload of a message as a string.
+Parameters
+message
- The message object in question.Returns: A string representing the payload of a message.
+def helicsMessageGetTime(message: HelicsMessage) -> HelicsTime
+
Get the helics time associated with a message.
+Parameters
+message
- The message object in question.Returns: The time associated with a message.
+def helicsMessageIsValid(message: HelicsMessage) -> bool
+
A check if the message contains a valid payload.
+Parameters
+message
- The message object in question.Returns: True
if the message contains a payload.
def helicsMessageReserve(message: HelicsMessage, reserve_size: int)
+
Reserve space in a buffer but don’t actually resize. +The message data buffer will be reserved but not resized.
+Parameters
+message
- The message object in question.reserve_size
- The number of bytes to reserve in the message object.def helicsMessageResize(message: HelicsMessage, new_size: int)
+
Resize the data buffer for a message. +The message data buffer will be resized. There are no guarantees on what is in the buffer in newly allocated space. +If the allocated space is not sufficient new allocations will occur
+Parameters
+message
- The message object in question.new_size
- The new size in bytes of the buffer.def helicsMessageSetData(message: HelicsMessage, data: bytes)
+
Set the data payload of a message as raw data.
+Parameters
+message
- The message object in question.data
- A string containing the message data.def helicsMessageSetDataBuffer(message: HelicsMessage, data: HelicsDataBuffer)
+
Set the data payload of a message from a HelicsDataBuffer Object.
+Parameters
+message
- The message object in question.data
- The dataBuffer containing the appropriate data, if null will clear the message payload.def helicsMessageSetDestination(message: HelicsMessage, destination: str)
+
Set the destination of a message.
+Parameters
+message
- The message object in question.destination
- A string containing the new destination.def helicsMessageSetFlagOption(message: HelicsMessage, flag: int, value: bool)
+
Set a flag on a message.
+Parameters
+message
- The message object in question.flag
- An index of a flag to set on the message.value
- The desired value of the flag.def helicsMessageSetMessageID(message: HelicsMessage, message_id: int)
+
Set the message ID for the message. +Normally this is not needed and the core of HELICS will adjust as needed.
+Parameters
+message
- The message object in question.message_id
- A new message ID.def helicsMessageSetOriginalDestination(message: HelicsMessage, destination: str)
+
Set the original destination of a message.
+Parameters
+message
- The message object in question.destination
- A string containing the new original source.def helicsMessageSetOriginalSource(message: HelicsMessage, source: str)
+
Set the original source of a message.
+Parameters
+message
- The message object in question.source
- A string containing the new original source.def helicsMessageSetSource(message: HelicsMessage, source: str)
+
Set the source of a message.
+Parameters
+message
- The message object in question.source
- A string containing the source.def helicsMessageSetString(message: HelicsMessage, string: str)
+
Set the data payload of a message as a string.
+Parameters
+message
- The message object in question.string
- A string containing the message data.def helicsMessageSetTime(message: HelicsMessage, time: HelicsTime)
+
Set the delivery time for a message.
+Parameters
+message
- The message object in question.time
- The time the message should be delivered.def helicsPublicationAddTarget(pub: HelicsPublication, target_name: str)
+
Add a named input to the list of targets a publication publishes to.
+Parameters
+pub
- The publication to add the target for.target_name
- The name of an input that the data should be sent to.def helicsPublicationGetInfo(pub: HelicsPublication) -> str
+
Get the data in the info field of an publication.
+Parameters
+pub
- The publication to query.Returns: A string with the info field string.
+def helicsPublicationGetKey(pub: HelicsPublication) -> str
+
Get the name of a publication. +This will be the global name used to identify the publication to the federation.
+Parameters
+pub
- The publication to query.Returns: A string with the units information.
+DEPRECATED
+def helicsPublicationGetName(pub: HelicsPublication) -> str
+
Get the name of a publication. +This will be the global name used to identify the publication to the federation.
+Parameters
+pub
- The publication to query.Returns: A string with the units information.
+def helicsPublicationGetOption(pub: HelicsPublication, option: HelicsHandleOption) -> int
+
Get the value of an option for a publication.
+Parameters
+pub
- The publication to query.option
- The value to query see helics.HelicsHandleOption
.Returns: A string with the info field string.
+def helicsPublicationGetTag(pub: HelicsPublication, tagname: str)
+
Get the data in a specified tag of a publication.
+Parameters
+pub
: The publication object to query.tagname
: The name of the tag to query.Returns
+A string with the tag data.
+def helicsPublicationGetType(pub: HelicsPublication) -> str
+
Get the type of a publication.
+Parameters
+pub
- The publication to queryReturns: A string with the publication type information.
+def helicsPublicationGetUnits(pub: HelicsPublication) -> str
+
Get the units of a publication.
+Parameters
+pub
- The publication to query.Returns: A string with the units information.
+def helicsPublicationIsValid(pub: HelicsPublication) -> bool
+
Publication functions. +Functions for publishing data of various kinds. +The data will get translated to the type specified when the publication was constructed automatically regardless of the function used to publish the data. +Check if a publication is valid.
+Parameters
+pub
- The publication to checkReturns: True
if the publication is a valid publication.
def helicsPublicationPublishBoolean(pub: HelicsPublication, value: bool)
+
Publish a Boolean Value.
+Parameters
+pub
- The publication to publish for.value
- The boolean value to publish.def helicsPublicationPublishBytes(pub: HelicsPublication, data: bytes)
+
Publish raw data from a char * and length.
+Parameters
+pub
- The publication to publish for.data
- A pointer to the raw data.def helicsPublicationPublishChar(pub: HelicsPublication, value: str)
+
Publish a single character.
+Parameters
+pub
- The publication to publish for.value
- The numerical value to publish.def helicsPublicationPublishComplex(pub: HelicsPublication, real: float, imag: float = 0)
+
Publish a complex value (or pair of values).
+Parameters
+pub
- The publication to publish for.real
- float
number or complex
numberimag
- float
numberdef helicsPublicationPublishComplexVector(pub: HelicsPublication, vectorInput: List[complex])
+
Publish a vector of complexes.
+Parameters
+pub
- The publication to publish for.vectorInput
- A list of complex data.def helicsPublicationPublishDataBuffer(pub: HelicsPublication, buffer: HelicsDataBuffer)
+
Publish a data buffer.
+Parameters
+pub
- The publication to publish for.buffer
- A HelicsDataBuffer to publish.def helicsPublicationPublishDouble(pub: HelicsPublication, value: float)
+
Publish a double floating point value.
+Parameters
+pub
- The publication to publish for.value
- The numerical value to publish.def helicsPublicationPublishInteger(pub: HelicsPublication, value: int)
+
Publish an integer value.
+Parameters
+pub
- The publication to publish for.value
- The numerical value to publish.def helicsPublicationPublishNamedPoint(pub: HelicsPublication, string: str, value: float)
+
Publish a named point.
+Parameters
+pub
- The publication to publish for.string
- A string for the name to publish.value
- A double for the value to publish.def helicsPublicationPublishRaw(pub: HelicsPublication, data: bytes)
+
Publish raw data from a char * and length.
+Parameters
+pub
- The publication to publish for.data
- A pointer to the raw data.DEPRECATED
+def helicsPublicationPublishString(pub: HelicsPublication, string: str)
+
Publish a string.
+Parameters
+pub
- The publication to publish for.string
- The string to publish.def helicsPublicationPublishTime(pub: HelicsPublication, value: HelicsTime)
+
Publish a time value.
+Parameters
+pub
- The publication to publish for.value
- The numerical value to publish.def helicsPublicationPublishVector(pub: HelicsPublication, vectorInput: List[float])
+
Publish a vector of doubles.
+Parameters
+pub
- The publication to publish for.vectorInput
- A list of double data.def helicsPublicationSetInfo(pub: HelicsPublication, info: str)
+
Set the data in the info field for a publication.
+Parameters
+pub
- The publication to set the info field for.info
- The string to set.def helicsPublicationSetMinimumChange(pub: HelicsPublication, tolerance: float)
+
Set the minimum change detection tolerance.
+Parameters
+pub
- The publication to modify.tolerance
- The tolerance level for publication, values changing less than this value will not be published.def helicsPublicationSetOption(pub: HelicsPublication, option: HelicsHandleOption, value: int)
+
Set the value of an option for a publication.
+Parameters
+pub
- The publication to query.option
- Integer code for the option to set helics.HelicsHandleOption
.value
- The value to set the option to.def helicsPublicationSetTag(pub: HelicsPublication, tagname: str, tagvalue: str)
+
Set the data in a specific tag for a publication.
+pub
: The publication object to set a tag for.
+tagname
: The name of the tag to set.
+tagvalue
: The string value to associate with a tag.
def helicsQueryBrokerExecute(query: HelicsQuery, broker: HelicsBroker) -> JSONType
+
Execute a query directly on a broker. +The call will block until the query finishes which may require communication or other delays.
+Parameters
+query
- The query object to use in the query.broker
- The broker to send the query to.Returns: String that contains the result of the query that was executed.
+def helicsQueryBufferFill(buffer: HelicsQueryBuffer, string: str)
+
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.
+buffer
: The buffer received in a helicsQueryCallback.string
: Pointer to the data to fill the buffer with.def helicsQueryCoreExecute(query: HelicsQuery, core: HelicsCore) -> JSONType
+
Execute a query directly on a core. +The call will block until the query finishes which may require communication or other delays.
+Parameters
+query
- The query object to use in the query.core
- The core to send the query to.Returns: String that contains the result of the query that was executed.
+def helicsQueryExecute(query: HelicsQuery, fed: HelicsFederate) -> JSONType
+
Execute a query. +The call will block until the query finishes which may require communication or other delays.
+Parameters
+query
- The query object to use in the query.fed
- A federate to send the query through.Returns: String that contains the result of the query that was executed.
+def helicsQueryExecuteAsync(query: HelicsQuery, fed: HelicsFederate)
+
Execute a query in a non-blocking call.
+Parameters
+query
- The query object to use in the query.fed
- A federate to send the query through.def helicsQueryExecuteComplete(query: HelicsQuery) -> JSONType
+
Complete the return from a query called with helics.helicsExecuteQueryAsync
.
+The function will block until the query completes isQueryComplete
can be called to determine if a query has completed or not.
Parameters
+query
- The query object to complete execution of.Returns: String that contains the result of the query that was executed.
+def helicsQueryFree(query: HelicsQuery)
+
Free the memory associated with a query object.
+def helicsQueryIsCompleted(query: HelicsQuery) -> bool
+
Check if an asynchronously executed query has completed. +This function should usually be called after a QueryExecuteAsync function has been called.
+Parameters
+query
- The query object to check if completedReturns: Will return True
if an asynchronous query has completed or a regular query call was made with a result, and false if an asynchronous query has not completed or is invalid.
def helicsQuerySetOrdering(query: HelicsQuery, mode: int)
+
Update the ordering mode of the query, fast runs on priority channels, ordered goes on normal channels but goes in sequence
+query
: The query object to change the order for.mode
: 0 for fast, 1 for ordered.def helicsQuerySetQueryString(query: HelicsQuery, query_string: str)
+
Update the queryString of a query.
+Parameters
+query
- The query object to change the target of.query_string
- the new queryString.def helicsQuerySetTarget(query: HelicsQuery, target_name: str)
+
Update the target of a query.
+Parameters
+query
- The query object to change the target of.target_name
- the name of the target to query.def helicsSubscriptionGetKey(ipt: HelicsInput) -> str
+
Get the name of a subscription.
+Parameters
+ipt
- The input to queryReturns: A string with the subscription name.
+DEPRECATED
+def helicsSubscriptionGetTarget(ipt: HelicsInput) -> str
+
Get the target of a subscription.
+Parameters
+ipt
- The input to queryReturns: A string with the subscription target.
+DEPRECATED
+def helicsTranslatorAddDestinationEndpoint(translator: HelicsTranslator, destination: str)
+
Add a destination target to a translator. +All messages coming from a source are copied to the delivery address(es).
+translator
- The given translator.destination
- The name of the translator to add as a source target.def helicsTranslatorAddInputTarget(translator: HelicsTranslator, input: str)
+
Add an input to send a translator output.
+All messages going to a destination are copied to the delivery address(es).
+translator
- The given translator to add a input target to.input
- The name of the endpoint to add as a input target.def helicsTranslatorAddPublicationTarget(translator: HelicsTranslator, publication: str)
+
Add a source publication target to a translator.
+All messages coming from a source are copied to the delivery address(es).
+translator
- The given translator.publication
- The name of the endpoint to add as a publication target.def helicsTranslatorAddSourceEndpoint(translator: HelicsTranslator, source: str)
+
Add a source endpoint target to a translator.
+All messages coming from a source are copied to the delivery address(es).
+trans
- The given translator.def helicsTranslatorGetInfo(translator: HelicsTranslator) -> str
+
Get the data in the info field of an translator.
+Parameters
+translator
- The translator to query.Returns: A string with the info field string.
+def helicsTranslatorGetName(translator: HelicsTranslator) -> str
+
Get the name of a translator.
+Parameters
+translator
- The translator to query.Returns: A string with the name of the translator.
+def helicsTranslatorGetOption(translator: HelicsTranslator, option: HelicsHandleOption) -> int
+
Get the current value of an translator handle option.
+Parameters
+translator
- The translator to query.option
- Integer representation of the option in question see helics.HelicsHandleOption
.Returns: An integer value with the current value of the given option.
+def helicsTranslatorGetTag(translator: HelicsTranslator) -> str
+
Get the data in the tag for an translator.
+Parameters
+translator
- The translator to query.Returns: A string with the info field string.
+def helicsTranslatorIsValid(translator: HelicsTranslator) -> bool
+
Check if a translator is valid.
+translator
The translator object to check.Returns: True if the Translator object represents a valid translator.
+def helicsTranslatorRemoveTarget(translator: HelicsTranslator, target: str)
+
Remove target from translator
+translator
- The given translator.target_name
- The name of the translator to remove.def helicsTranslatorSet(translator: HelicsTranslator, property: str, value: float)
+
Set a property on a translator.
+translator
: The translator to modify.prop
: A string containing the property to set.val
: A numerical value for the property.def helicsTranslatorSetCustomCallback(translator, to_message_call, to_value_call, user_data)
+
Set a general callback for a custom translator.
+Add a pair of custom callbacks for running a translator operation in the C shared library.
+Parameters
+translator
: The translator object to set the callbacks for.to_message_call
: A callback with signature void(HelicsDataBuffer, HelicsMessage, void *); The function arguments are raw Value data, the messageObject to fill out and a pointer to user data.to_value_call
: A callback with signature void(HelicsMessage, HelicsDataBuffer, void *); The function arguments are a message object, the data buffer to fill out and a pointer to user data.user_data
: A pointer to user data that is passed to the functions when executing.def helicsTranslatorSetInfo(translator: HelicsTranslator, info: str)
+
Set the data in the info field for an translator.
+Parameters
+translator
- The translator to query.info
- The string to set.def helicsTranslatorSetOption(translator: HelicsTranslator, option: HelicsHandleOption, value: int)
+
Set an option on an translator.
+Parameters
+translator
- The translator to query.option
- The option to set for the translator helics.HelicsHandleOption
.value
- The value to set the option to.def helicsTranslatorSetString(translator: HelicsTranslator, property: str, value: str)
+
Set string property on a translator.
+Parameters
+translator
- The translator to modifyproperty
: A string containing the property to set.value
: A string value for the property.def helicsTranslatorSetTag(translator: HelicsTranslator, tag: str)
+
Set the data in the tag for an translator.
+Parameters
+translator
- The translator to query.tag
- The string to set.def helicsWrapDataInBuffer(data: bytes, data_capacity: int) -> HelicsDataBuffer
+
Wrap user data in a buffer object
+def loadSym(s)
+
HELICS command line interface
+class Job(name: str, process: subprocess.Popen, file: str)
+
Job(name: str, process: subprocess.Popen, file: str)
+Initialize self. See help(type(self)) for accurate signature.
+class Output(name: str, file: Optional[_io.TextIOWrapper])
+
Output(name: str, file: Optional[_io.TextIOWrapper])
+Initialize self. See help(type(self)) for accurate signature.
+def fetch(url, data={}, method="POST")
+
class Brokers(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class Cores(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class DataGraph(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class FederateEventLogs(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class FederateGraph(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class Federates(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class Inputs(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class MetaData(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class Publications(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class Subscriptions(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
class SystemInfo(**kwargs)
+
The base class of the class hierarchy.
+When called, it accepts no arguments and returns a new featureless +instance that has no instance attributes and cannot be given any.
+sqlalchemy.Base
def as_dict(t)
+
class APIException(self, code, message)
+
Common base class for all non-exit exceptions.
+Initialize self. See help(type(self)) for accurate signature.
+builtins.Exception
code
+message
+class BrokerServer()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
def post(self)
+
class Cores()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class DataTable()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class Database()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
def post(self)
+
class DatabaseManager(self, path_to_helics_db=cache["path"])
+
Initialize self. See help(type(self)) for accurate signature.
+def instaniate(self)
+
class Federates()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class Graph()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class Health()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class Inputs()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class Profile()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
def post(self)
+
class Publications()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class RunnerFile()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
def post(self)
+
class RunnerFileEdit()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def delete(self)
+
def post(self)
+
def put(self)
+
class RunnerFileFolder()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def post(self)
+
class RunnerFileName()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def post(self)
+
class RunnerFilePath()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def post(self)
+
class RunnerKillBroker()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def post(self)
+
class RunnerLog()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self, name)
+
class RunnerRun()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def delete(self)
+
def get(self)
+
def post(self)
+
class RunnerStatus()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
def post(self)
+
class Subscriptions()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
class SystemInfo()
+
Represents an abstract RESTful resource. Concrete resources should
+extend from this class and expose methods for each supported HTTP
+method. If a resource is invoked with an unsupported HTTP method,
+the API will return a response with status 405 Method Not Allowed.
+Otherwise the appropriate method is called and passed all arguments
+from the url rule used when adding the resource to an Api instance. See
+:meth:~flask_restful.Api.add_resource
for details.
flask_restful.Resource
def get(self)
+
def index(path)
+
def run()
+
class HelicsObserverFederate(self, folder=None, core_type="zmq")
+
HelicsObserverFederate
+Initialize self. See help(type(self)) for accurate signature.
+brokers
+federates
+inputs
+publications
+subscriptions
+def get_data(self)
+
def hook(self)
+
def run(self)
+
def wait(self)
+
class CheckStatusThread(self, process_list, should_kill, helics_server_available)
+
A class that represents a thread of control.
+This class can be safely subclassed in a limited fashion. There are two ways +to specify the activity: by passing a callable object to the constructor, or +by overriding the run() method in a subclass.
+This constructor should always be called with keyword arguments. Arguments are:
+group should be None; reserved for future extension when a ThreadGroup +class is implemented.
+target is the callable object to be invoked by the run() +method. Defaults to None, meaning nothing is called.
+name is the thread name. By default, a unique name is constructed of +the form “Thread-N” where N is a small decimal number.
+args is a list or tuple of arguments for the target invocation. Defaults to ().
+kwargs is a dictionary of keyword arguments for the target +invocation. Defaults to {}.
+If a subclass overrides the constructor, it must make sure to invoke +the base class constructor (Thread.init()) before doing anything +else to the thread.
+threading.Thread
This must be set before start() is called, otherwise RuntimeError is +raised. Its initial value is inherited from the creating thread; the +main thread is not a daemon thread and therefore all threads created in +the main thread default to daemon = False.
+The entire Python program exits when only daemon threads are left.
+This is a nonzero integer. See the get_ident() function. Thread +identifiers may be recycled when a thread exits and another thread is +created. The identifier is available even after the thread has exited.
+It has no semantics. Multiple threads may be given the same name. The +initial name is set by the constructor.
+This is a non-negative integer. See the get_native_id() function. +This represents the Thread ID as reported by the kernel.
+def run(self)
+
Method representing the thread’s activity.
+You may override this method in a subclass. The standard run() method +invokes the callable object passed to the object’s constructor as the +target argument, if any, with sequential and keyword arguments taken +from the args and kwargs arguments, respectively.
+def status(self, p)
+
class HELICSRuntimeError(self, *args, **kwargs)
+
Unspecified run-time error.
+builtins.RuntimeError
class VcRedist(self, version="2015", arch="amd64")
+
Initialize self. See help(type(self)) for accurate signature.
+def download_and_run(self)
+
def download_file(url, filepath)
+
Download the file from url and store it in the given filepath.
+def filename_from_url(url)
+
Return the filename from a given url.
+ + + + + + + + + + + + + + + + +