From ab655095982f5c9914229e2366c4d6d338452eb1 Mon Sep 17 00:00:00 2001 From: GitHub Date: Fri, 20 Jan 2023 18:42:49 +0000 Subject: [PATCH] Automated update to generated interface files --- .../java/interface/HelicsCoreFlags.java | 3 +- .../java/interface/HelicsCoreTypes.java | 18 +- .../java/interface/HelicsDataTypes.java | 6 +- .../java/interface/HelicsErrorTypes.java | 14 +- .../java/interface/HelicsFederateFlags.java | 57 +- .../java/interface/HelicsFederateState.java | 5 +- .../java/interface/HelicsFilterTypes.java | 9 +- interfaces/java/interface/HelicsFlags.java | 21 +- .../java/interface/HelicsHandleOptions.java | 30 +- .../interface/HelicsIterationRequest.java | 10 +- .../java/interface/HelicsLogLevels.java | 2 +- .../java/interface/HelicsMultiInputModes.java | 5 +- .../java/interface/HelicsProperties.java | 39 +- .../java/interface/HelicsTranslatorTypes.java | 67 + ...PE_p_f_double_double_int_p_void__void.java | 26 + ...HelicsIterationRequest_p_void__double.java | 26 + .../SWIGTYPE_p_f_double_p_void__double.java | 26 + ..._p_f_int_p_q_const__char_p_void__void.java | 26 + .../SWIGTYPE_p_f_int_p_void__void.java | 26 + ...PE_p_f_p_void__HelicsIterationRequest.java | 26 + .../interface/SWIGTYPE_p_f_p_void__void.java | 26 + interfaces/java/interface/helics.java | 1125 +- interfaces/java/interface/helicsJNI.java | 107 +- interfaces/java/interface/helicsJava.c | 10543 ++++++++++------ .../shared_api_library/backup/helics/helics.h | 50 +- .../backup/helics/helics_api.h | 2 + 26 files changed, 8017 insertions(+), 4278 deletions(-) create mode 100644 interfaces/java/interface/HelicsTranslatorTypes.java create mode 100644 interfaces/java/interface/SWIGTYPE_p_f_double_double_int_p_void__void.java create mode 100644 interfaces/java/interface/SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double.java create mode 100644 interfaces/java/interface/SWIGTYPE_p_f_double_p_void__double.java create mode 100644 interfaces/java/interface/SWIGTYPE_p_f_int_p_q_const__char_p_void__void.java create mode 100644 interfaces/java/interface/SWIGTYPE_p_f_int_p_void__void.java create mode 100644 interfaces/java/interface/SWIGTYPE_p_f_p_void__HelicsIterationRequest.java create mode 100644 interfaces/java/interface/SWIGTYPE_p_f_p_void__void.java diff --git a/interfaces/java/interface/HelicsCoreFlags.java b/interfaces/java/interface/HelicsCoreFlags.java index 8f6942e7bc..7f0d992a10 100644 --- a/interfaces/java/interface/HelicsCoreFlags.java +++ b/interfaces/java/interface/HelicsCoreFlags.java @@ -13,7 +13,8 @@ */ public final class HelicsCoreFlags { /** - * used to delay a core from entering initialization mode even if it would otherwise be ready + * used to delay a core from entering initialization mode even if it would otherwise
+ * be ready */ public final static HelicsCoreFlags HELICS_FLAG_DELAY_INIT_ENTRY = new HelicsCoreFlags("HELICS_FLAG_DELAY_INIT_ENTRY", helicsJNI.HELICS_FLAG_DELAY_INIT_ENTRY_get()); /** diff --git a/interfaces/java/interface/HelicsCoreTypes.java b/interfaces/java/interface/HelicsCoreTypes.java index 0b727e5022..e3f0cf25d5 100644 --- a/interfaces/java/interface/HelicsCoreTypes.java +++ b/interfaces/java/interface/HelicsCoreTypes.java @@ -29,13 +29,14 @@ public final class HelicsCoreTypes { */ public final static HelicsCoreTypes HELICS_CORE_TYPE_TEST = new HelicsCoreTypes("HELICS_CORE_TYPE_TEST", helicsJNI.HELICS_CORE_TYPE_TEST_get()); /** - * interprocess uses memory mapped files to transfer data (for use when all federates are
- * on the same machine + * interprocess uses memory mapped files to transfer data (for use when all
+ * federates are on the same machine */ public final static HelicsCoreTypes HELICS_CORE_TYPE_INTERPROCESS = new HelicsCoreTypes("HELICS_CORE_TYPE_INTERPROCESS", helicsJNI.HELICS_CORE_TYPE_INTERPROCESS_get()); /** - * interprocess uses memory mapped files to transfer data (for use when all federates are
- * on the same machine ipc is the same as /ref HELICS_CORE_TYPE_interprocess + * interprocess uses memory mapped files to transfer data (for use when all
+ * federates are on the same machine ipc is the same as /ref
+ * HELICS_CORE_TYPE_interprocess */ public final static HelicsCoreTypes HELICS_CORE_TYPE_IPC = new HelicsCoreTypes("HELICS_CORE_TYPE_IPC", helicsJNI.HELICS_CORE_TYPE_IPC_get()); /** @@ -68,17 +69,18 @@ public final class HelicsCoreTypes { public final static HelicsCoreTypes HELICS_CORE_TYPE_WEBSOCKET = new HelicsCoreTypes("HELICS_CORE_TYPE_WEBSOCKET", helicsJNI.HELICS_CORE_TYPE_WEBSOCKET_get()); /** * an in process core type for handling communications in shared
- * memory it is pretty similar to the test core but stripped from
- * the "test" components + * memory it is pretty similar to the test core but
+ * stripped from the "test" components */ public final static HelicsCoreTypes HELICS_CORE_TYPE_INPROC = new HelicsCoreTypes("HELICS_CORE_TYPE_INPROC", helicsJNI.HELICS_CORE_TYPE_INPROC_get()); /** * an explicit core type that is recognized but explicitly doesn't
- * exist, for testing and a few other assorted reasons + * exist, for testing and a few other assorted reasons */ public final static HelicsCoreTypes HELICS_CORE_TYPE_NULL = new HelicsCoreTypes("HELICS_CORE_TYPE_NULL", helicsJNI.HELICS_CORE_TYPE_NULL_get()); /** - * an explicit core type exists but does nothing but return empty values or sink calls + * an explicit core type exists but does nothing but return empty values or sink
+ * calls */ public final static HelicsCoreTypes HELICS_CORE_TYPE_EMPTY = new HelicsCoreTypes("HELICS_CORE_TYPE_EMPTY", helicsJNI.HELICS_CORE_TYPE_EMPTY_get()); diff --git a/interfaces/java/interface/HelicsDataTypes.java b/interfaces/java/interface/HelicsDataTypes.java index 07f483296d..fc0040872f 100644 --- a/interfaces/java/interface/HelicsDataTypes.java +++ b/interfaces/java/interface/HelicsDataTypes.java @@ -49,6 +49,10 @@ public final class HelicsDataTypes { * time data type */ public final static HelicsDataTypes HELICS_DATA_TYPE_TIME = new HelicsDataTypes("HELICS_DATA_TYPE_TIME", helicsJNI.HELICS_DATA_TYPE_TIME_get()); + /** + * data type for a single character + */ + public final static HelicsDataTypes HELICS_DATA_TYPE_CHAR = new HelicsDataTypes("HELICS_DATA_TYPE_CHAR", helicsJNI.HELICS_DATA_TYPE_CHAR_get()); /** * raw data type */ @@ -100,7 +104,7 @@ private HelicsDataTypes(String swigName, HelicsDataTypes swigEnum) { swigNext = this.swigValue+1; } - private static HelicsDataTypes[] swigValues = { HELICS_DATA_TYPE_UNKNOWN, HELICS_DATA_TYPE_STRING, HELICS_DATA_TYPE_DOUBLE, HELICS_DATA_TYPE_INT, HELICS_DATA_TYPE_COMPLEX, HELICS_DATA_TYPE_VECTOR, HELICS_DATA_TYPE_COMPLEX_VECTOR, HELICS_DATA_TYPE_NAMED_POINT, HELICS_DATA_TYPE_BOOLEAN, HELICS_DATA_TYPE_TIME, HELICS_DATA_TYPE_RAW, HELICS_DATA_TYPE_JSON, HELICS_DATA_TYPE_MULTI, HELICS_DATA_TYPE_ANY }; + private static HelicsDataTypes[] swigValues = { HELICS_DATA_TYPE_UNKNOWN, HELICS_DATA_TYPE_STRING, HELICS_DATA_TYPE_DOUBLE, HELICS_DATA_TYPE_INT, HELICS_DATA_TYPE_COMPLEX, HELICS_DATA_TYPE_VECTOR, HELICS_DATA_TYPE_COMPLEX_VECTOR, HELICS_DATA_TYPE_NAMED_POINT, HELICS_DATA_TYPE_BOOLEAN, HELICS_DATA_TYPE_TIME, HELICS_DATA_TYPE_CHAR, HELICS_DATA_TYPE_RAW, HELICS_DATA_TYPE_JSON, HELICS_DATA_TYPE_MULTI, HELICS_DATA_TYPE_ANY }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsErrorTypes.java b/interfaces/java/interface/HelicsErrorTypes.java index efe1be08e2..083e55846f 100644 --- a/interfaces/java/interface/HelicsErrorTypes.java +++ b/interfaces/java/interface/HelicsErrorTypes.java @@ -28,10 +28,6 @@ public final class HelicsErrorTypes { * user code generated exception */ public final static HelicsErrorTypes HELICS_USER_EXCEPTION = new HelicsErrorTypes("HELICS_USER_EXCEPTION", helicsJNI.HELICS_USER_EXCEPTION_get()); - /** - * user system abort - */ - public final static HelicsErrorTypes HELICS_ERROR_USER_ABORT = new HelicsErrorTypes("HELICS_ERROR_USER_ABORT", helicsJNI.HELICS_ERROR_USER_ABORT_get()); /** * insufficient space is available to store requested data */ @@ -80,6 +76,14 @@ public final class HelicsErrorTypes { * the function executed successfully */ public final static HelicsErrorTypes HELICS_OK = new HelicsErrorTypes("HELICS_OK", helicsJNI.HELICS_OK_get()); + /** + * user system abort to match typical SIGINT value + */ + public final static HelicsErrorTypes HELICS_ERROR_USER_ABORT = new HelicsErrorTypes("HELICS_ERROR_USER_ABORT", helicsJNI.HELICS_ERROR_USER_ABORT_get()); + /** + * force termination to match typical SIGKILL value + */ + public final static HelicsErrorTypes HELICS_ERROR_TERMINATED = new HelicsErrorTypes("HELICS_ERROR_TERMINATED", helicsJNI.HELICS_ERROR_TERMINATED_get()); public final int swigValue() { return swigValue; @@ -115,7 +119,7 @@ private HelicsErrorTypes(String swigName, HelicsErrorTypes swigEnum) { swigNext = this.swigValue+1; } - private static HelicsErrorTypes[] swigValues = { HELICS_ERROR_FATAL, HELICS_ERROR_EXTERNAL_TYPE, HELICS_ERROR_OTHER, HELICS_USER_EXCEPTION, HELICS_ERROR_USER_ABORT, HELICS_ERROR_INSUFFICIENT_SPACE, HELICS_ERROR_EXECUTION_FAILURE, HELICS_ERROR_INVALID_FUNCTION_CALL, HELICS_ERROR_INVALID_STATE_TRANSITION, HELICS_WARNING, HELICS_ERROR_SYSTEM_FAILURE, HELICS_ERROR_DISCARD, HELICS_ERROR_INVALID_ARGUMENT, HELICS_ERROR_INVALID_OBJECT, HELICS_ERROR_CONNECTION_FAILURE, HELICS_ERROR_REGISTRATION_FAILURE, HELICS_OK }; + private static HelicsErrorTypes[] swigValues = { HELICS_ERROR_FATAL, HELICS_ERROR_EXTERNAL_TYPE, HELICS_ERROR_OTHER, HELICS_USER_EXCEPTION, HELICS_ERROR_INSUFFICIENT_SPACE, HELICS_ERROR_EXECUTION_FAILURE, HELICS_ERROR_INVALID_FUNCTION_CALL, HELICS_ERROR_INVALID_STATE_TRANSITION, HELICS_WARNING, HELICS_ERROR_SYSTEM_FAILURE, HELICS_ERROR_DISCARD, HELICS_ERROR_INVALID_ARGUMENT, HELICS_ERROR_INVALID_OBJECT, HELICS_ERROR_CONNECTION_FAILURE, HELICS_ERROR_REGISTRATION_FAILURE, HELICS_OK, HELICS_ERROR_USER_ABORT, HELICS_ERROR_TERMINATED }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsFederateFlags.java b/interfaces/java/interface/HelicsFederateFlags.java index 18d58c8106..baab546545 100644 --- a/interfaces/java/interface/HelicsFederateFlags.java +++ b/interfaces/java/interface/HelicsFederateFlags.java @@ -9,7 +9,7 @@ package com.java.helics; /** - * single character data type this is intentionally the same as string enumeration of possible federate flags + * enumeration of possible federate flags */ public final class HelicsFederateFlags { /** @@ -29,25 +29,25 @@ public final class HelicsFederateFlags { */ public final static HelicsFederateFlags HELICS_FLAG_SOURCE_ONLY = new HelicsFederateFlags("HELICS_FLAG_SOURCE_ONLY", helicsJNI.HELICS_FLAG_SOURCE_ONLY_get()); /** - * flag indicating a federate/interface should only transmit values if they have changed(binary
- * equivalence) + * flag indicating a federate/interface should only transmit values if they have
+ * changed(binary equivalence) */ public final static HelicsFederateFlags HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE = new HelicsFederateFlags("HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE", helicsJNI.HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE_get()); /** - * flag indicating a federate/interface should only trigger an update if a value has changed
- * (binary equivalence) + * flag indicating a federate/interface should only trigger an update if a value has
+ * changed (binary equivalence) */ public final static HelicsFederateFlags HELICS_FLAG_ONLY_UPDATE_ON_CHANGE = new HelicsFederateFlags("HELICS_FLAG_ONLY_UPDATE_ON_CHANGE", helicsJNI.HELICS_FLAG_ONLY_UPDATE_ON_CHANGE_get()); /** - * flag indicating a federate should only grant time if all other federates have already passed
- * the requested time + * flag indicating a federate should only grant time if all other federates have
+ * already passed the requested time */ public final static HelicsFederateFlags HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE = new HelicsFederateFlags("HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE", helicsJNI.HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE_get()); /** - * flag indicating a federate should operate on a restrictive time policy, which disallows some
- * 2nd order time evaluation and can be useful for certain types of dependency cycles
- * and update patterns, but generally shouldn't be used as it can lead to some very slow update
- * conditions + * flag indicating a federate should operate on a restrictive time policy, which
+ * disallows some 2nd order time evaluation and can be useful for certain types of
+ * dependency cycles and update patterns, but generally shouldn't be used as it can
+ * lead to some very slow update conditions */ public final static HelicsFederateFlags HELICS_FLAG_RESTRICTIVE_TIME_POLICY = new HelicsFederateFlags("HELICS_FLAG_RESTRICTIVE_TIME_POLICY", helicsJNI.HELICS_FLAG_RESTRICTIVE_TIME_POLICY_get()); /** @@ -55,7 +55,8 @@ public final class HelicsFederateFlags { */ public final static HelicsFederateFlags HELICS_FLAG_ROLLBACK = new HelicsFederateFlags("HELICS_FLAG_ROLLBACK", helicsJNI.HELICS_FLAG_ROLLBACK_get()); /** - * flag indicating that a federate performs forward computation and does internal rollback + * flag indicating that a federate performs forward computation and does internal
+ * rollback */ public final static HelicsFederateFlags HELICS_FLAG_FORWARD_COMPUTE = new HelicsFederateFlags("HELICS_FLAG_FORWARD_COMPUTE", helicsJNI.HELICS_FLAG_FORWARD_COMPUTE_get()); /** @@ -66,13 +67,21 @@ public final class HelicsFederateFlags { * flag indicating that the federate will only interact on a single thread */ public final static HelicsFederateFlags HELICS_FLAG_SINGLE_THREAD_FEDERATE = new HelicsFederateFlags("HELICS_FLAG_SINGLE_THREAD_FEDERATE", helicsJNI.HELICS_FLAG_SINGLE_THREAD_FEDERATE_get()); + /** + * flag indicating use of a thread safe core + */ + public final static HelicsFederateFlags HELICS_FLAG_MULTI_THREAD_CORE = new HelicsFederateFlags("HELICS_FLAG_MULTI_THREAD_CORE", helicsJNI.HELICS_FLAG_MULTI_THREAD_CORE_get()); + /** + * flag indicating use of a single threaded core + */ + public final static HelicsFederateFlags HELICS_FLAG_SINGLE_THREAD_CORE = new HelicsFederateFlags("HELICS_FLAG_SINGLE_THREAD_CORE", helicsJNI.HELICS_FLAG_SINGLE_THREAD_CORE_get()); /** * used to not display warnings on mismatched requested times */ public final static HelicsFederateFlags HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS = new HelicsFederateFlags("HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS", helicsJNI.HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS_get()); /** - * specify that checking on configuration files should be strict and throw and error on any
- * invalid values + * specify that checking on configuration files should be strict and throw and error
+ * on any invalid values */ public final static HelicsFederateFlags HELICS_FLAG_STRICT_CONFIG_CHECKING = new HelicsFederateFlags("HELICS_FLAG_STRICT_CONFIG_CHECKING", helicsJNI.HELICS_FLAG_STRICT_CONFIG_CHECKING_get()); /** @@ -80,15 +89,25 @@ public final class HelicsFederateFlags { */ public final static HelicsFederateFlags HELICS_FLAG_USE_JSON_SERIALIZATION = new HelicsFederateFlags("HELICS_FLAG_USE_JSON_SERIALIZATION", helicsJNI.HELICS_FLAG_USE_JSON_SERIALIZATION_get()); /** - * specify that the federate is event triggered-meaning (all/most) events are triggered by
- * incoming events + * specify that the federate is event triggered-meaning (all/most) events are
+ * triggered by incoming events */ public final static HelicsFederateFlags HELICS_FLAG_EVENT_TRIGGERED = new HelicsFederateFlags("HELICS_FLAG_EVENT_TRIGGERED", helicsJNI.HELICS_FLAG_EVENT_TRIGGERED_get()); /** - * specify that that federate should capture the profiling data to the local federate logging
- * system + * specify that that federate should capture the profiling data to the local
+ * federate logging system */ public final static HelicsFederateFlags HELICS_FLAG_LOCAL_PROFILING_CAPTURE = new HelicsFederateFlags("HELICS_FLAG_LOCAL_PROFILING_CAPTURE", helicsJNI.HELICS_FLAG_LOCAL_PROFILING_CAPTURE_get()); + /** + * specify that the federate is a callback based federate using callbacks for
+ * execution + */ + public final static HelicsFederateFlags HELICS_FLAG_CALLBACK_FEDERATE = new HelicsFederateFlags("HELICS_FLAG_CALLBACK_FEDERATE", helicsJNI.HELICS_FLAG_CALLBACK_FEDERATE_get()); + /** + * specify that a federate should automatically call timeRequest on completion of
+ * current request + */ + public final static HelicsFederateFlags HELICS_FLAG_AUTOMATED_TIME_REQUEST = new HelicsFederateFlags("HELICS_FLAG_AUTOMATED_TIME_REQUEST", helicsJNI.HELICS_FLAG_AUTOMATED_TIME_REQUEST_get()); public final int swigValue() { return swigValue; @@ -124,7 +143,7 @@ private HelicsFederateFlags(String swigName, HelicsFederateFlags swigEnum) { swigNext = this.swigValue+1; } - private static HelicsFederateFlags[] swigValues = { HELICS_FLAG_OBSERVER, HELICS_FLAG_UNINTERRUPTIBLE, HELICS_FLAG_INTERRUPTIBLE, HELICS_FLAG_SOURCE_ONLY, HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE, HELICS_FLAG_ONLY_UPDATE_ON_CHANGE, HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE, HELICS_FLAG_RESTRICTIVE_TIME_POLICY, HELICS_FLAG_ROLLBACK, HELICS_FLAG_FORWARD_COMPUTE, HELICS_FLAG_REALTIME, HELICS_FLAG_SINGLE_THREAD_FEDERATE, HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS, HELICS_FLAG_STRICT_CONFIG_CHECKING, HELICS_FLAG_USE_JSON_SERIALIZATION, HELICS_FLAG_EVENT_TRIGGERED, HELICS_FLAG_LOCAL_PROFILING_CAPTURE }; + private static HelicsFederateFlags[] swigValues = { HELICS_FLAG_OBSERVER, HELICS_FLAG_UNINTERRUPTIBLE, HELICS_FLAG_INTERRUPTIBLE, HELICS_FLAG_SOURCE_ONLY, HELICS_FLAG_ONLY_TRANSMIT_ON_CHANGE, HELICS_FLAG_ONLY_UPDATE_ON_CHANGE, HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE, HELICS_FLAG_RESTRICTIVE_TIME_POLICY, HELICS_FLAG_ROLLBACK, HELICS_FLAG_FORWARD_COMPUTE, HELICS_FLAG_REALTIME, HELICS_FLAG_SINGLE_THREAD_FEDERATE, HELICS_FLAG_MULTI_THREAD_CORE, HELICS_FLAG_SINGLE_THREAD_CORE, HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS, HELICS_FLAG_STRICT_CONFIG_CHECKING, HELICS_FLAG_USE_JSON_SERIALIZATION, HELICS_FLAG_EVENT_TRIGGERED, HELICS_FLAG_LOCAL_PROFILING_CAPTURE, HELICS_FLAG_CALLBACK_FEDERATE, HELICS_FLAG_AUTOMATED_TIME_REQUEST }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsFederateState.java b/interfaces/java/interface/HelicsFederateState.java index e7ee293e63..7aada7e0b6 100644 --- a/interfaces/java/interface/HelicsFederateState.java +++ b/interfaces/java/interface/HelicsFederateState.java @@ -12,8 +12,9 @@ * enumeration of possible federate states */ public final class HelicsFederateState { + public final static HelicsFederateState HELICS_STATE_UNKNOWN = new HelicsFederateState("HELICS_STATE_UNKNOWN", helicsJNI.HELICS_STATE_UNKNOWN_get()); /** - * when created the federate is in startup state + * used when no information is available about the federate state when created the federate is in startup state */ public final static HelicsFederateState HELICS_STATE_STARTUP = new HelicsFederateState("HELICS_STATE_STARTUP", helicsJNI.HELICS_STATE_STARTUP_get()); /** @@ -91,7 +92,7 @@ private HelicsFederateState(String swigName, HelicsFederateState swigEnum) { swigNext = this.swigValue+1; } - private static HelicsFederateState[] swigValues = { HELICS_STATE_STARTUP, HELICS_STATE_INITIALIZATION, HELICS_STATE_EXECUTION, HELICS_STATE_FINALIZE, HELICS_STATE_ERROR, HELICS_STATE_PENDING_INIT, HELICS_STATE_PENDING_EXEC, HELICS_STATE_PENDING_TIME, HELICS_STATE_PENDING_ITERATIVE_TIME, HELICS_STATE_PENDING_FINALIZE, HELICS_STATE_FINISHED }; + private static HelicsFederateState[] swigValues = { HELICS_STATE_UNKNOWN, HELICS_STATE_STARTUP, HELICS_STATE_INITIALIZATION, HELICS_STATE_EXECUTION, HELICS_STATE_FINALIZE, HELICS_STATE_ERROR, HELICS_STATE_PENDING_INIT, HELICS_STATE_PENDING_EXEC, HELICS_STATE_PENDING_TIME, HELICS_STATE_PENDING_ITERATIVE_TIME, HELICS_STATE_PENDING_FINALIZE, HELICS_STATE_FINISHED }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsFilterTypes.java b/interfaces/java/interface/HelicsFilterTypes.java index 1537b20187..358f23fa01 100644 --- a/interfaces/java/interface/HelicsFilterTypes.java +++ b/interfaces/java/interface/HelicsFilterTypes.java @@ -30,16 +30,17 @@ public final class HelicsFilterTypes { public final static HelicsFilterTypes HELICS_FILTER_TYPE_RANDOM_DROP = new HelicsFilterTypes("HELICS_FILTER_TYPE_RANDOM_DROP", helicsJNI.HELICS_FILTER_TYPE_RANDOM_DROP_get()); /** * a filter type that reroutes a message to a different destination than originally
- * specified + * specified */ public final static HelicsFilterTypes HELICS_FILTER_TYPE_REROUTE = new HelicsFilterTypes("HELICS_FILTER_TYPE_REROUTE", helicsJNI.HELICS_FILTER_TYPE_REROUTE_get()); /** - * a filter type that duplicates a message and sends the copy to a different destination + * a filter type that duplicates a message and sends the copy to a different
+ * destination */ public final static HelicsFilterTypes HELICS_FILTER_TYPE_CLONE = new HelicsFilterTypes("HELICS_FILTER_TYPE_CLONE", helicsJNI.HELICS_FILTER_TYPE_CLONE_get()); /** - * a customizable filter type that can perform different actions on a message based on
- * firewall like rules + * a customizable filter type that can perform different actions on a message based
+ * on firewall like rules */ public final static HelicsFilterTypes HELICS_FILTER_TYPE_FIREWALL = new HelicsFilterTypes("HELICS_FILTER_TYPE_FIREWALL", helicsJNI.HELICS_FILTER_TYPE_FIREWALL_get()); diff --git a/interfaces/java/interface/HelicsFlags.java b/interfaces/java/interface/HelicsFlags.java index d1b78d6557..0e5c0e6892 100644 --- a/interfaces/java/interface/HelicsFlags.java +++ b/interfaces/java/interface/HelicsFlags.java @@ -14,13 +14,14 @@ public final class HelicsFlags { /** * flag specifying that a federate, core, or broker may be slow to respond to pings
- * If the federate goes offline there is no good way to detect it so use with caution + * If the federate goes offline there is no good way to detect it so use with
+ * caution */ public final static HelicsFlags HELICS_FLAG_SLOW_RESPONDING = new HelicsFlags("HELICS_FLAG_SLOW_RESPONDING", helicsJNI.HELICS_FLAG_SLOW_RESPONDING_get()); /** - * flag specifying the federate/core/broker is operating in a user debug mode so deadlock
- * timers and timeout are disabled this flag is a combination of slow_responding and disabling of
- * some timeouts + * flag specifying the federate/core/broker is operating in a user debug mode so
+ * deadlock timers and timeout are disabled this flag is a combination of
+ * slow_responding and disabling of some timeouts */ public final static HelicsFlags HELICS_FLAG_DEBUGGING = new HelicsFlags("HELICS_FLAG_DEBUGGING", helicsJNI.HELICS_FLAG_DEBUGGING_get()); /** @@ -43,6 +44,16 @@ public final class HelicsFlags { * flag trigger for generating a profiling marker */ public final static HelicsFlags HELICS_FLAG_PROFILING_MARKER = new HelicsFlags("HELICS_FLAG_PROFILING_MARKER", helicsJNI.HELICS_FLAG_PROFILING_MARKER_get()); + /** + * specify that the federate/core/broker should allow some remote control operations
+ * such as finalize + */ + public final static HelicsFlags HELICS_FLAG_ALLOW_REMOTE_CONTROL = new HelicsFlags("HELICS_FLAG_ALLOW_REMOTE_CONTROL", helicsJNI.HELICS_FLAG_ALLOW_REMOTE_CONTROL_get()); + /** + * specify that the federate/core/broker should *NOT* allow some remote control
+ * operations such as finalize + */ + public final static HelicsFlags HELICS_FLAG_DISABLE_REMOTE_CONTROL = new HelicsFlags("HELICS_FLAG_DISABLE_REMOTE_CONTROL", helicsJNI.HELICS_FLAG_DISABLE_REMOTE_CONTROL_get()); public final int swigValue() { return swigValue; @@ -78,7 +89,7 @@ private HelicsFlags(String swigName, HelicsFlags swigEnum) { swigNext = this.swigValue+1; } - private static HelicsFlags[] swigValues = { HELICS_FLAG_SLOW_RESPONDING, HELICS_FLAG_DEBUGGING, HELICS_FLAG_TERMINATE_ON_ERROR, HELICS_FLAG_FORCE_LOGGING_FLUSH, HELICS_FLAG_DUMPLOG, HELICS_FLAG_PROFILING, HELICS_FLAG_PROFILING_MARKER }; + private static HelicsFlags[] swigValues = { HELICS_FLAG_SLOW_RESPONDING, HELICS_FLAG_DEBUGGING, HELICS_FLAG_TERMINATE_ON_ERROR, HELICS_FLAG_FORCE_LOGGING_FLUSH, HELICS_FLAG_DUMPLOG, HELICS_FLAG_PROFILING, HELICS_FLAG_PROFILING_MARKER, HELICS_FLAG_ALLOW_REMOTE_CONTROL, HELICS_FLAG_DISABLE_REMOTE_CONTROL }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsHandleOptions.java b/interfaces/java/interface/HelicsHandleOptions.java index 1d35c15cdb..84ecd31370 100644 --- a/interfaces/java/interface/HelicsHandleOptions.java +++ b/interfaces/java/interface/HelicsHandleOptions.java @@ -13,13 +13,13 @@ */ public final class HelicsHandleOptions { /** - * specify that a connection is required for an interface and will generate an error if not
- * available + * specify that a connection is required for an interface and will generate an error
+ * if not available */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_CONNECTION_REQUIRED = new HelicsHandleOptions("HELICS_HANDLE_OPTION_CONNECTION_REQUIRED", helicsJNI.HELICS_HANDLE_OPTION_CONNECTION_REQUIRED_get()); /** - * specify that a connection is NOT required for an interface and will only be made if
- * available no warning will be issues if not available + * specify that a connection is NOT required for an interface and will only be made
+ * if available no warning will be issues if not available */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL = new HelicsHandleOptions("HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL", helicsJNI.HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL_get()); /** @@ -31,20 +31,29 @@ public final class HelicsHandleOptions { */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED = new HelicsHandleOptions("HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED", helicsJNI.HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED_get()); /** - * specify that the last data should be buffered and sent on subscriptions after init + * specify that the last data should be buffered and sent on subscriptions after
+ * init */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_BUFFER_DATA = new HelicsHandleOptions("HELICS_HANDLE_OPTION_BUFFER_DATA", helicsJNI.HELICS_HANDLE_OPTION_BUFFER_DATA_get()); /** * specify that the types should be checked strictly for pub/sub and filters */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING = new HelicsHandleOptions("HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING", helicsJNI.HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING_get()); + /** + * specify that the handle is receive only + */ + public final static HelicsHandleOptions HELICS_HANDLE_OPTION_RECEIVE_ONLY = new HelicsHandleOptions("HELICS_HANDLE_OPTION_RECEIVE_ONLY", helicsJNI.HELICS_HANDLE_OPTION_RECEIVE_ONLY_get()); + /** + * specify that the handle is source only + */ + public final static HelicsHandleOptions HELICS_HANDLE_OPTION_SOURCE_ONLY = new HelicsHandleOptions("HELICS_HANDLE_OPTION_SOURCE_ONLY", helicsJNI.HELICS_HANDLE_OPTION_SOURCE_ONLY_get()); /** * specify that the mismatching units should be ignored */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH = new HelicsHandleOptions("HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH", helicsJNI.HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH_get()); /** * specify that an interface will only transmit on change(only applicable to
- * publications) + * publications) */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE = new HelicsHandleOptions("HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE", helicsJNI.HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE_get()); /** @@ -68,9 +77,14 @@ public final class HelicsHandleOptions { */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST = new HelicsHandleOptions("HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST", helicsJNI.HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST_get()); /** - * specify the required number of connections or get the actual number of connections + * specify the required number of connections or get the actual number of
+ * connections */ public final static HelicsHandleOptions HELICS_HANDLE_OPTION_CONNECTIONS = new HelicsHandleOptions("HELICS_HANDLE_OPTION_CONNECTIONS", helicsJNI.HELICS_HANDLE_OPTION_CONNECTIONS_get()); + /** + * specify that the interface only sends or receives data at specified intervals + */ + public final static HelicsHandleOptions HELICS_HANDLE_OPTION_TIME_RESTRICTED = new HelicsHandleOptions("HELICS_HANDLE_OPTION_TIME_RESTRICTED", helicsJNI.HELICS_HANDLE_OPTION_TIME_RESTRICTED_get()); public final int swigValue() { return swigValue; @@ -106,7 +120,7 @@ private HelicsHandleOptions(String swigName, HelicsHandleOptions swigEnum) { swigNext = this.swigValue+1; } - private static HelicsHandleOptions[] swigValues = { HELICS_HANDLE_OPTION_CONNECTION_REQUIRED, HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL, HELICS_HANDLE_OPTION_SINGLE_CONNECTION_ONLY, HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED, HELICS_HANDLE_OPTION_BUFFER_DATA, HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING, HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH, HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE, HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE, HELICS_HANDLE_OPTION_IGNORE_INTERRUPTS, HELICS_HANDLE_OPTION_MULTI_INPUT_HANDLING_METHOD, HELICS_HANDLE_OPTION_INPUT_PRIORITY_LOCATION, HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST, HELICS_HANDLE_OPTION_CONNECTIONS }; + private static HelicsHandleOptions[] swigValues = { HELICS_HANDLE_OPTION_CONNECTION_REQUIRED, HELICS_HANDLE_OPTION_CONNECTION_OPTIONAL, HELICS_HANDLE_OPTION_SINGLE_CONNECTION_ONLY, HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED, HELICS_HANDLE_OPTION_BUFFER_DATA, HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING, HELICS_HANDLE_OPTION_RECEIVE_ONLY, HELICS_HANDLE_OPTION_SOURCE_ONLY, HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH, HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE, HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE, HELICS_HANDLE_OPTION_IGNORE_INTERRUPTS, HELICS_HANDLE_OPTION_MULTI_INPUT_HANDLING_METHOD, HELICS_HANDLE_OPTION_INPUT_PRIORITY_LOCATION, HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST, HELICS_HANDLE_OPTION_CONNECTIONS, HELICS_HANDLE_OPTION_TIME_RESTRICTED }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsIterationRequest.java b/interfaces/java/interface/HelicsIterationRequest.java index 6e3569757b..6c1dc7a18d 100644 --- a/interfaces/java/interface/HelicsIterationRequest.java +++ b/interfaces/java/interface/HelicsIterationRequest.java @@ -24,6 +24,14 @@ public final class HelicsIterationRequest { * only return an iteration if necessary */ public final static HelicsIterationRequest HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED = new HelicsIterationRequest("HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED", helicsJNI.HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED_get()); + /** + * halt the federate + */ + public final static HelicsIterationRequest HELICS_ITERATION_REQUEST_HALT_OPERATIONS = new HelicsIterationRequest("HELICS_ITERATION_REQUEST_HALT_OPERATIONS", helicsJNI.HELICS_ITERATION_REQUEST_HALT_OPERATIONS_get()); + /** + * indicate there was an error + */ + public final static HelicsIterationRequest HELICS_ITERATION_REQUEST_ERROR = new HelicsIterationRequest("HELICS_ITERATION_REQUEST_ERROR", helicsJNI.HELICS_ITERATION_REQUEST_ERROR_get()); public final int swigValue() { return swigValue; @@ -59,7 +67,7 @@ private HelicsIterationRequest(String swigName, HelicsIterationRequest swigEnum) swigNext = this.swigValue+1; } - private static HelicsIterationRequest[] swigValues = { HELICS_ITERATION_REQUEST_NO_ITERATION, HELICS_ITERATION_REQUEST_FORCE_ITERATION, HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED }; + private static HelicsIterationRequest[] swigValues = { HELICS_ITERATION_REQUEST_NO_ITERATION, HELICS_ITERATION_REQUEST_FORCE_ITERATION, HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED, HELICS_ITERATION_REQUEST_HALT_OPERATIONS, HELICS_ITERATION_REQUEST_ERROR }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsLogLevels.java b/interfaces/java/interface/HelicsLogLevels.java index 8aff7f0d1f..8e5395ae20 100644 --- a/interfaces/java/interface/HelicsLogLevels.java +++ b/interfaces/java/interface/HelicsLogLevels.java @@ -38,7 +38,7 @@ public final class HelicsLogLevels { public final static HelicsLogLevels HELICS_LOG_LEVEL_SUMMARY = new HelicsLogLevels("HELICS_LOG_LEVEL_SUMMARY", helicsJNI.HELICS_LOG_LEVEL_SUMMARY_get()); /** * summary+ notices about federate and broker connections +messages about network
- * connections + * connections */ public final static HelicsLogLevels HELICS_LOG_LEVEL_CONNECTIONS = new HelicsLogLevels("HELICS_LOG_LEVEL_CONNECTIONS", helicsJNI.HELICS_LOG_LEVEL_CONNECTIONS_get()); /** diff --git a/interfaces/java/interface/HelicsMultiInputModes.java b/interfaces/java/interface/HelicsMultiInputModes.java index 0863421e50..5a0b2affe2 100644 --- a/interfaces/java/interface/HelicsMultiInputModes.java +++ b/interfaces/java/interface/HelicsMultiInputModes.java @@ -25,7 +25,8 @@ public final class HelicsMultiInputModes { */ public final static HelicsMultiInputModes HELICS_MULTI_INPUT_AND_OPERATION = new HelicsMultiInputModes("HELICS_MULTI_INPUT_AND_OPERATION", helicsJNI.HELICS_MULTI_INPUT_AND_OPERATION_get()); /** - * all inputs are assumed to be boolean and at least one must be true to return true + * all inputs are assumed to be boolean and at least one must be true to return
+ * true */ public final static HelicsMultiInputModes HELICS_MULTI_INPUT_OR_OPERATION = new HelicsMultiInputModes("HELICS_MULTI_INPUT_OR_OPERATION", helicsJNI.HELICS_MULTI_INPUT_OR_OPERATION_get()); /** @@ -34,7 +35,7 @@ public final class HelicsMultiInputModes { public final static HelicsMultiInputModes HELICS_MULTI_INPUT_SUM_OPERATION = new HelicsMultiInputModes("HELICS_MULTI_INPUT_SUM_OPERATION", helicsJNI.HELICS_MULTI_INPUT_SUM_OPERATION_get()); /** * do a difference operation on the inputs, first-sum(rest)
- * for double input, vector diff for vector input + * for double input, vector diff for vector input */ public final static HelicsMultiInputModes HELICS_MULTI_INPUT_DIFF_OPERATION = new HelicsMultiInputModes("HELICS_MULTI_INPUT_DIFF_OPERATION", helicsJNI.HELICS_MULTI_INPUT_DIFF_OPERATION_get()); /** diff --git a/interfaces/java/interface/HelicsProperties.java b/interfaces/java/interface/HelicsProperties.java index 0612fd1e2f..07cf0c108b 100644 --- a/interfaces/java/interface/HelicsProperties.java +++ b/interfaces/java/interface/HelicsProperties.java @@ -25,18 +25,18 @@ public final class HelicsProperties { */ public final static HelicsProperties HELICS_PROPERTY_TIME_OFFSET = new HelicsProperties("HELICS_PROPERTY_TIME_OFFSET", helicsJNI.HELICS_PROPERTY_TIME_OFFSET_get()); /** - * the property controlling real time lag for a federate the max time a federate can lag
- * real time + * the property controlling real time lag for a federate the max time a federate can
+ * lag real time */ public final static HelicsProperties HELICS_PROPERTY_TIME_RT_LAG = new HelicsProperties("HELICS_PROPERTY_TIME_RT_LAG", helicsJNI.HELICS_PROPERTY_TIME_RT_LAG_get()); /** - * the property controlling real time lead for a federate the max time a federate can be
- * ahead of real time + * the property controlling real time lead for a federate the max time a federate
+ * can be ahead of real time */ public final static HelicsProperties HELICS_PROPERTY_TIME_RT_LEAD = new HelicsProperties("HELICS_PROPERTY_TIME_RT_LEAD", helicsJNI.HELICS_PROPERTY_TIME_RT_LEAD_get()); /** * the property controlling real time tolerance for a federate sets both rt_lag and
- * rt_lead + * rt_lead */ public final static HelicsProperties HELICS_PROPERTY_TIME_RT_TOLERANCE = new HelicsProperties("HELICS_PROPERTY_TIME_RT_TOLERANCE", helicsJNI.HELICS_PROPERTY_TIME_RT_TOLERANCE_get()); /** @@ -48,32 +48,45 @@ public final class HelicsProperties { */ public final static HelicsProperties HELICS_PROPERTY_TIME_OUTPUT_DELAY = new HelicsProperties("HELICS_PROPERTY_TIME_OUTPUT_DELAY", helicsJNI.HELICS_PROPERTY_TIME_OUTPUT_DELAY_get()); /** - * the property specifying a timeout to trigger actions if the time for granting exceeds a
- * certain threshold + * specify the maximum time of a federate + */ + public final static HelicsProperties HELICS_PROPERTY_TIME_STOPTIME = new HelicsProperties("HELICS_PROPERTY_TIME_STOPTIME", helicsJNI.HELICS_PROPERTY_TIME_STOPTIME_get()); + /** + * the property specifying a timeout to trigger actions if the time for granting
+ * exceeds a certain threshold */ public final static HelicsProperties HELICS_PROPERTY_TIME_GRANT_TIMEOUT = new HelicsProperties("HELICS_PROPERTY_TIME_GRANT_TIMEOUT", helicsJNI.HELICS_PROPERTY_TIME_GRANT_TIMEOUT_get()); + /** + * read only property getting the current iteration count + */ + public final static HelicsProperties HELICS_PROPERTY_INT_CURRENT_ITERATION = new HelicsProperties("HELICS_PROPERTY_INT_CURRENT_ITERATION", helicsJNI.HELICS_PROPERTY_INT_CURRENT_ITERATION_get()); /** * integer property controlling the maximum number of iterations in a federate */ public final static HelicsProperties HELICS_PROPERTY_INT_MAX_ITERATIONS = new HelicsProperties("HELICS_PROPERTY_INT_MAX_ITERATIONS", helicsJNI.HELICS_PROPERTY_INT_MAX_ITERATIONS_get()); /** - * integer property controlling the log level in a federate see HelicsLogLevels + * integer property controlling the log level in a federate see
+ * HelicsLogLevels */ public final static HelicsProperties HELICS_PROPERTY_INT_LOG_LEVEL = new HelicsProperties("HELICS_PROPERTY_INT_LOG_LEVEL", helicsJNI.HELICS_PROPERTY_INT_LOG_LEVEL_get()); /** - * integer property controlling the log level for file logging in a federate see
- * HelicsLogLevels + * integer property controlling the log level for file logging in a federate see
+ * HelicsLogLevels */ public final static HelicsProperties HELICS_PROPERTY_INT_FILE_LOG_LEVEL = new HelicsProperties("HELICS_PROPERTY_INT_FILE_LOG_LEVEL", helicsJNI.HELICS_PROPERTY_INT_FILE_LOG_LEVEL_get()); /** - * integer property controlling the log level for console logging in a federate see
- * HelicsLogLevels + * integer property controlling the log level for console logging in a federate see
+ * HelicsLogLevels */ public final static HelicsProperties HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL = new HelicsProperties("HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL", helicsJNI.HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL_get()); /** * integer property controlling the size of the log buffer */ public final static HelicsProperties HELICS_PROPERTY_INT_LOG_BUFFER = new HelicsProperties("HELICS_PROPERTY_INT_LOG_BUFFER", helicsJNI.HELICS_PROPERTY_INT_LOG_BUFFER_get()); + /** + * integer property specifying an index group + */ + public final static HelicsProperties HELICS_PROPERTY_INT_INDEX_GROUP = new HelicsProperties("HELICS_PROPERTY_INT_INDEX_GROUP", helicsJNI.HELICS_PROPERTY_INT_INDEX_GROUP_get()); public final int swigValue() { return swigValue; @@ -109,7 +122,7 @@ private HelicsProperties(String swigName, HelicsProperties swigEnum) { swigNext = this.swigValue+1; } - private static HelicsProperties[] swigValues = { HELICS_PROPERTY_TIME_DELTA, HELICS_PROPERTY_TIME_PERIOD, HELICS_PROPERTY_TIME_OFFSET, HELICS_PROPERTY_TIME_RT_LAG, HELICS_PROPERTY_TIME_RT_LEAD, HELICS_PROPERTY_TIME_RT_TOLERANCE, HELICS_PROPERTY_TIME_INPUT_DELAY, HELICS_PROPERTY_TIME_OUTPUT_DELAY, HELICS_PROPERTY_TIME_GRANT_TIMEOUT, HELICS_PROPERTY_INT_MAX_ITERATIONS, HELICS_PROPERTY_INT_LOG_LEVEL, HELICS_PROPERTY_INT_FILE_LOG_LEVEL, HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL, HELICS_PROPERTY_INT_LOG_BUFFER }; + private static HelicsProperties[] swigValues = { HELICS_PROPERTY_TIME_DELTA, HELICS_PROPERTY_TIME_PERIOD, HELICS_PROPERTY_TIME_OFFSET, HELICS_PROPERTY_TIME_RT_LAG, HELICS_PROPERTY_TIME_RT_LEAD, HELICS_PROPERTY_TIME_RT_TOLERANCE, HELICS_PROPERTY_TIME_INPUT_DELAY, HELICS_PROPERTY_TIME_OUTPUT_DELAY, HELICS_PROPERTY_TIME_STOPTIME, HELICS_PROPERTY_TIME_GRANT_TIMEOUT, HELICS_PROPERTY_INT_CURRENT_ITERATION, HELICS_PROPERTY_INT_MAX_ITERATIONS, HELICS_PROPERTY_INT_LOG_LEVEL, HELICS_PROPERTY_INT_FILE_LOG_LEVEL, HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL, HELICS_PROPERTY_INT_LOG_BUFFER, HELICS_PROPERTY_INT_INDEX_GROUP }; private static int swigNext = 0; private final int swigValue; private final String swigName; diff --git a/interfaces/java/interface/HelicsTranslatorTypes.java b/interfaces/java/interface/HelicsTranslatorTypes.java new file mode 100644 index 0000000000..8fe3fee174 --- /dev/null +++ b/interfaces/java/interface/HelicsTranslatorTypes.java @@ -0,0 +1,67 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +/** + * enumeration of the predefined translator types + */ +public final class HelicsTranslatorTypes { + /** + * a custom filter type that executes a user defined callback + */ + public final static HelicsTranslatorTypes HELICS_TRANSLATOR_TYPE_CUSTOM = new HelicsTranslatorTypes("HELICS_TRANSLATOR_TYPE_CUSTOM", helicsJNI.HELICS_TRANSLATOR_TYPE_CUSTOM_get()); + /** + * a translator type that converts to and from JSON + */ + public final static HelicsTranslatorTypes HELICS_TRANSLATOR_TYPE_JSON = new HelicsTranslatorTypes("HELICS_TRANSLATOR_TYPE_JSON", helicsJNI.HELICS_TRANSLATOR_TYPE_JSON_get()); + /** + * a translator type that just encodes the message again in binary + */ + public final static HelicsTranslatorTypes HELICS_TRANSLATOR_TYPE_BINARY = new HelicsTranslatorTypes("HELICS_TRANSLATOR_TYPE_BINARY", helicsJNI.HELICS_TRANSLATOR_TYPE_BINARY_get()); + + public final int swigValue() { + return swigValue; + } + + public String toString() { + return swigName; + } + + public static HelicsTranslatorTypes swigToEnum(int swigValue) { + if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) + return swigValues[swigValue]; + for (int i = 0; i < swigValues.length; i++) + if (swigValues[i].swigValue == swigValue) + return swigValues[i]; + throw new IllegalArgumentException("No enum " + HelicsTranslatorTypes.class + " with value " + swigValue); + } + + private HelicsTranslatorTypes(String swigName) { + this.swigName = swigName; + this.swigValue = swigNext++; + } + + private HelicsTranslatorTypes(String swigName, int swigValue) { + this.swigName = swigName; + this.swigValue = swigValue; + swigNext = swigValue+1; + } + + private HelicsTranslatorTypes(String swigName, HelicsTranslatorTypes swigEnum) { + this.swigName = swigName; + this.swigValue = swigEnum.swigValue; + swigNext = this.swigValue+1; + } + + private static HelicsTranslatorTypes[] swigValues = { HELICS_TRANSLATOR_TYPE_CUSTOM, HELICS_TRANSLATOR_TYPE_JSON, HELICS_TRANSLATOR_TYPE_BINARY }; + private static int swigNext = 0; + private final int swigValue; + private final String swigName; +} + diff --git a/interfaces/java/interface/SWIGTYPE_p_f_double_double_int_p_void__void.java b/interfaces/java/interface/SWIGTYPE_p_f_double_double_int_p_void__void.java new file mode 100644 index 0000000000..ddea107f57 --- /dev/null +++ b/interfaces/java/interface/SWIGTYPE_p_f_double_double_int_p_void__void.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +public class SWIGTYPE_p_f_double_double_int_p_void__void { + private transient long swigCPtr; + + protected SWIGTYPE_p_f_double_double_int_p_void__void(long cPtr, @SuppressWarnings("unused") boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_f_double_double_int_p_void__void() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_f_double_double_int_p_void__void obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/interfaces/java/interface/SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double.java b/interfaces/java/interface/SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double.java new file mode 100644 index 0000000000..25dac70015 --- /dev/null +++ b/interfaces/java/interface/SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +public class SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double { + private transient long swigCPtr; + + protected SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double(long cPtr, @SuppressWarnings("unused") boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/interfaces/java/interface/SWIGTYPE_p_f_double_p_void__double.java b/interfaces/java/interface/SWIGTYPE_p_f_double_p_void__double.java new file mode 100644 index 0000000000..f7b1f74735 --- /dev/null +++ b/interfaces/java/interface/SWIGTYPE_p_f_double_p_void__double.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +public class SWIGTYPE_p_f_double_p_void__double { + private transient long swigCPtr; + + protected SWIGTYPE_p_f_double_p_void__double(long cPtr, @SuppressWarnings("unused") boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_f_double_p_void__double() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_f_double_p_void__double obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/interfaces/java/interface/SWIGTYPE_p_f_int_p_q_const__char_p_void__void.java b/interfaces/java/interface/SWIGTYPE_p_f_int_p_q_const__char_p_void__void.java new file mode 100644 index 0000000000..242f9e8b8b --- /dev/null +++ b/interfaces/java/interface/SWIGTYPE_p_f_int_p_q_const__char_p_void__void.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +public class SWIGTYPE_p_f_int_p_q_const__char_p_void__void { + private transient long swigCPtr; + + protected SWIGTYPE_p_f_int_p_q_const__char_p_void__void(long cPtr, @SuppressWarnings("unused") boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_f_int_p_q_const__char_p_void__void() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_f_int_p_q_const__char_p_void__void obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/interfaces/java/interface/SWIGTYPE_p_f_int_p_void__void.java b/interfaces/java/interface/SWIGTYPE_p_f_int_p_void__void.java new file mode 100644 index 0000000000..e5d8090acf --- /dev/null +++ b/interfaces/java/interface/SWIGTYPE_p_f_int_p_void__void.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +public class SWIGTYPE_p_f_int_p_void__void { + private transient long swigCPtr; + + protected SWIGTYPE_p_f_int_p_void__void(long cPtr, @SuppressWarnings("unused") boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_f_int_p_void__void() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_f_int_p_void__void obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/interfaces/java/interface/SWIGTYPE_p_f_p_void__HelicsIterationRequest.java b/interfaces/java/interface/SWIGTYPE_p_f_p_void__HelicsIterationRequest.java new file mode 100644 index 0000000000..7a70080a38 --- /dev/null +++ b/interfaces/java/interface/SWIGTYPE_p_f_p_void__HelicsIterationRequest.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +public class SWIGTYPE_p_f_p_void__HelicsIterationRequest { + private transient long swigCPtr; + + protected SWIGTYPE_p_f_p_void__HelicsIterationRequest(long cPtr, @SuppressWarnings("unused") boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_f_p_void__HelicsIterationRequest() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_f_p_void__HelicsIterationRequest obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/interfaces/java/interface/SWIGTYPE_p_f_p_void__void.java b/interfaces/java/interface/SWIGTYPE_p_f_p_void__void.java new file mode 100644 index 0000000000..3dcc735ccd --- /dev/null +++ b/interfaces/java/interface/SWIGTYPE_p_f_p_void__void.java @@ -0,0 +1,26 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 4.0.1 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package com.java.helics; + +public class SWIGTYPE_p_f_p_void__void { + private transient long swigCPtr; + + protected SWIGTYPE_p_f_p_void__void(long cPtr, @SuppressWarnings("unused") boolean futureUse) { + swigCPtr = cPtr; + } + + protected SWIGTYPE_p_f_p_void__void() { + swigCPtr = 0; + } + + protected static long getCPtr(SWIGTYPE_p_f_p_void__void obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } +} + diff --git a/interfaces/java/interface/helics.java b/interfaces/java/interface/helics.java index 29335becd4..9254d9cc06 100644 --- a/interfaces/java/interface/helics.java +++ b/interfaces/java/interface/helics.java @@ -67,6 +67,268 @@ public static int getHELICS_FALSE() { return helicsJNI.HELICS_FALSE_get(); } + /** + * create a helics managed data buffer with initial capacity + */ + public static SWIGTYPE_p_void helicsCreateDataBuffer(SWIGTYPE_p_int32_t initialCapacity) { + long cPtr = helicsJNI.helicsCreateDataBuffer(SWIGTYPE_p_int32_t.getCPtr(initialCapacity)); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * check whether a buffer is valid + */ + public static int helicsDataBufferIsValid(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferIsValid(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * wrap user data in a buffer object + */ + public static SWIGTYPE_p_void helicsWrapDataInBuffer(SWIGTYPE_p_void data, int dataSize, int dataCapacity) { + long cPtr = helicsJNI.helicsWrapDataInBuffer(SWIGTYPE_p_void.getCPtr(data), dataSize, dataCapacity); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * free a DataBuffer + */ + public static void helicsDataBufferFree(SWIGTYPE_p_void data) { + helicsJNI.helicsDataBufferFree(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * get the data buffer size + */ + public static SWIGTYPE_p_int32_t helicsDataBufferSize(SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsDataBufferSize(SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * get the data buffer capacity + */ + public static SWIGTYPE_p_int32_t helicsDataBufferCapacity(SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsDataBufferCapacity(SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * get a pointer to the raw data + */ + public static SWIGTYPE_p_void helicsDataBufferData(SWIGTYPE_p_void data) { + long cPtr = helicsJNI.helicsDataBufferData(SWIGTYPE_p_void.getCPtr(data)); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * increase the capacity a data buffer can hold without reallocating memory
+ * @return HELICS_TRUE if the reservation was successful HELICS_FALSE otherwise + */ + public static int helicsDataBufferReserve(SWIGTYPE_p_void data, SWIGTYPE_p_int32_t newCapacity) { + return helicsJNI.helicsDataBufferReserve(SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_int32_t.getCPtr(newCapacity)); + } + + /** + * create a new data buffer and copy an existing buffer + */ + public static SWIGTYPE_p_void helicsDataBufferClone(SWIGTYPE_p_void data) { + long cPtr = helicsJNI.helicsDataBufferClone(SWIGTYPE_p_void.getCPtr(data)); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * convert an integer to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsIntegerToBytes(long value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsIntegerToBytes(value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a double to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsDoubleToBytes(double value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsDoubleToBytes(value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a string to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsStringToBytes(String value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsStringToBytes(value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a raw string (may contain nulls) to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsRawStringToBytes(String str, int stringSize, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsRawStringToBytes(str, stringSize, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a bool to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsBooleanToBytes(int value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsBooleanToBytes(value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a char to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsCharToBytes(char value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsCharToBytes(value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a time to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsTimeToBytes(double value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsTimeToBytes(value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a complex pair to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsComplexToBytes(double real, double imag, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsComplexToBytes(real, imag, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a complex object to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsComplexObjectToBytes(HelicsComplex value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsComplexObjectToBytes(HelicsComplex.getCPtr(value), value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a real vector to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsVectorToBytes(double[] value, int dataSize, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsVectorToBytes(value, dataSize, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a named point to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsNamedPointToBytes(String name, double value, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsNamedPointToBytes(name, value, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a complex vector to serialized bytes + */ + public static SWIGTYPE_p_int32_t helicsComplexVectorToBytes(double[] value, int dataSize, SWIGTYPE_p_void data) { + return new SWIGTYPE_p_int32_t(helicsJNI.helicsComplexVectorToBytes(value, dataSize, SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * extract the data type from the data buffer, if the type isn't recognized UNKNOWN is returned + */ + public static int helicsDataBufferType(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferType(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * convert a data buffer to an int + */ + public static long helicsDataBufferToInteger(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferToInteger(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * convert a data buffer to a double + */ + public static double helicsDataBufferToDouble(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferToDouble(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * convert a data buffer to a boolean + */ + public static int helicsDataBufferToBoolean(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferToBoolean(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * convert a data buffer to a char + */ + public static char helicsDataBufferToChar(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferToChar(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * get the size of memory required to retrieve a string from a data buffer this includes space for a null terminator + */ + public static int helicsDataBufferStringSize(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferStringSize(SWIGTYPE_p_void.getCPtr(data)); + } + + public static void helicsDataBufferToString(SWIGTYPE_p_void data, String outputString, int maxStringLen, int[] actualLength) { + helicsJNI.helicsDataBufferToString(SWIGTYPE_p_void.getCPtr(data), outputString, maxStringLen, actualLength); + } + + public static void helicsDataBufferToRawString(SWIGTYPE_p_void data, String outputString, int maxStringLen, int[] actualLength) { + helicsJNI.helicsDataBufferToRawString(SWIGTYPE_p_void.getCPtr(data), outputString, maxStringLen, actualLength); + } + + /** + * convert a data buffer to a time + */ + public static double helicsDataBufferToTime(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferToTime(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * convert a data buffer to a complex object + */ + public static HelicsComplex helicsDataBufferToComplexObject(SWIGTYPE_p_void data) { + return new HelicsComplex(helicsJNI.helicsDataBufferToComplexObject(SWIGTYPE_p_void.getCPtr(data)), true); + } + + /** + * convert a data buffer to complex values + */ + public static void helicsDataBufferToComplex(SWIGTYPE_p_void data, double[] real, double[] imag) { + helicsJNI.helicsDataBufferToComplex(SWIGTYPE_p_void.getCPtr(data), real, imag); + } + + /** + * get the number of elements that would be required if a vector were retrieved + */ + public static int helicsDataBufferVectorSize(SWIGTYPE_p_void data) { + return helicsJNI.helicsDataBufferVectorSize(SWIGTYPE_p_void.getCPtr(data)); + } + + /** + * convert a data buffer to double vector values + */ + public static void helicsDataBufferToVector(SWIGTYPE_p_void data, SWIGTYPE_p_double values, int maxlen, int[] actualSize) { + helicsJNI.helicsDataBufferToVector(SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_double.getCPtr(values), maxlen, actualSize); + } + + /** + * convert a data buffer to complex double vector values
+ * @param data the buffer containing data
+ * @param values the storage for the converted data
+ * @param maxlen the number of complex values that the values vector can hold
+ * @param actualSize the number of complex values copied to values array + */ + public static void helicsDataBufferToComplexVector(SWIGTYPE_p_void data, SWIGTYPE_p_double values, int maxlen, int[] actualSize) { + helicsJNI.helicsDataBufferToComplexVector(SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_double.getCPtr(values), maxlen, actualSize); + } + + public static void helicsDataBufferToNamedPoint(SWIGTYPE_p_void data, byte[] outputString, int[] actualLength, double[] val) { + helicsJNI.helicsDataBufferToNamedPoint(SWIGTYPE_p_void.getCPtr(data), outputString, actualLength, val); + } + + /** + * convert the data in a data buffer to a different type representation
+ * @param data the buffer to convert
+ * @param newDataType the type that it is desired for the buffer to be converted to
+ * @return true if the conversion was successful + */ + public static int helicsDataBufferConvertToType(SWIGTYPE_p_void data, int newDataType) { + return helicsJNI.helicsDataBufferConvertToType(SWIGTYPE_p_void.getCPtr(data), newDataType); + } + /** * Get a version string for HELICS. */ @@ -694,6 +956,42 @@ public static SWIGTYPE_p_void helicsCreateCombinationFederateFromConfig(String c return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); } + /** + * Create a callback federate from a federate info object.
+ *
+ * Callback federates are combination federates that run a series of callback for execution in a completely automated fashion.
+ *
+ * @param fedName A string with the name of the federate, can be NULL or an empty string to pull the default name from fi.
+ * @param fi The federate info object that contains details on the federate.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function.
+ *
+ *
+ * @return An opaque value federate object; nullptr if the object creation failed. + */ + public static SWIGTYPE_p_void helicsCreateCallbackFederate(String fedName, SWIGTYPE_p_void fi) { + long cPtr = helicsJNI.helicsCreateCallbackFederate(fedName, SWIGTYPE_p_void.getCPtr(fi)); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * Create a callback federate from a JSON file or JSON string or TOML file.
+ *
+ * Callback federates are combination federates that run a series of callbacks for execution in a completely automated fashion.
+ * The enterInitializingMode call transfers complete control of the federate to the Core and no further user interaction is expected.
+ *
+ * @param configFile A JSON file or a JSON string or TOML file that contains setup and configuration information.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function.
+ *
+ *
+ * @return An opaque combination federate object. + */ + public static SWIGTYPE_p_void helicsCreateCallbackFederateFromConfig(String configFile) { + long cPtr = helicsJNI.helicsCreateCallbackFederateFromConfig(configFile); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + /** * Create a new reference to an existing federate.
*
@@ -711,6 +1009,48 @@ public static SWIGTYPE_p_void helicsFederateClone(SWIGTYPE_p_void fed) { return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); } + /** + * 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
+ *
+ * @param fedName The name of an existing HelicsFederate.
+ *
+ * ,out] err An error object that will contain an error code and string if any error
+ * occurred during the execution of the function, in particular if no federate with the given name exists + */ + public static void helicsFederateProtect(String fedName) { + helicsJNI.helicsFederateProtect(fedName); + } + + /** + * 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
+ *
+ * @param fedName the name of an existing federate that should not be protected
+ *
+ * ,out] err An error object that will contain an error code and string if the federate was not found. + */ + public static void helicsFederateUnProtect(String fedName) { + helicsJNI.helicsFederateUnProtect(fedName); + } + + /** + * checks if an existing federate is protected
+ *
+ *
+ * @param fedName the name of an existing federate to check the protection status
+ *
+ * ,out] err An error object that will contain an error code and string if the federate was not found. + */ + public static int helicsFederateIsProtected(String fedName) { + return helicsJNI.helicsFederateIsProtected(fedName); + } + /** * Create a federate info object for specifying federate information when constructing a federate.
*
@@ -1117,7 +1457,7 @@ public static void helicsFederateEnterInitializingMode(SWIGTYPE_p_void fed) { /** * Non blocking alternative to helicsFederateEnterInitializingMode.
*
- * The function helicsFederateEnterInitializationModeFinalize must be called to finish the operation.
+ * The function helicsFederateEnterInitializationModeComplete must be called to finish the operation.
*
* @param fed The federate to operate on.
*
@@ -1128,27 +1468,67 @@ public static void helicsFederateEnterInitializingModeAsync(SWIGTYPE_p_void fed) } /** - * Check if the current Asynchronous operation has completed.
+ * Complete the entry to initialize mode that was initiated with /ref heliceEnterInitializingModeAsync.
+ *
+ * @param fed The federate desiring to complete the initialization step.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + */ + public static void helicsFederateEnterInitializingModeComplete(SWIGTYPE_p_void fed) { + helicsJNI.helicsFederateEnterInitializingModeComplete(SWIGTYPE_p_void.getCPtr(fed)); + } + + /** + * Trigger a blocking call and return to created state after all federates have either triggered an iteration or are waiting to enter
+ * initializing mode.
+ *
+ * This call will return the federate to the created state to allow additional setup to occur with federates either iterating in
+ * the mode or waiting.
*
* @param fed The federate to operate on.
*
- * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function.
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + */ + public static void helicsFederateEnterInitializingModeIterative(SWIGTYPE_p_void fed) { + helicsJNI.helicsFederateEnterInitializingModeIterative(SWIGTYPE_p_void.getCPtr(fed)); + } + + /** + * Non blocking alternative to helicsFederateEnterInitializingModeIterative.
*
- * @return HELICS_FALSE if not completed, HELICS_TRUE if completed. + * The function helicsFederateEnterInitializationModeIterativeComplete must be called to finish the operation.
+ *
+ * @param fed The federate to operate on.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. */ - public static int helicsFederateIsAsyncOperationCompleted(SWIGTYPE_p_void fed) { - return helicsJNI.helicsFederateIsAsyncOperationCompleted(SWIGTYPE_p_void.getCPtr(fed)); + public static void helicsFederateEnterInitializingModeIterativeAsync(SWIGTYPE_p_void fed) { + helicsJNI.helicsFederateEnterInitializingModeIterativeAsync(SWIGTYPE_p_void.getCPtr(fed)); } /** - * Finalize the entry to initialize mode that was initiated with /ref heliceEnterInitializingModeAsync.
+ * Complete the call to enter initializing mode Iterative that was initiated with /ref heliceEnterInitializingModeIterativeAsync. The
+ * federate will be in created or error mode on return
*
- * @param fed The federate desiring to complete the initialization step.
+ * @param fed The federate used in the corresponding async call
*
* ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. */ - public static void helicsFederateEnterInitializingModeComplete(SWIGTYPE_p_void fed) { - helicsJNI.helicsFederateEnterInitializingModeComplete(SWIGTYPE_p_void.getCPtr(fed)); + public static void helicsFederateEnterInitializingModeIterativeComplete(SWIGTYPE_p_void fed) { + helicsJNI.helicsFederateEnterInitializingModeIterativeComplete(SWIGTYPE_p_void.getCPtr(fed)); + } + + /** + * Check if the current Asynchronous operation has completed.
+ *
+ * @param fed The federate to operate on.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function.
+ *
+ * @return HELICS_FALSE if not completed, HELICS_TRUE if completed. + */ + public static int helicsFederateIsAsyncOperationCompleted(SWIGTYPE_p_void fed) { + return helicsJNI.helicsFederateIsAsyncOperationCompleted(SWIGTYPE_p_void.getCPtr(fed)); } /** @@ -1241,8 +1621,10 @@ public static HelicsIterationResult helicsFederateEnterExecutingModeIterativeCom * @param fed The federate to query.
*
* ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function.
+ * The err object will be removed in a future release as it is not necessary for use the function will not error, invalid federate return
+ * HELICS_STATE_UNKOWN
*
- * @return State the resulting state if void return HELICS_OK. + * @return State the resulting state if the federate is invalid will return HELICS_STATE_UNKNOWN */ public static HelicsFederateState helicsFederateGetState(SWIGTYPE_p_void fed) { return HelicsFederateState.swigToEnum(helicsJNI.helicsFederateGetState(SWIGTYPE_p_void.getCPtr(fed))); @@ -1513,6 +1895,19 @@ public static double helicsFederateGetCurrentTime(SWIGTYPE_p_void fed) { return helicsJNI.helicsFederateGetCurrentTime(SWIGTYPE_p_void.getCPtr(fed)); } + /** + * Create an alias for an interface.
+ *
+ * @param fed The federate to use to set the alias.
+ * @param interfaceName The current name of an interface.
+ * @param alias The additional name to use for the given interface.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsFederateAddAlias(SWIGTYPE_p_void fed, String interfaceName, String alias) { + helicsJNI.helicsFederateAddAlias(SWIGTYPE_p_void.getCPtr(fed), interfaceName, alias); + } + /** * Set a federation global value through a federate.
*
@@ -1721,33 +2116,85 @@ public static void helicsBrokerSetGlobal(SWIGTYPE_p_void broker, String valueNam } /** - * Send a command to another helics object though a core.
+ * Create an alias for an interface.
*
- * @param core The core to send the command through.
- * @param target The name of the object to send the command to.
- * @param command The command to send.
+ * @param core The core to use to set the alias.
+ * @param interfaceName The current name of an interface.
+ * @param alias The additional name to use for the given interface.
*
- * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + * ,out] err A pointer to an error object for catching errors. */ - public static void helicsCoreSendCommand(SWIGTYPE_p_void core, String target, String command) { - helicsJNI.helicsCoreSendCommand(SWIGTYPE_p_void.getCPtr(core), target, command); + public static void helicsCoreAddAlias(SWIGTYPE_p_void core, String interfaceName, String alias) { + helicsJNI.helicsCoreAddAlias(SWIGTYPE_p_void.getCPtr(core), interfaceName, alias); } /** - * Send a command to another helics object through a broker.
+ * Create an alias for an interface.
*
- * @param broker The broker to send the command through.
- * @param target The name of the object to send the command to.
- * @param command The command to send.
+ * @param broker The broker to use to set the alias.
+ * @param interfaceName The current name of an interface.
+ * @param alias The additional name to use for the given interface.
*
- * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + * ,out] err A pointer to an error object for catching errors. */ - public static void helicsBrokerSendCommand(SWIGTYPE_p_void broker, String target, String command) { - helicsJNI.helicsBrokerSendCommand(SWIGTYPE_p_void.getCPtr(broker), target, command); + public static void helicsBrokerAddAlias(SWIGTYPE_p_void broker, String interfaceName, String alias) { + helicsJNI.helicsBrokerAddAlias(SWIGTYPE_p_void.getCPtr(broker), interfaceName, alias); } /** - * Set the log file on a core.
+ * Send a command to another helics object though a core using asynchronous(fast) operations.
+ *
+ * @param core The core to send the command through.
+ * @param target The name of the object to send the command to.
+ * @param command The command to send.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + */ + public static void helicsCoreSendCommand(SWIGTYPE_p_void core, String target, String command) { + helicsJNI.helicsCoreSendCommand(SWIGTYPE_p_void.getCPtr(core), target, command); + } + + /** + * Send a command to another helics object though a core using ordered operations.
+ *
+ * @param core The core to send the command through.
+ * @param target The name of the object to send the command to.
+ * @param command The command to send.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + */ + public static void helicsCoreSendOrderedCommand(SWIGTYPE_p_void core, String target, String command) { + helicsJNI.helicsCoreSendOrderedCommand(SWIGTYPE_p_void.getCPtr(core), target, command); + } + + /** + * Send a command to another helics object through a broker using asynchronous(fast) messages.
+ *
+ * @param broker The broker to send the command through.
+ * @param target The name of the object to send the command to.
+ * @param command The command to send.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + */ + public static void helicsBrokerSendCommand(SWIGTYPE_p_void broker, String target, String command) { + helicsJNI.helicsBrokerSendCommand(SWIGTYPE_p_void.getCPtr(broker), target, command); + } + + /** + * Send a command to another helics object through a broker using ordered sequencing.
+ *
+ * @param broker The broker to send the command through.
+ * @param target The name of the object to send the command to.
+ * @param command The command to send.
+ *
+ * ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. + */ + public static void helicsBrokerSendOrderedCommand(SWIGTYPE_p_void broker, String target, String command) { + helicsJNI.helicsBrokerSendOrderedCommand(SWIGTYPE_p_void.getCPtr(broker), target, command); + } + + /** + * Set the log file on a core.
*
* @param core The core to set the log file for.
* @param logFileName The name of the file to log to.
@@ -1983,22 +2430,21 @@ public static void helicsCleanupLibrary() { } /** - * sub/pub registration
+ * input/publication registration
*
- * Create a subscription.
+ * Create an input and add a publication target.
*
- * 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.
+ * this method is a wrapper method to create and unnamed input and add a publication target to it
*
- * @param fed The federate object in which to create a subscription, must have been created with /ref helicsCreateValueFederate or
+ * @param fed The federate object in which to create an input, must have been created with /ref helicsCreateValueFederate or
* /ref helicsCreateCombinationFederate.
- * @param key The identifier matching a publication to get a subscription for.
- * @param units A string listing the units of the subscription (may be NULL).
+ * @param key The identifier matching a publication to add as an input target.
+ * @param units A string listing the units of the input (may be NULL).
*
* ,out] err A pointer to an error object for catching errors.
*
*
- * @return An object containing the subscription. + * @return An object containing the input. */ public static SWIGTYPE_p_void helicsFederateRegisterSubscription(SWIGTYPE_p_void fed, String key, String units) { long cPtr = helicsJNI.helicsFederateRegisterSubscription(SWIGTYPE_p_void.getCPtr(fed), key, units); @@ -2009,12 +2455,12 @@ public static SWIGTYPE_p_void helicsFederateRegisterSubscription(SWIGTYPE_p_void * 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.
+ * functions for inputs and publications.
*
* @param fed The federate object in which to create a publication.
- * @param key The identifier for the publication the global publication key will be prepended with the federate name.
+ * @param key The identifier for the publication the global publication key will be prepended with the federate name (may be NULL).
* @param type A code identifying the type of the input see /ref HelicsDataTypes for available options.
- * @param units A string listing the units of the subscription (may be NULL).
+ * @param units A string listing the units of the publication (may be NULL).
*
* ,out] err A pointer to an error object for catching errors.
*
@@ -2030,12 +2476,12 @@ public static SWIGTYPE_p_void helicsFederateRegisterPublication(SWIGTYPE_p_void * 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.
+ * functions for inputs and publications.
*
* @param fed The federate object in which to create a publication.
- * @param key The identifier for the publication.
- * @param type A string labeling the type of the publication.
- * @param units A string listing the units of the subscription (may be NULL).
+ * @param key The identifier for the publication (may be NULL).
+ * @param type A string labeling the type of the publication (may be NULL).
+ * @param units A string listing the units of the publication (may be NULL).
*
* ,out] err A pointer to an error object for catching errors.
*
@@ -2051,12 +2497,12 @@ public static SWIGTYPE_p_void helicsFederateRegisterTypePublication(SWIGTYPE_p_v * 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.
+ * functions for inputs and publications.
*
* @param fed The federate object in which to create a publication.
- * @param key The identifier for the publication.
+ * @param key The identifier for the publication (may be NULL).
* @param type A code identifying the type of the input see /ref HelicsDataTypes for available options.
- * @param units A string listing the units of the subscription (may be NULL).
+ * @param units A string listing the units of the publication (may be NULL).
*
* ,out] err A pointer to an error object for catching errors.
*
@@ -2072,12 +2518,12 @@ public static SWIGTYPE_p_void helicsFederateRegisterGlobalPublication(SWIGTYPE_p * 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.
+ * functions for inputs and publications.
*
* @param fed The federate object in which to create a publication.
- * @param key The identifier for the publication.
- * @param type A string describing the expected type of the publication.
- * @param units A string listing the units of the subscription (may be NULL).
+ * @param key The identifier for the publication (may be NULL).
+ * @param type A string describing the expected type of the publication (may be NULL).
+ * @param units A string listing the units of the publication (may be NULL).
*
* ,out] err A pointer to an error object for catching errors.
*
@@ -2093,10 +2539,10 @@ public static SWIGTYPE_p_void helicsFederateRegisterGlobalTypePublication(SWIGTY * 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.
+ * functions for inputs, and publications.
*
* @param fed The federate object in which to create an input.
- * @param key The identifier for the publication the global input key will be prepended with the federate name.
+ * @param key The identifier for the publication the global input key will be prepended with the federate name (may be NULL).
* @param type A code identifying the type of the input see /ref HelicsDataTypes for available options.
* @param units A string listing the units of the input (may be NULL).
*
@@ -2114,11 +2560,11 @@ public static SWIGTYPE_p_void helicsFederateRegisterInput(SWIGTYPE_p_void fed, S * 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.
+ * functions for inputs, and publications.
*
* @param fed The federate object in which to create an input.
- * @param key The identifier for the input.
- * @param type A string describing the expected type of the input.
+ * @param key The identifier for the input (may be NULL).
+ * @param type A string describing the expected type of the input (may be NULL).
* @param units A string listing the units of the input maybe NULL.
*
* ,out] err A pointer to an error object for catching errors.
@@ -2135,17 +2581,17 @@ public static SWIGTYPE_p_void helicsFederateRegisterTypeInput(SWIGTYPE_p_void fe * 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.
+ * functions for inputs and publications.
*
* @param fed The federate object in which to create a publication.
- * @param key The identifier for the publication.
+ * @param key The identifier for the input (may be NULL).
* @param type A code identifying the type of the input see /ref HelicsDataTypes for available options.
- * @param units A string listing the units of the subscription maybe NULL.
+ * @param units A string listing the units of the input (may be NULL).
*
* ,out] err A pointer to an error object for catching errors.
*
*
- * @return An object containing the publication. + * @return An object containing the input. */ public static SWIGTYPE_p_void helicsFederateRegisterGlobalInput(SWIGTYPE_p_void fed, String key, HelicsDataTypes type, String units) { long cPtr = helicsJNI.helicsFederateRegisterGlobalInput(SWIGTYPE_p_void.getCPtr(fed), key, type.swigValue(), units); @@ -2153,20 +2599,18 @@ public static SWIGTYPE_p_void helicsFederateRegisterGlobalInput(SWIGTYPE_p_void } /** - * Register a global publication with an arbitrary type.
+ * Register an input 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.
+ * The input becomes part of the federate and is destroyed when the federate is freed so there are no separate free
+ * functions for interfaces.
*
- * @param fed The federate object in which to create a publication.
- * @param key The identifier for the publication.
- * @param type A string defining the type of the input.
- * @param units A string listing the units of the subscription maybe NULL.
+ * @param fed The federate object in which to create an input.
+ * @param key The identifier for the input (may be NULL).
+ * @param type A string defining the type of the input (may be NULL).
+ * @param units A string listing the units of the input (may be NULL).
*
* ,out] err A pointer to an error object for catching errors.
- *
- *
- * @return An object containing the publication. + * @return An object containing the input. */ public static SWIGTYPE_p_void helicsFederateRegisterGlobalTypeInput(SWIGTYPE_p_void fed, String key, String type, String units) { long cPtr = helicsJNI.helicsFederateRegisterGlobalTypeInput(SWIGTYPE_p_void.getCPtr(fed), key, type, units); @@ -2241,6 +2685,7 @@ public static SWIGTYPE_p_void helicsFederateGetInputByIndex(SWIGTYPE_p_void fed, /** * Get an input object from a subscription target.
+ * DEPRECATED: use helicsFederateGetInputByTarget instead
*
* @param fed The value federate object to use to get the publication.
* @param key The name of the publication that a subscription is targeting.
@@ -2256,6 +2701,23 @@ public static SWIGTYPE_p_void helicsFederateGetSubscription(SWIGTYPE_p_void fed, return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); } + /** + * Get an input object from a target.
+ *
+ * @param fed The value federate object to use to get the input.
+ * @param target The name of the publication that an input is targeting.
+ *
+ * ,out] err The error object to complete if there is an error.
+ *
+ *
+ * @return A HelicsInput object, the object will not be valid and err will contain an error code if no input with the specified
+ * key exists. + */ + public static SWIGTYPE_p_void helicsFederateGetInputByTarget(SWIGTYPE_p_void fed, String target) { + long cPtr = helicsJNI.helicsFederateGetInputByTarget(SWIGTYPE_p_void.getCPtr(fed), target); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + /** * Clear all the update flags from a federates inputs.
*
@@ -2320,12 +2782,12 @@ public static void helicsPublicationPublishBytes(SWIGTYPE_p_void pub, SWIGTYPE_p * Publish a string.
*
* @param pub The publication to publish for.
- * @param str The string to publish.
+ * @param val The null terminated string to publish.
*
* ,out] err A pointer to an error object for catching errors. */ - public static void helicsPublicationPublishString(SWIGTYPE_p_void pub, String str) { - helicsJNI.helicsPublicationPublishString(SWIGTYPE_p_void.getCPtr(pub), str); + public static void helicsPublicationPublishString(SWIGTYPE_p_void pub, String val) { + helicsJNI.helicsPublicationPublishString(SWIGTYPE_p_void.getCPtr(pub), val); } /** @@ -2431,13 +2893,13 @@ public static void helicsPublicationPublishComplexVector(SWIGTYPE_p_void pub, do * Publish a named point.
*
* @param pub The publication to publish for.
- * @param str A string for the name to publish.
+ * @param field A null terminated string for the field name of the namedPoint to publish.
* @param val A double for the value to publish.
*
* ,out] err A pointer to an error object for catching errors. */ - public static void helicsPublicationPublishNamedPoint(SWIGTYPE_p_void pub, String str, double val) { - helicsJNI.helicsPublicationPublishNamedPoint(SWIGTYPE_p_void.getCPtr(pub), str, val); + public static void helicsPublicationPublishNamedPoint(SWIGTYPE_p_void pub, String field, double val) { + helicsJNI.helicsPublicationPublishNamedPoint(SWIGTYPE_p_void.getCPtr(pub), field, val); } /** @@ -2477,7 +2939,7 @@ public static void helicsInputAddTarget(SWIGTYPE_p_void ipt, String target) { /** *
- * Get the size of the raw value for subscription.
+ * Get the size of the raw value for an input.
*
* @return The size of the raw data/string in bytes. */ @@ -2486,7 +2948,7 @@ public static int helicsInputGetByteCount(SWIGTYPE_p_void ipt) { } /** - * Get the raw data for the latest value of a subscription.
+ * Get the raw data for the latest value of an input.
*
* @param ipt The input to get the data for.
*
@@ -2500,7 +2962,7 @@ public static void helicsInputGetBytes(SWIGTYPE_p_void ipt, SWIGTYPE_p_void data } /** - * Get the size of a value for subscription assuming return as a string.
+ * Get the size of a value for an input assuming return as a string.
*
* @return The size of the string. */ @@ -2509,7 +2971,7 @@ public static int helicsInputGetStringSize(SWIGTYPE_p_void ipt) { } /** - * Get a string value from a subscription.
+ * Get a string value from an input.
*
* @param ipt The input to get the data for.
*
@@ -2523,7 +2985,7 @@ public static void helicsInputGetString(SWIGTYPE_p_void ipt, byte[] outputString } /** - * Get an integer value from a subscription.
+ * Get an integer value from an input.
*
* @param ipt The input to get the data for.
*
@@ -2536,7 +2998,7 @@ public static long helicsInputGetInteger(SWIGTYPE_p_void ipt) { } /** - * Get a boolean value from a subscription.
+ * Get a boolean value from an input.
*
* @param ipt The input to get the data for.
*
@@ -2549,7 +3011,7 @@ public static int helicsInputGetBoolean(SWIGTYPE_p_void ipt) { } /** - * Get a double value from a subscription.
+ * Get a double value from an input.
*
* @param ipt The input to get the data for.
*
@@ -2562,7 +3024,7 @@ public static double helicsInputGetDouble(SWIGTYPE_p_void ipt) { } /** - * Get a time value from a subscription.
+ * Get a time value from an input.
*
* @param ipt The input to get the data for.
*
@@ -2603,7 +3065,7 @@ public static HelicsComplex helicsInputGetComplexObject(SWIGTYPE_p_void ipt) { } /** - * Get a pair of double forming a complex number from a subscriptions.
+ * Get a pair of double forming a complex number from an input.
*
* @param ipt The input to get the data for.
*
@@ -2617,7 +3079,7 @@ public static void helicsInputGetComplex(SWIGTYPE_p_void ipt, double[] real, dou } /** - * Get the size of a value for subscription assuming return as an array of doubles.
+ * Get the size of a value for an ionput assuming return as an array of doubles.
*
* @return The number of doubles in a returned vector. */ @@ -2626,7 +3088,7 @@ public static int helicsInputGetVectorSize(SWIGTYPE_p_void ipt) { } /** - * Get a vector from a subscription.
+ * Get a vector from an input.
*
* @param ipt The input to get the result for.
*
@@ -2654,7 +3116,7 @@ public static void helicsInputGetComplexVector(SWIGTYPE_p_void ipt, SWIGTYPE_p_d } /** - * Get a named point from a subscription.
+ * Get a named point from an input.
*
* @param ipt The input to get the result for.
*
@@ -2686,12 +3148,12 @@ public static void helicsInputSetDefaultBytes(SWIGTYPE_p_void ipt, SWIGTYPE_p_vo * Set the default as a string.
*
* @param ipt The input to set the default for.
- * @param str A pointer to the default string.
+ * @param defaultString A pointer to the default string.
*
* ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. */ - public static void helicsInputSetDefaultString(SWIGTYPE_p_void ipt, String str) { - helicsJNI.helicsInputSetDefaultString(SWIGTYPE_p_void.getCPtr(ipt), str); + public static void helicsInputSetDefaultString(SWIGTYPE_p_void ipt, String defaultString) { + helicsJNI.helicsInputSetDefaultString(SWIGTYPE_p_void.getCPtr(ipt), defaultString); } /** @@ -2797,13 +3259,13 @@ public static void helicsInputSetDefaultComplexVector(SWIGTYPE_p_void ipt, doubl * Set the default as a NamedPoint.
*
* @param ipt The input to set the default for.
- * @param str A pointer to a string representing the name.
+ * @param defaultName A pointer to a null terminated string representing the field name to use in the named point.
* @param val A double value for the value of the named point.
*
* ,out] err An error object that will contain an error code and string if any error occurred during the execution of the function. */ - public static void helicsInputSetDefaultNamedPoint(SWIGTYPE_p_void ipt, String str, double val) { - helicsJNI.helicsInputSetDefaultNamedPoint(SWIGTYPE_p_void.getCPtr(ipt), str, val); + public static void helicsInputSetDefaultNamedPoint(SWIGTYPE_p_void ipt, String defaultName, double val) { + helicsJNI.helicsInputSetDefaultNamedPoint(SWIGTYPE_p_void.getCPtr(ipt), defaultName, val); } /** @@ -2871,6 +3333,15 @@ public static String helicsSubscriptionGetTarget(SWIGTYPE_p_void ipt) { return helicsJNI.helicsSubscriptionGetTarget(SWIGTYPE_p_void.getCPtr(ipt)); } + /** + * Get the target of an input.
+ *
+ * @return A const char with the input target. + */ + public static String helicsInputGetTarget(SWIGTYPE_p_void ipt) { + return helicsJNI.helicsInputGetTarget(SWIGTYPE_p_void.getCPtr(ipt)); + } + /** * Get the name of a publication.
*
@@ -3100,7 +3571,7 @@ public static void helicsInputSetMinimumChange(SWIGTYPE_p_void inp, double toler /** *
- * Check if a particular subscription was updated.
+ * Check if a particular input was updated.
*
* @return HELICS_TRUE if it has been updated since the last value retrieval. */ @@ -3109,7 +3580,7 @@ public static int helicsInputIsUpdated(SWIGTYPE_p_void ipt) { } /** - * Get the last time a subscription was updated. + * Get the last time a input was updated. */ public static double helicsInputLastUpdateTime(SWIGTYPE_p_void ipt) { return helicsJNI.helicsInputLastUpdateTime(SWIGTYPE_p_void.getCPtr(ipt)); @@ -3132,9 +3603,9 @@ public static int helicsFederateGetPublicationCount(SWIGTYPE_p_void fed) { } /** - * Get the number of subscriptions in a federate.
+ * Get the number of inputs in a federate.
*
- * @return (-1) if fed was not a valid federate otherwise returns the number of subscriptions. + * @return (-1) if fed was not a valid federate otherwise returns the number of inputs. */ public static int helicsFederateGetInputCount(SWIGTYPE_p_void fed) { return helicsJNI.helicsFederateGetInputCount(SWIGTYPE_p_void.getCPtr(fed)); @@ -3463,6 +3934,17 @@ public static SWIGTYPE_p_void helicsEndpointCreateMessage(SWIGTYPE_p_void endpoi return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); } + /** + * Clear all stored messages stored from an endpoint.
+ *
+ * This clears messages retrieved through helicsEndpointGetMessage or helicsEndpointCreateMessage
+ *
+ * @param endpoint The endpoint to clear the message for. + */ + public static void helicsEndpointClearMessages(SWIGTYPE_p_void endpoint) { + helicsJNI.helicsEndpointClearMessages(SWIGTYPE_p_void.getCPtr(endpoint)); + } + /** * Receive a communication message for any endpoint in the federate.
*
@@ -3920,12 +4402,12 @@ public static void helicsMessageSetFlagOption(SWIGTYPE_p_void message, int flag, * Set the data payload of a message as a string.
*
* @param message The message object in question.
- * @param str A string containing the message data.
+ * @param data A null terminated string containing the message data.
*
* ,out] err An error object to fill out in case of an error. */ - public static void helicsMessageSetString(SWIGTYPE_p_void message, String str) { - helicsJNI.helicsMessageSetString(SWIGTYPE_p_void.getCPtr(message), str); + public static void helicsMessageSetString(SWIGTYPE_p_void message, String data) { + helicsJNI.helicsMessageSetString(SWIGTYPE_p_void.getCPtr(message), data); } /** @@ -4346,6 +4828,318 @@ public static int helicsFilterGetOption(SWIGTYPE_p_void filt, int option) { return helicsJNI.helicsFilterGetOption(SWIGTYPE_p_void.getCPtr(filt), option); } + /** + * Create a Translator on the specified federate.
+ *
+ * Translators can be created through a federate or a core. Linking through a federate allows
+ * a few extra features of name matching to function on the federate interface but otherwise have equivalent behavior.
+ *
+ * @param fed The federate to register through.
+ * @param type The type of translator to create /ref HelicsTranslatorTypes.
+ * @param name The name of the translator (can be NULL).
+ *
+ * ,out] err A pointer to an error object for catching errors.
+ *
+ *
+ * @return A HelicsTranslator object. + */ + public static SWIGTYPE_p_void helicsFederateRegisterTranslator(SWIGTYPE_p_void fed, HelicsTranslatorTypes type, String name) { + long cPtr = helicsJNI.helicsFederateRegisterTranslator(SWIGTYPE_p_void.getCPtr(fed), type.swigValue(), name); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * Create a global translator through a federate.
+ *
+ * Translators can be created through a federate or a core. Linking through a federate allows
+ * a few extra features of name matching to function on the federate interface but otherwise have equivalent behavior.
+ *
+ * @param fed The federate to register through.
+ * @param type The type of translator to create /ref HelicsTranslatorTypes.
+ * @param name The name of the translator (can be NULL).
+ *
+ * ,out] err A pointer to an error object for catching errors.
+ *
+ *
+ * @return A HelicsTranslator object. + */ + public static SWIGTYPE_p_void helicsFederateRegisterGlobalTranslator(SWIGTYPE_p_void fed, HelicsTranslatorTypes type, String name) { + long cPtr = helicsJNI.helicsFederateRegisterGlobalTranslator(SWIGTYPE_p_void.getCPtr(fed), type.swigValue(), name); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * Create a Translator on the specified core.
+ *
+ * Translators can be created through a federate or a core. Linking through a federate allows
+ * a few extra features of name matching to function on the federate interface but otherwise have equivalent behavior.
+ *
+ * @param core The core to register through.
+ * @param type The type of translator to create /ref HelicsTranslatorTypes.
+ * @param name The name of the translator (can be NULL).
+ *
+ * ,out] err A pointer to an error object for catching errors.
+ *
+ *
+ * @return A HelicsTranslator object. + */ + public static SWIGTYPE_p_void helicsCoreRegisterTranslator(SWIGTYPE_p_void core, HelicsTranslatorTypes type, String name) { + long cPtr = helicsJNI.helicsCoreRegisterTranslator(SWIGTYPE_p_void.getCPtr(core), type.swigValue(), name); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * Get the number of translators registered through a federate.
+ *
+ * @param fed The federate object to use to get the translator.
+ *
+ * @return A count of the number of translators registered through a federate. + */ + public static int helicsFederateGetTranslatorCount(SWIGTYPE_p_void fed) { + return helicsJNI.helicsFederateGetTranslatorCount(SWIGTYPE_p_void.getCPtr(fed)); + } + + /** + * Get a translator by its name, typically already created via registerInterfaces file or something of that nature.
+ *
+ * @param fed The federate object to use to get the translator.
+ * @param name The name of the translator.
+ *
+ * ,out] err The error object to complete if there is an error.
+ *
+ *
+ * @return A HelicsTranslator object. If no translator with the specified name exists, the object will not be valid and
+ * err will contain an error code. + */ + public static SWIGTYPE_p_void helicsFederateGetTranslator(SWIGTYPE_p_void fed, String name) { + long cPtr = helicsJNI.helicsFederateGetTranslator(SWIGTYPE_p_void.getCPtr(fed), name); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * Get a translator by its index, typically already created via registerInterfaces file or something of that nature.
+ *
+ * @param fed The federate object in which to create a publication.
+ * @param index The index of the translator to get.
+ *
+ * ,out] err A pointer to an error object for catching errors.
+ *
+ *
+ * @return A HelicsTranslator, which will be NULL if an invalid index is given. + */ + public static SWIGTYPE_p_void helicsFederateGetTranslatorByIndex(SWIGTYPE_p_void fed, int index) { + long cPtr = helicsJNI.helicsFederateGetTranslatorByIndex(SWIGTYPE_p_void.getCPtr(fed), index); + return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); + } + + /** + * Check if a translator is valid.
+ *
+ * @param trans The translator object to check.
+ *
+ * @return HELICS_TRUE if the Translator object represents a valid translator. + */ + public static int helicsTranslatorIsValid(SWIGTYPE_p_void trans) { + return helicsJNI.helicsTranslatorIsValid(SWIGTYPE_p_void.getCPtr(trans)); + } + + /** + * Get the name of the translator and store in the given string.
+ *
+ * @param trans The given translator.
+ *
+ * @return A string with the name of the translator. + */ + public static String helicsTranslatorGetName(SWIGTYPE_p_void trans) { + return helicsJNI.helicsTranslatorGetName(SWIGTYPE_p_void.getCPtr(trans)); + } + + /** + * Set a property on a translator.
+ *
+ * @param trans The translator to modify.
+ * @param prop A string containing the property to set.
+ * @param val A numerical value for the property.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsTranslatorSet(SWIGTYPE_p_void trans, String prop, double val) { + helicsJNI.helicsTranslatorSet(SWIGTYPE_p_void.getCPtr(trans), prop, val); + } + + /** + * Set a string property on a translator.
+ *
+ * @param trans The translator to modify.
+ * @param prop A string containing the property to set.
+ * @param val A string containing the new value.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsTranslatorSetString(SWIGTYPE_p_void trans, String prop, String val) { + helicsJNI.helicsTranslatorSetString(SWIGTYPE_p_void.getCPtr(trans), prop, val); + } + + /** + * Add an input to send a translator output.
+ *
+ * All messages sent to a translator endpoint get translated and published to the translators target inputs.
+ * This method adds an input to a translators which will receive translated messages.
+ * @param trans The given translator to add a destination target to.
+ * @param input The name of the input which will be receiving translated messages
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsTranslatorAddInputTarget(SWIGTYPE_p_void trans, String input) { + helicsJNI.helicsTranslatorAddInputTarget(SWIGTYPE_p_void.getCPtr(trans), input); + } + + /** + * Add a source publication target to a translator.
+ *
+ * When a publication publishes data the translator will receive it and convert it to a message sent to a translators destination
+ * endpoints.
+ * This method adds a publication which publishes data the translator receives and sends to its destination endpoints.
+ *
+ * @param trans The given translator.
+ * @param pub The name of the publication to subscribe.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsTranslatorAddPublicationTarget(SWIGTYPE_p_void trans, String pub) { + helicsJNI.helicsTranslatorAddPublicationTarget(SWIGTYPE_p_void.getCPtr(trans), pub); + } + + /** + * Add a source endpoint target to a translator.
+ *
+ * The translator will "translate" all message sent to it. This method adds an endpoint which can send the translator data.
+ *
+ * @param trans The given translator.
+ * @param ept The name of the endpoint which will send the endpoint data
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsTranslatorAddSourceEndpoint(SWIGTYPE_p_void trans, String ept) { + helicsJNI.helicsTranslatorAddSourceEndpoint(SWIGTYPE_p_void.getCPtr(trans), ept); + } + + /** + * Add a destination target endpoint to a translator.
+ *
+ * The translator will "translate" all message sent to it. This method adds an endpoint which will receive data published to the
+ * translator.
+ *
+ * @param trans The given translator.
+ * @param ept The name of the endpoint the translator sends data to.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsTranslatorAddDestinationEndpoint(SWIGTYPE_p_void trans, String ept) { + helicsJNI.helicsTranslatorAddDestinationEndpoint(SWIGTYPE_p_void.getCPtr(trans), ept); + } + + /** + * Remove a target from a translator.
+ *
+ * @param trans The given translator.
+ * @param target The name of the interface to remove as a target.
+ *
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsTranslatorRemoveTarget(SWIGTYPE_p_void trans, String target) { + helicsJNI.helicsTranslatorRemoveTarget(SWIGTYPE_p_void.getCPtr(trans), target); + } + + /** + * Get the data in the info field of a translator.
+ *
+ * @param trans The given translator.
+ *
+ * @return A string with the info field string. + */ + public static String helicsTranslatorGetInfo(SWIGTYPE_p_void trans) { + return helicsJNI.helicsTranslatorGetInfo(SWIGTYPE_p_void.getCPtr(trans)); + } + + /** + * Set the data in the info field for a translator.
+ *
+ * @param trans The given translator.
+ * @param info The string to set.
+ *
+ * ,out] err An error object to fill out in case of an error. + */ + public static void helicsTranslatorSetInfo(SWIGTYPE_p_void trans, String info) { + helicsJNI.helicsTranslatorSetInfo(SWIGTYPE_p_void.getCPtr(trans), info); + } + + /** + * Get the data in a specified tag of a translator.
+ *
+ * @param trans The translator to query.
+ * @param tagname The name of the tag to query.
+ * @return A string with the tag data. + */ + public static String helicsTranslatorGetTag(SWIGTYPE_p_void trans, String tagname) { + return helicsJNI.helicsTranslatorGetTag(SWIGTYPE_p_void.getCPtr(trans), tagname); + } + + /** + * Set the data in a specific tag for a translator.
+ *
+ * @param trans The translator object to set the tag for.
+ * @param tagname The string to set.
+ * @param tagvalue The string value to associate with a tag.
+ *
+ * ,out] err An error object to fill out in case of an error. + */ + public static void helicsTranslatorSetTag(SWIGTYPE_p_void trans, String tagname, String tagvalue) { + helicsJNI.helicsTranslatorSetTag(SWIGTYPE_p_void.getCPtr(trans), tagname, tagvalue); + } + + /** + * Set an option value for a translator.
+ *
+ * @param trans The given translator.
+ * @param option The option to set /ref helics_handle_options.
+ * @param value The value of the option, commonly 0 for false or 1 for true.
+ *
+ * ,out] err An error object to fill out in case of an error. + */ + public static void helicsTranslatorSetOption(SWIGTYPE_p_void trans, int option, int value) { + helicsJNI.helicsTranslatorSetOption(SWIGTYPE_p_void.getCPtr(trans), option, value); + } + + /** + * Get a handle option for the translator.
+ *
+ * @param trans The given translator to query.
+ * @param option The option to query /ref helics_handle_options. + */ + public static int helicsTranslatorGetOption(SWIGTYPE_p_void trans, int option) { + return helicsJNI.helicsTranslatorGetOption(SWIGTYPE_p_void.getCPtr(trans), option); + } + + /** + * Set callback for the time request.
+ *
+ * This callback will be executed when a valid time request is made. It is intended for the possibility of embedded data grabbers
+ * in a callback to simplify user code.
+ *
+ * @param fed The federate to set the callback for.
+ * @param requestTime A callback with signature void(HelicsTime currentTime, HelicsTime requestTime, bool iterating, void *userdata);
+ * The function arguments are the current time value, the requested time value, a bool indicating that the time is
+ * iterating, and pointer to the userdata.
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsFederateSetTimeRequestEntryCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_double_double_int_p_void__void requestTime, SWIGTYPE_p_void userdata) { + helicsJNI.helicsFederateSetTimeRequestEntryCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_double_double_int_p_void__void.getCPtr(requestTime), SWIGTYPE_p_void.getCPtr(userdata)); + } + /** * Set callback for the time update.
*
@@ -4378,4 +5172,139 @@ public static void helicsFederateSetStateChangeCallback(SWIGTYPE_p_void fed, SWI helicsJNI.helicsFederateSetStateChangeCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_enum_HelicsFederateState_enum_HelicsFederateState_p_void__void.getCPtr(stateChange), SWIGTYPE_p_void.getCPtr(userdata)); } + /** + * Set callback for the time request return.
+ *
+ * This callback will be executed after all other callbacks for a time request return. This callback will be the last thing
+ * executed before returning control to the user program.
+ * The difference between this and the TimeUpdate callback is the order of execution. The timeUpdate callback is executed prior to
+ * individual interface callbacks, this callback is executed after all others.
+ * @param fed The federate to set the callback for.
+ * @param requestTimeReturn A callback with signature void(HelicsTime newTime, bool iterating, void *userdata);
+ * The function arguments are the new time value, a bool indicating that the time is iterating, and pointer to the userdata.
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsFederateSetTimeRequestReturnCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_double_int_p_void__void requestTimeReturn, SWIGTYPE_p_void userdata) { + helicsJNI.helicsFederateSetTimeRequestReturnCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_double_int_p_void__void.getCPtr(requestTimeReturn), SWIGTYPE_p_void.getCPtr(userdata)); + } + + /** + * Set callback for the entry to initializingMode.
+ *
+ * This callback will be executed when the initializingMode is entered
+ *
+ * @param fed The federate to set the callback for.
+ * @param initializingEntry A callback with signature void(HelicsBool iterating, void *userdata);
+ * the bool parameter is set to true if the entry is iterative, therefore the first time this is called the bool is false
+ * and all subsequent times it is true.
+ *
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsFederateInitializingEntryCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_int_p_void__void initializingEntry, SWIGTYPE_p_void userdata) { + helicsJNI.helicsFederateInitializingEntryCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_int_p_void__void.getCPtr(initializingEntry), SWIGTYPE_p_void.getCPtr(userdata)); + } + + /** + * Set callback for the entry to ExecutingMode.
+ *
+ * This callback will be executed once on first entry to executingMode
+ *
+ * @param fed The federate to set the callback for.
+ * @param executingEntry A callback with signature void(void *userdata);
+ *
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsFederateExecutingEntryCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_p_void__void executingEntry, SWIGTYPE_p_void userdata) { + helicsJNI.helicsFederateExecutingEntryCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_p_void__void.getCPtr(executingEntry), SWIGTYPE_p_void.getCPtr(userdata)); + } + + /** + * Set callback for cosimulation termination.
+ *
+ * This callback will be executed once when the time advancement of the federate/co-simulation has terminated.
+ * This may be called as part of the finalize operation, or when a maxTime signal is returned from requestTime or when an error is
+ * encountered.
+ *
+ * @param fed The federate to set the callback for.
+ * @param cosimTermination A callback with signature void(void *userdata);
+ *
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsFederateCosimulationTerminationCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_p_void__void cosimTermination, SWIGTYPE_p_void userdata) { + helicsJNI.helicsFederateCosimulationTerminationCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_p_void__void.getCPtr(cosimTermination), SWIGTYPE_p_void.getCPtr(userdata)); + } + + /** + * Set callback for error handling.
+ *
+ * This callback will be called when a federate error is encountered.
+ *
+ * @param fed The federate to set the callback for.
+ * @param errorHandler A callback with signature void(int errorCode, const char *errorString, void *userdata);
+ *
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsFederateErrorHandlerCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_int_p_q_const__char_p_void__void errorHandler, SWIGTYPE_p_void userdata) { + helicsJNI.helicsFederateErrorHandlerCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_int_p_q_const__char_p_void__void.getCPtr(errorHandler), SWIGTYPE_p_void.getCPtr(userdata)); + } + + /** + * Set callback for the next time update.
+ *
+ * This callback will be triggered to compute the next time update for a callback federate.
+ *
+ * @param fed The federate to set the callback for.
+ * @param timeUpdate A callback with signature HelicsTime(HelicsTime time, void *userdata);
+ *
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsCallbackFederateNextTimeCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_double_p_void__double timeUpdate, SWIGTYPE_p_void userdata) { + helicsJNI.helicsCallbackFederateNextTimeCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_double_p_void__double.getCPtr(timeUpdate), SWIGTYPE_p_void.getCPtr(userdata)); + } + + /** + * 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.
+ *
+ * @param fed The federate to set the callback for.
+ * @param timeUpdate A callback with signature HelicsTime(HelicsTime time, HelicsIterationResult result, HelicsIterationRequest* iteration,
+ * void *userdata);
+ *
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsCallbackFederateNextTimeIterativeCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double timeUpdate, SWIGTYPE_p_void userdata) { + helicsJNI.helicsCallbackFederateNextTimeIterativeCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_double_enum_HelicsIterationResult_p_enum_HelicsIterationRequest_p_void__double.getCPtr(timeUpdate), SWIGTYPE_p_void.getCPtr(userdata)); + } + + /** + * Set callback for initialization.
+ *
+ * This callback will be executed when computing whether to iterate in initialization mode.
+ *
+ * @param fed The federate to set the callback for.
+ * @param initialize A callback with signature HelicsIterationRequest(void *userdata);
+ *
+ * @param userdata A pointer to user data that is passed to the function when executing.
+ *
+ * ,out] err A pointer to an error object for catching errors. + */ + public static void helicsCallbackFederateInitializeCallback(SWIGTYPE_p_void fed, SWIGTYPE_p_f_p_void__HelicsIterationRequest initialize, SWIGTYPE_p_void userdata) { + helicsJNI.helicsCallbackFederateInitializeCallback(SWIGTYPE_p_void.getCPtr(fed), SWIGTYPE_p_f_p_void__HelicsIterationRequest.getCPtr(initialize), SWIGTYPE_p_void.getCPtr(userdata)); + } + } diff --git a/interfaces/java/interface/helicsJNI.java b/interfaces/java/interface/helicsJNI.java index 9dc88cb88a..c58b6192c7 100644 --- a/interfaces/java/interface/helicsJNI.java +++ b/interfaces/java/interface/helicsJNI.java @@ -35,6 +35,7 @@ public class helicsJNI { public final static native int HELICS_DATA_TYPE_NAMED_POINT_get(); public final static native int HELICS_DATA_TYPE_BOOLEAN_get(); public final static native int HELICS_DATA_TYPE_TIME_get(); + public final static native int HELICS_DATA_TYPE_CHAR_get(); public final static native int HELICS_DATA_TYPE_RAW_get(); public final static native int HELICS_DATA_TYPE_JSON_get(); public final static native int HELICS_DATA_TYPE_MULTI_get(); @@ -51,11 +52,15 @@ public class helicsJNI { public final static native int HELICS_FLAG_FORWARD_COMPUTE_get(); public final static native int HELICS_FLAG_REALTIME_get(); public final static native int HELICS_FLAG_SINGLE_THREAD_FEDERATE_get(); + public final static native int HELICS_FLAG_MULTI_THREAD_CORE_get(); + public final static native int HELICS_FLAG_SINGLE_THREAD_CORE_get(); public final static native int HELICS_FLAG_IGNORE_TIME_MISMATCH_WARNINGS_get(); public final static native int HELICS_FLAG_STRICT_CONFIG_CHECKING_get(); public final static native int HELICS_FLAG_USE_JSON_SERIALIZATION_get(); public final static native int HELICS_FLAG_EVENT_TRIGGERED_get(); public final static native int HELICS_FLAG_LOCAL_PROFILING_CAPTURE_get(); + public final static native int HELICS_FLAG_CALLBACK_FEDERATE_get(); + public final static native int HELICS_FLAG_AUTOMATED_TIME_REQUEST_get(); public final static native int HELICS_FLAG_DELAY_INIT_ENTRY_get(); public final static native int HELICS_FLAG_ENABLE_INIT_ENTRY_get(); public final static native int HELICS_FLAG_IGNORE_get(); @@ -66,6 +71,8 @@ public class helicsJNI { public final static native int HELICS_FLAG_DUMPLOG_get(); public final static native int HELICS_FLAG_PROFILING_get(); public final static native int HELICS_FLAG_PROFILING_MARKER_get(); + public final static native int HELICS_FLAG_ALLOW_REMOTE_CONTROL_get(); + public final static native int HELICS_FLAG_DISABLE_REMOTE_CONTROL_get(); public final static native int HELICS_LOG_LEVEL_DUMPLOG_get(); public final static native int HELICS_LOG_LEVEL_NO_PRINT_get(); public final static native int HELICS_LOG_LEVEL_ERROR_get(); @@ -82,7 +89,6 @@ public class helicsJNI { public final static native int HELICS_ERROR_EXTERNAL_TYPE_get(); public final static native int HELICS_ERROR_OTHER_get(); public final static native int HELICS_USER_EXCEPTION_get(); - public final static native int HELICS_ERROR_USER_ABORT_get(); public final static native int HELICS_ERROR_INSUFFICIENT_SPACE_get(); public final static native int HELICS_ERROR_EXECUTION_FAILURE_get(); public final static native int HELICS_ERROR_INVALID_FUNCTION_CALL_get(); @@ -95,6 +101,8 @@ public class helicsJNI { public final static native int HELICS_ERROR_CONNECTION_FAILURE_get(); public final static native int HELICS_ERROR_REGISTRATION_FAILURE_get(); public final static native int HELICS_OK_get(); + public final static native int HELICS_ERROR_USER_ABORT_get(); + public final static native int HELICS_ERROR_TERMINATED_get(); public final static native int HELICS_INVALID_OPTION_INDEX_get(); public final static native int HELICS_PROPERTY_TIME_DELTA_get(); public final static native int HELICS_PROPERTY_TIME_PERIOD_get(); @@ -104,12 +112,15 @@ public class helicsJNI { public final static native int HELICS_PROPERTY_TIME_RT_TOLERANCE_get(); public final static native int HELICS_PROPERTY_TIME_INPUT_DELAY_get(); public final static native int HELICS_PROPERTY_TIME_OUTPUT_DELAY_get(); + public final static native int HELICS_PROPERTY_TIME_STOPTIME_get(); public final static native int HELICS_PROPERTY_TIME_GRANT_TIMEOUT_get(); + public final static native int HELICS_PROPERTY_INT_CURRENT_ITERATION_get(); public final static native int HELICS_PROPERTY_INT_MAX_ITERATIONS_get(); public final static native int HELICS_PROPERTY_INT_LOG_LEVEL_get(); public final static native int HELICS_PROPERTY_INT_FILE_LOG_LEVEL_get(); public final static native int HELICS_PROPERTY_INT_CONSOLE_LOG_LEVEL_get(); public final static native int HELICS_PROPERTY_INT_LOG_BUFFER_get(); + public final static native int HELICS_PROPERTY_INT_INDEX_GROUP_get(); public final static native int HELICS_INVALID_PROPERTY_VALUE_get(); public final static native int HELICS_MULTI_INPUT_NO_OP_get(); public final static native int HELICS_MULTI_INPUT_VECTORIZE_OPERATION_get(); @@ -126,6 +137,8 @@ public class helicsJNI { public final static native int HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED_get(); public final static native int HELICS_HANDLE_OPTION_BUFFER_DATA_get(); public final static native int HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING_get(); + public final static native int HELICS_HANDLE_OPTION_RECEIVE_ONLY_get(); + public final static native int HELICS_HANDLE_OPTION_SOURCE_ONLY_get(); public final static native int HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH_get(); public final static native int HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE_get(); public final static native int HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE_get(); @@ -134,6 +147,7 @@ public class helicsJNI { public final static native int HELICS_HANDLE_OPTION_INPUT_PRIORITY_LOCATION_get(); public final static native int HELICS_HANDLE_OPTION_CLEAR_PRIORITY_LIST_get(); public final static native int HELICS_HANDLE_OPTION_CONNECTIONS_get(); + public final static native int HELICS_HANDLE_OPTION_TIME_RESTRICTED_get(); public final static native int HELICS_FILTER_TYPE_CUSTOM_get(); public final static native int HELICS_FILTER_TYPE_DELAY_get(); public final static native int HELICS_FILTER_TYPE_RANDOM_DELAY_get(); @@ -141,6 +155,9 @@ public class helicsJNI { public final static native int HELICS_FILTER_TYPE_REROUTE_get(); public final static native int HELICS_FILTER_TYPE_CLONE_get(); public final static native int HELICS_FILTER_TYPE_FIREWALL_get(); + public final static native int HELICS_TRANSLATOR_TYPE_CUSTOM_get(); + public final static native int HELICS_TRANSLATOR_TYPE_JSON_get(); + public final static native int HELICS_TRANSLATOR_TYPE_BINARY_get(); public final static native int HELICS_SEQUENCING_MODE_FAST_get(); public final static native int HELICS_SEQUENCING_MODE_ORDERED_get(); public final static native int HELICS_SEQUENCING_MODE_DEFAULT_get(); @@ -155,10 +172,13 @@ public class helicsJNI { public final static native int HELICS_ITERATION_REQUEST_NO_ITERATION_get(); public final static native int HELICS_ITERATION_REQUEST_FORCE_ITERATION_get(); public final static native int HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED_get(); + public final static native int HELICS_ITERATION_REQUEST_HALT_OPERATIONS_get(); + public final static native int HELICS_ITERATION_REQUEST_ERROR_get(); public final static native int HELICS_ITERATION_RESULT_NEXT_STEP_get(); public final static native int HELICS_ITERATION_RESULT_ERROR_get(); public final static native int HELICS_ITERATION_RESULT_HALTED_get(); public final static native int HELICS_ITERATION_RESULT_ITERATING_get(); + public final static native int HELICS_STATE_UNKNOWN_get(); public final static native int HELICS_STATE_STARTUP_get(); public final static native int HELICS_STATE_INITIALIZATION_get(); public final static native int HELICS_STATE_EXECUTION_get(); @@ -176,6 +196,43 @@ public class helicsJNI { public final static native double HelicsComplex_imag_get(long jarg1, HelicsComplex jarg1_); public final static native long new_HelicsComplex(); public final static native void delete_HelicsComplex(long jarg1); + public final static native long helicsCreateDataBuffer(long jarg1); + public final static native int helicsDataBufferIsValid(long jarg1); + public final static native long helicsWrapDataInBuffer(long jarg1, int jarg2, int jarg3); + public final static native void helicsDataBufferFree(long jarg1); + public final static native long helicsDataBufferSize(long jarg1); + public final static native long helicsDataBufferCapacity(long jarg1); + public final static native long helicsDataBufferData(long jarg1); + public final static native int helicsDataBufferReserve(long jarg1, long jarg2); + public final static native long helicsDataBufferClone(long jarg1); + public final static native long helicsIntegerToBytes(long jarg1, long jarg2); + public final static native long helicsDoubleToBytes(double jarg1, long jarg2); + public final static native long helicsStringToBytes(String jarg1, long jarg2); + public final static native long helicsRawStringToBytes(String jarg1, int jarg2, long jarg3); + public final static native long helicsBooleanToBytes(int jarg1, long jarg2); + public final static native long helicsCharToBytes(char jarg1, long jarg2); + public final static native long helicsTimeToBytes(double jarg1, long jarg2); + public final static native long helicsComplexToBytes(double jarg1, double jarg2, long jarg3); + public final static native long helicsComplexObjectToBytes(long jarg1, HelicsComplex jarg1_, long jarg2); + public final static native long helicsVectorToBytes(double[] jarg1, int jarg2, long jarg3); + public final static native long helicsNamedPointToBytes(String jarg1, double jarg2, long jarg3); + public final static native long helicsComplexVectorToBytes(double[] jarg1, int jarg2, long jarg3); + public final static native int helicsDataBufferType(long jarg1); + public final static native long helicsDataBufferToInteger(long jarg1); + public final static native double helicsDataBufferToDouble(long jarg1); + public final static native int helicsDataBufferToBoolean(long jarg1); + public final static native char helicsDataBufferToChar(long jarg1); + public final static native int helicsDataBufferStringSize(long jarg1); + public final static native void helicsDataBufferToString(long jarg1, String jarg2, int jarg3, int[] jarg4); + public final static native void helicsDataBufferToRawString(long jarg1, String jarg2, int jarg3, int[] jarg4); + public final static native double helicsDataBufferToTime(long jarg1); + public final static native long helicsDataBufferToComplexObject(long jarg1); + public final static native void helicsDataBufferToComplex(long jarg1, double[] jarg2, double[] jarg3); + public final static native int helicsDataBufferVectorSize(long jarg1); + public final static native void helicsDataBufferToVector(long jarg1, long jarg2, int jarg3, int[] jarg4); + public final static native void helicsDataBufferToComplexVector(long jarg1, long jarg2, int jarg3, int[] jarg4); + public final static native void helicsDataBufferToNamedPoint(long jarg1, byte[] jarg2, int[] jarg4, double[] jarg5); + public final static native int helicsDataBufferConvertToType(long jarg1, int jarg2); public final static native String helicsGetVersion(); public final static native String helicsGetBuildFlags(); public final static native String helicsGetCompilerVersion(); @@ -226,7 +283,12 @@ public class helicsJNI { public final static native long helicsCreateMessageFederateFromConfig(String jarg1); public final static native long helicsCreateCombinationFederate(String jarg1, long jarg2); public final static native long helicsCreateCombinationFederateFromConfig(String jarg1); + public final static native long helicsCreateCallbackFederate(String jarg1, long jarg2); + public final static native long helicsCreateCallbackFederateFromConfig(String jarg1); public final static native long helicsFederateClone(long jarg1); + public final static native void helicsFederateProtect(String jarg1); + public final static native void helicsFederateUnProtect(String jarg1); + public final static native int helicsFederateIsProtected(String jarg1); public final static native long helicsCreateFederateInfo(); public final static native long helicsFederateInfoClone(long jarg1); public final static native void helicsFederateInfoLoadFromArgs(long jarg1, String[] jarg2); @@ -264,8 +326,11 @@ public class helicsJNI { public final static native void helicsCloseLibrary(); public final static native void helicsFederateEnterInitializingMode(long jarg1); public final static native void helicsFederateEnterInitializingModeAsync(long jarg1); - public final static native int helicsFederateIsAsyncOperationCompleted(long jarg1); public final static native void helicsFederateEnterInitializingModeComplete(long jarg1); + public final static native void helicsFederateEnterInitializingModeIterative(long jarg1); + public final static native void helicsFederateEnterInitializingModeIterativeAsync(long jarg1); + public final static native void helicsFederateEnterInitializingModeIterativeComplete(long jarg1); + public final static native int helicsFederateIsAsyncOperationCompleted(long jarg1); public final static native void helicsFederateEnterExecutingMode(long jarg1); public final static native void helicsFederateEnterExecutingModeAsync(long jarg1); public final static native void helicsFederateEnterExecutingModeComplete(long jarg1); @@ -292,6 +357,7 @@ public class helicsJNI { public final static native int helicsFederateGetFlagOption(long jarg1, int jarg2); public final static native int helicsFederateGetIntegerProperty(long jarg1, int jarg2); public final static native double helicsFederateGetCurrentTime(long jarg1); + public final static native void helicsFederateAddAlias(long jarg1, String jarg2, String jarg3); public final static native void helicsFederateSetGlobal(long jarg1, String jarg2, String jarg3); public final static native void helicsFederateSetTag(long jarg1, String jarg2, String jarg3); public final static native String helicsFederateGetTag(long jarg1, String jarg2); @@ -308,8 +374,12 @@ public class helicsJNI { public final static native String helicsFederateWaitCommand(long jarg1); public final static native void helicsCoreSetGlobal(long jarg1, String jarg2, String jarg3); public final static native void helicsBrokerSetGlobal(long jarg1, String jarg2, String jarg3); + public final static native void helicsCoreAddAlias(long jarg1, String jarg2, String jarg3); + public final static native void helicsBrokerAddAlias(long jarg1, String jarg2, String jarg3); public final static native void helicsCoreSendCommand(long jarg1, String jarg2, String jarg3); + public final static native void helicsCoreSendOrderedCommand(long jarg1, String jarg2, String jarg3); public final static native void helicsBrokerSendCommand(long jarg1, String jarg2, String jarg3); + public final static native void helicsBrokerSendOrderedCommand(long jarg1, String jarg2, String jarg3); public final static native void helicsCoreSetLogFile(long jarg1, String jarg2); public final static native void helicsBrokerSetLogFile(long jarg1, String jarg2); public final static native void helicsBrokerSetTimeBarrier(long jarg1, double jarg2); @@ -342,6 +412,7 @@ public class helicsJNI { public final static native long helicsFederateGetInput(long jarg1, String jarg2); public final static native long helicsFederateGetInputByIndex(long jarg1, int jarg2); public final static native long helicsFederateGetSubscription(long jarg1, String jarg2); + public final static native long helicsFederateGetInputByTarget(long jarg1, String jarg2); public final static native void helicsFederateClearUpdates(long jarg1); public final static native void helicsFederateRegisterFromPublicationJSON(long jarg1, String jarg2); public final static native void helicsFederatePublishJSON(long jarg1, String jarg2); @@ -392,6 +463,7 @@ public class helicsJNI { public final static native String helicsPublicationGetType(long jarg1); public final static native String helicsInputGetName(long jarg1); public final static native String helicsSubscriptionGetTarget(long jarg1); + public final static native String helicsInputGetTarget(long jarg1); public final static native String helicsPublicationGetName(long jarg1); public final static native String helicsInputGetUnits(long jarg1); public final static native String helicsInputGetInjectionUnits(long jarg1); @@ -438,6 +510,7 @@ public class helicsJNI { public final static native int helicsEndpointPendingMessageCount(long jarg1); public final static native long helicsEndpointGetMessage(long jarg1); public final static native long helicsEndpointCreateMessage(long jarg1); + public final static native void helicsEndpointClearMessages(long jarg1); public final static native long helicsFederateGetMessage(long jarg1); public final static native long helicsFederateCreateMessage(long jarg1); public final static native void helicsFederateClearMessages(long jarg1); @@ -507,6 +580,36 @@ public class helicsJNI { public final static native void helicsFilterSetTag(long jarg1, String jarg2, String jarg3); public final static native void helicsFilterSetOption(long jarg1, int jarg2, int jarg3); public final static native int helicsFilterGetOption(long jarg1, int jarg2); + public final static native long helicsFederateRegisterTranslator(long jarg1, int jarg2, String jarg3); + public final static native long helicsFederateRegisterGlobalTranslator(long jarg1, int jarg2, String jarg3); + public final static native long helicsCoreRegisterTranslator(long jarg1, int jarg2, String jarg3); + public final static native int helicsFederateGetTranslatorCount(long jarg1); + public final static native long helicsFederateGetTranslator(long jarg1, String jarg2); + public final static native long helicsFederateGetTranslatorByIndex(long jarg1, int jarg2); + public final static native int helicsTranslatorIsValid(long jarg1); + public final static native String helicsTranslatorGetName(long jarg1); + public final static native void helicsTranslatorSet(long jarg1, String jarg2, double jarg3); + public final static native void helicsTranslatorSetString(long jarg1, String jarg2, String jarg3); + public final static native void helicsTranslatorAddInputTarget(long jarg1, String jarg2); + public final static native void helicsTranslatorAddPublicationTarget(long jarg1, String jarg2); + public final static native void helicsTranslatorAddSourceEndpoint(long jarg1, String jarg2); + public final static native void helicsTranslatorAddDestinationEndpoint(long jarg1, String jarg2); + public final static native void helicsTranslatorRemoveTarget(long jarg1, String jarg2); + public final static native String helicsTranslatorGetInfo(long jarg1); + public final static native void helicsTranslatorSetInfo(long jarg1, String jarg2); + public final static native String helicsTranslatorGetTag(long jarg1, String jarg2); + public final static native void helicsTranslatorSetTag(long jarg1, String jarg2, String jarg3); + public final static native void helicsTranslatorSetOption(long jarg1, int jarg2, int jarg3); + public final static native int helicsTranslatorGetOption(long jarg1, int jarg2); + public final static native void helicsFederateSetTimeRequestEntryCallback(long jarg1, long jarg2, long jarg3); public final static native void helicsFederateSetTimeUpdateCallback(long jarg1, long jarg2, long jarg3); public final static native void helicsFederateSetStateChangeCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsFederateSetTimeRequestReturnCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsFederateInitializingEntryCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsFederateExecutingEntryCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsFederateCosimulationTerminationCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsFederateErrorHandlerCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsCallbackFederateNextTimeCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsCallbackFederateNextTimeIterativeCallback(long jarg1, long jarg2, long jarg3); + public final static native void helicsCallbackFederateInitializeCallback(long jarg1, long jarg2, long jarg3); } diff --git a/interfaces/java/interface/helicsJava.c b/interfaces/java/interface/helicsJava.c index 36d75fa0e6..5581c7832a 100644 --- a/interfaces/java/interface/helicsJava.c +++ b/interfaces/java/interface/helicsJava.c @@ -531,6 +531,18 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1DATA_1TYPE_1TIME_ } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1DATA_1TYPE_1CHAR_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsDataTypes result; + + (void)jenv; + (void)jcls; + result = (HelicsDataTypes)HELICS_DATA_TYPE_CHAR; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1DATA_1TYPE_1RAW_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsDataTypes result; @@ -723,6 +735,30 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1SINGLE_1THR } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1MULTI_1THREAD_1CORE_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsFederateFlags result; + + (void)jenv; + (void)jcls; + result = (HelicsFederateFlags)HELICS_FLAG_MULTI_THREAD_CORE; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1SINGLE_1THREAD_1CORE_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsFederateFlags result; + + (void)jenv; + (void)jcls; + result = (HelicsFederateFlags)HELICS_FLAG_SINGLE_THREAD_CORE; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1IGNORE_1TIME_1MISMATCH_1WARNINGS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsFederateFlags result; @@ -783,6 +819,30 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1LOCAL_1PROF } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1CALLBACK_1FEDERATE_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsFederateFlags result; + + (void)jenv; + (void)jcls; + result = (HelicsFederateFlags)HELICS_FLAG_CALLBACK_FEDERATE; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1AUTOMATED_1TIME_1REQUEST_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsFederateFlags result; + + (void)jenv; + (void)jcls; + result = (HelicsFederateFlags)HELICS_FLAG_AUTOMATED_TIME_REQUEST; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1DELAY_1INIT_1ENTRY_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsCoreFlags result; @@ -903,6 +963,30 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1PROFILING_1 } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1ALLOW_1REMOTE_1CONTROL_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsFlags result; + + (void)jenv; + (void)jcls; + result = (HelicsFlags)HELICS_FLAG_ALLOW_REMOTE_CONTROL; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FLAG_1DISABLE_1REMOTE_1CONTROL_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsFlags result; + + (void)jenv; + (void)jcls; + result = (HelicsFlags)HELICS_FLAG_DISABLE_REMOTE_CONTROL; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1LOG_1LEVEL_1DUMPLOG_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsLogLevels result; @@ -1095,18 +1179,6 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1USER_1EXCEPTION_1 } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ERROR_1USER_1ABORT_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - HelicsErrorTypes result; - - (void)jenv; - (void)jcls; - result = (HelicsErrorTypes)HELICS_ERROR_USER_ABORT; - jresult = (jint)result; - return jresult; -} - - SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ERROR_1INSUFFICIENT_1SPACE_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsErrorTypes result; @@ -1251,6 +1323,30 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1OK_1get(JNIEnv *j } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ERROR_1USER_1ABORT_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsErrorTypes result; + + (void)jenv; + (void)jcls; + result = (HelicsErrorTypes)HELICS_ERROR_USER_ABORT; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ERROR_1TERMINATED_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsErrorTypes result; + + (void)jenv; + (void)jcls; + result = (HelicsErrorTypes)HELICS_ERROR_TERMINATED; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1INVALID_1OPTION_1INDEX_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; @@ -1359,6 +1455,18 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1TIME_1O } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1TIME_1STOPTIME_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsProperties result; + + (void)jenv; + (void)jcls; + result = (HelicsProperties)HELICS_PROPERTY_TIME_STOPTIME; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1TIME_1GRANT_1TIMEOUT_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsProperties result; @@ -1371,6 +1479,18 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1TIME_1G } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1INT_1CURRENT_1ITERATION_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsProperties result; + + (void)jenv; + (void)jcls; + result = (HelicsProperties)HELICS_PROPERTY_INT_CURRENT_ITERATION; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1INT_1MAX_1ITERATIONS_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsProperties result; @@ -1431,6 +1551,18 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1INT_1LO } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1PROPERTY_1INT_1INDEX_1GROUP_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsProperties result; + + (void)jenv; + (void)jcls; + result = (HelicsProperties)HELICS_PROPERTY_INT_INDEX_GROUP; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1INVALID_1PROPERTY_1VALUE_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; int result; @@ -1623,6 +1755,30 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1HANDLE_1OPTION_1S } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1HANDLE_1OPTION_1RECEIVE_1ONLY_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsHandleOptions result; + + (void)jenv; + (void)jcls; + result = (HelicsHandleOptions)HELICS_HANDLE_OPTION_RECEIVE_ONLY; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1HANDLE_1OPTION_1SOURCE_1ONLY_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsHandleOptions result; + + (void)jenv; + (void)jcls; + result = (HelicsHandleOptions)HELICS_HANDLE_OPTION_SOURCE_ONLY; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1HANDLE_1OPTION_1IGNORE_1UNIT_1MISMATCH_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsHandleOptions result; @@ -1719,6 +1875,18 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1HANDLE_1OPTION_1C } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1HANDLE_1OPTION_1TIME_1RESTRICTED_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsHandleOptions result; + + (void)jenv; + (void)jcls; + result = (HelicsHandleOptions)HELICS_HANDLE_OPTION_TIME_RESTRICTED; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FILTER_1TYPE_1CUSTOM_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsFilterTypes result; @@ -1803,6 +1971,42 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1FILTER_1TYPE_1FIR } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1TRANSLATOR_1TYPE_1CUSTOM_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsTranslatorTypes result; + + (void)jenv; + (void)jcls; + result = (HelicsTranslatorTypes)HELICS_TRANSLATOR_TYPE_CUSTOM; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1TRANSLATOR_1TYPE_1JSON_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsTranslatorTypes result; + + (void)jenv; + (void)jcls; + result = (HelicsTranslatorTypes)HELICS_TRANSLATOR_TYPE_JSON; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1TRANSLATOR_1TYPE_1BINARY_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsTranslatorTypes result; + + (void)jenv; + (void)jcls; + result = (HelicsTranslatorTypes)HELICS_TRANSLATOR_TYPE_BINARY; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1SEQUENCING_1MODE_1FAST_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsSequencingModes result; @@ -1971,6 +2175,30 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ITERATION_1REQUES } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ITERATION_1REQUEST_1HALT_1OPERATIONS_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsIterationRequest result; + + (void)jenv; + (void)jcls; + result = (HelicsIterationRequest)HELICS_ITERATION_REQUEST_HALT_OPERATIONS; + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ITERATION_1REQUEST_1ERROR_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsIterationRequest result; + + (void)jenv; + (void)jcls; + result = (HelicsIterationRequest)HELICS_ITERATION_REQUEST_ERROR; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ITERATION_1RESULT_1NEXT_1STEP_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsIterationResult result; @@ -2019,6 +2247,18 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1ITERATION_1RESULT } +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1STATE_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) { + jint jresult = 0 ; + HelicsFederateState result; + + (void)jenv; + (void)jcls; + result = (HelicsFederateState)HELICS_STATE_UNKNOWN; + jresult = (jint)result; + return jresult; +} + + SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_HELICS_1STATE_1STARTUP_1get(JNIEnv *jenv, jclass jcls) { jint jresult = 0 ; HelicsFederateState result; @@ -2229,612 +2469,2077 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_delete_1HelicsComplex(JNI } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetVersion(JNIEnv *jenv, jclass jcls) { - jstring jresult = 0 ; - char *result = 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateDataBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + int32_t arg1 ; + int32_t *argp1 ; + HelicsDataBuffer result; (void)jenv; (void)jcls; - result = (char *)helicsGetVersion(); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + argp1 = *(int32_t **)&jarg1; + if (!argp1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null int32_t"); + return 0; + } + arg1 = *argp1; + result = (HelicsDataBuffer)helicsCreateDataBuffer(arg1); + *(HelicsDataBuffer *)&jresult = result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetBuildFlags(JNIEnv *jenv, jclass jcls) { - jstring jresult = 0 ; - char *result = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + HelicsBool result; (void)jenv; (void)jcls; - result = (char *)helicsGetBuildFlags(); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (HelicsBool)helicsDataBufferIsValid(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetCompilerVersion(JNIEnv *jenv, jclass jcls) { - jstring jresult = 0 ; - char *result = 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsWrapDataInBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { + jlong jresult = 0 ; + void *arg1 = (void *) 0 ; + int arg2 ; + int arg3 ; + HelicsDataBuffer result; (void)jenv; (void)jcls; - result = (char *)helicsGetCompilerVersion(); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(void **)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + result = (HelicsDataBuffer)helicsWrapDataInBuffer(arg1,arg2,arg3); + *(HelicsDataBuffer *)&jresult = result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetSystemInfo(JNIEnv *jenv, jclass jcls) { - jstring jresult = 0 ; - char *result = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; (void)jenv; (void)jcls; - result = (char *)helicsGetSystemInfo(); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg1 = *(HelicsDataBuffer *)&jarg1; + helicsDataBufferFree(arg1); } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsLoadSignalHandler(JNIEnv *jenv, jclass jcls) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferSize(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + int32_t result; + (void)jenv; (void)jcls; - helicsLoadSignalHandler(); + arg1 = *(HelicsDataBuffer *)&jarg1; + result = helicsDataBufferSize(arg1); + { + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; + } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsLoadThreadedSignalHandler(JNIEnv *jenv, jclass jcls) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + int32_t result; + (void)jenv; (void)jcls; - helicsLoadThreadedSignalHandler(); + arg1 = *(HelicsDataBuffer *)&jarg1; + result = helicsDataBufferCapacity(arg1); + { + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; + } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsClearSignalHandler(JNIEnv *jenv, jclass jcls) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferData(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + void *result = 0 ; + (void)jenv; (void)jcls; - helicsClearSignalHandler(); + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (void *)helicsDataBufferData(arg1); + *(void **)&jresult = result; + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsLoadSignalHandlerCallbackNoExit(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - HelicsBool (*arg1)(int) = (HelicsBool (*)(int)) 0 ; - HelicsBool arg2 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + jint jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + int32_t arg2 ; + int32_t *argp2 ; + HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsBool (**)(int))&jarg1; - arg2 = (HelicsBool)jarg2; - helicsLoadSignalHandlerCallbackNoExit(arg1,arg2); + arg1 = *(HelicsDataBuffer *)&jarg1; + argp2 = *(int32_t **)&jarg2; + if (!argp2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null int32_t"); + return 0; + } + arg2 = *argp2; + result = (HelicsBool)helicsDataBufferReserve(arg1,arg2); + jresult = (jint)result; + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsAbort(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2) { - int arg1 ; - char *arg2 = (char *) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + HelicsDataBuffer result; (void)jenv; (void)jcls; - arg1 = (int)jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsAbort(arg1,(char const *)arg2); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (HelicsDataBuffer)helicsDataBufferClone(arg1); + *(HelicsDataBuffer *)&jresult = result; + return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsIsCoreTypeAvailable(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jint jresult = 0 ; - char *arg1 = (char *) 0 ; - HelicsBool result; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsIntegerToBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + jlong jresult = 0 ; + int64_t arg1 ; + HelicsDataBuffer arg2 = (HelicsDataBuffer) 0 ; + int32_t result; (void)jenv; (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + arg1 = (int64_t)jarg1; + arg2 = *(HelicsDataBuffer *)&jarg2; + result = helicsIntegerToBytes(arg1,arg2); + { + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } - result = (HelicsBool)helicsIsCoreTypeAvailable((char const *)arg1); - jresult = (jint)result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCore(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsDoubleToBytes(JNIEnv *jenv, jclass jcls, jdouble jarg1, jlong jarg2) { jlong jresult = 0 ; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; - HelicsCore result; + double arg1 ; + HelicsDataBuffer arg2 = (HelicsDataBuffer) 0 ; + int32_t result; (void)jenv; (void)jcls; + arg1 = (double)jarg1; + arg2 = *(HelicsDataBuffer *)&jarg2; + result = helicsDoubleToBytes(arg1,arg2); { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsStringToBytes(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsDataBuffer arg2 = (HelicsDataBuffer) 0 ; + int32_t result; + + (void)jenv; + (void)jcls; arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (HelicsCore)helicsCreateCore((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4); - *(HelicsCore *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg2 = *(HelicsDataBuffer *)&jarg2; + result = helicsStringToBytes((char const *)arg1,arg2); { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCoreFromArgs(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jobjectArray jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsRawStringToBytes(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2, jlong jarg3) { jlong jresult = 0 ; char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - char **arg4 = (char **) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsCore result; + int arg2 ; + HelicsDataBuffer arg3 = (HelicsDataBuffer) 0 ; + int32_t result; (void)jenv; (void)jcls; - { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; - } arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } + arg2 = (int)jarg2; + arg3 = *(HelicsDataBuffer *)&jarg3; + result = helicsRawStringToBytes((char const *)arg1,arg2,arg3); { - int i = 0; - arg3=(*jenv)->GetArrayLength(jenv, jarg3); - arg4 = (char **) malloc((arg3+1)*sizeof(char *)); - /* make a copy of each string */ - for (i = 0; iGetObjectArrayElement(jenv, jarg3, i); - const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0); - arg4[i] = malloc((strlen(c_string)+1)*sizeof(char)); - strcpy(arg4[i], c_string); - (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string); - (*jenv)->DeleteLocalRef(jenv, j_string); - } - arg4[i] = 0; + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } - result = (HelicsCore)helicsCreateCoreFromArgs((char const *)arg1,(char const *)arg2,arg3,(char const *const *)arg4,arg5); - *(HelicsCore *)&jresult = result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsBooleanToBytes(JNIEnv *jenv, jclass jcls, jint jarg1, jlong jarg2) { + jlong jresult = 0 ; + HelicsBool arg1 ; + HelicsDataBuffer arg2 = (HelicsDataBuffer) 0 ; + int32_t result; + + (void)jenv; + (void)jcls; + arg1 = (HelicsBool)jarg1; + arg2 = *(HelicsDataBuffer *)&jarg2; + result = helicsBooleanToBytes(arg1,arg2); { - int i; - for (i=0; ierror_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); - } + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsTimeToBytes(JNIEnv *jenv, jclass jcls, jdouble jarg1, jlong jarg2) { jlong jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsCore result; + HelicsTime arg1 ; + HelicsDataBuffer arg2 = (HelicsDataBuffer) 0 ; + int32_t result; (void)jenv; (void)jcls; + arg1 = (HelicsTime)jarg1; + arg2 = *(HelicsDataBuffer *)&jarg2; + result = helicsTimeToBytes(arg1,arg2); { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } - arg1 = *(HelicsCore *)&jarg1; - result = (HelicsCore)helicsCoreClone(arg1,arg2); - *(HelicsCore *)&jresult = result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsComplexToBytes(JNIEnv *jenv, jclass jcls, jdouble jarg1, jdouble jarg2, jlong jarg3) { + jlong jresult = 0 ; + double arg1 ; + double arg2 ; + HelicsDataBuffer arg3 = (HelicsDataBuffer) 0 ; + int32_t result; + + (void)jenv; + (void)jcls; + arg1 = (double)jarg1; + arg2 = (double)jarg2; + arg3 = *(HelicsDataBuffer *)&jarg3; + result = helicsComplexToBytes(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); - } + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - HelicsBool result; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsComplexObjectToBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) { + jlong jresult = 0 ; + HelicsComplex arg1 ; + HelicsDataBuffer arg2 = (HelicsDataBuffer) 0 ; + HelicsComplex *argp1 ; + int32_t result; (void)jenv; (void)jcls; - arg1 = *(HelicsCore *)&jarg1; - result = (HelicsBool)helicsCoreIsValid(arg1); - jresult = (jint)result; + (void)jarg1_; + argp1 = *(HelicsComplex **)&jarg1; + if (!argp1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null HelicsComplex"); + return 0; + } + arg1 = *argp1; + arg2 = *(HelicsDataBuffer *)&jarg2; + result = helicsComplexObjectToBytes(arg1,arg2); + { + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; + } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateBroker(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsVectorToBytes(JNIEnv *jenv, jclass jcls, jdoubleArray jarg1, jint jarg2, jlong jarg3) { jlong jresult = 0 ; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; - HelicsBroker result; + double *arg1 = (double *) 0 ; + int arg2 ; + HelicsDataBuffer arg3 = (HelicsDataBuffer) 0 ; + double temp1 ; + int32_t result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; - } - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; + if (!jarg1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return 0; + } + if ((*jenv)->GetArrayLength(jenv, jarg1) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return 0; + } + temp1 = (double)0; + arg1 = &temp1; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; + arg2 = (int)jarg2; + arg3 = *(HelicsDataBuffer *)&jarg3; + result = helicsVectorToBytes((double const *)arg1,arg2,arg3); + { + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } - result = (HelicsBroker)helicsCreateBroker((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4); - *(HelicsBroker *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } + jdouble jvalue = (jdouble)temp1; + (*jenv)->SetDoubleArrayRegion(jenv, jarg1, 0, 1, &jvalue); } + return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateBrokerFromArgs(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jobjectArray jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsNamedPointToBytes(JNIEnv *jenv, jclass jcls, jstring jarg1, jdouble jarg2, jlong jarg3) { jlong jresult = 0 ; char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - char **arg4 = (char **) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsBroker result; + double arg2 ; + HelicsDataBuffer arg3 = (HelicsDataBuffer) 0 ; + int32_t result; (void)jenv; (void)jcls; - { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; - } arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } + arg2 = (double)jarg2; + arg3 = *(HelicsDataBuffer *)&jarg3; + result = helicsNamedPointToBytes((char const *)arg1,arg2,arg3); { - int i = 0; - arg3=(*jenv)->GetArrayLength(jenv, jarg3); - arg4 = (char **) malloc((arg3+1)*sizeof(char *)); - /* make a copy of each string */ - for (i = 0; iGetObjectArrayElement(jenv, jarg3, i); - const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0); - arg4[i] = malloc((strlen(c_string)+1)*sizeof(char)); - strcpy(arg4[i], c_string); - (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string); - (*jenv)->DeleteLocalRef(jenv, j_string); - } - arg4[i] = 0; + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; } - result = (HelicsBroker)helicsCreateBrokerFromArgs((char const *)arg1,(char const *)arg2,arg3,(char const *const *)arg4,arg5); - *(HelicsBroker *)&jresult = result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - int i; - for (i=0; ierror_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); - } - } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsBrokerClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsComplexVectorToBytes(JNIEnv *jenv, jclass jcls, jdoubleArray jarg1, jint jarg2, jlong jarg3) { jlong jresult = 0 ; - HelicsBroker arg1 = (HelicsBroker) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsBroker result; + double *arg1 = (double *) 0 ; + int arg2 ; + HelicsDataBuffer arg3 = (HelicsDataBuffer) 0 ; + double temp1 ; + int32_t result; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + if (!jarg1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return 0; + } + if ((*jenv)->GetArrayLength(jenv, jarg1) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return 0; + } + temp1 = (double)0; + arg1 = &temp1; } - arg1 = *(HelicsBroker *)&jarg1; - result = (HelicsBroker)helicsBrokerClone(arg1,arg2); - *(HelicsBroker *)&jresult = result; + arg2 = (int)jarg2; + arg3 = *(HelicsDataBuffer *)&jarg3; + result = helicsComplexVectorToBytes((double const *)arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); - } + int32_t * resultptr = (int32_t *) malloc(sizeof(int32_t)); + memmove(resultptr, &result, sizeof(int32_t)); + *(int32_t **)&jresult = resultptr; + } + { + jdouble jvalue = (jdouble)temp1; + (*jenv)->SetDoubleArrayRegion(jenv, jarg1, 0, 1, &jvalue); } + return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferType(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsBroker arg1 = (HelicsBroker) 0 ; - HelicsBool result; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + int result; (void)jenv; (void)jcls; - arg1 = *(HelicsBroker *)&jarg1; - result = (HelicsBool)helicsBrokerIsValid(arg1); + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (int)helicsDataBufferType(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerIsConnected(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToInteger(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + int64_t result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + result = helicsDataBufferToInteger(arg1); + jresult = (jlong)result; + return jresult; +} + + +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToDouble(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + double result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (double)helicsDataBufferToDouble(arg1); + jresult = (jdouble)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToBoolean(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsBroker arg1 = (HelicsBroker) 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsBroker *)&jarg1; - result = (HelicsBool)helicsBrokerIsConnected(arg1); + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (HelicsBool)helicsDataBufferToBoolean(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerDataLink(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsBroker arg1 = (HelicsBroker) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jchar JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToChar(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jchar jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + char result; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsBroker *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsBrokerDataLink(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (char)helicsDataBufferToChar(arg1); + jresult = (jchar)result; + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerAddSourceFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsBroker arg1 = (HelicsBroker) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferStringSize(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + int result; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsBroker *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsBrokerAddSourceFilterToEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (int)helicsDataBufferStringSize(arg1); + jresult = (jint)result; + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerAddDestinationFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsBroker arg1 = (HelicsBroker) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jintArray jarg4) { + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + int arg3 ; + int *arg4 = (int *) 0 ; + int temp4 ; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsBroker *)&jarg1; + arg1 = *(HelicsDataBuffer *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsBrokerAddDestinationFilterToEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg3 = (int)jarg3; { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; } + temp4 = (int)0; + arg4 = &temp4; + } + helicsDataBufferToString(arg1,arg2,arg3,arg4); + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerMakeConnections(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsBroker arg1 = (HelicsBroker) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToRawString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jintArray jarg4) { + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + int arg3 ; + int *arg4 = (int *) 0 ; + int temp4 ; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsBroker *)&jarg1; + arg1 = *(HelicsDataBuffer *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsBrokerMakeConnections(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg3 = (int)jarg3; { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; } + temp4 = (int)0; + arg4 = &temp4; + } + helicsDataBufferToRawString(arg1,arg2,arg3,arg4); + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreWaitForDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jint jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsBool result; +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + HelicsTime result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsCore *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsBool)helicsCoreWaitForDisconnect(arg1,arg2,arg3); - jresult = (jint)result; - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (HelicsTime)helicsDataBufferToTime(arg1); + jresult = (jdouble)result; return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerWaitForDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToComplexObject(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + HelicsComplex result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + result = helicsDataBufferToComplexObject(arg1); + { + HelicsComplex * resultptr = (HelicsComplex *) malloc(sizeof(HelicsComplex)); + memmove(resultptr, &result, sizeof(HelicsComplex)); + *(HelicsComplex **)&jresult = resultptr; + } + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToComplex(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jdoubleArray jarg3) { + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + double *arg2 = (double *) 0 ; + double *arg3 = (double *) 0 ; + double temp2 ; + double temp3 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + { + if (!jarg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp2 = (double)0; + arg2 = &temp2; + } + { + if (!jarg3) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp3 = (double)0; + arg3 = &temp3; + } + helicsDataBufferToComplex(arg1,arg2,arg3); + { + jdouble jvalue = (jdouble)temp2; + (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); + } + { + jdouble jvalue = (jdouble)temp3; + (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue); + } + + +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferVectorSize(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsBroker arg1 = (HelicsBroker) 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + int result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + result = (int)helicsDataBufferVectorSize(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + double *arg2 ; + int arg3 ; + int *arg4 = (int *) 0 ; + int temp4 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + arg2 = *(double **)&jarg2; + arg3 = (int)jarg3; + { + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp4 = (int)0; + arg4 = &temp4; + } + helicsDataBufferToVector(arg1,arg2,arg3,arg4); + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + } + + +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToComplexVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + double *arg2 ; + int arg3 ; + int *arg4 = (int *) 0 ; + int temp4 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + arg2 = *(double **)&jarg2; + arg3 = (int)jarg3; + { + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp4 = (int)0; + arg4 = &temp4; + } + helicsDataBufferToComplexVector(arg1,arg2,arg3,arg4); + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + } + + +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferToNamedPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jintArray jarg4, jdoubleArray jarg5) { + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int *arg4 = (int *) 0 ; + double *arg5 = (double *) 0 ; + int temp4 ; + double temp5 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + { + arg2 = (char*)(*jenv)->GetByteArrayElements(jenv, jarg2, 0); + arg3 = (int)(*jenv)->GetArrayLength(jenv, jarg2); + } + { + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp4 = (int)0; + arg4 = &temp4; + } + { + if (!jarg5) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp5 = (double)0; + arg5 = &temp5; + } + helicsDataBufferToNamedPoint(arg1,arg2,arg3,arg4,arg5); + { + (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte*)arg2, 0); + } + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + } + { + jdouble jvalue = (jdouble)temp5; + (*jenv)->SetDoubleArrayRegion(jenv, jarg5, 0, 1, &jvalue); + } + + +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsDataBufferConvertToType(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; + HelicsDataBuffer arg1 = (HelicsDataBuffer) 0 ; int arg2 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsDataBuffer *)&jarg1; + arg2 = (int)jarg2; + result = (HelicsBool)helicsDataBufferConvertToType(arg1,arg2); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetVersion(JNIEnv *jenv, jclass jcls) { + jstring jresult = 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + result = (char *)helicsGetVersion(); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetBuildFlags(JNIEnv *jenv, jclass jcls) { + jstring jresult = 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + result = (char *)helicsGetBuildFlags(); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetCompilerVersion(JNIEnv *jenv, jclass jcls) { + jstring jresult = 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + result = (char *)helicsGetCompilerVersion(); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsGetSystemInfo(JNIEnv *jenv, jclass jcls) { + jstring jresult = 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + result = (char *)helicsGetSystemInfo(); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsLoadSignalHandler(JNIEnv *jenv, jclass jcls) { + (void)jenv; + (void)jcls; + helicsLoadSignalHandler(); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsLoadThreadedSignalHandler(JNIEnv *jenv, jclass jcls) { + (void)jenv; + (void)jcls; + helicsLoadThreadedSignalHandler(); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsClearSignalHandler(JNIEnv *jenv, jclass jcls) { + (void)jenv; + (void)jcls; + helicsClearSignalHandler(); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsLoadSignalHandlerCallbackNoExit(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + HelicsBool (*arg1)(int) = (HelicsBool (*)(int)) 0 ; + HelicsBool arg2 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBool (**)(int))&jarg1; + arg2 = (HelicsBool)jarg2; + helicsLoadSignalHandlerCallbackNoExit(arg1,arg2); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsAbort(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2) { + int arg1 ; + char *arg2 = (char *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = (int)jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsAbort(arg1,(char const *)arg2); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsIsCoreTypeAvailable(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jint jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + result = (HelicsBool)helicsIsCoreTypeAvailable((char const *)arg1); + jresult = (jint)result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCore(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsCore result; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + result = (HelicsCore)helicsCreateCore((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4); + *(HelicsCore *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCoreFromArgs(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jobjectArray jarg3) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + char **arg4 = (char **) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsCore result; + + (void)jenv; + (void)jcls; + { + etemp5=helicsErrorInitialize(); + arg5=&etemp5; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + { + int i = 0; + arg3=(*jenv)->GetArrayLength(jenv, jarg3); + arg4 = (char **) malloc((arg3+1)*sizeof(char *)); + /* make a copy of each string */ + for (i = 0; iGetObjectArrayElement(jenv, jarg3, i); + const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0); + arg4[i] = malloc((strlen(c_string)+1)*sizeof(char)); + strcpy(arg4[i], c_string); + (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string); + (*jenv)->DeleteLocalRef(jenv, j_string); + } + arg4[i] = 0; + } + result = (HelicsCore)helicsCreateCoreFromArgs((char const *)arg1,(char const *)arg2,arg3,(char const *const *)arg4,arg5); + *(HelicsCore *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + int i; + for (i=0; ierror_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsCore result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsCore *)&jarg1; + result = (HelicsCore)helicsCoreClone(arg1,arg2); + *(HelicsCore *)&jresult = result; + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsCore *)&jarg1; + result = (HelicsBool)helicsCoreIsValid(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateBroker(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsBroker result; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + result = (HelicsBroker)helicsCreateBroker((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4); + *(HelicsBroker *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateBrokerFromArgs(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jobjectArray jarg3) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + char **arg4 = (char **) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsBroker result; + + (void)jenv; + (void)jcls; + { + etemp5=helicsErrorInitialize(); + arg5=&etemp5; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + { + int i = 0; + arg3=(*jenv)->GetArrayLength(jenv, jarg3); + arg4 = (char **) malloc((arg3+1)*sizeof(char *)); + /* make a copy of each string */ + for (i = 0; iGetObjectArrayElement(jenv, jarg3, i); + const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0); + arg4[i] = malloc((strlen(c_string)+1)*sizeof(char)); + strcpy(arg4[i], c_string); + (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string); + (*jenv)->DeleteLocalRef(jenv, j_string); + } + arg4[i] = 0; + } + result = (HelicsBroker)helicsCreateBrokerFromArgs((char const *)arg1,(char const *)arg2,arg3,(char const *const *)arg4,arg5); + *(HelicsBroker *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + int i; + for (i=0; ierror_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsBrokerClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsBroker arg1 = (HelicsBroker) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsBroker result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsBroker *)&jarg1; + result = (HelicsBroker)helicsBrokerClone(arg1,arg2); + *(HelicsBroker *)&jresult = result; + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsBroker arg1 = (HelicsBroker) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBroker *)&jarg1; + result = (HelicsBool)helicsBrokerIsValid(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerIsConnected(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsBroker arg1 = (HelicsBroker) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBroker *)&jarg1; + result = (HelicsBool)helicsBrokerIsConnected(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerDataLink(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsBroker *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsBrokerDataLink(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerAddSourceFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsBroker *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsBrokerAddSourceFilterToEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerAddDestinationFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsBroker *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsBrokerAddDestinationFilterToEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerMakeConnections(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsBroker *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsBrokerMakeConnections(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreWaitForDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsCore *)&jarg1; + arg2 = (int)jarg2; + result = (HelicsBool)helicsCoreWaitForDisconnect(arg1,arg2,arg3); + jresult = (jint)result; + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerWaitForDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; + HelicsBroker arg1 = (HelicsBroker) 0 ; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsBroker *)&jarg1; + arg2 = (int)jarg2; + result = (HelicsBool)helicsBrokerWaitForDisconnect(arg1,arg2,arg3); + jresult = (jint)result; + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreIsConnected(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsCore *)&jarg1; + result = (HelicsBool)helicsCoreIsConnected(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreDataLink(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsCore *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsCoreDataLink(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreAddSourceFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsCore *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsCoreAddSourceFilterToEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreAddDestinationFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsCore *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsCoreAddDestinationFilterToEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreMakeConnections(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsCore arg1 = (HelicsCore) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsCore *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsCoreMakeConnections(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsBrokerGetIdentifier(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsBroker arg1 = (HelicsBroker) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBroker *)&jarg1; + result = (char *)helicsBrokerGetIdentifier(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsCoreGetIdentifier(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsCore *)&jarg1; + result = (char *)helicsCoreGetIdentifier(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsBrokerGetAddress(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsBroker arg1 = (HelicsBroker) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBroker *)&jarg1; + result = (char *)helicsBrokerGetAddress(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsCoreGetAddress(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsCore *)&jarg1; + result = (char *)helicsCoreGetAddress(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSetReadyToInit(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsCore arg1 = (HelicsCore) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsCore *)&jarg1; + helicsCoreSetReadyToInit(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreConnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsCore *)&jarg1; + result = (HelicsBool)helicsCoreConnect(arg1,arg2); + jresult = (jint)result; + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsCore arg1 = (HelicsCore) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsCore *)&jarg1; + helicsCoreDisconnect(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsGetFederateByName(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsFederate result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + result = (HelicsFederate)helicsGetFederateByName((char const *)arg1,arg2); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsBroker *)&jarg1; + helicsBrokerDisconnect(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDestroy(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateDestroy(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerDestroy(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBroker *)&jarg1; + helicsBrokerDestroy(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreDestroy(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsCore arg1 = (HelicsCore) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsCore *)&jarg1; + helicsCoreDestroy(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsCore arg1 = (HelicsCore) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsCore *)&jarg1; + helicsCoreFree(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBroker *)&jarg1; + helicsBrokerFree(arg1); +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateValueFederate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsFederateInfo arg2 = (HelicsFederateInfo) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsFederate result; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = *(HelicsFederateInfo *)&jarg2; + result = (HelicsFederate)helicsCreateValueFederate((char const *)arg1,arg2,arg3); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateValueFederateFromConfig(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsFederate result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + result = (HelicsFederate)helicsCreateValueFederateFromConfig((char const *)arg1,arg2); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateMessageFederate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsFederateInfo arg2 = (HelicsFederateInfo) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsFederate result; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = *(HelicsFederateInfo *)&jarg2; + result = (HelicsFederate)helicsCreateMessageFederate((char const *)arg1,arg2,arg3); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateMessageFederateFromConfig(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsFederate result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + result = (HelicsFederate)helicsCreateMessageFederateFromConfig((char const *)arg1,arg2); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCombinationFederate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsFederateInfo arg2 = (HelicsFederateInfo) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsFederate result; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = *(HelicsFederateInfo *)&jarg2; + result = (HelicsFederate)helicsCreateCombinationFederate((char const *)arg1,arg2,arg3); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCombinationFederateFromConfig(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsFederate result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + result = (HelicsFederate)helicsCreateCombinationFederateFromConfig((char const *)arg1,arg2); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCallbackFederate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsFederateInfo arg2 = (HelicsFederateInfo) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsBool result; + HelicsFederate result; (void)jenv; (void)jcls; @@ -2842,10 +4547,15 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerWaitForDiscon etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsBroker *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsBool)helicsBrokerWaitForDisconnect(arg1,arg2,arg3); - jresult = (jint)result; + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = *(HelicsFederateInfo *)&jarg2; + result = (HelicsFederate)helicsCreateCallbackFederate((char const *)arg1,arg2,arg3); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); { if (arg3->error_code!=HELICS_OK) { @@ -2857,98 +4567,196 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsBrokerWaitForDiscon } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreIsConnected(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - HelicsBool result; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCallbackFederateFromConfig(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsFederate result; (void)jenv; (void)jcls; - arg1 = *(HelicsCore *)&jarg1; - result = (HelicsBool)helicsCoreIsConnected(arg1); - jresult = (jint)result; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + result = (HelicsFederate)helicsCreateCallbackFederateFromConfig((char const *)arg1,arg2); + *(HelicsFederate *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreDataLink(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsCore arg1 = (HelicsCore) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsFederate result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsCore *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = *(HelicsFederate *)&jarg1; + result = (HelicsFederate)helicsFederateClone(arg1,arg2); + *(HelicsFederate *)&jresult = result; + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateProtect(JNIEnv *jenv, jclass jcls, jstring jarg1) { + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - helicsCoreDataLink(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return ; + } + helicsFederateProtect((char const *)arg1,arg2); + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreAddSourceFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsCore arg1 = (HelicsCore) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateUnProtect(JNIEnv *jenv, jclass jcls, jstring jarg1) { + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsCore *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return ; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + helicsFederateUnProtect((char const *)arg1,arg2); + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } } - helicsCoreAddSourceFilterToEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateIsProtected(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jint jresult = 0 ; + char *arg1 = (char *) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsBool result; + + (void)jenv; + (void)jcls; { - if (arg4->error_code!=HELICS_OK) + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + result = (HelicsBool)helicsFederateIsProtected((char const *)arg1,arg2); + jresult = (jint)result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + { + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreAddDestinationFilterToEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsCore arg1 = (HelicsCore) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateFederateInfo(JNIEnv *jenv, jclass jcls) { + jlong jresult = 0 ; + HelicsFederateInfo result; + + (void)jenv; + (void)jcls; + result = (HelicsFederateInfo)helicsCreateFederateInfo(); + *(HelicsFederateInfo *)&jresult = result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsFederateInfo result; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsFederateInfo *)&jarg1; + result = (HelicsFederateInfo)helicsFederateInfoClone(arg1,arg2); + *(HelicsFederateInfo *)&jresult = result; + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoLoadFromArgs(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + int arg2 ; + char **arg3 = (char **) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; @@ -2958,20 +4766,29 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreAddDestinationF etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsCore *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + arg1 = *(HelicsFederateInfo *)&jarg1; + { + int i = 0; + arg2=(*jenv)->GetArrayLength(jenv, jarg2); + arg3 = (char **) malloc((arg2+1)*sizeof(char *)); + /* make a copy of each string */ + for (i = 0; iGetObjectArrayElement(jenv, jarg2, i); + const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0); + arg3[i] = malloc((strlen(c_string)+1)*sizeof(char)); + strcpy(arg3[i], c_string); + (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string); + (*jenv)->DeleteLocalRef(jenv, j_string); + } + arg3[i] = 0; + } + helicsFederateInfoLoadFromArgs(arg1,arg2,(char const *const *)arg3,arg4); + { + int i; + for (i=0; iReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { if (arg4->error_code!=HELICS_OK) { @@ -2982,8 +4799,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreAddDestinationF } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreMakeConnections(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsCore arg1 = (HelicsCore) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoLoadFromString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -2994,13 +4811,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreMakeConnections etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsCore *)&jarg1; + arg1 = *(HelicsFederateInfo *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsCoreMakeConnections(arg1,(char const *)arg2,arg3); + helicsFederateInfoLoadFromString(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -3012,247 +4829,265 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreMakeConnections } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsBrokerGetIdentifier(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsBroker arg1 = (HelicsBroker) 0 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsBroker *)&jarg1; - result = (char *)helicsBrokerGetIdentifier(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; -} - - -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsCoreGetIdentifier(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsCore *)&jarg1; - result = (char *)helicsCoreGetIdentifier(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; -} - - -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsBrokerGetAddress(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsBroker arg1 = (HelicsBroker) 0 ; - char *result = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsBroker *)&jarg1; - result = (char *)helicsBrokerGetAddress(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg1 = *(HelicsFederateInfo *)&jarg1; + helicsFederateInfoFree(arg1); } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsCoreGetAddress(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - char *result = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsCore *)&jarg1; - result = (char *)helicsCoreGetAddress(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsFederate *)&jarg1; + result = (HelicsBool)helicsFederateIsValid(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSetReadyToInit(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsCore arg1 = (HelicsCore) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreName(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsCore *)&jarg1; - helicsCoreSetReadyToInit(arg1,arg2); + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateInfoSetCoreName(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsCoreConnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsBool result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreInitString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsCore *)&jarg1; - result = (HelicsBool)helicsCoreConnect(arg1,arg2); - jresult = (jint)result; + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateInfoSetCoreInitString(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsCore arg1 = (HelicsCore) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBrokerInitString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsCore *)&jarg1; - helicsCoreDisconnect(arg1,arg2); + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateInfoSetBrokerInitString(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsGetFederateByName(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jlong jresult = 0 ; - char *arg1 = (char *) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsFederate result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreType(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; - } - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - result = (HelicsFederate)helicsGetFederateByName((char const *)arg1,arg2); - *(HelicsFederate *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = (int)jarg2; + helicsFederateInfoSetCoreType(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsBroker arg1 = (HelicsBroker) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreTypeFromString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsBroker *)&jarg1; - helicsBrokerDisconnect(arg1,arg2); + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateInfoSetCoreTypeFromString(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDestroy(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsFederate arg1 = (HelicsFederate) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - helicsFederateDestroy(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerDestroy(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsBroker arg1 = (HelicsBroker) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsBroker *)&jarg1; - helicsBrokerDestroy(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreDestroy(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsCore arg1 = (HelicsCore) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBroker(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; - arg1 = *(HelicsCore *)&jarg1; - helicsCoreDestroy(arg1); + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateInfoSetBroker(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsCore arg1 = (HelicsCore) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBrokerKey(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; - arg1 = *(HelicsCore *)&jarg1; - helicsCoreFree(arg1); + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateInfoSetBrokerKey(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsBroker arg1 = (HelicsBroker) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBrokerPort(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; - arg1 = *(HelicsBroker *)&jarg1; - helicsBrokerFree(arg1); + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = (int)jarg2; + helicsFederateInfoSetBrokerPort(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateValueFederate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { - jlong jresult = 0 ; - char *arg1 = (char *) 0 ; - HelicsFederateInfo arg2 = (HelicsFederateInfo) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetLocalPort(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsFederate result; (void)jenv; (void)jcls; @@ -3260,15 +5095,14 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateValueFederat etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - arg2 = *(HelicsFederateInfo *)&jarg2; - result = (HelicsFederate)helicsCreateValueFederate((char const *)arg1,arg2,arg3); - *(HelicsFederate *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + helicsFederateInfoSetLocalPort(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -3276,244 +5110,160 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateValueFederat (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateValueFederateFromConfig(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jlong jresult = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetPropertyIndex(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jint jresult = 0 ; char *arg1 = (char *) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsFederate result; + int result; (void)jenv; (void)jcls; - { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; - } arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - result = (HelicsFederate)helicsCreateValueFederateFromConfig((char const *)arg1,arg2); - *(HelicsFederate *)&jresult = result; + result = (int)helicsGetPropertyIndex((char const *)arg1); + jresult = (jint)result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - { - if (arg2->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); - } - } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateMessageFederate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { - jlong jresult = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetFlagIndex(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jint jresult = 0 ; char *arg1 = (char *) 0 ; - HelicsFederateInfo arg2 = (HelicsFederateInfo) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsFederate result; + int result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - arg2 = *(HelicsFederateInfo *)&jarg2; - result = (HelicsFederate)helicsCreateMessageFederate((char const *)arg1,arg2,arg3); - *(HelicsFederate *)&jresult = result; + result = (int)helicsGetFlagIndex((char const *)arg1); + jresult = (jint)result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateMessageFederateFromConfig(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jlong jresult = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetOptionIndex(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jint jresult = 0 ; char *arg1 = (char *) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsFederate result; + int result; (void)jenv; (void)jcls; - { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; - } arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - result = (HelicsFederate)helicsCreateMessageFederateFromConfig((char const *)arg1,arg2); - *(HelicsFederate *)&jresult = result; + result = (int)helicsGetOptionIndex((char const *)arg1); + jresult = (jint)result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - { - if (arg2->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); - } - } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCombinationFederate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { - jlong jresult = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetOptionValue(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jint jresult = 0 ; char *arg1 = (char *) 0 ; - HelicsFederateInfo arg2 = (HelicsFederateInfo) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsFederate result; + int result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - arg2 = *(HelicsFederateInfo *)&jarg2; - result = (HelicsFederate)helicsCreateCombinationFederate((char const *)arg1,arg2,arg3); - *(HelicsFederate *)&jresult = result; + result = (int)helicsGetOptionValue((char const *)arg1); + jresult = (jint)result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateCombinationFederateFromConfig(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jlong jresult = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetDataType(JNIEnv *jenv, jclass jcls, jstring jarg1) { + jint jresult = 0 ; char *arg1 = (char *) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsFederate result; + int result; (void)jenv; (void)jcls; - { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; - } arg1 = 0; if (jarg1) { arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); if (!arg1) return 0; } - result = (HelicsFederate)helicsCreateCombinationFederateFromConfig((char const *)arg1,arg2); - *(HelicsFederate *)&jresult = result; + result = (int)helicsGetDataType((char const *)arg1); + jresult = (jint)result; if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - { - if (arg2->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); - } - } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsFederate result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { + HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; + int arg2 ; + HelicsBool arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsFederate)helicsFederateClone(arg1,arg2); - *(HelicsFederate *)&jresult = result; + arg1 = *(HelicsFederateInfo *)&jarg1; + arg2 = (int)jarg2; + arg3 = (HelicsBool)jarg3; + helicsFederateInfoSetFlagOption(arg1,arg2,arg3,arg4); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateFederateInfo(JNIEnv *jenv, jclass jcls) { - jlong jresult = 0 ; - HelicsFederateInfo result; - - (void)jenv; - (void)jcls; - result = (HelicsFederateInfo)helicsCreateFederateInfo(); - *(HelicsFederateInfo *)&jresult = result; - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetSeparator(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsFederateInfo result; + char arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederateInfo *)&jarg1; - result = (HelicsFederateInfo)helicsFederateInfoClone(arg1,arg2); - *(HelicsFederateInfo *)&jresult = result; + arg2 = (char)jarg2; + helicsFederateInfoSetSeparator(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoLoadFromArgs(JNIEnv *jenv, jclass jcls, jlong jarg1, jobjectArray jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetTimeProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jdouble jarg3) { HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; int arg2 ; - char **arg3 = (char **) 0 ; + HelicsTime arg3 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; @@ -3524,28 +5274,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoLoadFro arg4=&etemp4; } arg1 = *(HelicsFederateInfo *)&jarg1; - { - int i = 0; - arg2=(*jenv)->GetArrayLength(jenv, jarg2); - arg3 = (char **) malloc((arg2+1)*sizeof(char *)); - /* make a copy of each string */ - for (i = 0; iGetObjectArrayElement(jenv, jarg2, i); - const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0); - arg3[i] = malloc((strlen(c_string)+1)*sizeof(char)); - strcpy(arg3[i], c_string); - (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string); - (*jenv)->DeleteLocalRef(jenv, j_string); - } - arg3[i] = 0; - } - helicsFederateInfoLoadFromArgs(arg1,arg2,(char const *const *)arg3,arg4); - { - int i; - for (i=0; ierror_code!=HELICS_OK) { @@ -3556,62 +5287,35 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoLoadFro } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoLoadFromString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetIntegerProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + int arg2 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsFederateInfoLoadFromString(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg2 = (int)jarg2; + arg3 = (int)jarg3; + helicsFederateInfoSetIntegerProperty(arg1,arg2,arg3,arg4); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsFederateInfo *)&jarg1; - helicsFederateInfoFree(arg1); -} - - -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterInterfaces(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsBool result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsBool)helicsFederateIsValid(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreName(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -3622,13 +5326,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCore etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederateInfo *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederateInfoSetCoreName(arg1,(char const *)arg2,arg3); + helicsFederateRegisterInterfaces(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -3640,535 +5344,519 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCore } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreInitString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateGlobalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + int arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (int)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; } - helicsFederateInfoSetCoreInitString(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + helicsFederateGlobalError(arg1,arg2,(char const *)arg3,arg4); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBrokerInitString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLocalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + int arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (int)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; } - helicsFederateInfoSetBrokerInitString(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + helicsFederateLocalError(arg1,arg2,(char const *)arg3,arg4); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreType(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalize(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = (int)jarg2; - helicsFederateInfoSetCoreType(arg1,arg2,arg3); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateFinalize(arg1,arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetCoreTypeFromString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - helicsFederateInfoSetCoreTypeFromString(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateFinalizeAsync(arg1,arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBroker(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - helicsFederateInfoSetBroker(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateFinalizeComplete(arg1,arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBrokerKey(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - helicsFederateInfoSetBrokerKey(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateDisconnect(arg1,arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetBrokerPort(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnectAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = (int)jarg2; - helicsFederateInfoSetBrokerPort(arg1,arg2,arg3); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateDisconnectAsync(arg1,arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetLocalPort(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnectComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - helicsFederateInfoSetLocalPort(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateDisconnectComplete(arg1,arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetPropertyIndex(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jint jresult = 0 ; - char *arg1 = (char *) 0 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; (void)jenv; (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateFree(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCloseLibrary(JNIEnv *jenv, jclass jcls) { + (void)jenv; + (void)jcls; + helicsCloseLibrary(); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingMode(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + + (void)jenv; + (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterInitializingMode(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } } - result = (int)helicsGetPropertyIndex((char const *)arg1); - jresult = (jint)result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetFlagIndex(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jint jresult = 0 ; - char *arg1 = (char *) 0 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingModeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterInitializingModeAsync(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } } - result = (int)helicsGetFlagIndex((char const *)arg1); - jresult = (jint)result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetOptionIndex(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jint jresult = 0 ; - char *arg1 = (char *) 0 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingModeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterInitializingModeComplete(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } } - result = (int)helicsGetOptionIndex((char const *)arg1); - jresult = (jint)result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetOptionValue(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jint jresult = 0 ; - char *arg1 = (char *) 0 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingModeIterative(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterInitializingModeIterative(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } } - result = (int)helicsGetOptionValue((char const *)arg1); - jresult = (jint)result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsGetDataType(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jint jresult = 0 ; - char *arg1 = (char *) 0 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingModeIterativeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterInitializingModeIterativeAsync(arg1,arg2); + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } } - result = (int)helicsGetDataType((char const *)arg1); - jresult = (jint)result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - int arg2 ; - HelicsBool arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingModeIterativeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = (int)jarg2; - arg3 = (HelicsBool)jarg3; - helicsFederateInfoSetFlagOption(arg1,arg2,arg3,arg4); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterInitializingModeIterativeComplete(arg1,arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetSeparator(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - char arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateIsAsyncOperationCompleted(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsBool result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = (char)jarg2; - helicsFederateInfoSetSeparator(arg1,arg2,arg3); + arg1 = *(HelicsFederate *)&jarg1; + result = (HelicsBool)helicsFederateIsAsyncOperationCompleted(arg1,arg2); + jresult = (jint)result; { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetTimeProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jdouble jarg3) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - int arg2 ; - HelicsTime arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingMode(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = (int)jarg2; - arg3 = (HelicsTime)jarg3; - helicsFederateInfoSetTimeProperty(arg1,arg2,arg3,arg4); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterExecutingMode(arg1,arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInfoSetIntegerProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { - HelicsFederateInfo arg1 = (HelicsFederateInfo) 0 ; - int arg2 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsFederateInfo *)&jarg1; - arg2 = (int)jarg2; - arg3 = (int)jarg3; - helicsFederateInfoSetIntegerProperty(arg1,arg2,arg3,arg4); + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateEnterExecutingModeAsync(arg1,arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterInterfaces(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsFederateRegisterInterfaces(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + helicsFederateEnterExecutingModeComplete(arg1,arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateGlobalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeIterative(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + HelicsIterationRequest arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsIterationResult result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsFederateGlobalError(arg1,arg2,(char const *)arg3,arg4); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg2 = (HelicsIterationRequest)jarg2; + result = (HelicsIterationResult)helicsFederateEnterExecutingModeIterative(arg1,arg2,arg3); + jresult = (jint)result; { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLocalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeIterativeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + HelicsIterationRequest arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsFederateLocalError(arg1,arg2,(char const *)arg3,arg4); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg2 = (HelicsIterationRequest)jarg2; + helicsFederateEnterExecutingModeIterativeAsync(arg1,arg2,arg3); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalize(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeIterativeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; HelicsError *arg2 = (HelicsError *) 0 ; HelicsError etemp2 ; + HelicsIterationResult result; (void)jenv; (void)jcls; @@ -4177,7 +5865,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalize(JN arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateFinalize(arg1,arg2); + result = (HelicsIterationResult)helicsFederateEnterExecutingModeIterativeComplete(arg1,arg2); + jresult = (jint)result; { if (arg2->error_code!=HELICS_OK) { @@ -4185,13 +5874,16 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalize(JN (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetState(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; HelicsError *arg2 = (HelicsError *) 0 ; HelicsError etemp2 ; + HelicsFederateState result; (void)jenv; (void)jcls; @@ -4200,7 +5892,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeAsy arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateFinalizeAsync(arg1,arg2); + result = (HelicsFederateState)helicsFederateGetState(arg1,arg2); + jresult = (jint)result; { if (arg2->error_code!=HELICS_OK) { @@ -4208,13 +5901,16 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeAsy (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCore(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; HelicsError *arg2 = (HelicsError *) 0 ; HelicsError etemp2 ; + HelicsCore result; (void)jenv; (void)jcls; @@ -4223,7 +5919,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeCom arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateFinalizeComplete(arg1,arg2); + result = (HelicsCore)helicsFederateGetCore(arg1,arg2); + *(HelicsCore *)&jresult = result; { if (arg2->error_code!=HELICS_OK) { @@ -4231,59 +5928,74 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFinalizeCom (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnect(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + jdouble jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + HelicsTime arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsTime result; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateDisconnect(arg1,arg2); + arg2 = (HelicsTime)jarg2; + result = (HelicsTime)helicsFederateRequestTime(arg1,arg2,arg3); + jresult = (jdouble)result; { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnectAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeAdvance(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + jdouble jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + HelicsTime arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsTime result; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateDisconnectAsync(arg1,arg2); + arg2 = (HelicsTime)jarg2; + result = (HelicsTime)helicsFederateRequestTimeAdvance(arg1,arg2,arg3); + jresult = (jdouble)result; { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnectComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestNextStep(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; HelicsError *arg2 = (HelicsError *) 0 ; HelicsError etemp2 ; + HelicsTime result; (void)jenv; (void)jcls; @@ -4292,7 +6004,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnectC arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateDisconnectComplete(arg1,arg2); + result = (HelicsTime)helicsFederateRequestNextStep(arg1,arg2); + jresult = (jdouble)result; { if (arg2->error_code!=HELICS_OK) { @@ -4300,53 +6013,91 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateDisconnectC (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeIterative(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jint jarg3, jintArray jarg4) { + jdouble jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsTime arg2 ; + HelicsIterationRequest arg3 ; + HelicsIterationResult *arg4 = (HelicsIterationResult *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsIterationResult temp4 ; + HelicsError etemp5 ; + HelicsTime result; (void)jenv; (void)jcls; + { + etemp5=helicsErrorInitialize(); + arg5=&etemp5; + } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateFree(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCloseLibrary(JNIEnv *jenv, jclass jcls) { - (void)jenv; - (void)jcls; - helicsCloseLibrary(); + arg2 = (HelicsTime)jarg2; + arg3 = (HelicsIterationRequest)jarg3; + { + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return 0; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return 0; + } + temp4 = (HelicsIterationResult)0; + arg4 = &temp4; + } + result = (HelicsTime)helicsFederateRequestTimeIterative(arg1,arg2,arg3,arg4,arg5); + jresult = (jdouble)result; + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + } + + { + if (arg5->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); + } + } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingMode(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + HelicsTime arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateEnterInitializingMode(arg1,arg2); + arg2 = (HelicsTime)jarg2; + helicsFederateRequestTimeAsync(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingModeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; HelicsError *arg2 = (HelicsError *) 0 ; HelicsError etemp2 ; + HelicsTime result; (void)jenv; (void)jcls; @@ -4355,7 +6106,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitia arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateEnterInitializingModeAsync(arg1,arg2); + result = (HelicsTime)helicsFederateRequestTimeComplete(arg1,arg2); + jresult = (jdouble)result; { if (arg2->error_code!=HELICS_OK) { @@ -4363,135 +6115,181 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitia (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateIsAsyncOperationCompleted(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeIterativeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jint jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsBool result; + HelicsTime arg2 ; + HelicsIterationRequest arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsBool)helicsFederateIsAsyncOperationCompleted(arg1,arg2); - jresult = (jint)result; + arg2 = (HelicsTime)jarg2; + arg3 = (HelicsIterationRequest)jarg3; + helicsFederateRequestTimeIterativeAsync(arg1,arg2,arg3,arg4); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterInitializingModeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeIterativeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) { + jdouble jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + HelicsIterationResult *arg2 = (HelicsIterationResult *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsIterationResult temp2 ; + HelicsError etemp3 ; + HelicsTime result; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateEnterInitializingModeComplete(arg1,arg2); { - if (arg2->error_code!=HELICS_OK) + if (!jarg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return 0; + } + if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return 0; + } + temp2 = (HelicsIterationResult)0; + arg2 = &temp2; + } + result = (HelicsTime)helicsFederateRequestTimeIterativeComplete(arg1,arg2,arg3); + jresult = (jdouble)result; + { + jint jvalue = (jint)temp2; + (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue); + } + + { + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingMode(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateProcessCommunications(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + HelicsTime arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateEnterExecutingMode(arg1,arg2); + arg2 = (HelicsTime)jarg2; + helicsFederateProcessCommunications(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsFederate *)&jarg1; + result = (char *)helicsFederateGetName(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTimeProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jdouble jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + int arg2 ; + HelicsTime arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateEnterExecutingModeAsync(arg1,arg2); + arg2 = (int)jarg2; + arg3 = (HelicsTime)jarg3; + helicsFederateSetTimeProperty(arg1,arg2,arg3,arg4); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + int arg2 ; + HelicsBool arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - helicsFederateEnterExecutingModeComplete(arg1,arg2); + arg2 = (int)jarg2; + arg3 = (HelicsBool)jarg3; + helicsFederateSetFlagOption(arg1,arg2,arg3,arg4); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeIterative(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jint jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetSeparator(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsIterationRequest arg2 ; + char arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsIterationResult result; (void)jenv; (void)jcls; @@ -4500,9 +6298,8 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecut arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsIterationRequest)jarg2; - result = (HelicsIterationResult)helicsFederateEnterExecutingModeIterative(arg1,arg2,arg3); - jresult = (jint)result; + arg2 = (char)jarg2; + helicsFederateSetSeparator(arg1,arg2,arg3); { if (arg3->error_code!=HELICS_OK) { @@ -4510,15 +6307,43 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecut (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeIterativeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetIntegerProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsIterationRequest arg2 ; + int arg2 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + helicsFederateSetIntegerProperty(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetTimeProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jdouble jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + int arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsTime result; (void)jenv; (void)jcls; @@ -4527,8 +6352,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecut arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsIterationRequest)jarg2; - helicsFederateEnterExecutingModeIterativeAsync(arg1,arg2,arg3); + arg2 = (int)jarg2; + result = (HelicsTime)helicsFederateGetTimeProperty(arg1,arg2,arg3); + jresult = (jdouble)result; { if (arg3->error_code!=HELICS_OK) { @@ -4536,69 +6362,74 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecut (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateEnterExecutingModeIterativeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsIterationResult result; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsBool result; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsIterationResult)helicsFederateEnterExecutingModeIterativeComplete(arg1,arg2); + arg2 = (int)jarg2; + result = (HelicsBool)helicsFederateGetFlagOption(arg1,arg2,arg3); jresult = (jint)result; { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetState(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetIntegerProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsFederateState result; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + int result; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsFederateState)helicsFederateGetState(arg1,arg2); + arg2 = (int)jarg2; + result = (int)helicsFederateGetIntegerProperty(arg1,arg2,arg3); jresult = (jint)result; { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCore(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCurrentTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; HelicsError *arg2 = (HelicsError *) 0 ; HelicsError etemp2 ; - HelicsCore result; + HelicsTime result; (void)jenv; (void)jcls; @@ -4607,8 +6438,8 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCore(JN arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsCore)helicsFederateGetCore(arg1,arg2); - *(HelicsCore *)&jresult = result; + result = (HelicsTime)helicsFederateGetCurrentTime(arg1,arg2); + jresult = (jdouble)result; { if (arg2->error_code!=HELICS_OK) { @@ -4620,144 +6451,154 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCore(JN } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateAddAlias(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsTime arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsTime result; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsTime)jarg2; - result = (HelicsTime)helicsFederateRequestTime(arg1,arg2,arg3); - jresult = (jdouble)result; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsFederateAddAlias(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeAdvance(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetGlobal(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsTime arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsTime result; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsTime)jarg2; - result = (HelicsTime)helicsFederateRequestTimeAdvance(arg1,arg2,arg3); - jresult = (jdouble)result; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsFederateSetGlobal(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestNextStep(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsTime result; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsTime)helicsFederateRequestNextStep(arg1,arg2); - jresult = (jdouble)result; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsFederateSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeIterative(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jint jarg3, jintArray jarg4) { - jdouble jresult = 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jstring jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsTime arg2 ; - HelicsIterationRequest arg3 ; - HelicsIterationResult *arg4 = (HelicsIterationResult *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsIterationResult temp4 ; - HelicsError etemp5 ; - HelicsTime result; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + char *result = 0 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsTime)jarg2; - arg3 = (HelicsIterationRequest)jarg3; - { - if (!jarg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return 0; - } - if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return 0; - } - temp4 = (HelicsIterationResult)0; - arg4 = &temp4; - } - result = (HelicsTime)helicsFederateRequestTimeIterative(arg1,arg2,arg3,arg4,arg5); - jresult = (jdouble)result; - { - jint jvalue = (jint)temp4; - (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; } - + result = (char *)helicsFederateGetTag(arg1,(char const *)arg2,arg3); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateAddDependency(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsTime arg2 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -4768,8 +6609,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTime arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsTime)jarg2; - helicsFederateRequestTimeAsync(arg1,arg2,arg3); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateAddDependency(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -4780,68 +6626,71 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTime } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetLogFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsTime result; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsTime)helicsFederateRequestTimeComplete(arg1,arg2); - jresult = (jdouble)result; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateSetLogFile(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeIterativeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jint jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogErrorMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsTime arg2 ; - HelicsIterationRequest arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsTime)jarg2; - arg3 = (HelicsIterationRequest)jarg3; - helicsFederateRequestTimeIterativeAsync(arg1,arg2,arg3,arg4); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateLogErrorMessage(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestTimeIterativeComplete(JNIEnv *jenv, jclass jcls, jlong jarg1, jintArray jarg2) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogWarningMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsIterationResult *arg2 = (HelicsIterationResult *) 0 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; - HelicsIterationResult temp2 ; HelicsError etemp3 ; - HelicsTime result; (void)jenv; (void)jcls; @@ -4850,25 +6699,13 @@ SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestT arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - { - if (!jarg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return 0; - } - if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return 0; - } - temp2 = (HelicsIterationResult)0; - arg2 = &temp2; - } - result = (HelicsTime)helicsFederateRequestTimeIterativeComplete(arg1,arg2,arg3); - jresult = (jdouble)result; - { - jint jvalue = (jint)temp2; - (*jenv)->SetIntArrayRegion(jenv, jarg2, 0, 1, &jvalue); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - + helicsFederateLogWarningMessage(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -4876,13 +6713,12 @@ SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateRequestT (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateProcessCommunications(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogInfoMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsTime arg2 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -4893,8 +6729,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateProcessComm arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsTime)jarg2; - helicsFederateProcessCommunications(arg1,arg2,arg3); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateLogInfoMessage(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -4905,51 +6746,40 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateProcessComm } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - result = (char *)helicsFederateGetName(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTimeProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jdouble jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogDebugMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - HelicsTime arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - arg3 = (HelicsTime)jarg3; - helicsFederateSetTimeProperty(arg1,arg2,arg3,arg4); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFederateLogDebugMessage(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogLevelMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; int arg2 ; - HelicsBool arg3 ; + char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; @@ -4961,8 +6791,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetFlagOpti } arg1 = *(HelicsFederate *)&jarg1; arg2 = (int)jarg2; - arg3 = (HelicsBool)jarg3; - helicsFederateSetFlagOption(arg1,arg2,arg3,arg4); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsFederateLogLevelMessage(arg1,arg2,(char const *)arg3,arg4); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { if (arg4->error_code!=HELICS_OK) { @@ -4973,174 +6808,200 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetFlagOpti } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetSeparator(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSendCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; - char arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (char)jarg2; - helicsFederateSetSeparator(arg1,arg2,arg3); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsFederateSendCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetIntegerProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCommand(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + char *result = 0 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - arg3 = (int)jarg3; - helicsFederateSetIntegerProperty(arg1,arg2,arg3,arg4); + result = (char *)helicsFederateGetCommand(arg1,arg2); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetTimeProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jdouble jresult = 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCommandSource(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsTime result; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + char *result = 0 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsTime)helicsFederateGetTimeProperty(arg1,arg2,arg3); - jresult = (jdouble)result; + result = (char *)helicsFederateGetCommandSource(arg1,arg2); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jint jresult = 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateWaitCommand(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsBool result; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + char *result = 0 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsBool)helicsFederateGetFlagOption(arg1,arg2,arg3); - jresult = (jint)result; + result = (char *)helicsFederateWaitCommand(arg1,arg2); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetIntegerProperty(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jint jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSetGlobal(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - result = (int)helicsFederateGetIntegerProperty(arg1,arg2,arg3); - jresult = (jint)result; + arg1 = *(HelicsCore *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsCoreSetGlobal(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCurrentTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsTime result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetGlobal(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsTime)helicsFederateGetCurrentTime(arg1,arg2); - jresult = (jdouble)result; + arg1 = *(HelicsBroker *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsBrokerSetGlobal(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetGlobal(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreAddAlias(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; @@ -5152,7 +7013,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetGlobal(J etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsCore *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); @@ -5163,7 +7024,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetGlobal(J arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); if (!arg3) return ; } - helicsFederateSetGlobal(arg1,(char const *)arg2,(char const *)arg3,arg4); + helicsCoreAddAlias(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { @@ -5176,8 +7037,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetGlobal(J } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerAddAlias(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; @@ -5189,7 +7050,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTag(JNIE etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsBroker *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); @@ -5200,7 +7061,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTag(JNIE arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); if (!arg3) return ; } - helicsFederateSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); + helicsBrokerAddAlias(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { @@ -5213,132 +7074,156 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTag(JNIE } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jstring jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSendCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - char *result = 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsCore *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; + if (!arg2) return ; } - result = (char *)helicsFederateGetTag(arg1,(char const *)arg2,arg3); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsCoreSendCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateAddDependency(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSendOrderedCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsCore *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederateAddDependency(arg1,(char const *)arg2,arg3); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsCoreSendOrderedCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetLogFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSendCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsBroker *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederateSetLogFile(arg1,(char const *)arg2,arg3); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsBrokerSendCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogErrorMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSendOrderedCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsBroker *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederateLogErrorMessage(arg1,(char const *)arg2,arg3); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsBrokerSendOrderedCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogWarningMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSetLogFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsCore arg1 = (HelicsCore) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -5349,13 +7234,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogWarningM etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsCore *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederateLogWarningMessage(arg1,(char const *)arg2,arg3); + helicsCoreSetLogFile(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -5367,8 +7252,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogWarningM } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogInfoMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetLogFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsBroker arg1 = (HelicsBroker) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -5379,13 +7264,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogInfoMess etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsBroker *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederateLogInfoMessage(arg1,(char const *)arg2,arg3); + helicsBrokerSetLogFile(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -5397,9 +7282,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogInfoMess } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogDebugMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetTimeBarrier(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + HelicsTime arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -5409,14 +7294,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogDebugMes etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsFederateLogDebugMessage(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsBroker *)&jarg1; + arg2 = (HelicsTime)jarg2; + helicsBrokerSetTimeBarrier(arg1,arg2,arg3); { if (arg3->error_code!=HELICS_OK) { @@ -5427,8 +7307,50 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogDebugMes } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogLevelMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerClearTimeBarrier(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsBroker *)&jarg1; + helicsBrokerClearTimeBarrier(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerGlobalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { + HelicsBroker arg1 = (HelicsBroker) 0 ; + int arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsBroker *)&jarg1; + arg2 = (int)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsBrokerGlobalError(arg1,arg2,(char const *)arg3,arg4); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreGlobalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { + HelicsCore arg1 = (HelicsCore) 0 ; int arg2 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; @@ -5437,122 +7359,169 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateLogLevelMes (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsCore *)&jarg1; + arg2 = (int)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsCoreGlobalError(arg1,arg2,(char const *)arg3,arg4); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateQuery(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) { + jlong jresult = 0 ; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + HelicsQuery result; + + (void)jenv; + (void)jcls; + arg1 = 0; + if (jarg1) { + arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); + if (!arg1) return 0; + } + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + result = (HelicsQuery)helicsCreateQuery((char const *)arg1,(char const *)arg2); + *(HelicsQuery *)&jresult = result; + if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryExecute(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + jstring jresult = 0 ; + HelicsQuery arg1 = (HelicsQuery) 0 ; + HelicsFederate arg2 = (HelicsFederate) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - helicsFederateLogLevelMessage(arg1,arg2,(char const *)arg3,arg4); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg1 = *(HelicsQuery *)&jarg1; + arg2 = *(HelicsFederate *)&jarg2; + result = (char *)helicsQueryExecute(arg1,arg2,arg3); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSendCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryCoreExecute(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + jstring jresult = 0 ; + HelicsQuery arg1 = (HelicsQuery) 0 ; + HelicsCore arg2 = (HelicsCore) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + char *result = 0 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - helicsFederateSendCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg1 = *(HelicsQuery *)&jarg1; + arg2 = *(HelicsCore *)&jarg2; + result = (char *)helicsQueryCoreExecute(arg1,arg2,arg3); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCommand(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryBrokerExecute(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { jstring jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; + HelicsQuery arg1 = (HelicsQuery) 0 ; + HelicsBroker arg2 = (HelicsBroker) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; char *result = 0 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; - result = (char *)helicsFederateGetCommand(arg1,arg2); + arg1 = *(HelicsQuery *)&jarg1; + arg2 = *(HelicsBroker *)&jarg2; + result = (char *)helicsQueryBrokerExecute(arg1,arg2,arg3); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetCommandSource(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - char *result = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQueryExecuteAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + HelicsQuery arg1 = (HelicsQuery) 0 ; + HelicsFederate arg2 = (HelicsFederate) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; - result = (char *)helicsFederateGetCommandSource(arg1,arg2); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsQuery *)&jarg1; + arg2 = *(HelicsFederate *)&jarg2; + helicsQueryExecuteAsync(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateWaitCommand(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryExecuteComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { jstring jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsQuery arg1 = (HelicsQuery) 0 ; HelicsError *arg2 = (HelicsError *) 0 ; HelicsError etemp2 ; char *result = 0 ; @@ -5563,8 +7532,8 @@ SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateWaitComm etemp2=helicsErrorInitialize(); arg2=&etemp2; } - arg1 = *(HelicsFederate *)&jarg1; - result = (char *)helicsFederateWaitCommand(arg1,arg2); + arg1 = *(HelicsQuery *)&jarg1; + result = (char *)helicsQueryExecuteComplete(arg1,arg2); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); { if (arg2->error_code!=HELICS_OK) @@ -5577,123 +7546,136 @@ SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFederateWaitComm } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSetGlobal(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsCore arg1 = (HelicsCore) 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsQueryIsCompleted(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsQuery arg1 = (HelicsQuery) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsQuery *)&jarg1; + result = (HelicsBool)helicsQueryIsCompleted(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsQuery arg1 = (HelicsQuery) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsCore *)&jarg1; + arg1 = *(HelicsQuery *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsCoreSetGlobal(arg1,(char const *)arg2,(char const *)arg3,arg4); + helicsQuerySetTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetGlobal(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsBroker arg1 = (HelicsBroker) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetQueryString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsQuery arg1 = (HelicsQuery) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsBroker *)&jarg1; + arg1 = *(HelicsQuery *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsBrokerSetGlobal(arg1,(char const *)arg2,(char const *)arg3,arg4); + helicsQuerySetQueryString(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSendCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsCore arg1 = (HelicsCore) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetOrdering(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + HelicsQuery arg1 = (HelicsQuery) 0 ; + int32_t arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + int32_t *argp2 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsCore *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + arg1 = *(HelicsQuery *)&jarg1; + argp2 = *(int32_t **)&jarg2; + if (!argp2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null int32_t"); + return ; } - helicsCoreSendCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg2 = *argp2; + helicsQuerySetOrdering(arg1,arg2,arg3); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSendCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsBroker arg1 = (HelicsBroker) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQueryFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsQuery arg1 = (HelicsQuery) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsQuery *)&jarg1; + helicsQueryFree(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCleanupLibrary(JNIEnv *jenv, jclass jcls) { + (void)jenv; + (void)jcls; + helicsCleanupLibrary(); +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterSubscription(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; + HelicsInput result; (void)jenv; (void)jcls; @@ -5701,18 +7683,19 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSendCommand(J etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsBroker *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } arg3 = 0; if (jarg3) { arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + if (!arg3) return 0; } - helicsBrokerSendCommand(arg1,(char const *)arg2,(char const *)arg3,arg4); + result = (HelicsInput)helicsFederateRegisterSubscription(arg1,(char const *)arg2,(char const *)arg3,arg4); + *(HelicsInput *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { @@ -5722,352 +7705,381 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSendCommand(J (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreSetLogFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsCore arg1 = (HelicsCore) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterPublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + HelicsDataTypes arg3 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsPublication result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsCore *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } - helicsCoreSetLogFile(arg1,(char const *)arg2,arg3); + arg3 = (HelicsDataTypes)jarg3; + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; + } + result = (HelicsPublication)helicsFederateRegisterPublication(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); + *(HelicsPublication *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg3->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetLogFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsBroker arg1 = (HelicsBroker) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTypePublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsPublication result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsBroker *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } - helicsBrokerSetLogFile(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; } -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerSetTimeBarrier(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - HelicsBroker arg1 = (HelicsBroker) 0 ; - HelicsTime arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - - (void)jenv; - (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; } - arg1 = *(HelicsBroker *)&jarg1; - arg2 = (HelicsTime)jarg2; - helicsBrokerSetTimeBarrier(arg1,arg2,arg3); + result = (HelicsPublication)helicsFederateRegisterTypePublication(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); + *(HelicsPublication *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg3->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerClearTimeBarrier(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsBroker arg1 = (HelicsBroker) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsBroker *)&jarg1; - helicsBrokerClearTimeBarrier(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsBrokerGlobalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { - HelicsBroker arg1 = (HelicsBroker) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalPublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; + HelicsDataTypes arg3 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsPublication result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsBroker *)&jarg1; - arg2 = (int)jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; } - helicsBrokerGlobalError(arg1,arg2,(char const *)arg3,arg4); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg3 = (HelicsDataTypes)jarg3; + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; + } + result = (HelicsPublication)helicsFederateRegisterGlobalPublication(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); + *(HelicsPublication *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg4->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCoreGlobalError(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { - HelicsCore arg1 = (HelicsCore) 0 ; - int arg2 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalTypePublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsPublication result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; } - arg1 = *(HelicsCore *)&jarg1; - arg2 = (int)jarg2; arg3 = 0; if (jarg3) { arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + if (!arg3) return 0; } - helicsCoreGlobalError(arg1,arg2,(char const *)arg3,arg4); + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; + } + result = (HelicsPublication)helicsFederateRegisterGlobalTypePublication(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); + *(HelicsPublication *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg4->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } + return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCreateQuery(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { jlong jresult = 0 ; - char *arg1 = (char *) 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - HelicsQuery result; + HelicsDataTypes arg3 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsInput result; (void)jenv; (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; + { + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return 0; } - result = (HelicsQuery)helicsCreateQuery((char const *)arg1,(char const *)arg2); - *(HelicsQuery *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryExecute(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jstring jresult = 0 ; - HelicsQuery arg1 = (HelicsQuery) 0 ; - HelicsFederate arg2 = (HelicsFederate) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + arg3 = (HelicsDataTypes)jarg3; + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; } - arg1 = *(HelicsQuery *)&jarg1; - arg2 = *(HelicsFederate *)&jarg2; - result = (char *)helicsQueryExecute(arg1,arg2,arg3); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + result = (HelicsInput)helicsFederateRegisterInput(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); + *(HelicsInput *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg3->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryCoreExecute(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jstring jresult = 0 ; - HelicsQuery arg1 = (HelicsQuery) 0 ; - HelicsCore arg2 = (HelicsCore) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - char *result = 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTypeInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsInput result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsQuery *)&jarg1; - arg2 = *(HelicsCore *)&jarg2; - result = (char *)helicsQueryCoreExecute(arg1,arg2,arg3); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; + } + result = (HelicsInput)helicsFederateRegisterTypeInput(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); + *(HelicsInput *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg3->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryBrokerExecute(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jstring jresult = 0 ; - HelicsQuery arg1 = (HelicsQuery) 0 ; - HelicsBroker arg2 = (HelicsBroker) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - char *result = 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; + HelicsDataTypes arg3 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsPublication result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsQuery *)&jarg1; - arg2 = *(HelicsBroker *)&jarg2; - result = (char *)helicsQueryBrokerExecute(arg1,arg2,arg3); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + arg3 = (HelicsDataTypes)jarg3; + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; + } + result = (HelicsPublication)helicsFederateRegisterGlobalInput(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); + *(HelicsPublication *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg3->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQueryExecuteAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - HelicsQuery arg1 = (HelicsQuery) 0 ; - HelicsFederate arg2 = (HelicsFederate) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalTypeInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; + HelicsPublication result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsQuery *)&jarg1; - arg2 = *(HelicsFederate *)&jarg2; - helicsQueryExecuteAsync(arg1,arg2,arg3); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; } -} - - -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsQueryExecuteComplete(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsQuery arg1 = (HelicsQuery) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; } - arg1 = *(HelicsQuery *)&jarg1; - result = (char *)helicsQueryExecuteComplete(arg1,arg2); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return 0; + } + result = (HelicsPublication)helicsFederateRegisterGlobalTypeInput(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); + *(HelicsPublication *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg2->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsQueryIsCompleted(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsQuery arg1 = (HelicsQuery) 0 ; - HelicsBool result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsQuery *)&jarg1; - result = (HelicsBool)helicsQueryIsCompleted(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsQuery arg1 = (HelicsQuery) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsPublication result; (void)jenv; (void)jcls; @@ -6075,13 +8087,14 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetTarget(JNIE etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsQuery *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } - helicsQuerySetTarget(arg1,(char const *)arg2,arg3); + result = (HelicsPublication)helicsFederateGetPublication(arg1,(char const *)arg2,arg3); + *(HelicsPublication *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -6090,14 +8103,17 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetTarget(JNIE (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetQueryString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsQuery arg1 = (HelicsQuery) 0 ; - char *arg2 = (char *) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublicationByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + int arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsPublication result; (void)jenv; (void)jcls; @@ -6105,14 +8121,10 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetQueryString etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsQuery *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsQuerySetQueryString(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (int)jarg2; + result = (HelicsPublication)helicsFederateGetPublicationByIndex(arg1,arg2,arg3); + *(HelicsPublication *)&jresult = result; { if (arg3->error_code!=HELICS_OK) { @@ -6120,15 +8132,17 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetQueryString (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetOrdering(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - HelicsQuery arg1 = (HelicsQuery) 0 ; - int32_t arg2 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; - int32_t *argp2 ; HelicsError etemp3 ; + HelicsInput result; (void)jenv; (void)jcls; @@ -6136,14 +8150,15 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetOrdering(JN etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsQuery *)&jarg1; - argp2 = *(int32_t **)&jarg2; - if (!argp2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null int32_t"); - return ; + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; } - arg2 = *argp2; - helicsQuerySetOrdering(arg1,arg2,arg3); + result = (HelicsInput)helicsFederateGetInput(arg1,(char const *)arg2,arg3); + *(HelicsInput *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -6151,82 +8166,52 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQuerySetOrdering(JN (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsQueryFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsQuery arg1 = (HelicsQuery) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsQuery *)&jarg1; - helicsQueryFree(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCleanupLibrary(JNIEnv *jenv, jclass jcls) { - (void)jenv; - (void)jcls; - helicsCleanupLibrary(); -} - - -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterSubscription(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInputByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; HelicsInput result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (HelicsInput)helicsFederateRegisterSubscription(arg1,(char const *)arg2,(char const *)arg3,arg4); + arg2 = (int)jarg2; + result = (HelicsInput)helicsFederateGetInputByIndex(arg1,arg2,arg3); *(HelicsInput *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterPublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetSubscription(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - HelicsDataTypes arg3 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsPublication result; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsInput result; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; @@ -6234,42 +8219,33 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterPu arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return 0; } - arg3 = (HelicsDataTypes)jarg3; - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; - } - result = (HelicsPublication)helicsFederateRegisterPublication(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); - *(HelicsPublication *)&jresult = result; + result = (HelicsInput)helicsFederateGetSubscription(arg1,(char const *)arg2,arg3); + *(HelicsInput *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTypePublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInputByTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsPublication result; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsInput result; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; @@ -6277,312 +8253,216 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTy arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return 0; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; - } - result = (HelicsPublication)helicsFederateRegisterTypePublication(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); - *(HelicsPublication *)&jresult = result; + result = (HelicsInput)helicsFederateGetInputByTarget(arg1,(char const *)arg2,arg3); + *(HelicsInput *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalPublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { - jlong jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateClearUpdates(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsFederate *)&jarg1; + helicsFederateClearUpdates(arg1); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFromPublicationJSON(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - HelicsDataTypes arg3 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsPublication result; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (HelicsDataTypes)jarg3; - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; + if (!arg2) return ; } - result = (HelicsPublication)helicsFederateRegisterGlobalPublication(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); - *(HelicsPublication *)&jresult = result; + helicsFederateRegisterFromPublicationJSON(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalTypePublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { - jlong jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederatePublishJSON(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsPublication result; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; + if (!arg2) return ; } - result = (HelicsPublication)helicsFederateRegisterGlobalTypePublication(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); - *(HelicsPublication *)&jresult = result; + helicsFederatePublishJSON(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsPublicationIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsPublication arg1 = (HelicsPublication) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsPublication *)&jarg1; + result = (HelicsBool)helicsPublicationIsValid(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - HelicsDataTypes arg3 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsInput result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + void *arg2 = (void *) 0 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (HelicsDataTypes)jarg3; - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - result = (HelicsInput)helicsFederateRegisterInput(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); - *(HelicsInput *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); + arg1 = *(HelicsPublication *)&jarg1; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + helicsPublicationPublishBytes(arg1,(void const *)arg2,arg3,arg4); { - if (arg5->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTypeInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsInput result; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsPublication *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; + if (!arg2) return ; } - result = (HelicsInput)helicsFederateRegisterTypeInput(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); - *(HelicsInput *)&jresult = result; + helicsPublicationPublishString(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3, jstring jarg4) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - HelicsDataTypes arg3 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsPublication result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + int64_t arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (HelicsDataTypes)jarg3; - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - result = (HelicsPublication)helicsFederateRegisterGlobalInput(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5); - *(HelicsPublication *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (int64_t)jarg2; + helicsPublicationPublishInteger(arg1,arg2,arg3); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalTypeInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jstring jarg4) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - HelicsPublication result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishBoolean(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + HelicsBool arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - result = (HelicsPublication)helicsFederateRegisterGlobalTypeInput(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5); - *(HelicsPublication *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (HelicsBool)jarg2; + helicsPublicationPublishBoolean(arg1,arg2,arg3); { - if (arg5->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublication(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishDouble(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + double arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsPublication result; (void)jenv; (void)jcls; @@ -6590,15 +8470,9 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublica etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (HelicsPublication)helicsFederateGetPublication(arg1,(char const *)arg2,arg3); - *(HelicsPublication *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (double)jarg2; + helicsPublicationPublishDouble(arg1,arg2,arg3); { if (arg3->error_code!=HELICS_OK) { @@ -6606,17 +8480,14 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublica (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublicationByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + HelicsTime arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsPublication result; (void)jenv; (void)jcls; @@ -6624,10 +8495,9 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublica etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsPublication)helicsFederateGetPublicationByIndex(arg1,arg2,arg3); - *(HelicsPublication *)&jresult = result; + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (HelicsTime)jarg2; + helicsPublicationPublishTime(arg1,arg2,arg3); { if (arg3->error_code!=HELICS_OK) { @@ -6635,17 +8505,14 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublica (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInput(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishChar(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + char arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsInput result; (void)jenv; (void)jcls; @@ -6653,15 +8520,9 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInput(J etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (HelicsInput)helicsFederateGetInput(arg1,(char const *)arg2,arg3); - *(HelicsInput *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (char)jarg2; + helicsPublicationPublishChar(arg1,arg2,arg3); { if (arg3->error_code!=HELICS_OK) { @@ -6669,85 +8530,158 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInput(J (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInputByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsInput result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishComplex(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jdouble jarg3) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + double arg2 ; + double arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (double)jarg2; + arg3 = (double)jarg3; + helicsPublicationPublishComplex(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + double temp2 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsPublication *)&jarg1; + { + if (!jarg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp2 = (double)0; + arg2 = &temp2; + } + arg3 = (int)jarg3; + helicsPublicationPublishVector(arg1,(double const *)arg2,arg3,arg4); + { + jdouble jvalue = (jdouble)temp2; + (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); + } + + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishComplexVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + double temp2 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsPublication *)&jarg1; + { + if (!jarg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp2 = (double)0; + arg2 = &temp2; + } + arg3 = (int)jarg3; + helicsPublicationPublishComplexVector(arg1,(double const *)arg2,arg3,arg4); + { + jdouble jvalue = (jdouble)temp2; + (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsInput)helicsFederateGetInputByIndex(arg1,arg2,arg3); - *(HelicsInput *)&jresult = result; + { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetSubscription(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishNamedPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { + HelicsPublication arg1 = (HelicsPublication) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsInput result; + double arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsPublication *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; + if (!arg2) return ; } - result = (HelicsInput)helicsFederateGetSubscription(arg1,(char const *)arg2,arg3); - *(HelicsInput *)&jresult = result; + arg3 = (double)jarg3; + helicsPublicationPublishNamedPoint(arg1,(char const *)arg2,arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateClearUpdates(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsFederate arg1 = (HelicsFederate) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - helicsFederateClearUpdates(arg1); } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFromPublicationJSON(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationAddTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -6758,13 +8692,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFro etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsPublication *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederateRegisterFromPublicationJSON(arg1,(char const *)arg2,arg3); + helicsPublicationAddTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -6776,8 +8710,22 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFro } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederatePublishJSON(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsInput *)&jarg1; + result = (HelicsBool)helicsInputIsValid(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputAddTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsInput arg1 = (HelicsInput) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -6788,13 +8736,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederatePublishJSON etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; + arg1 = *(HelicsInput *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFederatePublishJSON(arg1,(char const *)arg2,arg3); + helicsInputAddTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -6806,279 +8754,304 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederatePublishJSON } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsPublicationIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetByteCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsPublication arg1 = (HelicsPublication) 0 ; - HelicsBool result; + HelicsInput arg1 = (HelicsInput) 0 ; + int result; (void)jenv; (void)jcls; - arg1 = *(HelicsPublication *)&jarg1; - result = (HelicsBool)helicsPublicationIsValid(arg1); + arg1 = *(HelicsInput *)&jarg1; + result = (int)helicsInputGetByteCount(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { - HelicsPublication arg1 = (HelicsPublication) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { + HelicsInput arg1 = (HelicsInput) 0 ; void *arg2 = (void *) 0 ; int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + int *arg4 = (int *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + int temp4 ; + HelicsError etemp5 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsPublication *)&jarg1; + arg1 = *(HelicsInput *)&jarg1; arg2 = *(void **)&jarg2; arg3 = (int)jarg3; - helicsPublicationPublishBytes(arg1,(void const *)arg2,arg3,arg4); { - if (arg4->error_code!=HELICS_OK) + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp4 = (int)0; + arg4 = &temp4; + } + helicsInputGetBytes(arg1,arg2,arg3,arg4,arg5); + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + } + + { + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetStringSize(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + int result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsInput *)&jarg1; + result = (int)helicsInputGetStringSize(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jintArray jarg4) { + HelicsInput arg1 = (HelicsInput) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + int arg3 ; + int *arg4 = (int *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + int temp4 ; + HelicsError etemp5 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = *(HelicsInput *)&jarg1; + { + arg2 = (char*)(*jenv)->GetByteArrayElements(jenv, jarg2, 0); + arg3 = (int)(*jenv)->GetArrayLength(jenv, jarg2); } - helicsPublicationPublishString(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; } + temp4 = (int)0; + arg4 = &temp4; } -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - int64_t arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - - (void)jenv; - (void)jcls; + helicsInputGetString(arg1,arg2,arg3,arg4,arg5); { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte*)arg2, 0); } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (int64_t)jarg2; - helicsPublicationPublishInteger(arg1,arg2,arg3); { - if (arg3->error_code!=HELICS_OK) + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + } + + { + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishBoolean(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - HelicsBool arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsInputGetInteger(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + int64_t result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (HelicsBool)jarg2; - helicsPublicationPublishBoolean(arg1,arg2,arg3); + arg1 = *(HelicsInput *)&jarg1; + result = helicsInputGetInteger(arg1,arg2); + jresult = (jlong)result; { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishDouble(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - double arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetBoolean(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsBool result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (double)jarg2; - helicsPublicationPublishDouble(arg1,arg2,arg3); + arg1 = *(HelicsInput *)&jarg1; + result = (HelicsBool)helicsInputGetBoolean(arg1,arg2); + jresult = (jint)result; { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - HelicsTime arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsInputGetDouble(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + double result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (HelicsTime)jarg2; - helicsPublicationPublishTime(arg1,arg2,arg3); + arg1 = *(HelicsInput *)&jarg1; + result = (double)helicsInputGetDouble(arg1,arg2); + jresult = (jdouble)result; { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishChar(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - char arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsInputGetTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsTime result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (char)jarg2; - helicsPublicationPublishChar(arg1,arg2,arg3); + arg1 = *(HelicsInput *)&jarg1; + result = (HelicsTime)helicsInputGetTime(arg1,arg2); + jresult = (jdouble)result; { - if (arg3->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishComplex(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jdouble jarg3) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - double arg2 ; - double arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jchar JNICALL Java_com_java_helics_helicsJNI_helicsInputGetChar(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jchar jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + char result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (double)jarg2; - arg3 = (double)jarg3; - helicsPublicationPublishComplex(arg1,arg2,arg3,arg4); + arg1 = *(HelicsInput *)&jarg1; + result = (char)helicsInputGetChar(arg1,arg2); + jresult = (jchar)result; { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - double temp2 ; - HelicsError etemp4 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplexObject(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsComplex result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsPublication *)&jarg1; - { - if (!jarg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp2 = (double)0; - arg2 = &temp2; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - arg3 = (int)jarg3; - helicsPublicationPublishVector(arg1,(double const *)arg2,arg3,arg4); + arg1 = *(HelicsInput *)&jarg1; + result = helicsInputGetComplexObject(arg1,arg2); { - jdouble jvalue = (jdouble)temp2; - (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); + HelicsComplex * resultptr = (HelicsComplex *) malloc(sizeof(HelicsComplex)); + memmove(resultptr, &result, sizeof(HelicsComplex)); + *(HelicsComplex **)&jresult = resultptr; } - { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishComplexVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { - HelicsPublication arg1 = (HelicsPublication) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplex(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jdoubleArray jarg3) { + HelicsInput arg1 = (HelicsInput) 0 ; double *arg2 = (double *) 0 ; - int arg3 ; + double *arg3 = (double *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; double temp2 ; + double temp3 ; HelicsError etemp4 ; (void)jenv; @@ -7087,7 +9060,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishC etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsPublication *)&jarg1; + arg1 = *(HelicsInput *)&jarg1; { if (!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); @@ -7100,130 +9073,40 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishC temp2 = (double)0; arg2 = &temp2; } - arg3 = (int)jarg3; - helicsPublicationPublishComplexVector(arg1,(double const *)arg2,arg3,arg4); - { - jdouble jvalue = (jdouble)temp2; - (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); - } - - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationPublishNamedPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; - - (void)jenv; - (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - arg3 = (double)jarg3; - helicsPublicationPublishNamedPoint(arg1,(char const *)arg2,arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + if (!jarg3) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; } - } -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationAddTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - - (void)jenv; - (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsPublicationAddTarget(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; } + temp3 = (double)0; + arg3 = &temp3; } -} - - -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; - HelicsBool result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - result = (HelicsBool)helicsInputIsValid(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputAddTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsInput arg1 = (HelicsInput) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - - (void)jenv; - (void)jcls; + helicsInputGetComplex(arg1,arg2,arg3,arg4); { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + jdouble jvalue = (jdouble)temp2; + (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); } - arg1 = *(HelicsInput *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + { + jdouble jvalue = (jdouble)temp3; + (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue); } - helicsInputAddTarget(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + + { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetByteCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetVectorSize(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; int result; @@ -7231,15 +9114,15 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetByteCount(J (void)jenv; (void)jcls; arg1 = *(HelicsInput *)&jarg1; - result = (int)helicsInputGetByteCount(arg1); + result = (int)helicsInputGetVectorSize(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { HelicsInput arg1 = (HelicsInput) 0 ; - void *arg2 = (void *) 0 ; + double *arg2 ; int arg3 ; int *arg4 = (int *) 0 ; HelicsError *arg5 = (HelicsError *) 0 ; @@ -7253,7 +9136,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetBytes(JNIEn arg5=&etemp5; } arg1 = *(HelicsInput *)&jarg1; - arg2 = *(void **)&jarg2; + arg2 = *(double **)&jarg2; arg3 = (int)jarg3; { if (!jarg4) { @@ -7267,12 +9150,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetBytes(JNIEn temp4 = (int)0; arg4 = &temp4; } - helicsInputGetBytes(arg1,arg2,arg3,arg4,arg5); + helicsInputGetVector(arg1,arg2,arg3,arg4,arg5); { jint jvalue = (jint)temp4; (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } + { if (arg5->error_code!=HELICS_OK) { @@ -7283,34 +9167,69 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetBytes(JNIEn } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetStringSize(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplexVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { HelicsInput arg1 = (HelicsInput) 0 ; - int result; + double *arg2 ; + int arg3 ; + int *arg4 = (int *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + int temp4 ; + HelicsError etemp5 ; (void)jenv; (void)jcls; + { + etemp5=helicsErrorInitialize(); + arg5=&etemp5; + } arg1 = *(HelicsInput *)&jarg1; - result = (int)helicsInputGetStringSize(arg1); - jresult = (jint)result; - return jresult; + arg2 = *(double **)&jarg2; + arg3 = (int)jarg3; + { + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp4 = (int)0; + arg4 = &temp4; + } + helicsInputGetComplexVector(arg1,arg2,arg3,arg4,arg5); + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + } + + + { + if (arg5->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); + } + } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jintArray jarg4) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetNamedPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jintArray jarg4, jdoubleArray jarg5) { HelicsInput arg1 = (HelicsInput) 0 ; char *arg2 = (char *) 0 ; int arg3 ; int *arg4 = (int *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; + double *arg5 = (double *) 0 ; + HelicsError *arg6 = (HelicsError *) 0 ; int temp4 ; - HelicsError etemp5 ; + double temp5 ; + HelicsError etemp6 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp6=helicsErrorInitialize(); + arg6=&etemp6; } arg1 = *(HelicsInput *)&jarg1; { @@ -7329,7 +9248,19 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetString(JNIE temp4 = (int)0; arg4 = &temp4; } - helicsInputGetString(arg1,arg2,arg3,arg4,arg5); + { + if (!jarg5) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp5 = (double)0; + arg5 = &temp5; + } + helicsInputGetNamedPoint(arg1,arg2,arg3,arg4,arg5,arg6); { (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte*)arg2, 0); } @@ -7337,190 +9268,237 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetString(JNIE jint jvalue = (jint)temp4; (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } + { + jdouble jvalue = (jdouble)temp5; + (*jenv)->SetDoubleArrayRegion(jenv, jarg5, 0, 1, &jvalue); + } + { - if (arg5->error_code!=HELICS_OK) + if (arg6->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg6->message); } } } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsInputGetInteger(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { HelicsInput arg1 = (HelicsInput) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - int64_t result; + void *arg2 = (void *) 0 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsInput *)&jarg1; - result = helicsInputGetInteger(arg1,arg2); - jresult = (jlong)result; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + helicsInputSetDefaultBytes(arg1,(void const *)arg2,arg3,arg4); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetBoolean(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsInput arg1 = (HelicsInput) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsBool result; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsInput *)&jarg1; - result = (HelicsBool)helicsInputGetBoolean(arg1,arg2); - jresult = (jint)result; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsInputSetDefaultString(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsInputGetDouble(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { HelicsInput arg1 = (HelicsInput) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - double result; + int64_t arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsInput *)&jarg1; - result = (double)helicsInputGetDouble(arg1,arg2); - jresult = (jdouble)result; + arg2 = (int64_t)jarg2; + helicsInputSetDefaultInteger(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsInputGetTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultBoolean(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { HelicsInput arg1 = (HelicsInput) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsTime result; + HelicsBool arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsInput *)&jarg1; - result = (HelicsTime)helicsInputGetTime(arg1,arg2); - jresult = (jdouble)result; + arg2 = (HelicsBool)jarg2; + helicsInputSetDefaultBoolean(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + HelicsInput arg1 = (HelicsInput) 0 ; + HelicsTime arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsInput *)&jarg1; + arg2 = (HelicsTime)jarg2; + helicsInputSetDefaultTime(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultChar(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { + HelicsInput arg1 = (HelicsInput) 0 ; + char arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsInput *)&jarg1; + arg2 = (char)jarg2; + helicsInputSetDefaultChar(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jchar JNICALL Java_com_java_helics_helicsJNI_helicsInputGetChar(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jchar jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultDouble(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { HelicsInput arg1 = (HelicsInput) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - char result; + double arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsInput *)&jarg1; - result = (char)helicsInputGetChar(arg1,arg2); - jresult = (jchar)result; + arg2 = (double)jarg2; + helicsInputSetDefaultDouble(arg1,arg2,arg3); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplexObject(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultComplex(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jdouble jarg3) { HelicsInput arg1 = (HelicsInput) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsComplex result; + double arg2 ; + double arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsInput *)&jarg1; - result = helicsInputGetComplexObject(arg1,arg2); - { - HelicsComplex * resultptr = (HelicsComplex *) malloc(sizeof(HelicsComplex)); - memmove(resultptr, &result, sizeof(HelicsComplex)); - *(HelicsComplex **)&jresult = resultptr; - } + arg2 = (double)jarg2; + arg3 = (double)jarg3; + helicsInputSetDefaultComplex(arg1,arg2,arg3,arg4); { - if (arg2->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplex(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jdoubleArray jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { HelicsInput arg1 = (HelicsInput) 0 ; double *arg2 = (double *) 0 ; - double *arg3 = (double *) 0 ; + int arg3 ; HelicsError *arg4 = (HelicsError *) 0 ; double temp2 ; - double temp3 ; HelicsError etemp4 ; (void)jenv; @@ -7542,28 +9520,12 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplex(JNI temp2 = (double)0; arg2 = &temp2; } - { - if (!jarg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg3) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp3 = (double)0; - arg3 = &temp3; - } - helicsInputGetComplex(arg1,arg2,arg3,arg4); + arg3 = (int)jarg3; + helicsInputSetDefaultVector(arg1,(double const *)arg2,arg3,arg4); { jdouble jvalue = (jdouble)temp2; (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); } - { - jdouble jvalue = (jdouble)temp3; - (*jenv)->SetDoubleArrayRegion(jenv, jarg3, 0, 1, &jvalue); - } - { if (arg4->error_code!=HELICS_OK) @@ -7575,344 +9537,267 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplex(JNI } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetVectorSize(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - result = (int)helicsInputGetVectorSize(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultComplexVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { HelicsInput arg1 = (HelicsInput) 0 ; - double *arg2 ; + double *arg2 = (double *) 0 ; int arg3 ; - int *arg4 = (int *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - int temp4 ; - HelicsError etemp5 ; + HelicsError *arg4 = (HelicsError *) 0 ; + double temp2 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsInput *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; { - if (!jarg4) { + if (!jarg2) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); return ; } - if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); return ; } - temp4 = (int)0; - arg4 = &temp4; + temp2 = (double)0; + arg2 = &temp2; } - helicsInputGetVector(arg1,arg2,arg3,arg4,arg5); + arg3 = (int)jarg3; + helicsInputSetDefaultComplexVector(arg1,(double const *)arg2,arg3,arg4); { - jint jvalue = (jint)temp4; - (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + jdouble jvalue = (jdouble)temp2; + (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); } - { - if (arg5->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetComplexVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultNamedPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { HelicsInput arg1 = (HelicsInput) 0 ; - double *arg2 ; - int arg3 ; - int *arg4 = (int *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - int temp4 ; - HelicsError etemp5 ; + char *arg2 = (char *) 0 ; + double arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsInput *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - { - if (!jarg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp4 = (int)0; - arg4 = &temp4; - } - helicsInputGetComplexVector(arg1,arg2,arg3,arg4,arg5); - { - jint jvalue = (jint)temp4; - (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - - + arg3 = (double)jarg3; + helicsInputSetDefaultNamedPoint(arg1,(char const *)arg2,arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg5->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputGetNamedPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jbyteArray jarg2, jintArray jarg4, jdoubleArray jarg5) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetType(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsInput *)&jarg1; + result = (char *)helicsInputGetType(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetPublicationType(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsInput *)&jarg1; + result = (char *)helicsInputGetPublicationType(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetPublicationDataType(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + int result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsInput *)&jarg1; + result = (int)helicsInputGetPublicationDataType(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetType(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsPublication arg1 = (HelicsPublication) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsPublication *)&jarg1; + result = (char *)helicsPublicationGetType(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsInput *)&jarg1; + result = (char *)helicsInputGetName(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsSubscriptionGetTarget(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsInput arg1 = (HelicsInput) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsInput *)&jarg1; + result = (char *)helicsSubscriptionGetTarget(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetTarget(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - int *arg4 = (int *) 0 ; - double *arg5 = (double *) 0 ; - HelicsError *arg6 = (HelicsError *) 0 ; - int temp4 ; - double temp5 ; - HelicsError etemp6 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp6=helicsErrorInitialize(); - arg6=&etemp6; - } arg1 = *(HelicsInput *)&jarg1; - { - arg2 = (char*)(*jenv)->GetByteArrayElements(jenv, jarg2, 0); - arg3 = (int)(*jenv)->GetArrayLength(jenv, jarg2); - } - { - if (!jarg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp4 = (int)0; - arg4 = &temp4; - } - { - if (!jarg5) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg5) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp5 = (double)0; - arg5 = &temp5; - } - helicsInputGetNamedPoint(arg1,arg2,arg3,arg4,arg5,arg6); - { - (*jenv)->ReleaseByteArrayElements(jenv, jarg2, (jbyte*)arg2, 0); - } - { - jint jvalue = (jint)temp4; - (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); - } - { - jdouble jvalue = (jdouble)temp5; - (*jenv)->SetDoubleArrayRegion(jenv, jarg5, 0, 1, &jvalue); - } - - - { - if (arg6->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg6->message); - } - } + result = (char *)helicsInputGetTarget(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { - HelicsInput arg1 = (HelicsInput) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsPublication arg1 = (HelicsPublication) 0 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsInput *)&jarg1; - arg2 = *(void **)&jarg2; - arg3 = (int)jarg3; - helicsInputSetDefaultBytes(arg1,(void const *)arg2,arg3,arg4); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } + arg1 = *(HelicsPublication *)&jarg1; + result = (char *)helicsPublicationGetName(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = *(HelicsInput *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsInputSetDefaultString(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + result = (char *)helicsInputGetUnits(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultInteger(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetInjectionUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - int64_t arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = *(HelicsInput *)&jarg1; - arg2 = (int64_t)jarg2; - helicsInputSetDefaultInteger(arg1,arg2,arg3); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + result = (char *)helicsInputGetInjectionUnits(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultBoolean(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetExtractionUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - HelicsBool arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = *(HelicsInput *)&jarg1; - arg2 = (HelicsBool)jarg2; - helicsInputSetDefaultBoolean(arg1,arg2,arg3); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + result = (char *)helicsInputGetExtractionUnits(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - HelicsInput arg1 = (HelicsInput) 0 ; - HelicsTime arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsPublication arg1 = (HelicsPublication) 0 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsInput *)&jarg1; - arg2 = (HelicsTime)jarg2; - helicsInputSetDefaultTime(arg1,arg2,arg3); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + arg1 = *(HelicsPublication *)&jarg1; + result = (char *)helicsPublicationGetUnits(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultChar(JNIEnv *jenv, jclass jcls, jlong jarg1, jchar jarg2) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - char arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = *(HelicsInput *)&jarg1; - arg2 = (char)jarg2; - helicsInputSetDefaultChar(arg1,arg2,arg3); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + result = (char *)helicsInputGetInfo(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultDouble(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsInput arg1 = (HelicsInput) 0 ; - double arg2 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -7923,8 +9808,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultDoub arg3=&etemp3; } arg1 = *(HelicsInput *)&jarg1; - arg2 = (double)jarg2; - helicsInputSetDefaultDouble(arg1,arg2,arg3); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsInputSetInfo(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -7935,39 +9825,32 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultDoub } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultComplex(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jdouble jarg3) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jstring jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - double arg2 ; - double arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } arg1 = *(HelicsInput *)&jarg1; - arg2 = (double)jarg2; - arg3 = (double)jarg3; - helicsInputSetDefaultComplex(arg1,arg2,arg3,arg4); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; } + result = (char *)helicsInputGetTag(arg1,(char const *)arg2); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { HelicsInput arg1 = (HelicsInput) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; - double temp2 ; HelicsError etemp4 ; (void)jenv; @@ -7977,25 +9860,19 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultVect arg4=&etemp4; } arg1 = *(HelicsInput *)&jarg1; - { - if (!jarg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp2 = (double)0; - arg2 = &temp2; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - arg3 = (int)jarg3; - helicsInputSetDefaultVector(arg1,(double const *)arg2,arg3,arg4); - { - jdouble jvalue = (jdouble)temp2; - (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; } - + helicsInputSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { if (arg4->error_code!=HELICS_OK) { @@ -8006,54 +9883,75 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultVect } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultComplexVector(JNIEnv *jenv, jclass jcls, jlong jarg1, jdoubleArray jarg2, jint jarg3) { - HelicsInput arg1 = (HelicsInput) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - double temp2 ; - HelicsError etemp4 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsPublication arg1 = (HelicsPublication) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsPublication *)&jarg1; + result = (char *)helicsPublicationGetInfo(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsInput *)&jarg1; - { - if (!jarg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg2) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp2 = (double)0; - arg2 = &temp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg3 = (int)jarg3; - helicsInputSetDefaultComplexVector(arg1,(double const *)arg2,arg3,arg4); - { - jdouble jvalue = (jdouble)temp2; - (*jenv)->SetDoubleArrayRegion(jenv, jarg2, 0, 1, &jvalue); + arg1 = *(HelicsPublication *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - + helicsPublicationSetInfo(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultNamedPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { - HelicsInput arg1 = (HelicsInput) 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jstring jresult = 0 ; + HelicsPublication arg1 = (HelicsPublication) 0 ; char *arg2 = (char *) 0 ; - double arg3 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsPublication *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + result = (char *)helicsPublicationGetTag(arg1,(char const *)arg2); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; @@ -8063,15 +9961,20 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultName etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsInput *)&jarg1; + arg1 = *(HelicsPublication *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - arg3 = (double)jarg3; - helicsInputSetDefaultNamedPoint(arg1,(char const *)arg2,arg3,arg4); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsPublicationSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { if (arg4->error_code!=HELICS_OK) { @@ -8082,231 +9985,339 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetDefaultName } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetType(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; + int arg2 ; + int result; (void)jenv; (void)jcls; arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsInputGetType(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg2 = (int)jarg2; + result = (int)helicsInputGetOption(arg1,arg2); + jresult = (jint)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetPublicationType(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; + int arg2 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsInputGetPublicationType(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + helicsInputSetOption(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetPublicationDataType(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { jint jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; + HelicsPublication arg1 = (HelicsPublication) 0 ; + int arg2 ; int result; (void)jenv; (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - result = (int)helicsInputGetPublicationDataType(arg1); + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (int)jarg2; + result = (int)helicsPublicationGetOption(arg1,arg2); jresult = (jint)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetType(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { HelicsPublication arg1 = (HelicsPublication) 0 ; - char *result = 0 ; + int arg2 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } arg1 = *(HelicsPublication *)&jarg1; - result = (char *)helicsPublicationGetType(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + helicsPublicationSetOption(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetMinimumChange(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + HelicsPublication arg1 = (HelicsPublication) 0 ; + double arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsPublication *)&jarg1; + arg2 = (double)jarg2; + helicsPublicationSetMinimumChange(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetMinimumChange(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; + double arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsInputGetName(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg2 = (double)jarg2; + helicsInputSetMinimumChange(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsSubscriptionGetTarget(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputIsUpdated(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; + HelicsBool result; (void)jenv; (void)jcls; arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsSubscriptionGetTarget(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; -} - - -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsPublication arg1 = (HelicsPublication) 0 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsPublication *)&jarg1; - result = (char *)helicsPublicationGetName(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + result = (HelicsBool)helicsInputIsUpdated(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsInputLastUpdateTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; + HelicsTime result; (void)jenv; (void)jcls; arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsInputGetUnits(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + result = (HelicsTime)helicsInputLastUpdateTime(arg1); + jresult = (jdouble)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetInjectionUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputClearUpdate(JNIEnv *jenv, jclass jcls, jlong jarg1) { HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; (void)jenv; (void)jcls; arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsInputGetInjectionUnits(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + helicsInputClearUpdate(arg1); } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetExtractionUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublicationCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + int result; (void)jenv; (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsInputGetExtractionUnits(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsFederate *)&jarg1; + result = (int)helicsFederateGetPublicationCount(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetUnits(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsPublication arg1 = (HelicsPublication) 0 ; - char *result = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInputCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + int result; (void)jenv; (void)jcls; - arg1 = *(HelicsPublication *)&jarg1; - result = (char *)helicsPublicationGetUnits(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsFederate *)&jarg1; + result = (int)helicsFederateGetInputCount(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; - char *result = 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsEndpoint result; (void)jenv; (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - result = (char *)helicsInputGetInfo(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + result = (HelicsEndpoint)helicsFederateRegisterEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + *(HelicsEndpoint *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsInput arg1 = (HelicsInput) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsEndpoint result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsInput *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } - helicsInputSetInfo(arg1,(char const *)arg2,arg3); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + result = (HelicsEndpoint)helicsFederateRegisterGlobalEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + *(HelicsEndpoint *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } + return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsInputGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jstring jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTargetedEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; - char *result = 0 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsEndpoint result; (void)jenv; (void)jcls; - arg1 = *(HelicsInput *)&jarg1; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return 0; } - result = (char *)helicsInputGetTag(arg1,(char const *)arg2); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + result = (HelicsEndpoint)helicsFederateRegisterTargetedEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + *(HelicsEndpoint *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsInput arg1 = (HelicsInput) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalTargetedEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; + HelicsEndpoint result; (void)jenv; (void)jcls; @@ -8314,46 +10325,111 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetTag(JNIEnv etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsInput *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } arg3 = 0; if (jarg3) { arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + if (!arg3) return 0; } - helicsInputSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); + result = (HelicsEndpoint)helicsFederateRegisterGlobalTargetedEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); + *(HelicsEndpoint *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg4->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsEndpoint result; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + result = (HelicsEndpoint)helicsFederateGetEndpoint(arg1,(char const *)arg2,arg3); + *(HelicsEndpoint *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetEndpointByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + HelicsEndpoint result; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (int)jarg2; + result = (HelicsEndpoint)helicsFederateGetEndpointByIndex(arg1,arg2,arg3); + *(HelicsEndpoint *)&jresult = result; + { + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - HelicsPublication arg1 = (HelicsPublication) 0 ; - char *result = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsPublication *)&jarg1; - result = (char *)helicsPublicationGetInfo(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + arg1 = *(HelicsEndpoint *)&jarg1; + result = (HelicsBool)helicsEndpointIsValid(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetDefaultDestination(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -8364,13 +10440,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetInfo( etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsPublication *)&jarg1; + arg1 = *(HelicsEndpoint *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsPublicationSetInfo(arg1,(char const *)arg2,arg3); + helicsEndpointSetDefaultDestination(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -8382,31 +10458,24 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetInfo( } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetDefaultDestination(JNIEnv *jenv, jclass jcls, jlong jarg1) { jstring jresult = 0 ; - HelicsPublication arg1 = (HelicsPublication) 0 ; - char *arg2 = (char *) 0 ; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsPublication *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (char *)helicsPublicationGetTag(arg1,(char const *)arg2); + arg1 = *(HelicsEndpoint *)&jarg1; + result = (char *)helicsEndpointGetDefaultDestination(arg1); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + void *arg2 = (void *) 0 ; + int arg3 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; @@ -8416,20 +10485,10 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetTag(J etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; - } - helicsPublicationSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + helicsEndpointSendBytes(arg1,(void const *)arg2,arg3,arg4); { if (arg4->error_code!=HELICS_OK) { @@ -8440,95 +10499,133 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetTag(J } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jint jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; - int arg2 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytesTo(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jstring jarg4) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + void *arg2 = (void *) 0 ; + int arg3 ; + char *arg4 = (char *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; (void)jenv; (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - arg2 = (int)jarg2; - result = (int)helicsInputGetOption(arg1,arg2); - jresult = (jint)result; - return jresult; + { + etemp5=helicsErrorInitialize(); + arg5=&etemp5; + } + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return ; + } + helicsEndpointSendBytesTo(arg1,(void const *)arg2,arg3,(char const *)arg4,arg5); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); + { + if (arg5->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); + } + } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { - HelicsInput arg1 = (HelicsInput) 0 ; - int arg2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytesToAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jstring jarg4, jdouble jarg5) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + void *arg2 = (void *) 0 ; int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; + char *arg4 = (char *) 0 ; + HelicsTime arg5 ; + HelicsError *arg6 = (HelicsError *) 0 ; + HelicsError etemp6 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp6=helicsErrorInitialize(); + arg6=&etemp6; } - arg1 = *(HelicsInput *)&jarg1; - arg2 = (int)jarg2; + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = *(void **)&jarg2; arg3 = (int)jarg3; - helicsInputSetOption(arg1,arg2,arg3,arg4); + arg4 = 0; + if (jarg4) { + arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); + if (!arg4) return ; + } + arg5 = (HelicsTime)jarg5; + helicsEndpointSendBytesToAt(arg1,(void const *)arg2,arg3,(char const *)arg4,arg5,arg6); + if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); { - if (arg4->error_code!=HELICS_OK) + if (arg6->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg6->message); } } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsPublicationGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jint jresult = 0 ; - HelicsPublication arg1 = (HelicsPublication) 0 ; - int arg2 ; - int result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytesAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jdouble jarg4) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + void *arg2 = (void *) 0 ; + int arg3 ; + HelicsTime arg4 ; + HelicsError *arg5 = (HelicsError *) 0 ; + HelicsError etemp5 ; (void)jenv; (void)jcls; - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (int)jarg2; - result = (int)helicsPublicationGetOption(arg1,arg2); - jresult = (jint)result; - return jresult; + { + etemp5=helicsErrorInitialize(); + arg5=&etemp5; + } + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + arg4 = (HelicsTime)jarg4; + helicsEndpointSendBytesAt(arg1,(void const *)arg2,arg3,arg4,arg5); + { + if (arg5->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); + } + } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - int arg2 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsMessage arg2 = (HelicsMessage) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (int)jarg2; - arg3 = (int)jarg3; - helicsPublicationSetOption(arg1,arg2,arg3,arg4); + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = *(HelicsMessage *)&jarg2; + helicsEndpointSendMessage(arg1,arg2,arg3); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetMinimumChange(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - HelicsPublication arg1 = (HelicsPublication) 0 ; - double arg2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendMessageZeroCopy(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsMessage arg2 = (HelicsMessage) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -8538,9 +10635,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetMinim etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsPublication *)&jarg1; - arg2 = (double)jarg2; - helicsPublicationSetMinimumChange(arg1,arg2,arg3); + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = *(HelicsMessage *)&jarg2; + helicsEndpointSendMessageZeroCopy(arg1,arg2,arg3); { if (arg3->error_code!=HELICS_OK) { @@ -8551,9 +10648,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsPublicationSetMinim } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetMinimumChange(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - HelicsInput arg1 = (HelicsInput) 0 ; - double arg2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSubscribe(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -8563,9 +10660,14 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetMinimumChan etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsInput *)&jarg1; - arg2 = (double)jarg2; - helicsInputSetMinimumChange(arg1,arg2,arg3); + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsEndpointSubscribe(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -8576,45 +10678,35 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputSetMinimumChan } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsInputIsUpdated(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateHasMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - result = (HelicsBool)helicsInputIsUpdated(arg1); + arg1 = *(HelicsFederate *)&jarg1; + result = (HelicsBool)helicsFederateHasMessage(arg1); jresult = (jint)result; return jresult; } - -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsInputLastUpdateTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; - HelicsInput arg1 = (HelicsInput) 0 ; - HelicsTime result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - result = (HelicsTime)helicsInputLastUpdateTime(arg1); - jresult = (jdouble)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsInputClearUpdate(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsInput arg1 = (HelicsInput) 0 ; + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointHasMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsInput *)&jarg1; - helicsInputClearUpdate(arg1); + arg1 = *(HelicsEndpoint *)&jarg1; + result = (HelicsBool)helicsEndpointHasMessage(arg1); + jresult = (jint)result; + return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublicationCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederatePendingMessageCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; int result; @@ -8622,268 +10714,185 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetPublicat (void)jenv; (void)jcls; arg1 = *(HelicsFederate *)&jarg1; - result = (int)helicsFederateGetPublicationCount(arg1); + result = (int)helicsFederatePendingMessageCount(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetInputCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointPendingMessageCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; int result; (void)jenv; (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - result = (int)helicsFederateGetInputCount(arg1); + arg1 = *(HelicsEndpoint *)&jarg1; + result = (int)helicsEndpointPendingMessageCount(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; - HelicsEndpoint result; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsMessage result; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (HelicsEndpoint)helicsFederateRegisterEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); - *(HelicsEndpoint *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } + arg1 = *(HelicsEndpoint *)&jarg1; + result = (HelicsMessage)helicsEndpointGetMessage(arg1); + *(HelicsMessage *)&jresult = result; return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsEndpointCreateMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; - HelicsEndpoint result; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsMessage result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } - result = (HelicsEndpoint)helicsFederateRegisterGlobalEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); - *(HelicsEndpoint *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg1 = *(HelicsEndpoint *)&jarg1; + result = (HelicsMessage)helicsEndpointCreateMessage(arg1,arg2); + *(HelicsMessage *)&jresult = result; { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTargetedEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointClearMessages(JNIEnv *jenv, jclass jcls, jlong jarg1) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsEndpoint *)&jarg1; + helicsEndpointClearMessages(arg1); +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; - HelicsEndpoint result; + HelicsMessage result; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (HelicsEndpoint)helicsFederateRegisterTargetedEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); - *(HelicsEndpoint *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } + result = (HelicsMessage)helicsFederateGetMessage(arg1); + *(HelicsMessage *)&jresult = result; return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalTargetedEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateCreateMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; - HelicsEndpoint result; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsMessage result; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (HelicsEndpoint)helicsFederateRegisterGlobalTargetedEndpoint(arg1,(char const *)arg2,(char const *)arg3,arg4); - *(HelicsEndpoint *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + result = (HelicsMessage)helicsFederateCreateMessage(arg1,arg2); + *(HelicsMessage *)&jresult = result; { - if (arg4->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateClearMessages(JNIEnv *jenv, jclass jcls, jlong jarg1) { HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsEndpoint result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (HelicsEndpoint)helicsFederateGetEndpoint(arg1,(char const *)arg2,arg3); - *(HelicsEndpoint *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + helicsFederateClearMessages(arg1); +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetType(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsEndpoint *)&jarg1; + result = (char *)helicsEndpointGetType(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetEndpointByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jlong jresult = 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsEndpoint *)&jarg1; + result = (char *)helicsEndpointGetName(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetEndpointCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - int arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsEndpoint result; + int result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } arg1 = *(HelicsFederate *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsEndpoint)helicsFederateGetEndpointByIndex(arg1,arg2,arg3); - *(HelicsEndpoint *)&jresult = result; - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + result = (int)helicsFederateGetEndpointCount(arg1); + jresult = (jint)result; return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - HelicsBool result; + char *result = 0 ; (void)jenv; (void)jcls; arg1 = *(HelicsEndpoint *)&jarg1; - result = (HelicsBool)helicsEndpointIsValid(arg1); - jresult = (jint)result; + result = (char *)helicsEndpointGetInfo(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetDefaultDestination(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; @@ -8901,7 +10910,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetDefaultD arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsEndpointSetDefaultDestination(arg1,(char const *)arg2,arg3); + helicsEndpointSetInfo(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -8913,24 +10922,31 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetDefaultD } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetDefaultDestination(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { jstring jresult = 0 ; HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + char *arg2 = (char *) 0 ; char *result = 0 ; (void)jenv; (void)jcls; arg1 = *(HelicsEndpoint *)&jarg1; - result = (char *)helicsEndpointGetDefaultDestination(arg1); + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + result = (char *)helicsEndpointGetTag(arg1,(char const *)arg2); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; @@ -8941,121 +10957,75 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytes(J arg4=&etemp4; } arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = *(void **)&jarg2; - arg3 = (int)jarg3; - helicsEndpointSendBytes(arg1,(void const *)arg2,arg3,arg4); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytesTo(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jstring jarg4) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; - char *arg4 = (char *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; - - (void)jenv; - (void)jcls; - { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = *(void **)&jarg2; - arg3 = (int)jarg3; - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return ; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; } - helicsEndpointSendBytesTo(arg1,(void const *)arg2,arg3,(char const *)arg4,arg5); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); + helicsEndpointSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg5->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytesToAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jstring jarg4, jdouble jarg5) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - void *arg2 = (void *) 0 ; + int arg2 ; int arg3 ; - char *arg4 = (char *) 0 ; - HelicsTime arg5 ; - HelicsError *arg6 = (HelicsError *) 0 ; - HelicsError etemp6 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp6=helicsErrorInitialize(); - arg6=&etemp6; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = *(void **)&jarg2; + arg2 = (int)jarg2; arg3 = (int)jarg3; - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return ; - } - arg5 = (HelicsTime)jarg5; - helicsEndpointSendBytesToAt(arg1,(void const *)arg2,arg3,(char const *)arg4,arg5,arg6); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); + helicsEndpointSetOption(arg1,arg2,arg3,arg4); { - if (arg6->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg6->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendBytesAt(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jdouble jarg4) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; - HelicsTime arg4 ; - HelicsError *arg5 = (HelicsError *) 0 ; - HelicsError etemp5 ; + int arg2 ; + int result; (void)jenv; (void)jcls; - { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; - } arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = *(void **)&jarg2; - arg3 = (int)jarg3; - arg4 = (HelicsTime)jarg4; - helicsEndpointSendBytesAt(arg1,(void const *)arg2,arg3,arg4,arg5); - { - if (arg5->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); - } - } + arg2 = (int)jarg2; + result = (int)helicsEndpointGetOption(arg1,arg2); + jresult = (jint)result; + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendMessage(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - HelicsMessage arg2 = (HelicsMessage) 0 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -9066,33 +11036,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendMessage arg3=&etemp3; } arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = *(HelicsMessage *)&jarg2; - helicsEndpointSendMessage(arg1,arg2,arg3); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendMessageZeroCopy(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - HelicsMessage arg2 = (HelicsMessage) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - - (void)jenv; - (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = *(HelicsMessage *)&jarg2; - helicsEndpointSendMessageZeroCopy(arg1,arg2,arg3); + helicsEndpointAddSourceTarget(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -9103,7 +11053,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSendMessage } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSubscribe(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinationTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; @@ -9121,355 +11071,312 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSubscribe(J arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsEndpointSubscribe(arg1,(char const *)arg2,arg3); + helicsEndpointAddDestinationTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } -} - - -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateHasMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsBool result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsBool)helicsFederateHasMessage(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointHasMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - HelicsBool result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - result = (HelicsBool)helicsEndpointHasMessage(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederatePendingMessageCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - result = (int)helicsFederatePendingMessageCount(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointPendingMessageCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - result = (int)helicsEndpointPendingMessageCount(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - HelicsMessage result; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - result = (HelicsMessage)helicsEndpointGetMessage(arg1); - *(HelicsMessage *)&jresult = result; - return jresult; + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsEndpointCreateMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointRemoveTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsMessage result; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } arg1 = *(HelicsEndpoint *)&jarg1; - result = (HelicsMessage)helicsEndpointCreateMessage(arg1,arg2); - *(HelicsMessage *)&jresult = result; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsEndpointRemoveTarget(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsMessage result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsMessage)helicsFederateGetMessage(arg1); - *(HelicsMessage *)&jresult = result; - return jresult; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsEndpointAddSourceFilter(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateCreateMessage(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsMessage result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinationFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsFederate *)&jarg1; - result = (HelicsMessage)helicsFederateCreateMessage(arg1,arg2); - *(HelicsMessage *)&jresult = result; + arg1 = *(HelicsEndpoint *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsEndpointAddDestinationFilter(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetSource(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsMessage *)&jarg1; + result = (char *)helicsMessageGetSource(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateClearMessages(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsFederate arg1 = (HelicsFederate) 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetDestination(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; + char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - helicsFederateClearMessages(arg1); + arg1 = *(HelicsMessage *)&jarg1; + result = (char *)helicsMessageGetDestination(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetType(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetOriginalSource(JNIEnv *jenv, jclass jcls, jlong jarg1) { jstring jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - result = (char *)helicsEndpointGetType(arg1); + arg1 = *(HelicsMessage *)&jarg1; + result = (char *)helicsMessageGetOriginalSource(arg1); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetOriginalDestination(JNIEnv *jenv, jclass jcls, jlong jarg1) { jstring jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - result = (char *)helicsEndpointGetName(arg1); + arg1 = *(HelicsMessage *)&jarg1; + result = (char *)helicsMessageGetOriginalDestination(arg1); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetEndpointCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - int result; +SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jdouble jresult = 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; + HelicsTime result; (void)jenv; (void)jcls; - arg1 = *(HelicsFederate *)&jarg1; - result = (int)helicsFederateGetEndpointCount(arg1); - jresult = (jint)result; + arg1 = *(HelicsMessage *)&jarg1; + result = (HelicsTime)helicsMessageGetTime(arg1); + jresult = (jdouble)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetString(JNIEnv *jenv, jclass jcls, jlong jarg1) { jstring jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - result = (char *)helicsEndpointGetInfo(arg1); + arg1 = *(HelicsMessage *)&jarg1; + result = (char *)helicsMessageGetString(arg1); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetMessageID(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; + int result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; - } - helicsEndpointSetInfo(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + arg1 = *(HelicsMessage *)&jarg1; + result = (int)helicsMessageGetMessageID(arg1); + jresult = (jint)result; + return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jstring jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - char *arg2 = (char *) 0 ; - char *result = 0 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; + int arg2 ; + HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (char *)helicsEndpointGetTag(arg1,(char const *)arg2); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + arg1 = *(HelicsMessage *)&jarg1; + arg2 = (int)jarg2; + result = (HelicsBool)helicsMessageGetFlagOption(arg1,arg2); + jresult = (jint)result; return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetByteCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; + int result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsMessage *)&jarg1; + result = (int)helicsMessageGetByteCount(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { + HelicsMessage arg1 = (HelicsMessage) 0 ; + void *arg2 = (void *) 0 ; + int arg3 ; + int *arg4 = (int *) 0 ; + HelicsError *arg5 = (HelicsError *) 0 ; + int temp4 ; + HelicsError etemp5 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp5=helicsErrorInitialize(); + arg5=&etemp5; } - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = *(HelicsMessage *)&jarg1; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + { + if (!jarg4) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); + return ; + } + if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); + return ; + } + temp4 = (int)0; + arg4 = &temp4; } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return ; + helicsMessageGetBytes(arg1,arg2,arg3,arg4,arg5); + { + jint jvalue = (jint)temp4; + (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); } - helicsEndpointSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { - if (arg4->error_code!=HELICS_OK) + if (arg5->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg5->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - int arg2 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetBytesPointer(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; + HelicsMessage arg1 = (HelicsMessage) 0 ; + void *result = 0 ; (void)jenv; (void)jcls; - { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; - } - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = (int)jarg2; - arg3 = (int)jarg3; - helicsEndpointSetOption(arg1,arg2,arg3,arg4); - { - if (arg4->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); - } - } + arg1 = *(HelicsMessage *)&jarg1; + result = (void *)helicsMessageGetBytesPointer(arg1); + *(void **)&jresult = result; + return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsEndpointGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - int arg2 ; - int result; + HelicsMessage arg1 = (HelicsMessage) 0 ; + HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = (int)jarg2; - result = (int)helicsEndpointGetOption(arg1,arg2); + arg1 = *(HelicsMessage *)&jarg1; + result = (HelicsBool)helicsMessageIsValid(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetSource(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsMessage arg1 = (HelicsMessage) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -9480,13 +11387,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceTa etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsEndpoint *)&jarg1; + arg1 = *(HelicsMessage *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsEndpointAddSourceTarget(arg1,(char const *)arg2,arg3); + helicsMessageSetSource(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -9498,8 +11405,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceTa } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinationTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetDestination(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsMessage arg1 = (HelicsMessage) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -9510,13 +11417,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinat etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsEndpoint *)&jarg1; + arg1 = *(HelicsMessage *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsEndpointAddDestinationTarget(arg1,(char const *)arg2,arg3); + helicsMessageSetDestination(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -9528,8 +11435,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinat } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointRemoveTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetOriginalSource(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsMessage arg1 = (HelicsMessage) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -9540,13 +11447,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointRemoveTarge etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsEndpoint *)&jarg1; + arg1 = *(HelicsMessage *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsEndpointRemoveTarget(arg1,(char const *)arg2,arg3); + helicsMessageSetOriginalSource(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -9558,8 +11465,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointRemoveTarge } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetOriginalDestination(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsMessage arg1 = (HelicsMessage) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -9570,13 +11477,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceFi etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsEndpoint *)&jarg1; + arg1 = *(HelicsMessage *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsEndpointAddSourceFilter(arg1,(char const *)arg2,arg3); + helicsMessageSetOriginalDestination(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -9588,9 +11495,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddSourceFi } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinationFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsEndpoint arg1 = (HelicsEndpoint) 0 ; - char *arg2 = (char *) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { + HelicsMessage arg1 = (HelicsMessage) 0 ; + HelicsTime arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -9600,14 +11507,34 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinat etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsEndpoint *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = *(HelicsMessage *)&jarg1; + arg2 = (HelicsTime)jarg2; + helicsMessageSetTime(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } } - helicsEndpointAddDestinationFilter(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + HelicsMessage arg1 = (HelicsMessage) 0 ; + int arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; + + (void)jenv; + (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } + arg1 = *(HelicsMessage *)&jarg1; + arg2 = (int)jarg2; + helicsMessageReserve(arg1,arg2,arg3); { if (arg3->error_code!=HELICS_OK) { @@ -9618,213 +11545,322 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsEndpointAddDestinat } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetSource(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetMessageID(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { HelicsMessage arg1 = (HelicsMessage) 0 ; - char *result = 0 ; + int32_t arg2 ; + HelicsError *arg3 = (HelicsError *) 0 ; + int32_t *argp2 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } arg1 = *(HelicsMessage *)&jarg1; - result = (char *)helicsMessageGetSource(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + argp2 = *(int32_t **)&jarg2; + if (!argp2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null int32_t"); + return ; + } + arg2 = *argp2; + helicsMessageSetMessageID(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetDestination(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageClearFlags(JNIEnv *jenv, jclass jcls, jlong jarg1) { HelicsMessage arg1 = (HelicsMessage) 0 ; - char *result = 0 ; (void)jenv; (void)jcls; arg1 = *(HelicsMessage *)&jarg1; - result = (char *)helicsMessageGetDestination(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + helicsMessageClearFlags(arg1); } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetOriginalSource(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { HelicsMessage arg1 = (HelicsMessage) 0 ; - char *result = 0 ; + int arg2 ; + HelicsBool arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } arg1 = *(HelicsMessage *)&jarg1; - result = (char *)helicsMessageGetOriginalSource(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg2 = (int)jarg2; + arg3 = (HelicsBool)jarg3; + helicsMessageSetFlagOption(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetOriginalDestination(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { HelicsMessage arg1 = (HelicsMessage) 0 ; - char *result = 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } arg1 = *(HelicsMessage *)&jarg1; - result = (char *)helicsMessageGetOriginalDestination(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsMessageSetString(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT jdouble JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetData(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { HelicsMessage arg1 = (HelicsMessage) 0 ; - HelicsTime result; + void *arg2 = (void *) 0 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } arg1 = *(HelicsMessage *)&jarg1; - result = (HelicsTime)helicsMessageGetTime(arg1); - jresult = (jdouble)result; - return jresult; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + helicsMessageSetData(arg1,(void const *)arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetString(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageAppendData(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { HelicsMessage arg1 = (HelicsMessage) 0 ; - char *result = 0 ; + void *arg2 = (void *) 0 ; + int arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } arg1 = *(HelicsMessage *)&jarg1; - result = (char *)helicsMessageGetString(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; + arg2 = *(void **)&jarg2; + arg3 = (int)jarg3; + helicsMessageAppendData(arg1,(void const *)arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetMessageID(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageCopy(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { HelicsMessage arg1 = (HelicsMessage) 0 ; - int result; + HelicsMessage arg2 = (HelicsMessage) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; + { + etemp3=helicsErrorInitialize(); + arg3=&etemp3; + } arg1 = *(HelicsMessage *)&jarg1; - result = (int)helicsMessageGetMessageID(arg1); - jresult = (jint)result; - return jresult; + arg2 = *(HelicsMessage *)&jarg2; + helicsMessageCopy(arg1,arg2,arg3); + { + if (arg3->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); + } + } } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - jint jresult = 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsMessageClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jlong jresult = 0 ; HelicsMessage arg1 = (HelicsMessage) 0 ; - int arg2 ; - HelicsBool result; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; + HelicsMessage result; (void)jenv; (void)jcls; + { + etemp2=helicsErrorInitialize(); + arg2=&etemp2; + } arg1 = *(HelicsMessage *)&jarg1; - arg2 = (int)jarg2; - result = (HelicsBool)helicsMessageGetFlagOption(arg1,arg2); - jresult = (jint)result; + result = (HelicsMessage)helicsMessageClone(arg1,arg2); + *(HelicsMessage *)&jresult = result; + { + if (arg2->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); + } + } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetByteCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { HelicsMessage arg1 = (HelicsMessage) 0 ; - int result; (void)jenv; (void)jcls; arg1 = *(HelicsMessage *)&jarg1; - result = (int)helicsMessageGetByteCount(arg1); - jresult = (jint)result; - return jresult; + helicsMessageFree(arg1); } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jintArray jarg4) { +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageClear(JNIEnv *jenv, jclass jcls, jlong jarg1) { HelicsMessage arg1 = (HelicsMessage) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; - int *arg4 = (int *) 0 ; - HelicsError *arg5 = (HelicsError *) 0 ; - int temp4 ; - HelicsError etemp5 ; + HelicsError *arg2 = (HelicsError *) 0 ; + HelicsError etemp2 ; (void)jenv; (void)jcls; { - etemp5=helicsErrorInitialize(); - arg5=&etemp5; + etemp2=helicsErrorInitialize(); + arg2=&etemp2; } arg1 = *(HelicsMessage *)&jarg1; - arg2 = *(void **)&jarg2; - arg3 = (int)jarg3; - { - if (!jarg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null"); - return ; - } - if ((*jenv)->GetArrayLength(jenv, jarg4) == 0) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element"); - return ; - } - temp4 = (int)0; - arg4 = &temp4; - } - helicsMessageGetBytes(arg1,arg2,arg3,arg4,arg5); - { - jint jvalue = (jint)temp4; - (*jenv)->SetIntArrayRegion(jenv, jarg4, 0, 1, &jvalue); - } - + helicsMessageClear(arg1,arg2); { - if (arg5->error_code!=HELICS_OK) + if (arg2->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg5->message); + (*jenv)->ThrowNew(jenv, clazz, arg2->message); } } } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsMessageGetBytesPointer(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { jlong jresult = 0 ; - HelicsMessage arg1 = (HelicsMessage) 0 ; - void *result = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsFilterTypes arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsFilter result; (void)jenv; (void)jcls; - arg1 = *(HelicsMessage *)&jarg1; - result = (void *)helicsMessageGetBytesPointer(arg1); - *(void **)&jresult = result; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (HelicsFilterTypes)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + result = (HelicsFilter)helicsFederateRegisterFilter(arg1,arg2,(char const *)arg3,arg4); + *(HelicsFilter *)&jresult = result; + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsMessageIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - HelicsMessage arg1 = (HelicsMessage) 0 ; - HelicsBool result; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsFilterTypes arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsFilter result; (void)jenv; (void)jcls; - arg1 = *(HelicsMessage *)&jarg1; - result = (HelicsBool)helicsMessageIsValid(arg1); - jresult = (jint)result; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (HelicsFilterTypes)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; + } + result = (HelicsFilter)helicsFederateRegisterGlobalFilter(arg1,arg2,(char const *)arg3,arg4); + *(HelicsFilter *)&jresult = result; + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetSource(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterCloningFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsFilter result; (void)jenv; (void)jcls; @@ -9832,13 +11868,14 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetSource(JN etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } - helicsMessageSetSource(arg1,(char const *)arg2,arg3); + result = (HelicsFilter)helicsFederateRegisterCloningFilter(arg1,(char const *)arg2,arg3); + *(HelicsFilter *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -9847,14 +11884,17 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetSource(JN (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetDestination(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalCloningFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsFilter result; (void)jenv; (void)jcls; @@ -9862,13 +11902,14 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetDestinati etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } - helicsMessageSetDestination(arg1,(char const *)arg2,arg3); + result = (HelicsFilter)helicsFederateRegisterGlobalCloningFilter(arg1,(char const *)arg2,arg3); + *(HelicsFilter *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -9877,44 +11918,53 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetDestinati (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetOriginalSource(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreRegisterFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { + jlong jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; + HelicsFilterTypes arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsFilter result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsMessage *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + arg1 = *(HelicsCore *)&jarg1; + arg2 = (HelicsFilterTypes)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; } - helicsMessageSetOriginalSource(arg1,(char const *)arg2,arg3); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + result = (HelicsFilter)helicsCoreRegisterFilter(arg1,arg2,(char const *)arg3,arg4); + *(HelicsFilter *)&jresult = result; + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } + return jresult; } - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetOriginalDestination(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreRegisterCloningFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jlong jresult = 0 ; + HelicsCore arg1 = (HelicsCore) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsFilter result; (void)jenv; (void)jcls; @@ -9922,13 +11972,14 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetOriginalD etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; + arg1 = *(HelicsCore *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return ; + if (!arg2) return 0; } - helicsMessageSetOriginalDestination(arg1,(char const *)arg2,arg3); + result = (HelicsFilter)helicsCoreRegisterCloningFilter(arg1,(char const *)arg2,arg3); + *(HelicsFilter *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -9937,14 +11988,31 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetOriginalD (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - HelicsTime arg2 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilterCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + int result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsFederate *)&jarg1; + result = (int)helicsFederateGetFilterCount(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsFilter result; (void)jenv; (void)jcls; @@ -9952,9 +12020,15 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetTime(JNIE etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; - arg2 = (HelicsTime)jarg2; - helicsMessageSetTime(arg1,arg2,arg3); + arg1 = *(HelicsFederate *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + result = (HelicsFilter)helicsFederateGetFilter(arg1,(char const *)arg2,arg3); + *(HelicsFilter *)&jresult = result; + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -9962,14 +12036,17 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetTime(JNIE (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilterByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jlong jresult = 0 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; int arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; + HelicsFilter result; (void)jenv; (void)jcls; @@ -9977,9 +12054,10 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageReserve(JNIE etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; + arg1 = *(HelicsFederate *)&jarg1; arg2 = (int)jarg2; - helicsMessageReserve(arg1,arg2,arg3); + result = (HelicsFilter)helicsFederateGetFilterByIndex(arg1,arg2,arg3); + *(HelicsFilter *)&jresult = result; { if (arg3->error_code!=HELICS_OK) { @@ -9987,54 +12065,74 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageReserve(JNIE (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetMessageID(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - int32_t arg2 ; - HelicsError *arg3 = (HelicsError *) 0 ; - int32_t *argp2 ; - HelicsError etemp3 ; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFilterIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jint jresult = 0 ; + HelicsFilter arg1 = (HelicsFilter) 0 ; + HelicsBool result; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsFilter *)&jarg1; + result = (HelicsBool)helicsFilterIsValid(arg1); + jresult = (jint)result; + return jresult; +} + + +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsFilter *)&jarg1; + result = (char *)helicsFilterGetName(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSet(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; + double arg3 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } - arg1 = *(HelicsMessage *)&jarg1; - argp2 = *(int32_t **)&jarg2; - if (!argp2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null int32_t"); - return ; + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; } - arg2 = *argp2; - helicsMessageSetMessageID(arg1,arg2,arg3); + arg3 = (double)jarg3; + helicsFilterSet(arg1,(char const *)arg2,arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageClearFlags(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(HelicsMessage *)&jarg1; - helicsMessageClearFlags(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetFlagOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - int arg2 ; - HelicsBool arg3 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; @@ -10044,10 +12142,20 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetFlagOptio etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsMessage *)&jarg1; - arg2 = (int)jarg2; - arg3 = (HelicsBool)jarg3; - helicsMessageSetFlagOption(arg1,arg2,arg3,arg4); + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return ; + } + helicsFilterSetString(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { if (arg4->error_code!=HELICS_OK) { @@ -10058,8 +12166,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetFlagOptio } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDestinationTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFilter arg1 = (HelicsFilter) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10070,13 +12178,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetString(JN etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; + arg1 = *(HelicsFilter *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsMessageSetString(arg1,(char const *)arg2,arg3); + helicsFilterAddDestinationTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10088,63 +12196,69 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetString(JN } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageSetData(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddSourceTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; - arg2 = *(void **)&jarg2; - arg3 = (int)jarg3; - helicsMessageSetData(arg1,(void const *)arg2,arg3,arg4); + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFilterAddSourceTarget(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageAppendData(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - void *arg2 = (void *) 0 ; - int arg3 ; - HelicsError *arg4 = (HelicsError *) 0 ; - HelicsError etemp4 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDeliveryEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp4=helicsErrorInitialize(); - arg4=&etemp4; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; - arg2 = *(void **)&jarg2; - arg3 = (int)jarg3; - helicsMessageAppendData(arg1,(void const *)arg2,arg3,arg4); + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFilterAddDeliveryEndpoint(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg4->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg4->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageCopy(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - HelicsMessage arg2 = (HelicsMessage) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10154,9 +12268,14 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageCopy(JNIEnv etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; - arg2 = *(HelicsMessage *)&jarg2; - helicsMessageCopy(arg1,arg2,arg3); + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFilterRemoveTarget(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) { @@ -10167,74 +12286,107 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageCopy(JNIEnv } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsMessageClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - HelicsMessage arg1 = (HelicsMessage) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; - HelicsMessage result; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveDeliveryEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; - result = (HelicsMessage)helicsMessageClone(arg1,arg2); - *(HelicsMessage *)&jresult = result; + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFilterRemoveDeliveryEndpoint(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } - return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsMessage arg1 = (HelicsMessage) 0 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { + jstring jresult = 0 ; + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsMessage *)&jarg1; - helicsMessageFree(arg1); + arg1 = *(HelicsFilter *)&jarg1; + result = (char *)helicsFilterGetInfo(arg1); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsMessageClear(JNIEnv *jenv, jclass jcls, jlong jarg1) { - HelicsMessage arg1 = (HelicsMessage) 0 ; - HelicsError *arg2 = (HelicsError *) 0 ; - HelicsError etemp2 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; + HelicsError *arg3 = (HelicsError *) 0 ; + HelicsError etemp3 ; (void)jenv; (void)jcls; { - etemp2=helicsErrorInitialize(); - arg2=&etemp2; + etemp3=helicsErrorInitialize(); + arg3=&etemp3; } - arg1 = *(HelicsMessage *)&jarg1; - helicsMessageClear(arg1,arg2); + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } + helicsFilterSetInfo(arg1,(char const *)arg2,arg3); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { - if (arg2->error_code!=HELICS_OK) + if (arg3->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg2->message); + (*jenv)->ThrowNew(jenv, clazz, arg3->message); } } } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsFilterTypes arg2 ; +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + jstring jresult = 0 ; + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return 0; + } + result = (char *)helicsFilterGetTag(arg1,(char const *)arg2); + if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + return jresult; +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; - HelicsFilter result; (void)jenv; (void)jcls; @@ -10242,15 +12394,19 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFi etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsFilterTypes)jarg2; + arg1 = *(HelicsFilter *)&jarg1; + arg2 = 0; + if (jarg2) { + arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); + if (!arg2) return ; + } arg3 = 0; if (jarg3) { arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; + if (!arg3) return ; } - result = (HelicsFilter)helicsFederateRegisterFilter(arg1,arg2,(char const *)arg3,arg4); - *(HelicsFilter *)&jresult = result; + helicsFilterSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); + if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { if (arg4->error_code!=HELICS_OK) @@ -10259,18 +12415,15 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterFi (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - HelicsFilterTypes arg2 ; - char *arg3 = (char *) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { + HelicsFilter arg1 = (HelicsFilter) 0 ; + int arg2 ; + int arg3 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; - HelicsFilter result; (void)jenv; (void)jcls; @@ -10278,16 +12431,10 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGl etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = (HelicsFilterTypes)jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (HelicsFilter)helicsFederateRegisterGlobalFilter(arg1,arg2,(char const *)arg3,arg4); - *(HelicsFilter *)&jresult = result; - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); + arg1 = *(HelicsFilter *)&jarg1; + arg2 = (int)jarg2; + arg3 = (int)jarg3; + helicsFilterSetOption(arg1,arg2,arg3,arg4); { if (arg4->error_code!=HELICS_OK) { @@ -10295,86 +12442,69 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGl (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } - return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterCloningFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsFilter result; +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { + jint jresult = 0 ; + HelicsFilter arg1 = (HelicsFilter) 0 ; + int arg2 ; + int result; (void)jenv; (void)jcls; - { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; - } - arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (HelicsFilter)helicsFederateRegisterCloningFilter(arg1,(char const *)arg2,arg3); - *(HelicsFilter *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - { - if (arg3->error_code!=HELICS_OK) - { - jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); - } - } + arg1 = *(HelicsFilter *)&jarg1; + arg2 = (int)jarg2; + result = (int)helicsFilterGetOption(arg1,arg2); + jresult = (jint)result; return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalCloningFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterTranslator(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsFilter result; + HelicsTranslatorTypes arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsTranslator result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsFederate *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; + arg2 = (HelicsTranslatorTypes)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; } - result = (HelicsFilter)helicsFederateRegisterGlobalCloningFilter(arg1,(char const *)arg2,arg3); - *(HelicsFilter *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + result = (HelicsTranslator)helicsFederateRegisterTranslator(arg1,arg2,(char const *)arg3,arg4); + *(HelicsTranslator *)&jresult = result; + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreRegisterFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateRegisterGlobalTranslator(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { jlong jresult = 0 ; - HelicsCore arg1 = (HelicsCore) 0 ; - HelicsFilterTypes arg2 ; + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsTranslatorTypes arg2 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; HelicsError etemp4 ; - HelicsFilter result; + HelicsTranslator result; (void)jenv; (void)jcls; @@ -10382,15 +12512,15 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreRegisterFilter etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsCore *)&jarg1; - arg2 = (HelicsFilterTypes)jarg2; + arg1 = *(HelicsFederate *)&jarg1; + arg2 = (HelicsTranslatorTypes)jarg2; arg3 = 0; if (jarg3) { arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); if (!arg3) return 0; } - result = (HelicsFilter)helicsCoreRegisterFilter(arg1,arg2,(char const *)arg3,arg4); - *(HelicsFilter *)&jresult = result; + result = (HelicsTranslator)helicsFederateRegisterGlobalTranslator(arg1,arg2,(char const *)arg3,arg4); + *(HelicsTranslator *)&jresult = result; if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { if (arg4->error_code!=HELICS_OK) @@ -10403,41 +12533,43 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreRegisterFilter } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreRegisterCloningFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsCoreRegisterTranslator(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jstring jarg3) { jlong jresult = 0 ; HelicsCore arg1 = (HelicsCore) 0 ; - char *arg2 = (char *) 0 ; - HelicsError *arg3 = (HelicsError *) 0 ; - HelicsError etemp3 ; - HelicsFilter result; + HelicsTranslatorTypes arg2 ; + char *arg3 = (char *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + HelicsTranslator result; (void)jenv; (void)jcls; { - etemp3=helicsErrorInitialize(); - arg3=&etemp3; + etemp4=helicsErrorInitialize(); + arg4=&etemp4; } arg1 = *(HelicsCore *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; + arg2 = (HelicsTranslatorTypes)jarg2; + arg3 = 0; + if (jarg3) { + arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); + if (!arg3) return 0; } - result = (HelicsFilter)helicsCoreRegisterCloningFilter(arg1,(char const *)arg2,arg3); - *(HelicsFilter *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); + result = (HelicsTranslator)helicsCoreRegisterTranslator(arg1,arg2,(char const *)arg3,arg4); + *(HelicsTranslator *)&jresult = result; + if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { - if (arg3->error_code!=HELICS_OK) + if (arg4->error_code!=HELICS_OK) { jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); - (*jenv)->ThrowNew(jenv, clazz, arg3->message); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); } } return jresult; } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilterCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetTranslatorCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; int result; @@ -10445,19 +12577,19 @@ SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilterCo (void)jenv; (void)jcls; arg1 = *(HelicsFederate *)&jarg1; - result = (int)helicsFederateGetFilterCount(arg1); + result = (int)helicsFederateGetTranslatorCount(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetTranslator(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsFilter result; + HelicsTranslator result; (void)jenv; (void)jcls; @@ -10471,8 +12603,8 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilter( arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return 0; } - result = (HelicsFilter)helicsFederateGetFilter(arg1,(char const *)arg2,arg3); - *(HelicsFilter *)&jresult = result; + result = (HelicsTranslator)helicsFederateGetTranslator(arg1,(char const *)arg2,arg3); + *(HelicsTranslator *)&jresult = result; if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10485,13 +12617,13 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilter( } -SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilterByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { +SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetTranslatorByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { jlong jresult = 0 ; HelicsFederate arg1 = (HelicsFederate) 0 ; int arg2 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; - HelicsFilter result; + HelicsTranslator result; (void)jenv; (void)jcls; @@ -10501,8 +12633,8 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilterB } arg1 = *(HelicsFederate *)&jarg1; arg2 = (int)jarg2; - result = (HelicsFilter)helicsFederateGetFilterByIndex(arg1,arg2,arg3); - *(HelicsFilter *)&jresult = result; + result = (HelicsTranslator)helicsFederateGetTranslatorByIndex(arg1,arg2,arg3); + *(HelicsTranslator *)&jresult = result; { if (arg3->error_code!=HELICS_OK) { @@ -10514,36 +12646,36 @@ SWIGEXPORT jlong JNICALL Java_com_java_helics_helicsJNI_helicsFederateGetFilterB } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFilterIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorIsValid(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; - HelicsFilter arg1 = (HelicsFilter) 0 ; + HelicsTranslator arg1 = (HelicsTranslator) 0 ; HelicsBool result; (void)jenv; (void)jcls; - arg1 = *(HelicsFilter *)&jarg1; - result = (HelicsBool)helicsFilterIsValid(arg1); + arg1 = *(HelicsTranslator *)&jarg1; + result = (HelicsBool)helicsTranslatorIsValid(arg1); jresult = (jint)result; return jresult; } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorGetName(JNIEnv *jenv, jclass jcls, jlong jarg1) { jstring jresult = 0 ; - HelicsFilter arg1 = (HelicsFilter) 0 ; + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsFilter *)&jarg1; - result = (char *)helicsFilterGetName(arg1); + arg1 = *(HelicsTranslator *)&jarg1; + result = (char *)helicsTranslatorGetName(arg1); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSet(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorSet(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; double arg3 ; HelicsError *arg4 = (HelicsError *) 0 ; @@ -10555,14 +12687,14 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSet(JNIEnv *j etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } arg3 = (double)jarg3; - helicsFilterSet(arg1,(char const *)arg2,arg3,arg4); + helicsTranslatorSet(arg1,(char const *)arg2,arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg4->error_code!=HELICS_OK) @@ -10573,9 +12705,9 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSet(JNIEnv *j } } - -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsFilter arg1 = (HelicsFilter) 0 ; + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorSetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; @@ -10587,7 +12719,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetString(JNI etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); @@ -10598,7 +12730,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetString(JNI arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); if (!arg3) return ; } - helicsFilterSetString(arg1,(char const *)arg2,(char const *)arg3,arg4); + helicsTranslatorSetString(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { @@ -10611,8 +12743,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetString(JNI } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDestinationTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorAddInputTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10623,13 +12755,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDestinatio etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFilterAddDestinationTarget(arg1,(char const *)arg2,arg3); + helicsTranslatorAddInputTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10641,8 +12773,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDestinatio } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddSourceTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorAddPublicationTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10653,13 +12785,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddSourceTarg etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFilterAddSourceTarget(arg1,(char const *)arg2,arg3); + helicsTranslatorAddPublicationTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10671,8 +12803,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddSourceTarg } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDeliveryEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorAddSourceEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10683,13 +12815,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDeliveryEn etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFilterAddDeliveryEndpoint(arg1,(char const *)arg2,arg3); + helicsTranslatorAddSourceEndpoint(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10701,8 +12833,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterAddDeliveryEn } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorAddDestinationEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10713,13 +12845,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveTarget( etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFilterRemoveTarget(arg1,(char const *)arg2,arg3); + helicsTranslatorAddDestinationEndpoint(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10731,8 +12863,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveTarget( } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveDeliveryEndpoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorRemoveTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10743,13 +12875,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveDeliver etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFilterRemoveDeliveryEndpoint(arg1,(char const *)arg2,arg3); + helicsTranslatorRemoveTarget(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10761,22 +12893,22 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterRemoveDeliver } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorGetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) { jstring jresult = 0 ; - HelicsFilter arg1 = (HelicsFilter) 0 ; + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsFilter *)&jarg1; - result = (char *)helicsFilterGetInfo(arg1); + arg1 = *(HelicsTranslator *)&jarg1; + result = (char *)helicsTranslatorGetInfo(arg1); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorSetInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; HelicsError *arg3 = (HelicsError *) 0 ; HelicsError etemp3 ; @@ -10787,13 +12919,13 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetInfo(JNIEn etemp3=helicsErrorInitialize(); arg3=&etemp3; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return ; } - helicsFilterSetInfo(arg1,(char const *)arg2,arg3); + helicsTranslatorSetInfo(arg1,(char const *)arg2,arg3); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); { if (arg3->error_code!=HELICS_OK) @@ -10805,29 +12937,29 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetInfo(JNIEn } -SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { +SWIGEXPORT jstring JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorGetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { jstring jresult = 0 ; - HelicsFilter arg1 = (HelicsFilter) 0 ; + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; char *result = 0 ; (void)jenv; (void)jcls; - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); if (!arg2) return 0; } - result = (char *)helicsFilterGetTag(arg1,(char const *)arg2); + result = (char *)helicsTranslatorGetTag(arg1,(char const *)arg2); if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); return jresult; } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorSetTag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; HelicsError *arg4 = (HelicsError *) 0 ; @@ -10839,7 +12971,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetTag(JNIEnv etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = 0; if (jarg2) { arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); @@ -10850,7 +12982,7 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetTag(JNIEnv arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); if (!arg3) return ; } - helicsFilterSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); + helicsTranslatorSetTag(arg1,(char const *)arg2,(char const *)arg3,arg4); if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); { @@ -10863,8 +12995,8 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetTag(JNIEnv } -SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { - HelicsFilter arg1 = (HelicsFilter) 0 ; +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorSetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3) { + HelicsTranslator arg1 = (HelicsTranslator) 0 ; int arg2 ; int arg3 ; HelicsError *arg4 = (HelicsError *) 0 ; @@ -10876,10 +13008,10 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetOption(JNI etemp4=helicsErrorInitialize(); arg4=&etemp4; } - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = (int)jarg2; arg3 = (int)jarg3; - helicsFilterSetOption(arg1,arg2,arg3,arg4); + helicsTranslatorSetOption(arg1,arg2,arg3,arg4); { if (arg4->error_code!=HELICS_OK) { @@ -10890,22 +13022,49 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFilterSetOption(JNI } -SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsFilterGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { +SWIGEXPORT jint JNICALL Java_com_java_helics_helicsJNI_helicsTranslatorGetOption(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) { jint jresult = 0 ; - HelicsFilter arg1 = (HelicsFilter) 0 ; + HelicsTranslator arg1 = (HelicsTranslator) 0 ; int arg2 ; int result; (void)jenv; (void)jcls; - arg1 = *(HelicsFilter *)&jarg1; + arg1 = *(HelicsTranslator *)&jarg1; arg2 = (int)jarg2; - result = (int)helicsFilterGetOption(arg1,arg2); + result = (int)helicsTranslatorGetOption(arg1,arg2); jresult = (jint)result; return jresult; } +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTimeRequestEntryCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + void (*arg2)(HelicsTime,HelicsTime,HelicsBool,void *) = (void (*)(HelicsTime,HelicsTime,HelicsBool,void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(void (**)(HelicsTime,HelicsTime,HelicsBool,void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsFederateSetTimeRequestEntryCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTimeUpdateCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { HelicsFederate arg1 = (HelicsFederate) 0 ; void (*arg2)(HelicsTime,HelicsBool,void *) = (void (*)(HelicsTime,HelicsBool,void *)) 0 ; @@ -10960,6 +13119,222 @@ SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetStateCha } +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateSetTimeRequestReturnCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + void (*arg2)(HelicsTime,HelicsBool,void *) = (void (*)(HelicsTime,HelicsBool,void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(void (**)(HelicsTime,HelicsBool,void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsFederateSetTimeRequestReturnCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateInitializingEntryCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + void (*arg2)(HelicsBool,void *) = (void (*)(HelicsBool,void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(void (**)(HelicsBool,void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsFederateInitializingEntryCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateExecutingEntryCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + void (*arg2)(void *) = (void (*)(void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(void (**)(void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsFederateExecutingEntryCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateCosimulationTerminationCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + void (*arg2)(void *) = (void (*)(void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(void (**)(void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsFederateCosimulationTerminationCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsFederateErrorHandlerCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + void (*arg2)(int,char const *,void *) = (void (*)(int,char const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(void (**)(int,char const *,void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsFederateErrorHandlerCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCallbackFederateNextTimeCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsTime (*arg2)(HelicsTime,void *) = (HelicsTime (*)(HelicsTime,void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(HelicsTime (**)(HelicsTime,void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsCallbackFederateNextTimeCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCallbackFederateNextTimeIterativeCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsTime (*arg2)(HelicsTime,HelicsIterationResult,HelicsIterationRequest *,void *) = (HelicsTime (*)(HelicsTime,HelicsIterationResult,HelicsIterationRequest *,void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(HelicsTime (**)(HelicsTime,HelicsIterationResult,HelicsIterationRequest *,void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsCallbackFederateNextTimeIterativeCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + +SWIGEXPORT void JNICALL Java_com_java_helics_helicsJNI_helicsCallbackFederateInitializeCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { + HelicsFederate arg1 = (HelicsFederate) 0 ; + HelicsIterationRequest (*arg2)(void *) = (HelicsIterationRequest (*)(void *)) 0 ; + void *arg3 = (void *) 0 ; + HelicsError *arg4 = (HelicsError *) 0 ; + HelicsError etemp4 ; + + (void)jenv; + (void)jcls; + { + etemp4=helicsErrorInitialize(); + arg4=&etemp4; + } + arg1 = *(HelicsFederate *)&jarg1; + arg2 = *(HelicsIterationRequest (**)(void *))&jarg2; + arg3 = *(void **)&jarg3; + helicsCallbackFederateInitializeCallback(arg1,arg2,arg3,arg4); + { + if (arg4->error_code!=HELICS_OK) + { + jclass clazz = (*jenv)->FindClass(jenv, "java/lang/Exception"); + (*jenv)->ThrowNew(jenv, clazz, arg4->message); + } + } +} + + #ifdef __cplusplus } #endif diff --git a/src/helics/shared_api_library/backup/helics/helics.h b/src/helics/shared_api_library/backup/helics/helics.h index 71df7d2300..735d074728 100644 --- a/src/helics/shared_api_library/backup/helics/helics.h +++ b/src/helics/shared_api_library/backup/helics/helics.h @@ -381,6 +381,10 @@ typedef enum { /* NOLINT */ HELICS_HANDLE_OPTION_BUFFER_DATA = 411, /** specify that the types should be checked strictly for pub/sub and filters*/ HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING = 414, + /** specify that the handle is receive only*/ + HELICS_HANDLE_OPTION_RECEIVE_ONLY = 422, + /** specify that the handle is source only*/ + HELICS_HANDLE_OPTION_SOURCE_ONLY = 423, /** specify that the mismatching units should be ignored*/ HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH = 447, /** specify that an interface will only transmit on change(only applicable to @@ -2574,7 +2578,7 @@ HELICS_EXPORT HelicsInput helicsFederateRegisterSubscription(HelicsFederate fed, * functions for inputs and publications. * * @param fed The federate object in which to create a publication. - * @param key The identifier for the publication the global publication key will be prepended with the federate name. + * @param key The identifier for the publication the global publication key will be prepended with the federate name (may be NULL). * @param type A code identifying the type of the input see /ref HelicsDataTypes for available options. * @param units A string listing the units of the publication (may be NULL). * @@ -2593,8 +2597,8 @@ HELICS_EXPORT HelicsPublication * functions for inputs and publications. * * @param fed The federate object in which to create a publication. - * @param key The identifier for the publication. - * @param type A string labeling the type of the publication. + * @param key The identifier for the publication (may be NULL). + * @param type A string labeling the type of the publication (may be NULL). * @param units A string listing the units of the publication (may be NULL). * * @param[in,out] err A pointer to an error object for catching errors. @@ -2612,7 +2616,7 @@ HELICS_EXPORT HelicsPublication * functions for inputs and publications. * * @param fed The federate object in which to create a publication. - * @param key The identifier for the publication. + * @param key The identifier for the publication (may be NULL). * @param type A code identifying the type of the input see /ref HelicsDataTypes for available options. * @param units A string listing the units of the publication (may be NULL). * @@ -2631,8 +2635,8 @@ HELICS_EXPORT HelicsPublication * functions for inputs and publications. * * @param fed The federate object in which to create a publication. - * @param key The identifier for the publication. - * @param type A string describing the expected type of the publication. + * @param key The identifier for the publication (may be NULL). + * @param type A string describing the expected type of the publication (may be NULL). * @param units A string listing the units of the publication (may be NULL). * * @param[in,out] err A pointer to an error object for catching errors. @@ -2650,7 +2654,7 @@ HELICS_EXPORT HelicsPublication * functions for inputs, and publications. * * @param fed The federate object in which to create an input. - * @param key The identifier for the publication the global input key will be prepended with the federate name. + * @param key The identifier for the publication the global input key will be prepended with the federate name (may be NULL). * @param type A code identifying the type of the input see /ref HelicsDataTypes for available options. * @param units A string listing the units of the input (may be NULL). * @@ -2669,8 +2673,8 @@ HELICS_EXPORT HelicsInput * functions for inputs, and publications. * * @param fed The federate object in which to create an input. - * @param key The identifier for the input. - * @param type A string describing the expected type of the input. + * @param key The identifier for the input (may be NULL). + * @param type A string describing the expected type of the input (may be NULL). * @param units A string listing the units of the input maybe NULL. * * @param[in,out] err A pointer to an error object for catching errors. @@ -2688,33 +2692,31 @@ HELICS_EXPORT HelicsInput * functions for inputs and publications. * * @param fed The federate object in which to create a publication. - * @param key The identifier for the publication. + * @param key The identifier for the input (may be NULL). * @param type A code identifying the type of the input see /ref HelicsDataTypes for available options. - * @param units A string listing the units of the input maybe NULL. + * @param units A string listing the units of the input (may be NULL). * * @param[in,out] err A pointer to an error object for catching errors. * - * @return An object containing the publication. + * @return An object containing the input. */ HELICS_EXPORT HelicsPublication helicsFederateRegisterGlobalInput(HelicsFederate fed, const char* key, HelicsDataTypes type, const char* units, HelicsError* err); /** - * Register a global publication with an arbitrary type. + * Register an input with an arbitrary type. * - * @details The publication becomes part of the federate and is destroyed when the federate is freed so there are no separate free - * functions for inputs and publications. + * @details The input becomes part of the federate and is destroyed when the federate is freed so there are no separate free + * functions for interfaces. * - * @param fed The federate object in which to create a publication. - * @param key The identifier for the publication. - * @param type A string defining the type of the input. - * @param units A string listing the units of the input maybe NULL. + * @param fed The federate object in which to create an input. + * @param key The identifier for the input (may be NULL). + * @param type A string defining the type of the input (may be NULL). + * @param units A string listing the units of the input (may be NULL). * * @param[in,out] err A pointer to an error object for catching errors. - - * - * @return An object containing the publication. + * @return An object containing the input. */ HELICS_EXPORT HelicsPublication helicsFederateRegisterGlobalTypeInput(HelicsFederate fed, const char* key, const char* type, const char* units, HelicsError* err); @@ -2775,7 +2777,7 @@ HELICS_EXPORT HelicsInput helicsFederateGetInputByIndex(HelicsFederate fed, int /** * Get an input object from a subscription target. -* DEPRECATED: use helicsFederateInputByTarget instead +* DEPRECATED: use helicsFederateGetInputByTarget instead * * @param fed The value federate object to use to get the publication. * @param key The name of the publication that a subscription is targeting. @@ -2791,7 +2793,7 @@ HELICS_EXPORT HELICS_DEPRECATED HelicsInput helicsFederateGetSubscription(Helics /** * Get an input object from a target. * -* @param fed The value federate object to use to get the publication. +* @param fed The value federate object to use to get the input. * @param target The name of the publication that an input is targeting. * * @param[in,out] err The error object to complete if there is an error. diff --git a/src/helics/shared_api_library/backup/helics/helics_api.h b/src/helics/shared_api_library/backup/helics/helics_api.h index f6c59c51f1..7680f212df 100644 --- a/src/helics/shared_api_library/backup/helics/helics_api.h +++ b/src/helics/shared_api_library/backup/helics/helics_api.h @@ -175,6 +175,8 @@ typedef enum { HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED = 409, HELICS_HANDLE_OPTION_BUFFER_DATA = 411, HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING = 414, + HELICS_HANDLE_OPTION_RECEIVE_ONLY = 422, + HELICS_HANDLE_OPTION_SOURCE_ONLY = 423, HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH = 447, HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE = 452, HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE = 454,