Ejemplo n.º 1
0
        public List <string> getDevDetails(HARTDevice dev)
        {
            List <string> devInfo   = new List <string>();
            CDDLBase      pItemBase = null;

            if (dev.getItembyID(DEVICE_DISTRIBUTOR, ref pItemBase))
            {
                if (pItemBase.eType == nitype.nVar)
                {
                    CDDLVar devdis = pItemBase as CDDLVar;
                    devdis.getDispValue().SetValue((int)dev.ddbDeviceID.wManufacturer, valueType_t.isIntConst);
                    m_strDistributor = devdis.GetDispString();
                }
            }

            if (dev.getItembyID(DEVICE_DEVICE_TYPE, ref pItemBase))
            {
                if (pItemBase.eType == nitype.nVar)
                {
                    CDDLVar devtype = pItemBase as CDDLVar;
                    m_strType = devtype.GetDispString();
                }
            }

            m_strDDRevision = dev.parentform.strDDRevision;
            m_strRevision   = dev.parentform.strDeviceRevision;
            devInfo.Add(m_strDistributor);
            devInfo.Add(m_strType);
            devInfo.Add(m_strDDRevision);
            devInfo.Add(m_strRevision);
            return(devInfo);
            //strDDfile = dev.;
        }
Ejemplo n.º 2
0
        public void getDevCommStatus(HARTDevice dev)
        {
            CDDLBase pItemBase = null;

            if (dev.getItembyID(DeviceDetails.DEVICE_COMM_STATUS, ref pItemBase))
            {
                if (pItemBase.eType == nitype.nVar)
                {
                    CDDLVar comstatus = pItemBase as CDDLVar;
                    nCommStatusValue = comstatus.getDispValue().GetInt();
                }
            }

            if (dev.getItembyID(DeviceDetails.DEVICE_COMM48_STATUS, ref pItemBase))
            {
                if (pItemBase.eType == nitype.nVar)
                {
                    CDDLVar devstatus = pItemBase as CDDLVar;
                    nDevStatusValue = devstatus.getDispValue().GetInt();
                }
            }
        }