From f1163e78db41d2a04b3b29c4af2dc79ceb042d47 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 18 Nov 2017 11:46:24 +0100 Subject: [PATCH] added deprecated wrappers for ABI compatability --- src/sampled_values/sv_publisher.h | 1 + src/sampled_values/sv_publisher_deprecated.h | 101 +++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 src/sampled_values/sv_publisher_deprecated.h diff --git a/src/sampled_values/sv_publisher.h b/src/sampled_values/sv_publisher.h index 9b66913c..8123eec8 100644 --- a/src/sampled_values/sv_publisher.h +++ b/src/sampled_values/sv_publisher.h @@ -143,5 +143,6 @@ SV_ASDU_setSmpRate(SV_ASDU self, uint16_t smpRate); } #endif +#include "sv_publisher_deprecated.h" #endif /* LIBIEC61850_SRC_SAMPLED_VALUES_SV_PUBLISHER_H_ */ diff --git a/src/sampled_values/sv_publisher_deprecated.h b/src/sampled_values/sv_publisher_deprecated.h new file mode 100644 index 00000000..5ce6cd5a --- /dev/null +++ b/src/sampled_values/sv_publisher_deprecated.h @@ -0,0 +1,101 @@ +/* + * sv_publisher.h + * + * Copyright 2016 Michael Zillgith + * + * This file is part of libIEC61850. + * + * libIEC61850 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libIEC61850 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with libIEC61850. If not, see . + * + * See COPYING file for the complete license text. + */ + + +#ifndef LIBIEC61850_SRC_SAMPLED_VALUES_SV_PUBLISHER_DEPRECATED_H_ +#define LIBIEC61850_SRC_SAMPLED_VALUES_SV_PUBLISHER_DEPRECATED_H_ + +#include "libiec61850_platform_includes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__GNUC__) || defined(__clang__) + #define DEPRECATED __attribute__((deprecated)) +#else + #define DEPRECATED +#endif + +typedef struct sSVPublisher* SampledValuesPublisher DEPRECATED; + +/** + * \brief This function is deprecated and will be removed in the next major release. Use SVPublisher_create() instead. + * \deprecated + */ +static DEPRECATED +SampledValuesPublisher +SampledValuesPublisher_create(CommParameters* parameters, const char* interfaceId) +{ + return SVPublisher_create(parameters, interfaceId); +} + +/** + * \brief This function is deprecated and will be removed in the next major release. Use SVPublisher_addASDU() instead. + * \deprecated + */ +static DEPRECATED +SV_ASDU +SampledValuesPublisher_addASDU(SampledValuesPublisher self, char* svID, char* datset, uint32_t confRev) +{ + return SVPublisher_addASDU(self, svID, datset, confRev); +} + +/** + * \brief This function is deprecated and will be removed in the next major release. Use SVPublisher_setupComplete() instead. + * \deprecated + */ +static DEPRECATED +void +SampledValuesPublisher_setupComplete(SampledValuesPublisher self) +{ + SVPublisher_setupComplete(self); +} + +/** + * \brief This function is deprecated and will be removed in the next major release. Use SVPublisher_publish() instead. + * \deprecated + */ +static DEPRECATED +void +SampledValuesPublisher_publish(SampledValuesPublisher self) +{ + SVPublisher_publish(self); +} + +/** + * \brief This function is deprecated and will be removed in the next major release. Use SVPublisher_destroy() instead. + * \deprecated + */ +static DEPRECATED +void +SampledValuesPublisher_destroy(SampledValuesPublisher self) +{ + SVPublisher_destroy(self); +} + +#ifdef __cplusplus +} +#endif + +#endif /* LIBIEC61850_SRC_SAMPLED_VALUES_SV_PUBLISHER_DEPRECATED_H_ */