- added IEC61850_ prefix to REASON.. values
This commit is contained in:
parent
61534daa99
commit
0e169139e3
4 changed files with 32 additions and 24 deletions
|
@ -22,7 +22,7 @@ reportCallbackFunction(void* parameter, ClientReport report)
|
|||
for (i = 0; i < 4; i++) {
|
||||
ReasonForInclusion reason = ClientReport_getReasonForInclusion(report, i);
|
||||
|
||||
if (reason != REASON_NOT_INCLUDED) {
|
||||
if (reason != IEC61850_REASON_NOT_INCLUDED) {
|
||||
printf(" GGIO1.SPCSO%i.stVal: %i (included for reason %i)\n", i,
|
||||
MmsValue_getBoolean(MmsValue_getElement(dataSetValues, i)), reason);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ reportCallbackFunction(void* parameter, ClientReport report)
|
|||
for (i = 0; i < LinkedList_size(dataSetDirectory); i++) {
|
||||
ReasonForInclusion reason = ClientReport_getReasonForInclusion(report, i);
|
||||
|
||||
if (reason != REASON_NOT_INCLUDED) {
|
||||
if (reason != IEC61850_REASON_NOT_INCLUDED) {
|
||||
|
||||
LinkedList entry = LinkedList_get(dataSetDirectory, i);
|
||||
|
||||
|
|
|
@ -67,17 +67,17 @@ char*
|
|||
ReasonForInclusion_getValueAsString(ReasonForInclusion reasonCode)
|
||||
{
|
||||
switch (reasonCode) {
|
||||
case REASON_NOT_INCLUDED:
|
||||
case IEC61850_REASON_NOT_INCLUDED:
|
||||
return "not-included";
|
||||
case REASON_DATA_CHANGE:
|
||||
case IEC61850_REASON_DATA_CHANGE:
|
||||
return "data-change";
|
||||
case REASON_DATA_UPDATE:
|
||||
case IEC61850_REASON_DATA_UPDATE:
|
||||
return "data-update";
|
||||
case REASON_QUALITY_CHANGE:
|
||||
case IEC61850_REASON_QUALITY_CHANGE:
|
||||
return "quality-change";
|
||||
case REASON_GI:
|
||||
case IEC61850_REASON_GI:
|
||||
return "GI";
|
||||
case REASON_INTEGRITY:
|
||||
case IEC61850_REASON_INTEGRITY:
|
||||
return "integrity";
|
||||
default:
|
||||
return "unknown";
|
||||
|
@ -136,7 +136,7 @@ ClientReport_getReasonForInclusion(ClientReport self, int elementIndex)
|
|||
if (self->reasonForInclusion != NULL)
|
||||
return self->reasonForInclusion[elementIndex];
|
||||
else
|
||||
return REASON_NOT_INCLUDED;
|
||||
return IEC61850_REASON_NOT_INCLUDED;
|
||||
}
|
||||
|
||||
MmsValue*
|
||||
|
@ -536,7 +536,7 @@ private_IedConnection_handleReport(IedConnection self, MmsValue* value)
|
|||
int elementIndex;
|
||||
|
||||
for (elementIndex = 0; elementIndex < dataSetSize; elementIndex++)
|
||||
matchingReport->reasonForInclusion[elementIndex] = REASON_NOT_INCLUDED;
|
||||
matchingReport->reasonForInclusion[elementIndex] = IEC61850_REASON_NOT_INCLUDED;
|
||||
|
||||
}
|
||||
|
||||
|
@ -570,22 +570,22 @@ private_IedConnection_handleReport(IedConnection self, MmsValue* value)
|
|||
MmsValue* reasonForInclusion = MmsValue_getElement(value, reasonForInclusionIndex);
|
||||
|
||||
if (MmsValue_getBitStringBit(reasonForInclusion, 1) == true)
|
||||
matchingReport->reasonForInclusion[i] = REASON_DATA_CHANGE;
|
||||
matchingReport->reasonForInclusion[i] = IEC61850_REASON_DATA_CHANGE;
|
||||
else if (MmsValue_getBitStringBit(reasonForInclusion, 2) == true)
|
||||
matchingReport->reasonForInclusion[i] = REASON_QUALITY_CHANGE;
|
||||
matchingReport->reasonForInclusion[i] = IEC61850_REASON_QUALITY_CHANGE;
|
||||
else if (MmsValue_getBitStringBit(reasonForInclusion, 3) == true)
|
||||
matchingReport->reasonForInclusion[i] = REASON_DATA_UPDATE;
|
||||
matchingReport->reasonForInclusion[i] = IEC61850_REASON_DATA_UPDATE;
|
||||
else if (MmsValue_getBitStringBit(reasonForInclusion, 4) == true)
|
||||
matchingReport->reasonForInclusion[i] = REASON_INTEGRITY;
|
||||
matchingReport->reasonForInclusion[i] = IEC61850_REASON_INTEGRITY;
|
||||
else if (MmsValue_getBitStringBit(reasonForInclusion, 5) == true)
|
||||
matchingReport->reasonForInclusion[i] = REASON_GI;
|
||||
matchingReport->reasonForInclusion[i] = IEC61850_REASON_GI;
|
||||
}
|
||||
else {
|
||||
matchingReport->reasonForInclusion[i] = REASON_UNKNOWN;
|
||||
matchingReport->reasonForInclusion[i] = IEC61850_REASON_UNKNOWN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
matchingReport->reasonForInclusion[i] = REASON_NOT_INCLUDED;
|
||||
matchingReport->reasonForInclusion[i] = IEC61850_REASON_NOT_INCLUDED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -658,27 +658,35 @@ IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char
|
|||
/** Describes the reason for the inclusion of the element in the report */
|
||||
typedef enum {
|
||||
/** the element is not included in the received report */
|
||||
REASON_NOT_INCLUDED = 0,
|
||||
IEC61850_REASON_NOT_INCLUDED = 0,
|
||||
|
||||
/** the element is included due to a change of the data value */
|
||||
REASON_DATA_CHANGE = 1,
|
||||
IEC61850_REASON_DATA_CHANGE = 1,
|
||||
|
||||
/** the element is included due to a change in the quality of data */
|
||||
REASON_QUALITY_CHANGE = 2,
|
||||
IEC61850_REASON_QUALITY_CHANGE = 2,
|
||||
|
||||
/** the element is included due to an update of the data value */
|
||||
REASON_DATA_UPDATE = 3,
|
||||
IEC61850_REASON_DATA_UPDATE = 3,
|
||||
|
||||
/** the element is included due to a periodic integrity report task */
|
||||
REASON_INTEGRITY = 4,
|
||||
IEC61850_REASON_INTEGRITY = 4,
|
||||
|
||||
/** the element is included due to a general interrogation by the client */
|
||||
REASON_GI = 5,
|
||||
IEC61850_REASON_GI = 5,
|
||||
|
||||
/** the reason for inclusion is unknown */
|
||||
REASON_UNKNOWN = 6
|
||||
IEC61850_REASON_UNKNOWN = 6
|
||||
} ReasonForInclusion;
|
||||
|
||||
#define REASON_NOT_INCLUDED IEC61850_REASON_NOT_INCLUDED
|
||||
#define REASON_DATA_CHANGE IEC61850_REASON_DATA_CHANGE
|
||||
#define REASON_QUALITY_CHANGE IEC61850_REASON_QUALITY_CHANGE
|
||||
#define REASON_DATA_UPDATE IEC61850_REASON_DATA_UPDATE
|
||||
#define REASON_INTEGRITY IEC61850_REASON_INTEGRITY
|
||||
#define REASON_GI IEC61850_REASON_GI
|
||||
#define REASON_UNKNOWN IEC61850_REASON_UNKNOWN
|
||||
|
||||
|
||||
/* Element encoding mask values for ClientReportControlBlock */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue