- 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
--------------------------
- 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 */
//#define SIMULATED 1
#define SIMULATED 0

@ -2403,6 +2403,7 @@ ReportControlBlock iedModel_GenericIO_LLN0_report4 = {&iedModel_GenericIO_LLN0,
IedModel iedModel = {
"beagle",
&iedModel_GenericIO,
@ -2410,6 +2411,7 @@ IedModel iedModel = {
&iedModel_GenericIO_LLN0_report0,
NULL,
NULL,
NULL,
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
/// deletable.</description>
/// <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>
public void DeleteDataSet (string dataSetReference)
public bool DeleteDataSet (string dataSetReference)
{
int error;
IedConnection_deleteDataSet (connection, out error, dataSetReference);
bool isDeleted = IedConnection_deleteDataSet (connection, out error, dataSetReference);
if (error != 0)
throw new IedConnectionException ("Failed to delete data set", error);
return isDeleted;
}
/// <summary>

@ -18,7 +18,7 @@ DOXYFILE_ENCODING = UTF-8
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"

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

@ -1336,8 +1336,10 @@ IedConnection_createDataSet(IedConnection self, IedClientError* error, const cha
* \param connection the connection object
* \param error the error code if an error occurs
* \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);

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

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

@ -493,8 +493,10 @@ MmsConnection_readNamedVariableListDirectoryAssociationSpecific(MmsConnection se
* \param mmsError user provided variable to store error code
* \param domainId the domain name of the domain of the 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);
/**
@ -503,8 +505,10 @@ MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError, co
* \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code
* \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,
const char* listName);

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

Loading…
Cancel
Save