vkrejc

Extended description and pointclass attributes of PI Point

Discussion created by vkrejc on Sep 20, 2012
Latest reply on Sep 20, 2012 by vkrejc

Hi,

 

I'm getting PI Points from PI Server using GetPoints2 method. I'm able to retrieve attributes like Descriptor, displaydigits, engunits, .. But I'm not able to retrieve attributes extended description and pointclass. How can I do it, please?

 

Here is my code:

 

 

 

 

 
PISDK::IGetPoints2Ptr l_spPoints2 = (PISDK::IGetPoints2Ptr) m_spServer;


PISDKCommon::_NamedValuesPtr l_spAttributes(__uuidof(PISDKCommon::NamedValues));

_variant_t l_varPointSource;
l_spAttributes->Add("pointsource", &l_varPointSource);
_variant_t l_varDescriptor;
l_spAttributes->Add("Descriptor",&l_varDescriptor);
_variant_t l_varPointclass;
l_spAttributes->Add("pointclass",&l_varPointclass);
_variant_t l_varDigitalset;
l_spAttributes->Add("digitalset",&l_varDigitalset);
_variant_t l_varEnginunits;
l_spAttributes->Add("engunits",&l_varEnginunits);
_variant_t l_varExtendedDesc;
l_spAttributes->Add("extenddescription",&l_varExtendedDesc);
_variant_t l_varSourceTag;
l_spAttributes->Add("sourcetag", &l_varSourceTag);
_variant_t l_varDisplayDigits;
l_spAttributes->Add("displaydigits",&l_varDisplayDigits);

PISDK::_PointListPtr l_spList = l_spPoints2->GetPoints2(l_whereClause, l_spAttributes, PISDK::useGetPoints, l_spasync, NULL, NULL);

 

 

Thank you!

 

 

Outcomes