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

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

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

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

Loading…
Cancel
Save