From ad89a0f26ad20d3eb7f8eed0eee3ccd1f24c354a Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Fri, 12 Dec 2014 10:04:46 +0100 Subject: [PATCH] - added some documentation --- CMakeLists.txt | 2 +- config/stack_config.h | 2 +- src/doxygen.config | 2 +- src/iec61850/inc/iec61850_server.h | 92 ++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7aad2d4..8b1ff63e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ project(libiec61850) set(LIB_VERSION_MAJOR "0") set(LIB_VERSION_MINOR "8") -set(LIB_VERSION_PATCH "3") +set(LIB_VERSION_PATCH "4") # feature checks include(CheckLibraryExists) diff --git a/config/stack_config.h b/config/stack_config.h index 31a6678a..5a0f93c2 100644 --- a/config/stack_config.h +++ b/config/stack_config.h @@ -131,7 +131,7 @@ /* default results for MMS identify service */ #define CONFIG_DEFAULT_MMS_VENDOR_NAME "libiec61850.com" #define CONFIG_DEFAULT_MMS_MODEL_NAME "LIBIEC61850" -#define CONFIG_DEFAULT_MMS_REVISION "0.8.3" +#define CONFIG_DEFAULT_MMS_REVISION "0.8.4" /* MMS virtual file store base path - where file services are looking for files */ #define CONFIG_VIRTUAL_FILESTORE_BASEPATH "./vmd-filestore/" diff --git a/src/doxygen.config b/src/doxygen.config index 74873d34..a71d55bc 100644 --- a/src/doxygen.config +++ b/src/doxygen.config @@ -18,7 +18,7 @@ DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "libIEC61850" -PROJECT_NUMBER = 0.8.3 +PROJECT_NUMBER = 0.8.4 PROJECT_BRIEF = "Open-source IEC 61850 MMS/GOOSE server and client library" diff --git a/src/iec61850/inc/iec61850_server.h b/src/iec61850/inc/iec61850_server.h index d7ecb624..302c9200 100644 --- a/src/iec61850/inc/iec61850_server.h +++ b/src/iec61850/inc/iec61850_server.h @@ -328,27 +328,119 @@ IedServer_unlockDataModel(IedServer self); MmsValue* IedServer_getAttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of a boolean data attribute + * + * Get the value of a data attribute of type MMS_BOOLEAN. If the data attribute + * is of a different type the returned value is undefined. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return true or false + */ bool IedServer_getBooleanAttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of an integer data attribute + * + * Get the value of a data attribute of type MMS_INTEGER. If the data attribute + * is of a different type the returned value is undefined. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return the value as 32 bit integer + */ int32_t IedServer_getInt32AttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of an integer data attribute + * + * Get the value of a data attribute of type MMS_INTEGER. If the data attribute + * is of a different type the returned value is undefined. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return the value as 64 bit integer + */ int64_t IedServer_getInt64AttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of an unsigned integer data attribute + * + * Get the value of a data attribute of type MMS_UNSIGNED. If the data attribute + * is of a different type the returned value is undefined. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return the value as 32 bit unsigned integer + */ uint32_t IedServer_getUInt32AttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of a floating point data attribute + * + * Get the value of a data attribute of type MMS_FLOAT. If the data attribute + * is of a different type the returned value is undefined. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return the value as 32 bit float + */ float IedServer_getFloatAttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of a UTC time data attribute + * + * Get the value of a data attribute of type MMS_UTC_TIME. If the data attribute + * is of a different type the returned value is undefined. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return the value as 32 bit float + */ uint64_t IedServer_getUTCTimeAttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of a bit string data attribute as integer value + * + * Get the value of a data attribute of type MMS_BIT_STRING. If the data attribute + * is of a different type the returned value is undefined. + * NOTE: The returned integer is determined by calculating the according the follwing + * formula: bit0^0 + bit1^1 + ... + bitn^n + * It is not specified in the IEC 61850 specifications how a bit string can be interpreted + * as an integer. Therefore this function has to be used with care. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return the value a 32 bit integer. + */ uint32_t IedServer_getBitStringAttributeValue(IedServer self, DataAttribute* dataAttribute); +/** + * \brief Get data attribute value of a string type data attribute + * + * Get the value of a data attribute of type MMS_STRING or MMS_VISIBLE_STRING. If the data attribute + * is of a different type the returned value is undefined. + * + * \param self the instance of IedServer to operate on. + * \param dataAttribute the data attribute handle + * + * \return the value as a C string (null terminated string) + */ char* IedServer_getStringAttributeValue(IedServer self, DataAttribute* dataAttribute);