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.

Per opc-da-client’s documented contract (the Windows-only library the gateway wraps on the other side), this is one of "Good", "Bad", "Uncertain", or a synthesized "Unknown(0xNNNN)" for an OPC quality code the library 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.