diff --git a/CMakeLists.txt b/CMakeLists.txt index 81f609f5..8302179b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ option(CONFIG_IEC61850_CONTROL_SERVICE "Build with support for IEC 61850 control option(CONFIG_IEC61850_REPORT_SERVICE "Build with support for IEC 61850 reporting services" ON) option(CONFIG_IEC61850_LOG_SERVICE "Build with support for IEC 61850 logging services" ON) option(CONFIG_IEC61850_SETTING_GROUPS "Build with support for IEC 61850 setting group services" ON) +option(CONFIG_IEC61850_SUPPORT_USER_READ_ACCESS_CONTROL "Allow user provided callback to control read access" ON) set(CONFIG_REPORTING_DEFAULT_REPORT_BUFFER_SIZE "65536" CACHE STRING "Default buffer size for buffered reports in byte" ) diff --git a/src/iec61850/common/iec61850_common.c b/src/iec61850/common/iec61850_common.c index 8e17c05c..02156b8b 100644 --- a/src/iec61850/common/iec61850_common.c +++ b/src/iec61850/common/iec61850_common.c @@ -136,6 +136,8 @@ FunctionalConstraint_toString(FunctionalConstraint fc) { return "BR"; case IEC61850_FC_LG: return "LG"; + case IEC61850_FC_GO: + return "GO"; default: return NULL; } @@ -221,6 +223,12 @@ FunctionalConstraint_fromString(const char* fcString) return IEC61850_FC_NONE; } + if (fcString[0] == 'G') { + if (fcString[1] == 'O') + return IEC61850_FC_GO; + return IEC61850_FC_NONE; + } + return IEC61850_FC_NONE; } diff --git a/src/iec61850/inc/iec61850_common.h b/src/iec61850/inc/iec61850_common.h index a41a7db4..b4f18b92 100644 --- a/src/iec61850/inc/iec61850_common.h +++ b/src/iec61850/inc/iec61850_common.h @@ -245,6 +245,8 @@ typedef enum eFunctionalConstraint { IEC61850_FC_BR = 16, /** Log control blocks */ IEC61850_FC_LG = 17, + /** Goose control blocks */ + IEC61850_FC_GO = 18, /** All FCs - wildcard value */ IEC61850_FC_ALL = 99, diff --git a/src/iec61850/server/mms_mapping/mms_mapping.c b/src/iec61850/server/mms_mapping/mms_mapping.c index d36adc14..87919a7a 100644 --- a/src/iec61850/server/mms_mapping/mms_mapping.c +++ b/src/iec61850/server/mms_mapping/mms_mapping.c @@ -2481,8 +2481,8 @@ mmsReadAccessHandler (void* parameter, MmsDomain* domain, char* variableId, MmsS fc = FunctionalConstraint_fromString(separator + 1); if (fc == IEC61850_FC_BR || fc == IEC61850_FC_US || - fc == IEC61850_FC_MS || fc == IEC61850_FC_RP || - fc == IEC61850_FC_LG) + fc == IEC61850_FC_MS || fc == IEC61850_FC_RP || + fc == IEC61850_FC_LG || fc == IEC61850_FC_GO) { return DATA_ACCESS_ERROR_SUCCESS; }