Skip to content

Metrics only updated when dataReceived handler is attached and other metrics are removed #106

@Geens

Description

@Geens

I noticed some problems with the ProcessPayload function in SparkplugApplication.cs. When no DeviceDataReceived or NodeDataReceived event handler is attached, the IEnumerable is not evaluated and metrics are not updated.

Also, the metricState is reinitialized each time ProcessPayload is called. Because of this a partial update, of for instance a single metric, removes all other metrics from the state.

I have a pull request ready to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions