- Fixed to compile with C++

pull/68/head
Michael Zillgith 7 years ago
parent c28d06f4d8
commit cc24c86484

@ -28,13 +28,11 @@
#include "mms_device_model.h" #include "mms_device_model.h"
#include "control.h" #include "control.h"
typedef enum { #define REPORT_CONTROL_NONE 0U
REPORT_CONTROL_NONE = 0, #define REPORT_CONTROL_VALUE_UPDATE 1U
REPORT_CONTROL_VALUE_UPDATE = 1, #define REPORT_CONTROL_VALUE_CHANGED 2U
REPORT_CONTROL_VALUE_CHANGED = 2, #define REPORT_CONTROL_QUALITY_CHANGED 4U
REPORT_CONTROL_QUALITY_CHANGED = 4, #define REPORT_CONTROL_NOT_UPDATED 8U
REPORT_CONTROL_NOT_UPDATED = 8
} ReportInclusionFlag;
typedef enum { typedef enum {
LOG_CONTROL_NONE, LOG_CONTROL_NONE,
@ -91,7 +89,7 @@ DataSet*
MmsMapping_createDataSetByNamedVariableList(MmsMapping* self, MmsNamedVariableList variableList); MmsMapping_createDataSetByNamedVariableList(MmsMapping* self, MmsNamedVariableList variableList);
void void
MmsMapping_triggerReportObservers(MmsMapping* self, MmsValue* value, ReportInclusionFlag flag); MmsMapping_triggerReportObservers(MmsMapping* self, MmsValue* value, int flag);
void void
MmsMapping_triggerLogging(MmsMapping* self, MmsValue* value, LogInclusionFlag flag); MmsMapping_triggerLogging(MmsMapping* self, MmsValue* value, LogInclusionFlag flag);

@ -80,7 +80,7 @@ typedef struct {
Semaphore createNotificationsMutex; /* { covered by mutex } */ Semaphore createNotificationsMutex; /* { covered by mutex } */
#endif #endif
ReportInclusionFlag* inclusionFlags; /* { covered by mutex } */ uint8_t* inclusionFlags; /* { covered by mutex } */
bool triggered; /* { covered by mutex } */ bool triggered; /* { covered by mutex } */
uint64_t reportTime; /* { covered by mutex } */ uint64_t reportTime; /* { covered by mutex } */
@ -103,7 +103,7 @@ void
ReportControl_destroy(ReportControl* self); ReportControl_destroy(ReportControl* self);
void void
ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, ReportInclusionFlag flag, bool modelLocked); ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, int flag, bool modelLocked);
MmsValue* MmsValue*
ReportControl_getRCBValue(ReportControl* rc, char* elementName); ReportControl_getRCBValue(ReportControl* rc, char* elementName);

@ -2723,7 +2723,7 @@ MmsMapping_triggerLogging(MmsMapping* self, MmsValue* value, LogInclusionFlag fl
#if (CONFIG_IEC61850_REPORT_SERVICE == 1) #if (CONFIG_IEC61850_REPORT_SERVICE == 1)
void void
MmsMapping_triggerReportObservers(MmsMapping* self, MmsValue* value, ReportInclusionFlag flag) MmsMapping_triggerReportObservers(MmsMapping* self, MmsValue* value, int flag)
{ {
LinkedList element = self->reportControls; LinkedList element = self->reportControls;

@ -662,7 +662,7 @@ updateReportDataset(MmsMapping* mapping, ReportControl* rc, MmsValue* newDatSet,
if (rc->inclusionFlags != NULL) if (rc->inclusionFlags != NULL)
GLOBAL_FREEMEM(rc->inclusionFlags); GLOBAL_FREEMEM(rc->inclusionFlags);
rc->inclusionFlags = (ReportInclusionFlag*) GLOBAL_CALLOC(dataSet->elementCount, sizeof(ReportInclusionFlag)); rc->inclusionFlags = (uint8_t*) GLOBAL_CALLOC(dataSet->elementCount, sizeof(uint8_t));
success = true; success = true;
@ -2368,7 +2368,7 @@ sendNextReportEntry(ReportControl* self)
MmsValue_deleteAllBitStringBits(reason); MmsValue_deleteAllBitStringBits(reason);
switch((ReportInclusionFlag) *currentReportBufferPos) { switch((int) *currentReportBufferPos) {
case REPORT_CONTROL_QUALITY_CHANGED: case REPORT_CONTROL_QUALITY_CHANGED:
MmsValue_setBitStringBit(reason, 2, true); MmsValue_setBitStringBit(reason, 2, true);
break; break;
@ -2587,7 +2587,7 @@ Reporting_processReportEventsAfterUnlock(MmsMapping* self)
} }
void void
ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, ReportInclusionFlag flag, bool modelLocked) ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, int flag, bool modelLocked)
{ {
ReportControl_lockNotify(self); ReportControl_lockNotify(self);

Loading…
Cancel
Save