- added new callback function headers for dataset access (LIB61850-387)

v1.6_develop_387
Michael Zillgith 3 years ago
parent ee9c64adc8
commit e77bd15134

@ -1841,6 +1841,21 @@ typedef MmsDataAccessError
LIB61850_API void
IedServer_setReadAccessHandler(IedServer self, ReadAccessHandler handler, void* parameter);
typedef enum {
DATASET_CREATE,
DATASET_DELETE,
DATASET_READ,
DATASET_WRITE,
DATASET_GET_DIRECTORY
} IedServer_DataSetOperation;
typedef bool
(*IedServer_DataSetAccessHandler) (void* parameter, ClientConnection connection, IedServer_DataSetOperation operation, const char* datasetRef);
LIB61850_API void
IedServer_setDataSetAccessHandler(IedServer self, IedServer_DataSetAccessHandler handler, void* parameter);
/**@}*/
/**@}*/

@ -57,6 +57,29 @@ MmsServer_setLocalIpAddress(MmsServer self, const char* localIpAddress);
LIB61850_INTERNAL bool
MmsServer_isRunning(MmsServer self);
typedef enum {
MMS_VARLIST_CREATE,
MMS_VARLIST_DELETE,
MMS_VARLIST_READ,
MMS_VARLIST_WRITE,
MMS_VARLIST_GET_DIRECTORY
} MmsVariableListAccessType;
/**
* \brief callback handler that is called for each named variable list access
*
* \param parameter a user provided parameter
* \param accessType the kind of access (create, delete, read, write, get directory)
* \param listType the type (scope) of the named variable list (either domain, association or VMD specific)
* \param domain the MMS domain the list is belonging to (is NULL for association or VMD specific lists!)
* \param listName the name
* \param connection client connection that is accessing the named variable list
*
* \return MMS_ERROR_NONE if the request is accepted, otherwise the MmsError value that has to be sent back to the client
*/
typedef MmsError (*MmsNamedVariableListAccessHandler)(void* parameter, MmsVariableListAccessType accessType, MmsVariableListType listType, MmsDomain* domain,
char* listName, MmsServerConnection connection);
/**
* \brief callback handler that is called whenever a named variable list changes
*

@ -123,7 +123,7 @@ struct sMmsServer {
MmsConnectionHandler connectionHandler;
void* connectionHandlerParameter;
MmsNamedVariableListChangedHandler variableListChangedHandler; /* TODO this is only required if dynamic data sets are supported! */
MmsNamedVariableListChangedHandler variableListChangedHandler;
void* variableListChangedHandlerParameter;
AcseAuthenticator authenticator;

@ -3,22 +3,22 @@
*
* Copyright 2013 Michael Zillgith
*
* This file is part of libIEC61850.
* 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 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.
* 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 <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
*
* See COPYING file for the complete license text.
* See COPYING file for the complete license text.
*/
#include "libiec61850_platform_includes.h"
@ -51,7 +51,6 @@ MmsNamedVariableListEntry_destroy(MmsNamedVariableListEntry self)
GLOBAL_FREEMEM(self);
}
MmsDomain*
MmsNamedVariableListEntry_getDomain(MmsNamedVariableListEntry self)
{
@ -120,5 +119,3 @@ MmsNamedVariableList_destroy(MmsNamedVariableList self)
GLOBAL_FREEMEM(self->name);
GLOBAL_FREEMEM(self);
}

Loading…
Cancel
Save