'DeclarationEvent WriteError As SparkplugProducerErrorEventHandler
'UsageDim instance As ISparkplugProducerEvents Dim handler As SparkplugProducerErrorEventHandler AddHandler instance.WriteError, handler
event SparkplugProducerErrorEventHandler WriteError
event SparkplugProducerErrorEventHandler^ WriteError
The event handler receives an argument of type SparkplugProducerErrorEventArgs containing data related to this event. The following SparkplugProducerErrorEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Device | The device associated with this event, if any. (Inherited from OpcLabs.EasySparkplug.OperationModel.SparkplugProducerProcessedEventArgs) |
| EdgeNode | The edge node associated with this event. (Inherited from OpcLabs.EasySparkplug.OperationModel.SparkplugProducerProcessedEventArgs) |
| Exception | Describes the error that has occurred in the producer. |
| Handled | (Inherited from System.ComponentModel.HandledEventArgs) |
| MetricName | The name of the metric associated with this event. Empty if the event is not associated with a metric. (Inherited from OpcLabs.EasySparkplug.OperationModel.SparkplugProducerProcessedEventArgs) |
This event is raised when the produced has received data for the metric, but the metric data cannot be updated, e.g. because of the data type mismatch.
Possible causes of the write error include:
- The Sparkplug command message specifies a metric with a name that does not exist in the edge node or device.
- Attempt to write historical data into the metric.
- The value received in the Sparkplug command message cannot be converted to the data type of the metric. The converted value cannot be represented in a CLS type.Processing of the SparkplugMetric.Write event has indicated failure by returning
falsein the OpcLabs.EasySparkplug.OperationModel.SparkplugMetricWriteEventArgs.Result property of the event arguments.
Write error is reported through this on the corresponding Sparkplug edge node (EasySparkplugEdgeNodeCore) or device (SparkplugDevice). The event arguments include the name of the metric that has encountered the write error, in the OpcLabs.EasySparkplug.OperationModel.SparkplugProducerProcessedEventArgs.MetricName property.
Sparkplug is a trademark of Eclipse Foundation, Inc. "MQTT" is a trademark of the OASIS Open standards consortium. Other related terms are trademarks of their respective owners. Any use of these terms on this site is for descriptive purposes only and does not imply any sponsorship, endorsement or affiliation.