Since HELICS 3 is a major version update, there are some breaking changes to the API for developers. This guide will try to track what breaking changes are made to the API, and what developers should use instead when updating from HELICS 2.x to 3.
Support for some older compilers and dependencies have been removed. The new minimum version are:
- C++17 compatible-compiler (minimums: GCC 7.0, Clang 5.0, MSVC 2017 15.7, XCode 10, ICC 19)
- CMake 3.10+
- ZeroMQ 4.2+
- Boost 1.65.1+ (if building with Boost enabled)
Changes that will require changing code are listed below based on the interface API used. A list of known PRs that made breaking changes is also provided.
Federate::error(int errorcode)
andFederate::error(int errorcode, const std::string& message)
were removed, uselocalError
instead (orglobalError
to stop the entire simulation). Changed in #1363.
- Removed
helics_message
struct -- call functions to set fields instead.helicsEndpointGetMessage
andhelicsFederateGetMessage
returning this struct were removed -- call functions to get field values instead. Changed in #1363. helics_message_object
typedef was renamed tohelics_message
inapi-data.h
; inMessageFederate.h
andhelicsCallbacks.h
allhelics_message_object
arguments and return types are nowhelics_message
. Changed in #1363.- Renamed
helicsEndpointSendMessageObject
tohelicsEndpointSendMessage
,helicsSendMessageObjectZeroCopy
tohelicsSendMessageZeroCopy
,helicsEndpointGetMessageObject
tohelicsEndpointGetMessage
,helicsEndpointCreateMessageObject
tohelicsEndpointCreateMessage
,helicsFederateGetMessageObject
tohelicsFederateGetMessage
, andhelicsFederateCreateMessageObject
tohelicsFederateCreateMessage
. Changed in #1363. - Removed
helicsEndpointClearMessages
-- it did nothing,helicsFederateClearMessages
orhelicsMessageFree
should be used instead. Changed in #1363.
- Removed the
helics_message
struct, and renamedhelics_message_object
tohelics_message
. Direct setting of struct fields should be done through API functions instead. This affects a few functions in theMessage
class inEndpoint.hpp
; the explicit constructor andrelease()
methods now takehelics_message
arguments, andoperator helics_message_object()
becomesoperator helics_message()
. Changed in #1363.