void DA::AddAttr(SLnk& param, TFld::Type type, unsigned flg, const string& ex) { TFld * fld; mPrm.p_el.fldAdd(fld = new TFld(param.prmName.c_str(), param.prmDesc.c_str(), type, flg)); param.vlattr = mPrm.vlAt(param.prmName); fld->setReserve(ex); }
//****************************************************** //* B_BVTC * //****************************************************** KA_BVTC::KA_BVTC(TMdPrm& prm, uint16_t id, uint16_t n, bool has_params) : DA(prm), count_n(n), ID(id), with_params(has_params), config(3 | (n << 4) | (3 << 10)) { mTypeFT3 = KA; TFld * fld; mPrm.p_el.fldAdd(fld = new TFld("state", _("State"), TFld::Integer, TFld::NoWrite)); fld->setReserve("0:0"); for(int i = 0; i < count_n; i++) { AddChannel(i); } loadIO(true); }
B_BVI::B_BVI(TMdPrm& prm, uint16_t id, uint16_t n, bool has_params, bool has_ext_period) : DA(prm), ID(id), count_n(n), with_params(has_params), ext_period(has_ext_period) { mTypeFT3 = GRS; blkID = 0x20; TFld * fld; mPrm.p_el.fldAdd(fld = new TFld("state", _("State"), TFld::Integer, TFld::NoWrite)); fld->setReserve("0:0"); for(int i = 0; i < count_n; i++) { AddChannel(i); } loadIO(true); }
KA_GNS::KA_GNS(TMdPrm& prm, uint16_t id, uint16_t n, bool has_params) : DA(prm), ID(id), count_n(n), with_params(has_params), config(0xF | (n << 4) | (3 << 10)) { mTypeFT3 = KA; chan_err.clear(); TFld * fld; mPrm.p_el.fldAdd(fld = new TFld("state", _("State"), TFld::Integer, TFld::NoWrite)); fld->setReserve("0:0"); for(int i = 0; i < count_n; i++) { chan_err.insert(chan_err.end(), SDataRec()); AddNSChannel(i); } loadIO(true); }