Skip to content

Commit

Permalink
Merge pull request #15 from GMLC-TDC/helics3.4Update
Browse files Browse the repository at this point in the history
Helics 3.4 library updates
  • Loading branch information
phlptp authored Jan 24, 2023
2 parents e6523c8 + 1ed055f commit 4c84a41
Show file tree
Hide file tree
Showing 22 changed files with 541 additions and 462 deletions.
899 changes: 488 additions & 411 deletions helicsMex.cpp

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions matlabBindings/+helics/HelicsHandleOptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
% HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED: value:409 specify that multiple connections are allowed for an interface
% HELICS_HANDLE_OPTION_BUFFER_DATA: value:411 specify that the last data should be buffered and sent on subscriptions after init
% HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING: value:414 specify that the types should be checked strictly for pub/sub and filters
% HELICS_HANDLE_OPTION_RECEIVE_ONLY: value:422 specify that the handle is receive only
% HELICS_HANDLE_OPTION_SOURCE_ONLY: value:423 specify that the handle is source only
% HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH: value:447 specify that the mismatching units should be ignored
% HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE: value:452 specify that an interface will only transmit on change(only applicable to publications)
% HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE: value:454 specify that an interface will only update if the value has actually changed
Expand All @@ -24,6 +26,8 @@
HELICS_HANDLE_OPTION_MULTIPLE_CONNECTIONS_ALLOWED = int32(409);
HELICS_HANDLE_OPTION_BUFFER_DATA = int32(411);
HELICS_HANDLE_OPTION_STRICT_TYPE_CHECKING = int32(414);
HELICS_HANDLE_OPTION_RECEIVE_ONLY = int32(422);
HELICS_HANDLE_OPTION_SOURCE_ONLY = int32(423);
HELICS_HANDLE_OPTION_IGNORE_UNIT_MISMATCH = int32(447);
HELICS_HANDLE_OPTION_ONLY_TRANSMIT_ON_CHANGE = int32(452);
HELICS_HANDLE_OPTION_ONLY_UPDATE_ON_CHANGE = int32(454);
Expand Down
4 changes: 2 additions & 2 deletions matlabBindings/+helics/helicsFederateGetInputCount.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function varargout = helicsFederateGetInputCount(varargin)
% 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.

[varargout{1:nargout}] = helicsMex('helicsFederateGetInputCount', varargin{:});
end
1 change: 1 addition & 0 deletions matlabBindings/+helics/helicsFederateGetSubscription.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function varargout = helicsFederateGetSubscription(varargin)
% 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.
Expand Down
8 changes: 4 additions & 4 deletions matlabBindings/+helics/helicsFederateRegisterGlobalInput.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
% Register a global named input.
%
% @details 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).
%
%
%
% @return An object containing the publication.
% @return An object containing the input.

[varargout{1:nargout}] = helicsMex('helicsFederateRegisterGlobalInput', varargin{:});
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
% Register a global named publication 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 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).
%
%
%
Expand Down
18 changes: 8 additions & 10 deletions matlabBindings/+helics/helicsFederateRegisterGlobalTypeInput.m
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
function varargout = helicsFederateRegisterGlobalTypeInput(varargin)
% 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 subscriptions 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 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).
%
%
%
% @return An object containing the publication.
% @return An object containing the input.

[varargout{1:nargout}] = helicsMex('helicsFederateRegisterGlobalTypeInput', varargin{:});
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
% Register a global publication with a defined 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 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).
%
%
%
Expand Down
4 changes: 2 additions & 2 deletions matlabBindings/+helics/helicsFederateRegisterInput.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
% Register a named input.
%
% @details 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).
%
Expand Down
6 changes: 3 additions & 3 deletions matlabBindings/+helics/helicsFederateRegisterPublication.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
% Register a publication with a known 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 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).
%
%
%
Expand Down
13 changes: 6 additions & 7 deletions matlabBindings/+helics/helicsFederateRegisterSubscription.m
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
function varargout = helicsFederateRegisterSubscription(varargin)
% Create a subscription.
% Create an input and add a publication target.
%
% @details 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.
% @details 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).
%
%
%
% @return An object containing the subscription.
% @return An object containing the input.

[varargout{1:nargout}] = helicsMex('helicsFederateRegisterSubscription', varargin{:});
end
6 changes: 3 additions & 3 deletions matlabBindings/+helics/helicsFederateRegisterTypeInput.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
% Register an input with a defined type.
%
% @details 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.
%
%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
% Register a publication with a defined 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 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).
%
%
%
Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputGetBoolean.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputGetBoolean(varargin)
% Get a boolean value from a subscription.
% Get a boolean value from an input.
%
% @param ipt The input to get the data for.
%
Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputGetByteCount.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputGetByteCount(varargin)
% 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.

Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputGetDouble.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputGetDouble(varargin)
% Get a double value from a subscription.
% Get a double value from an input.
%
% @param ipt The input to get the data for.
%
Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputGetInteger.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputGetInteger(varargin)
% Get an integer value from a subscription.
% Get an integer value from an input.
%
% @param ipt The input to get the data for.
%
Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputGetStringSize.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputGetStringSize(varargin)
% 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.

Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputGetTime.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputGetTime(varargin)
% Get a time value from a subscription.
% Get a time value from an input.
%
% @param ipt The input to get the data for.
%
Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputGetVectorSize.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputGetVectorSize(varargin)
% 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.

Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputIsUpdated.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputIsUpdated(varargin)
% 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.

Expand Down
2 changes: 1 addition & 1 deletion matlabBindings/+helics/helicsInputLastUpdateTime.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function varargout = helicsInputLastUpdateTime(varargin)
% Get the last time a subscription was updated.
% Get the last time a input was updated.

[varargout{1:nargout}] = helicsMex('helicsInputLastUpdateTime', varargin{:});
end

0 comments on commit 4c84a41

Please sign in to comment.