FOUNDATION Fieldbus

cancel
Showing results for 
Search instead for 
Did you mean: 

nifGetObjectAttributes of NIFBUS4.0 cannot get enums

Our application works fine with NI-FBUS 3.2.1 and earlier version. With NI-FBUS 4.0 and the same DD file, nifGetObjectAttributes fails to get enum list.  Following is the sample code. The value of flatVar->enums.count is 0. szParaName = “TB.VALVE_MAN_ID”,            err = nifGetObjectAttributes(vfdDesc[0], szParaName, &attrib);            if(!bErr)            {           FLAT_VAR *flatVar;                        ENUM_VALUE *pEnumList;                        CString strTemp;                        flatVar = (FLAT_VAR *)attrib.item;                        pEnumList = flatVar->enums.list;                        for(int i = 0; i < flatVar->enums.count; i ++)                        {                                    if(pEnumList)                                    {                                                strTemp = MyUtil.HandleFFString(pEnumList->desc);                                                strList.AddTail(strTemp);                                                nArray.Add(pEnumList->val);                                                pEnumList ++;                                    }                        }}Please help to resolve the issue.Thanks.
0 Kudos
Message 1 of 1
(6,610 Views)