Evaluation of qc/qx in a consumer App - Manual - Industrial Edge Platform - Industrial Edge - Industrial Edge - Documentation of the Industrial Edge Platform - IEM - Hub - Industrial - Device - IED - Edge - IEH

Industrial Edge Platform Operation - APIs & References

Portfolio
Industrial Edge
Product
Industrial Edge Platform
Edition
02/2025
Language
en-US (original)

qx will be only added to a message, if it contains additional information to qc. That means, when any of the bits 14 to 8 or 5 to 0 is non-zero. As a consumer, if you would like to use the additional information of qx, you should do the following in your code to simplify the evaluation and to take care if the qx field is not there but just the qc field as fallback:

uint16_t qx;
if(val.hasField("qx") {
    qx = val.getFieldValue("qx");
} else {
    // qx doesn’t exist, use qc as fallback and convert it to same structure as qx
    qx = val.getFieldValue("qc") << 6;
}
// work just with value of qx
if(qx & 0x80) { // qx is either 'Good' or 'Good (cascade)'
    ...
}