- changed signature of IedConnection_deleteDataSet, MmsConnection_deleteAssociationSpecificNamedVariableList, MmsConnection_deleteNamedVariableList. added boolean return value to indicate if data set/named variable list has been deleted.

- increased version number to 0.9.1
pull/6/head
Michael Zillgith 10 years ago
parent f55e6f92c3
commit 44a4336deb

@ -1,3 +1,7 @@
Changes to version 0.9.1
------------------------
- changed signature of IedConnection_deleteDataSet, MmsConnection_deleteAssociationSpecificNamedVariableList, MmsConnection_deleteNamedVariableList. added boolean return value to indicate if data set/named variable list has been deleted.
Changes to version 0.9.0.2 Changes to version 0.9.0.2
-------------------------- --------------------------
- added CONFIG_IEC61850_EDITION_1 configuration option to enable server builds for edition 1 (at the moment only remove "Owner" form RCBs). - added CONFIG_IEC61850_EDITION_1 configuration option to enable server builds for edition 1 (at the moment only remove "Owner" form RCBs).

@ -7,7 +7,7 @@
/* set to 1 if you want to run the demo on a PC */ /* set to 1 if you want to run the demo on a PC */
//#define SIMULATED 1 #define SIMULATED 0

@ -2403,6 +2403,7 @@ ReportControlBlock iedModel_GenericIO_LLN0_report4 = {&iedModel_GenericIO_LLN0,
IedModel iedModel = { IedModel iedModel = {
"beagle", "beagle",
&iedModel_GenericIO, &iedModel_GenericIO,
@ -2410,6 +2411,7 @@ IedModel iedModel = {
&iedModel_GenericIO_LLN0_report0, &iedModel_GenericIO_LLN0_report0,
NULL, NULL,
NULL, NULL,
NULL,
initializeValues initializeValues
}; };

@ -1003,15 +1003,18 @@ namespace IEC61850
/// <description>This function will delete a data set at the server. This function may fail if the data set is not /// <description>This function will delete a data set at the server. This function may fail if the data set is not
/// deletable.</description> /// deletable.</description>
/// <param name="dataSetReference">The object reference of the data set</param> /// <param name="dataSetReference">The object reference of the data set</param>
/// <returns>true if data set has been deleted, false otherwise</returns>
/// <exception cref="IedConnectionException">This exception is thrown if there is a connection or service error</exception> /// <exception cref="IedConnectionException">This exception is thrown if there is a connection or service error</exception>
public void DeleteDataSet (string dataSetReference) public bool DeleteDataSet (string dataSetReference)
{ {
int error; int error;
IedConnection_deleteDataSet (connection, out error, dataSetReference); bool isDeleted = IedConnection_deleteDataSet (connection, out error, dataSetReference);
if (error != 0) if (error != 0)
throw new IedConnectionException ("Failed to delete data set", error); throw new IedConnectionException ("Failed to delete data set", error);
return isDeleted;
} }
/// <summary> /// <summary>

@ -18,7 +18,7 @@ DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "libIEC61850" PROJECT_NAME = "libIEC61850"
PROJECT_NUMBER = 0.9.0 PROJECT_NUMBER = 0.9.1
PROJECT_BRIEF = "Open-source IEC 61850 MMS/GOOSE server and client library" PROJECT_BRIEF = "Open-source IEC 61850 MMS/GOOSE server and client library"

@ -1973,13 +1973,14 @@ exit_function:
return; return;
} }
void bool
IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const char* dataSetReference) IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const char* dataSetReference)
{ {
char domainIdBuf[65]; char domainIdBuf[65];
char* domainId = domainIdBuf; char* domainId = domainIdBuf;
char itemId[DATA_SET_MAX_NAME_LENGTH + 1]; char itemId[DATA_SET_MAX_NAME_LENGTH + 1];
bool isAssociationSpecific = false; bool isAssociationSpecific = false;
bool isDeleted = false;
int dataSetReferenceLength = strlen(dataSetReference); int dataSetReferenceLength = strlen(dataSetReference);
@ -2025,14 +2026,14 @@ IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const cha
MmsError mmsError; MmsError mmsError;
if (isAssociationSpecific) if (isAssociationSpecific)
MmsConnection_deleteAssociationSpecificNamedVariableList(self->connection, &mmsError, itemId); isDeleted = MmsConnection_deleteAssociationSpecificNamedVariableList(self->connection, &mmsError, itemId);
else else
MmsConnection_deleteNamedVariableList(self->connection, &mmsError, domainId, itemId); isDeleted = MmsConnection_deleteNamedVariableList(self->connection, &mmsError, domainId, itemId);
*error = iedConnection_mapMmsErrorToIedError(mmsError); *error = iedConnection_mapMmsErrorToIedError(mmsError);
exit_function: exit_function:
return; return isDeleted;
} }
LinkedList /* <char*> */ LinkedList /* <char*> */

@ -1336,8 +1336,10 @@ IedConnection_createDataSet(IedConnection self, IedClientError* error, const cha
* \param connection the connection object * \param connection the connection object
* \param error the error code if an error occurs * \param error the error code if an error occurs
* \param dataSetReference object reference of the data set * \param dataSetReference object reference of the data set
*
* \return true if data set has been deleted, false otherwise
*/ */
void bool
IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const char* dataSetReference); IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const char* dataSetReference);

@ -325,6 +325,9 @@ MmsGooseControlBlock_checkAndPublish(MmsGooseControlBlock self, uint64_t current
Semaphore_post(self->publisherMutex); Semaphore_post(self->publisherMutex);
#endif #endif
} }
else if ((self->nextPublishTime - currentTime) > ((uint32_t) self->maxTime * 2)) {
self->nextPublishTime = currentTime + self->minTime;
}
} }
void void

@ -229,15 +229,15 @@ createNamedVariableFromDataAttribute(DataAttribute* attribute)
namedVariable->type = MMS_OCTET_STRING; namedVariable->type = MMS_OCTET_STRING;
break; break;
case IEC61850_VISIBLE_STRING_32: case IEC61850_VISIBLE_STRING_32:
namedVariable->typeSpec.visibleString = -129; namedVariable->typeSpec.visibleString = -32;
namedVariable->type = MMS_VISIBLE_STRING; namedVariable->type = MMS_VISIBLE_STRING;
break; break;
case IEC61850_VISIBLE_STRING_64: case IEC61850_VISIBLE_STRING_64:
namedVariable->typeSpec.visibleString = -129; namedVariable->typeSpec.visibleString = -64;
namedVariable->type = MMS_VISIBLE_STRING; namedVariable->type = MMS_VISIBLE_STRING;
break; break;
case IEC61850_VISIBLE_STRING_65: case IEC61850_VISIBLE_STRING_65:
namedVariable->typeSpec.visibleString = -129; namedVariable->typeSpec.visibleString = -65;
namedVariable->type = MMS_VISIBLE_STRING; namedVariable->type = MMS_VISIBLE_STRING;
break; break;
case IEC61850_VISIBLE_STRING_129: case IEC61850_VISIBLE_STRING_129:

@ -493,8 +493,10 @@ MmsConnection_readNamedVariableListDirectoryAssociationSpecific(MmsConnection se
* \param mmsError user provided variable to store error code * \param mmsError user provided variable to store error code
* \param domainId the domain name of the domain of the variable list * \param domainId the domain name of the domain of the variable list
* \param listName the name of the named variable list * \param listName the name of the named variable list
*
* \return true if named variable list has been deleted, false otherwise
*/ */
void bool
MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName); MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName);
/** /**
@ -503,8 +505,10 @@ MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError, co
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code * \param mmsError user provided variable to store error code
* \param listName the name of the named variable list * \param listName the name of the named variable list
*
* \return true if named variable list has been deleted, false otherwise
*/ */
void bool
MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsError* mmsError, MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsError* mmsError,
const char* listName); const char* listName);

@ -1459,10 +1459,12 @@ exit_function:
return; return;
} }
void bool
MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError, MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* listName) const char* domainId, const char* listName)
{ {
bool isDeleted = false;
if (self->associationState != MMS_STATE_CONNECTED) { if (self->associationState != MMS_STATE_CONNECTED) {
*mmsError = MMS_ERROR_CONNECTION_LOST; *mmsError = MMS_ERROR_CONNECTION_LOST;
goto exit_function; goto exit_function;
@ -1481,8 +1483,8 @@ MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError,
if (self->lastResponseError != MMS_ERROR_NONE) if (self->lastResponseError != MMS_ERROR_NONE)
*mmsError = self->lastResponseError; *mmsError = self->lastResponseError;
else if (responseMessage != NULL) else if (responseMessage != NULL)
if (!mmsClient_parseDeleteNamedVariableListResponse(self->lastResponse, NULL)) if (mmsClient_parseDeleteNamedVariableListResponse(self->lastResponse, NULL))
*mmsError = MMS_ERROR_ACCESS_OTHER; isDeleted = true;
releaseResponse(self); releaseResponse(self);
@ -1490,13 +1492,15 @@ MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError,
*mmsError = MMS_ERROR_CONNECTION_LOST; *mmsError = MMS_ERROR_CONNECTION_LOST;
exit_function: exit_function:
return; return isDeleted;
} }
void bool
MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self,
MmsError* mmsError, const char* listName) MmsError* mmsError, const char* listName)
{ {
bool isDeleted = false;
if (self->associationState != MMS_STATE_CONNECTED) { if (self->associationState != MMS_STATE_CONNECTED) {
*mmsError = MMS_ERROR_CONNECTION_LOST; *mmsError = MMS_ERROR_CONNECTION_LOST;
goto exit_function; goto exit_function;
@ -1516,8 +1520,8 @@ MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self,
if (self->lastResponseError != MMS_ERROR_NONE) if (self->lastResponseError != MMS_ERROR_NONE)
*mmsError = self->lastResponseError; *mmsError = self->lastResponseError;
else if (responseMessage != NULL) else if (responseMessage != NULL)
if (!mmsClient_parseDeleteNamedVariableListResponse(self->lastResponse, NULL)) if (mmsClient_parseDeleteNamedVariableListResponse(self->lastResponse, NULL))
*mmsError = MMS_ERROR_ACCESS_OTHER; isDeleted = true;
releaseResponse(self); releaseResponse(self);
@ -1525,7 +1529,7 @@ MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self,
*mmsError = MMS_ERROR_CONNECTION_LOST; *mmsError = MMS_ERROR_CONNECTION_LOST;
exit_function: exit_function:
return; return isDeleted;
} }
MmsVariableSpecification* MmsVariableSpecification*

Loading…
Cancel
Save