- fixed problem with report activation
This commit is contained in:
parent
39b566f265
commit
1700bca56b
4 changed files with 13 additions and 30 deletions
|
@ -160,7 +160,7 @@
|
||||||
#define MMS_GET_NAME_LIST 1
|
#define MMS_GET_NAME_LIST 1
|
||||||
#define MMS_GET_VARIABLE_ACCESS_ATTRIBUTES 1
|
#define MMS_GET_VARIABLE_ACCESS_ATTRIBUTES 1
|
||||||
#define MMS_DATA_SET_SERVICE 1
|
#define MMS_DATA_SET_SERVICE 1
|
||||||
#define MMS_DYNAMIC_DATA_SETS 0
|
#define MMS_DYNAMIC_DATA_SETS 1
|
||||||
#define MMS_GET_DATA_SET_ATTRIBUTES 1
|
#define MMS_GET_DATA_SET_ATTRIBUTES 1
|
||||||
#define MMS_STATUS_SERVICE 1
|
#define MMS_STATUS_SERVICE 1
|
||||||
#define MMS_IDENTIFY_SERVICE 1
|
#define MMS_IDENTIFY_SERVICE 1
|
||||||
|
|
|
@ -81,33 +81,6 @@ int main(int argc, char** argv) {
|
||||||
LinkedList_destroy(nameList);
|
LinkedList_destroy(nameList);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
|
||||||
// MmsValue* value;
|
|
||||||
//
|
|
||||||
// MmsConnection_getVariableAccessAttributes(con, "SampleIEDDevice1", "MMXU2$MX$TotW");
|
|
||||||
//
|
|
||||||
// value = MmsConnection_readVariable(con, "SampleIEDDevice1", "MMXU2$MX$TotW$mag$f");
|
|
||||||
//
|
|
||||||
// printf("Read variable with value: %f\n", MmsValue_toFloat(value));
|
|
||||||
//
|
|
||||||
// MmsValue_setFloat(value, 1.234f);
|
|
||||||
//
|
|
||||||
// MmsConnection_writeVariable(con, "SampleIEDDevice1", "MMXU2$MX$TotW$mag$f", value);
|
|
||||||
//
|
|
||||||
// MmsValue_delete(value);
|
|
||||||
//
|
|
||||||
// value = MmsConnection_readVariable(con, "SampleIEDDevice1", "MMXU2$MX$TotW$mag$f");
|
|
||||||
//
|
|
||||||
// printf("Read variable with value: %f\n", MmsValue_toFloat(value));
|
|
||||||
//
|
|
||||||
// MmsValue_delete(value);
|
|
||||||
//
|
|
||||||
// value = MmsConnection_readVariable(con, "SampleIEDDevice1", "DGEN1$ST$Beh$stVal");
|
|
||||||
//
|
|
||||||
// printf("Read integer variable with value: %i\n", MmsValue_toInt32(value));
|
|
||||||
//
|
|
||||||
// MmsValue_delete(value);
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
MmsConnection_destroy(con);
|
MmsConnection_destroy(con);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1315,6 +1315,7 @@ Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* eleme
|
||||||
increaseConfRev(rc);
|
increaseConfRev(rc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
printf("BBBBBB\n");
|
||||||
retVal = DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID;
|
retVal = DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID;
|
||||||
goto exit_function;
|
goto exit_function;
|
||||||
}
|
}
|
||||||
|
@ -1413,6 +1414,7 @@ Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* eleme
|
||||||
if (rcbValue != NULL)
|
if (rcbValue != NULL)
|
||||||
MmsValue_update(rcbValue, value);
|
MmsValue_update(rcbValue, value);
|
||||||
else {
|
else {
|
||||||
|
printf("AAAAAA\n");
|
||||||
retVal = DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID;
|
retVal = DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID;
|
||||||
goto exit_function;
|
goto exit_function;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,11 +104,19 @@ IedModel_lookupDataSet(IedModel* model, const char* dataSetReference /* e.g. ie
|
||||||
|
|
||||||
int ldNameLen = separator - dataSetReference;
|
int ldNameLen = separator - dataSetReference;
|
||||||
|
|
||||||
|
char domainName[65];
|
||||||
|
|
||||||
|
int modelNameLen = strlen(model->name);
|
||||||
|
|
||||||
|
memcpy(domainName, model->name, modelNameLen);
|
||||||
|
|
||||||
while (dataSet != NULL) {
|
while (dataSet != NULL) {
|
||||||
|
|
||||||
//TODO use domain name instead of dataSet->logicalDeviceName !?
|
domainName[modelNameLen] = 0;
|
||||||
|
|
||||||
if (strncmp(dataSet->logicalDeviceName, dataSetReference, ldNameLen) == 0) {
|
strncat(domainName, dataSet->logicalDeviceName, 64);
|
||||||
|
|
||||||
|
if (strncmp(domainName, dataSetReference, ldNameLen) == 0) {
|
||||||
if (strcmp(dataSet->name, separator + 1) == 0) {
|
if (strcmp(dataSet->name, separator + 1) == 0) {
|
||||||
return dataSet;
|
return dataSet;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue