Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NBReports generated despite IedServer_lockDataModel(), IedServer_lockDataModel() #501

Open
moggiozzi opened this issue Mar 29, 2024 · 2 comments

Comments

@moggiozzi
Copy link

Shouldn't mms not buffered reports generated only after IedServer_unlockDataModel()?
I think need "else" before the call processEventsForReport(); in reporting.c
`void
ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, int flag, bool modelLocked)
{
ReportControl_lockNotify(self);

if (self->inclusionFlags[dataSetEntryIndex] & flag) { /* report for this data set entry is already pending (bypass BufTm) */
    self->reportTime = Hal_getTimeInMs();

    if (modelLocked) {
        /* buffer all relevant values */
        copyValuesToReportBuffer(self);
    }
    else // !!! MY CODE !!!
        processEventsForReport(self, self->reportTime);
}`
@moggiozzi moggiozzi changed the title Reports are generated despite IedServer_lockDataModel(), IedServer_lockDataModel() NBReports generated despite IedServer_lockDataModel(), IedServer_lockDataModel() Mar 29, 2024
@mzillgith
Copy link
Contributor

In this case there is already a pending value in the report buffer, so it has to be sent immediately. Otherwise the value in the buffer would be lost. Therefore processEventsForReport has to be called even when IedServer_lockDataModel has been called before.

@moggiozzi
Copy link
Author

In this case there is already a pending value in the report buffer, so it has to be sent immediately. Otherwise the value in the buffer would be lost. Therefore processEventsForReport has to be called even when IedServer_lockDataModel has been called before.

I have structured data (3-phase voltage and current) and I want to send a report only after updating all 3 values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants