bool BackendHelper::ReadRegisterField(const QString& dev, const QString& reg, const QString& field, soc_word_t& v) { SocDevRef dev_ref; SocRegRef reg_ref; SocFieldRef field_ref; if(!GetDevRef(dev, dev_ref) || !GetRegRef(dev_ref, reg, reg_ref) || !GetFieldRef(reg_ref, field, field_ref)) return false; if(!ReadRegister(dev, reg, v)) return false; v = (v & field_ref.GetField().bitmask()) >> field_ref.GetField().first_bit; return true; }
// // retrieve a named field. The named field can recurse, depending // on a set of user-defined delimiters // const CUser_field& CUser_object::GetField(const string& str, const string& delim) const { return *GetFieldRef(str, delim); }