picm_getpointrecord

This function returns the cached point record for a given point in the cache file.

C format

int32 picm_getpointrecord(

int32 nPointId,(

struct SPointRecord * pRecord );

Returns

0

Success

-12011

Point not found

-20018

Point id does not match point id found in cache file

-20028

System error

-20004

Bad pointer

-20019

Invalid cache file

-20020

No cache file for current host

Arguments

nPointId (passed)

Point number

pRecord (returned)

Cached point record

Usage Notes

The caller of this function must have previously called picm_opencache to open the cache file and piut_setservernode to set the PI Server if a call to piut_setservernode had been made since the initial call to picm_opencache.

The struct SPointRecord is defined in ptcache.h as follows:

#define PTATTR_BUFF_LEN 1024 /* Maximum point attribute length */

struct SPointRecord

{

int32 m_arrLocation[5];

char m_cPointType;

float m_fConvers;

float m_fTypicalvalue;

float m_fSpan;

float m_fUserReal1;

float m_fUserReal2;

float m_fZero;

short m_nArchiving;

int32 m_nChangeDate;

short m_nCompDev;

int32 m_nCompMax;

int32 m_nCompMin;

short m_nCompressing;

int32 m_nCreationDate;

short m_nDisplayDigits;

short m_nEngUnits;

short m_nExcDev;

short m_nExcMax;

short m_nExcMin;

short m_nFilterCode;

int32 m_nPointId;

short m_nScan;

int32 m_nSourcePoint;

short m_nSquareroot;

short m_nTotalCode;

int32 m_nUserInt1;

int32 m_nUserInt2;

char m_szChanger[8];

char m_szCreator[8];

char m_szDescriptor[PTATTR_BUFF_LEN+1];

char m_szExDesc[PTATTR_BUFF_LEN+1];

char m_szInstrumentTag[PTATTR_BUFF_LEN +1];

char m_szPointsource[PTATTR_BUFF_LEN + 1];

char m_szTagname[PTATTR_BUFF_LEN+1];

};

Enabling Operational Intelligence