Skip to main content

quality_from_raw

Function quality_from_raw 

Source
pub fn quality_from_raw(raw: &str) -> Quality
Expand description

Maps opcda_bridge’s raw OPC quality string to Quality.

The gateway reports one of "Good", "Bad", "Uncertain", or a synthesized "Unknown(0xNNNN)" for an OPC quality code it doesn’t otherwise recognize. Any string other than an exact "Good"/"Uncertain" match — including that "Unknown(...)" case — is treated as Quality::Bad: an unrecognized quality is exactly the situation where guessing “trustworthy” would be the wrong default.