Custom Collector Toolkit Structure Reference

Following are the custom collector toolkit structure references:

ihInterfaceTKPreCfgInfo

The ihInterfaceTKPreCfgInfo structure maintains the pre-configuration information of a collector.

Definition
typedef struct ihInterfaceTKPreCfgInfo {
ihTKInterfaceType InterfaceType;
int MultipleInstancesAllowed;
int MinimumInterval;
int MaxTagsPerRead;
int CanReadASync;
int CanBrowseSource;
int CanSourceTimestamp;
int ForceInputScaling;
int NeedMsgPump;
float ForcedScaleHI;
float ForcedScaleLO;
int ForceAsyncSource;
int ForcePolledSource;
int AyncAllowAdjustWhenSource;
int PolledAllowAdjustWhenSource;
int DontWriteASyncOfflineValue;
int DontWritePolledOfflineValue;
int DoesReloadMode;
int DoesLagTimes;
ihTKTagFields ReloadTagFields;
ihTKTagFields NotifyTagFields;
int IsHistoricalCollector;
int CanBrowseHierarchical;
wchar_t ReloadModeName[100];
TKCallBackFunctionCalcLibraryTag * CalcLibraryTagCallback;
void * CalcLibraryTagCallbackParam;
int CanSendOPCQuality;
} ihInterfaceTKPreCfgInfo;
Parameters
NameDescription
InterfaceTypeIndicates the collector responsible for collecting data for the tag.
MultipleInstancesAllowedIndicates whether multiple instances are allowed.
MinimumIntervalIndicates the minimum interval the collector uses.
MaxTagsPerReadIndicates the maximum tags per read.
CanReadASyncIndicates whether Async tags can be read.
CanBrowseSourceIf True, this column indicates that the collector is capable of browsing its source for tags.
CanSourceTimestampIndicates whether the data source is capable of providing timestamps along with the data.
ForceInputScalingForces input scaling to be used.
NeedMsgPumpIndicates whether a message pump is required.
ForcedScaleHIForces to use Hi Scaling.
ForcedScaleLOForces to use Low scaling.
ForceAsyncSourceForces to use Async source.
ForcePolledSourceForces to use polled source.
AsyncAllowAdjustWhenSourceForces Async to allow adjust when source.
PolledAllowAdjustWhenSourceForces to polled to allow adjust when source.
DontWriteASyncOfflineValueForces not to write Async offline value.
DontWritePolledOfflineValueForces not to write polled offline values.
DoesReloadModeUses the reload mode.
DoesLagTimesDefines the lag times.
IsHistoricalCollectorIndicates whether it is a historical collector.
CanBrowseHierarchicalIndicates whether a hierarchical browse can be done.
ReloadModeNameReload mode name.
CalcLibraryTagCallbackCall back function for calculation tag.
CalcLibraryTagCallbackParamCalculation tag call back parameters
CanSendOPCQualityIndicates whether OPC Quality can be sent.

ihInterfaceTKCfgInfo

The ihInterfaceTKCfgInfo structure maintains the configuration information of the collectors.

Definition
typedef struct ihInterfaceTKCfgInfo {
int CanBrowseSource;
int CanSourceTimestamp;
int ForcePolled;
int DoOnFly;
wchar_t* CustomProp1;
wchar_t* CustomProp2;
wchar_t* CustomProp3;
wchar_t* CustomProp4;
wchar_t* CustomProp5;
wchar_t StatusOutputAddress[500];
wchar_t RateOutputAddress[500];
wchar_t HeartbeatOutputAddress[500];
wchar_t InterfaceName[500];
wchar_t HistorianNodeName[1024];
wchar_t LogFilePath[500];
wchar_t BufferFilePath[500];
uint32 MinimumDiskFreeBufferSize;
uint32 MaximumMemoryBufferSize;
int ShouldAdjustTime;
int ShouldQueueWrites;
int SourceTimeInLocalTime;
volatile int32_t CollectionDelay;
wchar_t DefaultTagPrefix[200];
uint32_t DefaultCollectionInterval;
ihTKCollectionType DefaultCollectionType;
ihTKTimeStampType DefaultTimeStampType;
int DefaultLoadBalancing;
int DefaultCollectorCompression;
float DefaultCollectorCompressionDeadband;
uint32_t DefaultCollectorCompressionTimeout;
int ReloadMode;
volatile int32_t DisableOnTheFlyTagChanges;
uint32_t ReadLagTime;
int32_t MaxHistoricalRecoverySeconds;
int32_t HistoricalOverrunThresholdSecs;
int DontStartupPolling;
int DefaultSpikeLogic;
float DefaultSpikeMultiplier;
uint32_t DefaultSpikeInterval;
volatile int32_t DataRecoveryQueueEnabled;
int DefaultAbsoluteDeadbanding;
double DefaultAbsoluteDeadband;
int RedundancyEnabled;
wchar_t RedundancyPrincipalCollector[500];
volatile int32_t RedundancyIsActiveCollector;
wchar_t RedundancyPrimaryCollector[500];
uint32_t SyncThreadInterval;
} ihInterfaceTKCfgInfo;
Parameters
NameDescription
CanBrowseSourceIf True, this column indicates that the collector is capable of browsing its source for tags.
CanSourceTimestampIndicates whether the data source is capable of providing timestamps along with the data.
ForcePolledIf you set as true then collection type will be forced to be ihPolled.
DoOnFlyIndicates whether to enable or disable on the fly changes.
CustomProp1The general (or spare) configuration fields for the collector. The CollectorGeneral1 column is not user defined; it is different for each collector.
CustomProp2The general (or spare) configuration fields for the collector. The CollectorGeneral2 column is not user defined; it is different for each collector.
CustomProp3The general (or spare) configuration fields for the collector. The CollectorGeneral3 column is not user defined; it is different for each collector.
CustomProp4The general (or spare) configuration fields for the collector. The CollectorGeneral4 column is not user defined; it is different for each collector.
CustomProp5The general (or spare) configuration fields for the collector. The CollectorGeneral5 column is not user defined; it is different for each collector.
StatusOutputAddress[500]The address in the source database into which the collector writes the status signal output.
RateOutputAddress[500]An address or tag name in the data source into which the collector writes the current value of the events per minute output.
HeartbeatOutputAddress[500]The address in the source database into which the collector writes the heartbeat signal output.
InterfaceName[500]The name of the collector. The collector name is unique in a given Historian Server.
HistorianNodeName[1024]The name of the DataArchiver server where we need to store our data.
LogFilePath[500]Path name to specify the location of the log files.
BufferFilePath[500]Path name to specify the location of the buffer files.
MinimumDiskFreeBufferSizeThe minimum size (in MB) of disk buffer for buffering outgoing data.
MaximumMemoryBufferSizeThe maximum size of memory buffer (in MB) for buffering outgoing data.
ShouldAdjustTimeIf the data source supplies the timestamps, the ShouldAdjustTime value is False. If the collector supplies the timestamps, the ShouldAdjustTime value is True.
ShouldQueueWritesIndicates whether queue writes are allowed or not.
SourceTimeInLocalTimeApplicable only for data source timestamps. Indicates whether the timestamps use local time. If SourceTimeInLocalTime is False, then UTC time is used.
CollectionDelayThe length of time, in seconds, that the collector should delay collection at start-up (to allow data source time to initialize).
DefaultTagPrefix[200]The prefix that is automatically added to all tag names added by the specified collector.
DefaultCollectionIntervalThe collection interval, in milliseconds, for tags added by the collector.
ihTKCollectionType

DefaultCollectionType

Type of collection used to acquire data for tags added by the collector:

  • Unsolicited - The collector accepts data from the source whenever the source presents the data.
  • Polled - The collector acquires data from a source on a periodic schedule determined by the collector.
ihTKTimeStampType

DefaultTimeStampType

The type of time stamping applied to data samples at collection time for tags added by the collector:

  • Source - The source delivers the timestamp along with the data sample.
  • Collector - The collector delivers the timestamp along with the collected data.
DefaultCollectorCompressionIndicates whether the default collector compression is enabled for tags added by the collector.
DefaultCollectorCompressionDeadbandThe default collector compression deadband for tags added by the collector.
DefaultCollectorCompressionTimeoutIndicates the default collector compression time out value.
DisableOnTheFlyTagChanges

Indicates whether a user can perform on the fly changes to this tag. When enabled (True), you can make changes to this tag without having to restart the collector.

If this option is disabled (False), any changes you make to this tag does not affect collection until you restart the collector.

DefaultSpikeLogicIndicates whether the Spike Logic is enabled.
DefaultSpikeMultiplierIndicates the default Spike Logic multiplier.
DefaultSpikeIntervalIndicates the default Spike Logic interval.
DataRecoveryQueueEnabledIndicates whether the Recovery queue is enabled.
DefaultAbsoluteDeadbandingIndicates if the absolute dead band is enabled.
RedundancyEnabledIndicates that the collector redundancy is enabled.
RedundancyPrincipalCollector[500]Indicates the principal collector.
RedundancyIsActiveCollectorIndicates that the current collector is active.
RedundancyPrimaryCollector[500]Indicates the principal collector.
SyncThreadInterval

If greater than 0, indicates that the collector is capable of synchronizing EnumeratedSets populated by ihCollectorToolkitGetEnumeratedSets implementation.

ihCollectorToolkitGetEnumeratedSets is fired every x minutes, where x is the value of SyncThreadInterval.

ihCollectorToolKitDefProperties

The ihCollectorToolkitDefProperties structure maintains the Custom Collectors specific properties General1-5 definitions.

Definition
typedef struct {
wchar_t* InterfaceDefName;
int32_t InterfaceType;
unsigned char IsSystemInterface;
wchar_t* General1Description;
wchar_t* General2Description;
wchar_t* General3Description;
wchar_t* General4Description;
wchar_t* General5Description;
} ihCollectorToolkitDefProperties;
Parameters
NameDescription
InterfaceDefNameThe name of the Custom Collector.
InterfaceTypeihTKCustom- specifies the custom collector type.
IsSystemInterfaceBoolean. If true, specifies whether it is a System collector or a custom collector. Default - false.
General1DescriptionCollector general-1 property description.
General2DescriptionCollector general-2 property description.
General3DescriptionCollector general-3 property description.
General4DescriptionCollector general-4 property description.
General5DescriptionCollector general-5 property description.

The parameters General1Description, General2Description to General5Description, specifies the collector specific properties descriptions which are not listed among the general collector properties. Using Collector Toolkit we can add up to 5 collector specific properties descriptions.

ihInterfaceTKDataInfo

The ihInterfaceTKDataInfo structure maintains data properties of a collector.

Definition
typedef struct ihInterfaceTKDataInfo {
wchar_t
*ArchiveTagName;
wchar_t *Tag;
ihTKDataProperties DataProp;
ihTKAPIStatus ErrorStatus;
ihTKGetDataType GetDataType;
wchar_t *ErrorMessage;
uint32_t CollectionTime;
wchar_t *CustomProp1;
wchar_t *CustomProp2;
wchar_t *CustomProp3;
wchar_t *CustomProp4;
wchar_t *CustomProp5;
} ihInterfaceTKDataInfo;
Parameters
NameDescription
*ArchiveTagNameTag name of the archive.
*TagName of the tag.
DataPropProperties of the data.
ErrorStatusStatus of the error.
GetDataTypeData type.
*ErrorMessageError message.
CollectionTimeCollection time.
*CustomProp1CustomProp1 property description.
*CustomProp2CustomProp2 property description.
*CustomProp3CustomProp3 property description.
*CustomProp4CustomProp4 property description.
*CustomProp5CustomProp5 property description.
Example
Populating data for a single tag.
ihInterfaceTKDataInfodata;
memset(&data,0, sizeof(ihInterfaceTKDataInfo));
data.Tag= Lcomputername.OperatorName
data.DataProp.ValueDataType= ihTKFloat;// correct data type- same as tag type 
data.DataProp.TimeStamp = pColl->TKGetSystemTime(); //10/01/2014 07:05:00
data.DataProp.Value = 10; // value that matches the data type. 
data.DataProp.Quality = ihTKOPCGood;

ihTKTagProperties

The ihTKTagProperties structure maintains the properties of a Historian tag.

Definition
typedef struct ihTKTagProperties {wchar_t* Tagname; wchar_t*
Description; wchar_t* 
EngineeringUnits; wchar_t* 
Comment; ihTKDataType 
DataType;
unsigned char FixedStringLength;
wchar_t* InterfaceName; wchar_t* 
SourceAddress; ihTKCollectionType 
CollectionType; uint32_t 
CollectionInterval; uint32_t 
CollectionOffset; ihTKBoolean 
LoadBalancing; ihTKTimeStampType 
TimeStampType; double 
HiEngineeringUnits;
double LoEngineeringUnits; 
ihTKBoolean InputScaling; 
double HiScale;
double LoScale;
ihTKBoolean InterfaceCompression; 
float InterfaceDeadbandPercentRange; 
ihTKBoolean ArchiveCompression;
float ArchiveDeadbandPercentRange;
wchar_t* CustomProp1; 
wchar_t* CustomProp2; 
wchar_t* CustomProp3; 
wchar_t* CustomProp4; 
wchar_t* CustomProp5; 
wchar_t* ReadSecurityGroup; 
wchar_t* WriteSecurityGroup;
wchar_t* AdministratorSecurityGroup;
ihTKTimeStruct LastModified; 
wchar_t* LastModifiedUser; 
ihTKInterfaceType InterfaceType; 
ihTKBoolean ObsoleteField; 
int32_t UTCBias;
uint32_t NumberOfCalculationDependencies; 
wchar_t** CalculationDependencies; 
uint32_t AverageCollectionTime; 
ihTKBoolean CollectionDisabled;
uint32_t ArchiveCompressionTimeout; 
uint32_t InterfaceCompressionTimeout; 
ihTKBoolean SpikeLogic;
ihTKBoolean SpikeLogicOverride; 
ihTKBoolean InterfaceAbsoluteDeadbanding; 
double InterfaceAbsoluteDeadband; 
ihTKBoolean ArchiveAbsoluteDeadbanding; 
double ArchiveAbsoluteDeadband; 
ihTKBoolean StepValue;
ihTKTimeResolution TimeResolution; 
ihTKBoolean ConditionCollectionEnabled; 
wchar_t* ConditionCollectionTriggerTag;
ihTKConditionCollectionComparison ConditionCollectionComparison;
wchar_t* ConditionCollectionCompareValue; 
ihTKBoolean ConditionCollectionMarkers; 
ihTKTagId TagId;
} ihTKTagProperties;
Parameters
NameDescription
TagnameTagname property of the tag.
DescriptionUser description of the tag.
EngineeringUnitsEngineering units description of the tag.
CommentUser comment associated with the selected tag.
DataTypeThe data type returned in this column is the data type that is defined in the Historian Administrator application.
FixedStringLengthZero unless the data type is FixedString. If the data type is FixedString, this number represents the maximum length of the string value.
InterfaceNameName of the collector responsible for collecting data for the specified tag.
SourceAddressAddress used to identify the tag at the data source. For iFIXsystems, this is NTF (Node.Tag.Field).
CollectionTypeTypes of collection used to acquire data for the tag.
CollectionIntervalThe time interval, in milliseconds, between readings of data from this tag.
CollectionOffsetThe time shift from midnight, in milliseconds, for collection of data from this tag.
LoadBalancingIndicates whether the data collector should automatically shift the phase of sampling to distribute the activity of the processor evenly over the polling cycle. This is sometimes called Phase Shifting.
TimeStampTypeThe type of time stamping applied to data samples at collection time:
  • Source: The source delivers the timestamp along with the data sample.
  • Collector: The collector delivers the timestamp along with the collected data.
HiEngineeringUnitsThe high end of the engineering units range. Used only for scaled data types and input scaled tags.
LoEngineeringUnitsThe low end of the engineering units range. Used only for scaled data types and input scaled tags.
InputScaling

Indicates whether the measurement should be converted to an engineering unit's value. When set to False, the measurement is interpreted as a raw measurement.

With input scaling set to True, the system converts the value to engineering units by scaling the value between the Hi and Lo Scale. If InputScaling is not enabled, the system assumes that the measurement is already converted into engineering units.

HiScaleThe high end value of the input scaling range used for the tag.
LoScaleThe low end value of the input scaling range used for the tag.
InterfaceCompression

Indicates whether collector compression is enabled for the tag.

Collector compression applies a smoothing filter to incoming data by ignoring incremental changes in values that fall within a dead band centered around the last collected value. The collector passes (to the archiver) any new value that falls outside the dead band and then centers the dead band around the new value.

InterfaceDeadbandPercentRangeThe current value of the compression dead band.
ArchiveCompressionIndicates whether the archive collector compression is enabled for the tag.
ArchiveDeadbandPercentRangeThe current value of the archive compression dead band.
CustomProp1The general (or spare) configuration fields for the collector. The CustomProp1 column is not user-defined; it is different for each collector.
CustomProp2The general (or spare) configuration fields for the collector. The CustomProp2 column is not user-defined; it is different for each collector.
CustomProp3The general (or spare) configuration fields for the collector. The CustomProp3 column is not user-defined; it is different for each collector.
CustomProp4The general (or spare) configuration fields for the collector. The CustomProp4 column is not user-defined; it is different for each collector.
CustomProp5The general (or spare) configuration fields for the collector. The CustomProp5 column is not user-defined; it is different for each collector.
ReadSecurityGroupThe name of the Windows security group controlling the reading of data for the tag.
WriteSecurityGroupThe name of the Windows security group controlling the writing of data for the tag.
AdministratorSecurityGroupThe name of the Windows security group responsible for controlling configuration changes for the tag.
LastModifiedThe date and time that the tag configuration for this tag was last modified. The time structure includes milliseconds.
LastModifiedUserThe user name of the Windows user who last modified this tag's configuration.
InterfaceTypeThe collector responsible for collecting data for the tag.
ObsoleteField
UTCBias

The time zone bias for the tag. Time zone bias is used to indicate the natural time zone of the tag expressed as an offset from UTC (Universal Time Coordinated) in minutes.

UTC is the international time standard, the current term for what was commonly referred to as Greenwich Mean Time (GMT).

ArchiveCompressionTimeout

Indicates the maximum amount of time from the last stored point before another point is stored, if the value does not exceed the archive compression dead band.

The data archiver treats the incoming sample after the timeout occurs as if it exceeded compression. It then stores the pending sample.

InterfaceCompressionTimeoutIndicates the maximum amount of time the collector will wait between sending samples to the archiver.
SpikeLogicIndicates whether the Spike Logic is enabled for the tag.
SpikeLogicOverrideIndicates whether the Spike Logic setting for this tag overrides the collector.
InterfaceAbsoluteDeadbandingIndicates if absolute collector deadbanding is enabled for this tag.
InterfaceAbsoluteDeadbandIndicates the value for absolute collector dead banding.
ArchiveAbsoluteDeadbandingIndicates if absolute archive dead banding is enabled for this tag.
ArchiveAbsoluteDeadbandIndicates the value for absolute archive dead banding.
StepValueIndicates if the StepValue property is enabled for the tag.
TimeResolutionIndicates the timestamp resolution in seconds, milliseconds, or microseconds.
ConditionCollectionEnabledIndicates whether condition-based collection is enabled.
ConditionCollectionTriggerTagTag condition-based collection trigger tag.
ConditionCollectionComparisonTag condition-based collection comparison operator.
ConditionCollectionCompareValueTag condition-based collection compare value.
ConditionCollectionMarkersIndicates whether to employ condition-based collection markers.
TagIdTagID associated with this tag.

ihTKTagFields

The ihTKTagFields structure maintains the information that should be provided to Historian while creating tags.

Definition
typedef struct ihTKTagFields { 
ihTKBoolean    AllFields; 
ihTKBoolean    Tagname; 
ihTKBoolean    Description; 
ihTKBoolean    EngineeringUnits; 
ihTKBoolean    Comment; 
ihTKBoolean    DataType; 
ihTKBoolean    FixedStringLength; 
ihTKBoolean    InterfaceName; 
ihTKBoolean    SourceAddress; 
ihTKBoolean    CollectionType;
ihTKBoolean    CollectionInterval; 
ihTKBoolean    CollectionOffset; 
ihTKBoolean    LoadBalancing; 
ihTKBoolean    TimeStampType; 
ihTKBoolean    HiEngineeringUnits; 
ihTKBoolean    LoEngineeringUnits; 
ihTKBoolean    InputScaling; 
ihTKBoolean    HiScale;
ihTKBoolean    LoScale;
ihTKBoolean    InterfaceCompression; 
ihTKBoolean    InterfaceDeadbandPercentRange; 
ihTKBoolean    ArchiveCompression;
ihTKBoolean    ArchiveDeadbandPercentRange;
ihTKBoolean    CustomProp1; 
ihTKBoolean    CustomProp2; 
ihTKBoolean    CustomProp3; 
ihTKBoolean    CustomProp4; 
ihTKBoolean    CustomProp5; 
ihTKBoolean    ReadSecurityGroup; 
ihTKBoolean    WriteSecurityGroup;
ihTKBoolean    AdministratorSecurityGroup;
ihTKBoolean    ObsoleteField; 
ihTKBoolean    LastModified; 
ihTKBoolean    LastModifiedUser; 
ihTKBoolean    InterfaceType; 
ihTKBoolean    TimeResolution; 
ihTKBoolean    UTCBias;
ihTKBoolean    AverageCollectionTime; 
ihTKBoolean    CalculationDependencies; 
ihTKBoolean    CollectionDisabled; 
ihTKBoolean    ArchiveCompressionTimeout; 
ihTKBoolean    InterfaceCompressionTimeout; 
ihTKBoolean    SpikeLogic;
ihTKBoolean    SpikeLogicOverride; 
ihTKBoolean    InterfaceAbsoluteDeadbanding; 
ihTKBoolean    InterfaceAbsoluteDeadband; 
ihTKBoolean    ArchiveAbsoluteDeadbanding; 
ihTKBoolean    ArchiveAbsoluteDeadband; 
ihTKBoolean    StepValue;
ihTKBoolean    MaxTagsToRetrieve; 
ihTKBoolean    ConditionCollectionEnabled; 
ihTKBoolean    ConditionCollectionTriggerTag; 
ihTKBoolean    ConditionCollectionComparison; 
ihTKBoolean    ConditionCollectionCompareValue; 
ihTKBoolean    ConditionCollectionMarkers; 
ihTKBoolean    TagId;
} ihTKTagFields;
Parameters
NameDescription
AllFieldsTag request contains all fields.
TagnameTag request contains Tagname.
DescriptionTag request contains Description.
EngineeringUnitsTag request contains EngineeringUnits.
CommentTag request contains Comment.
DataTypeTag request contains DataType.
FixedStringLengthTag request contains FixedStringLength.
InterfaceNameTag request contains InterfaceName.
SourceAddressTag request contains SourceAddress.
CollectionTypeTag request contains CollectionType.
CollectionIntervalTag request contains CollectionInterval.
CollectionOffsetTag request contains CollectionOffset.
LoadBalancingTag request contains LoadBalancing.
TimeStampTypeTag request contains TimeStampType.
HiEngineeringUnitsTag request contains HiEngineeringUnits.
LoEngineeringUnitsTag request contains LoEngineeringUnits.
InputScalingTag request contains InputScaling.
HiScaleTag request contains HiScale.
LoScaleTag request contains LoScale.
InterfaceCompressionTag request contains InterfaceCompression.
InterfaceDeadbandPercentRangeTag request contains InterfaceDeadbandPercentRange.
ArchiveCompressionTag request contains ArchiveCompression.
ArchiveDeadbandPercentRangeTag request contains ArchiveDeadbandPercentRange.
CustomProp1Tag request contains CustomProp1.
CustomProp2Tag request contains CustomProp2.
CustomProp3Tag request contains CustomProp3.
CustomProp4Tag request contains CustomProp4.
CustomProp5Tag request contains CustomProp5.
ReadSecurityGroupTag request contains ReadSecurityGroup.
WriteSecurityGroupTag request contains WriteSecurityGroup.
AdministratorSecurityGroupTag request contains AdministratorSecurityGroup.
ObsoleteFieldTag request contains ObsoleteField.
LastModifiedTag request contains LastModified.
LastModifiedUserTag request contains LastModifiedUser.
InterfaceTypeTag request contains InterfaceType.
TimeResolutionTag request contains TimeResolution.
UTCBiasTag request contains UTCBias.
AverageCollectionTimeTag request contains AverageCollectionTime.
CalculationDependenciesTag request contains CalculationDependencies.
CollectionDisabledTag request contains CollectionDisabled.
ArchiveCompressionTimeoutTag request contains ArchiveCompressionTimeout.
SpikeLogicTag request contains SpikeLogic.
SpikeLogicOverrideTag request contains SpikeLogicOverride.
InterfaceAbsoluteDeadbandingTag request contains InterfaceAbsoluteDeadbanding.
InterfaceAbsoluteDeadbandTag request contains InterfaceAbsoluteDeadband.
ArchiveAbsoluteDeadbandingTag request contains ArchiveAbsoluteDeadbanding.
ArchiveAbsoluteDeadbandTag request contains ArchiveAbsoluteDeadband.
StepValueTag request contains StepValue.
MaxTagsToRetrieveTag request contains MaxTagsToRetrieve.
ConditionCollectionEnabledTag request contains ConditionCollectionEnabled.
ConditionCollectionTriggerTagTag request contains ConditionCollectionTriggerTag.
ConditionCollectionComparisonTag request contains ConditionCollectionComparison.
ConditionCollectionCompareValueTag request contains ConditionCollectionCompareValue.
ConditionCollectionMarkersTag request contains ConditionCollectionMarkers.
TagIdTag request contains TagId

ihTKTagCriteria

The ihTKTagCriteria structure maintains the information required while retrieving data from Historian.

Definition
typedef struct ihTKTagCriteria {
wchar_t* TagnameMask; 
uint32_t NumberOfTags; 
wchar_t** TagnameArray; 
wchar_t* DescriptionMask; 
wchar_t* EngineeringUnits; 
wchar_t* Comment; 
ihTKDataType DataType;
unsigned char FixedStringLength;
wchar_t* InterfaceName; 
wchar_t* SourceAddress; 
ihTKCollectionType CollectionType; 
uint32_t CollectionInterval; 
uint32_t CollectionOffset; 
ihTKBoolean  LoadBalancing; 
ihTKTimeStampType TimeStampType; 
double HiEngineeringUnits;
double LoEngineeringUnits;
ihTKBoolean InputScaling;
double HiScale;
double LoScale;
ihTKBoolean InterfaceCompression; 
float InterfaceDeadbandPercentRange; 
ihTKBoolean ArchiveCompression;
float ArchiveDeadbandPercentRange;
wchar_t* CustomProp1; 
wchar_t* CustomProp2; 
wchar_t* CustomProp3; 
wchar_t* CustomProp4; 
wchar_t* CustomProp5; 
wchar_t* ReadSecurityGroup; 
wchar_t* WriteSecurityGroup;
wchar_t* AdministratorSecurityGroup;
ihTKTimeStruct LastModified; 
wchar_t* LastModifiedUser; 
ihTKInterfaceType InterfaceType; 
ihTKBoolean ObsoleteField; 
int32_t UTCBias;
uint32_t AverageCollectionTime; 
ihTKBoolean CollectionDisabled; 
uint32_t ArchiveCompressionTimeout; 
uint32_t InterfaceCompressionTimeout; 
ihTKBoolean SpikeLogic;
ihTKBoolean SpikeLogicOverride; 
ihTKBoolean InterfaceAbsoluteDeadbanding; 
double InterfaceAbsoluteDeadband; 
ihTKBoolean ArchiveAbsoluteDeadbanding; 
double ArchiveAbsoluteDeadband; 
ihTKBoolean SourceAddressIsMask; 
ihTKBoolean StepValue;
int32_t MaxTagsToRetrieve; 
ihTKTimeResolution TimeResolution; 
ihTKBoolean ConditionCollectionEnabled; 
wchar_t* ConditionCollectionTriggerTag;
ihTKConditionCollectionComparison ConditionCollectionComparison;
wchar_t* ConditionCollectionCompareValue; 
ihTKBoolean ConditionCollectionMarkers; 
ihTKTagId TagId;
} ihTKTagCriteria;
Parameters
NameDescription
TagnameMaskTag name mask criteria.
NumberOfTagsNumber of tags for a tag.
TagnameArrayTag name array of a tag.
DescriptionMaskTag description mask criteria.
EngineeringUnitsTag engineering units criteria.
CommentTag comment criteria.
DataTypeTag data type criteria.
FixedStringLengthTag fixed string length criteria.
InterfaceNameTag interface name.
SourceAddressTag source address criteria.
CollectionTypeTag collection type criteria.
CollectionIntervalTag collection interval criteria.
CollectionOffsetTag collection offset criteria.
LoadBalancingTag load balancing enabled criteria.
TimeStampTypeTag timestamp type criteria.
HiEngineeringUnitsTag high engineering unit criteria.
LoEngineeringUnitsTag low engineering unit criteria.
InputScalingTag input scaling enabled criteria.
HiScaleTag high scale value criteria.
LoScaleTag low scale value criteria.
InterfaceCompressionTag interface compression.
InterfaceDeadbandPercentRangeTag interface deadband percentage range.
ArchiveCompressionTag archive compression enabled criteria.
CustomProp1Tag custom property 1.
CustomProp2Tag custom property 2.
CustomProp3Tag custom property 3.
CustomProp4Tag custom property 4.
CustomProp5Tag custom property 5.
ReadSecurityGroupTag read security group name criteria.
WriteSecurityGroupTag write security group name criteria.
AdministratorSecurityGroupTag administrator security group name criteria.
LastModifiedTag last modified time criteria.
LastModifiedUserTag last modified user name criteria.
InterfaceTypeTag interface type.
ObsoleteFieldTag obsolete field.
UTCBiasTag UTC bias criteria.
AverageCollectionTimeTag average collection time.
CollectionDisabledTag collection disabled criteria.
ArchiveCompressionTimeoutTag archive-compression time out criteria.
InterfaceCompressionTimeoutTag interface compression time out.
SpikeLogicTag spike logic enabled criteria.
SpikeLogicOverrideTag spike logic override enabled criteria.
InterfaceAbsoluteDeadbandingTag interface absolute deadbanding.
ArchiveAbsoluteDeadbandingTag archive compression absolute deadband criteria.
SourceAddressIsMaskWhether to interpret source address criteria as a wildcard expression.
StepValueTag step value enabled criteria.
MaxTagsToRetrieveMaximum number of tags to retrieve per query.
TimeResolutionTag time resolution criteria.
ConditionCollectionEnabledTag condition-based collection enabled criteria.
ConditionCollectionTriggerTagTag condition-based collection trigger tag criteria.
ConditionCollectionComparisonTag condition-based collection comparison operator criteria.
ConditionCollectionCompareValueTag condition-based collection compare value criteria.
ConditionCollectionMarkersTag condition-based collection markers enabled criteria.
TagIdTagId criteria.

ihTKDataType

The ihTKDataType structure contains the data types supported by Historian.

Definition
typedefenum ihTKDataType { 
ihTKDataTypeUndefined = 0, 
ihTKScaled,
ihTKFloat, 
ihTKDoubleFloat, 
ihTKInteger, 
ihTKDoubleInteger, 
ihTKFixedString,
ihTKVariableString, 
ihTKBlob,ihTKTime, 
ihTKInt64, 
ihTKUInt64, 
ihTKUInt32, 
ihTKUInt16, 
ihTKMaxDataType}ihTKDataType;
Parameters
NameDescription
ihTKDataTypeUndefinedAn Undefined data type.
ihTKScaledA single precision (32-bit) floating-point type.
ihTKFloatA single precision (32-bit) floating-point type.
ihTKDoubleFloatA double precision (64-bit) floating-point type.
ihTKIntegerA short, signed integral type (16-bit).
ihTKDoubleIntegerA long, signed integral type (32-bit).
ihTKFixedStringA fixed-length UNICODE string The length is determined by Tag.FixedStringLengthtag property.
ihTKVariableStringA variable-length UNICODE string.
ihTKBlobAn unstructured, binary data type.
ihTKTimeA date-time type (64-bit), capable of storing one DateTime instance value.
ihTKInt64A __int64-bit quad integer.
ihTKUInt64A __int64-bit unsigned quad integer.
ihTKUInt32A long, unsigned integral type (32-bit).
ihTKUInt16A short, unsigned integral type (16-bit).
ihTKMaxDataTypeA max data type.

ihInterfaceTKASyncTagInfo

The ihInterfaceTKASyncTagInfo structure contains unsolicited tag information.

Definition
typedef struct ihInterfaceTKASyncTagInfo {
int TagId;
wchar_t *ArchiveTagName;
wchar_t *Tag;
int Interval;
double DeadbandPct; 
ihTKDataType DataType; 
int UseSourceTimeStamp; 
wchar_t *CustomProp1; 
wchar_t *CustomProp2; 
wchar_t *CustomProp3; 
wchar_t *CustomProp4; 
wchar_t *CustomProp5;
} ihInterfaceTKASyncTagInfo;
Parameters
NameDescription
TagIdTagId of the tag to be stored.
*ArchiveTagNameTag name of the corresponding TagId stored in the archiver.
*TagTag name used as primary key.
IntervalCollection interval of the tag.
DeadbandPctDeadband percentage used for compression.
DataTypeDatatype of the tag.
UseSourceTimeStampEnables you to specify to use source time stamp or collector timestamp.
*CustomProp1The general (or spare) configuration fields for the collector. The CustomProp1 column is not user-defined; it is different for each collector.
*CustomProp2The general (or spare) configuration fields for the collector. The CustomProp2 column is not user-defined; it is different for each collector.
*CustomProp3The general (or spare) configuration fields for the collector. The CustomProp3 column is not user-defined; it is different for each collector.
*CustomProp4The general (or spare) configuration fields for the collector. The CustomProp4 column is not user-defined; it is different for each collector.
*CustomProp5The general (or spare) configuration fields for the collector. The CustomProp5 column is not user-defined; it is different for each collector.

ihInterfaceTKPolledTagInfo

The ihInterfaceTKPolledTagInfo structure maintains the polled tag information of the collectors.

Definition
typedef struct ihInterfaceTKPolledTagInfo {
int TagId;
wchar_t *ArchiveTagName;
wchar_t *Tag; 
int Interval; 
int Offset;
double DeadbandPct;
ihTKDataType DataType; 
int UseSourceTimeStamp; 
wchar_t *CustomProp1; 
wchar_t *CustomProp2; 
wchar_t *CustomProp3; 
wchar_t *CustomProp4; 
wchar_t *CustomProp5;
} ihInterfaceTKPolledTagInfo;
Parameters
NameDescription
TagIdTagId of the tag to be stored.
*ArchiveTagNameTag name of the corresponding tagid stored in the archiver.
*TagTag name used as primary key.
IntervalCollection interval of the tag.
OffsetOffset from midnight (in seconds) to force sampling at a specific time of day.
DeadbandPercentageDeadband percentage used for compression.
ihTKDataType DataTypeDatatype of the tag.
UseSourceTimeStampEnables you to specify to use source time stamp or collector timestamp.
*CustomProp1The general (or spare) configuration fields for the collector. The CollectorGeneral1 column is not user-defined; it is different for each collector.
*CustomProp2The general (or spare) configuration fields for the collector. The CollectorGeneral2 column is not user-defined; it is different for each collector.
*CustomProp3The general (or spare) configuration fields for the collector. The CollectorGeneral3 column is not user-defined; it is different for each collector.
*CustomProp4The general (or spare) configuration fields for the collector. The CollectorGeneral4 column is not user-defined; it is different for each collector.
*CustomProp5The general (or spare) configuration fields for the collector. The CollectorGeneral5 column is not user-defined; it is different for each collector.

ihTKTagRecordset

The ihTKTagRecordset structure maintains Historian tags' record set.

Definition
typedef struct ihTKTagRecordset { 
ihTKTagFields RequestedFields; 
ihTKTagCriteria Criteria; 
ihTKTagFields CriteriaFields; 
uint32_t NumberOfRecords; 
ihTKTagPropertiesPtr TagRecords;
} ihTKTagRecordset;
Parameters
NameDescription
RequestedFieldsTag fields structure, which can be used to retrieve the specific fields of tags.
CriteriaCriteria structure, which can be used to query the tags based on the fields that are set.
CriteriaFieldsTag fields structure that need to be populated based on query criteria. For example, if user wants to query the tags based on Tag names then CriteriaFields.Tagname must set to true.
NumberOfRecordsNumber of TagRecords.
TagRecordsArray of TagRecords. Each TagRecord is a tag property of each tag.

ihTKBlobData

The ihTKBlobData structure contains some memory that can support data in any format such as XML or CSV.

Definition
typedefstruct ihTKBlobData {
void*Blob;
uint32_tBlobSize;
}ihTKBlobData;
Parameters
NameDescription
BlobBlob data.
BlobSizeBlob size.

ihTKHiddenValue

The ihTKHiddenValue structure represents the mapping of supported data types Historian and Microsoft, the operating system.

Definition
typedef union ihTKHiddenValue {
short Integer;
int32_t DoubleInteger;
float Float;
double DoubleFloat; 
ihTKBlobData Blob; 
wchar_t* String; 
ihTKTimeStruct Time; 
int64_t Int64; 
uint64_t UInt64; 
uint32_t UInt32; 
uint16_t UInt16;
} ihTKHiddenValue;
Parameters
NameDescription
IntegerSingle integer.
DoubleIntegerDouble integer.
FloatFloat.
DoubleFloatDouble float.
BlobBlob.
StringString.
TimeTimestamp structure with seconds and nanoseconds.
Int64Quad integer.
UInt64Unsigned quad integer.
UInt32Unsigned double integer.
UInt16Unsigned short.

ihTKRawQuality

The ihTKRawQuality structure maintains the raw quality types of the tag data.

Definition
typedef struct ihTKRawQuality {
ihTKBoolean Deleted; 
ihTKBoolean Replaced; 
unsigned char QualityStatus;
unsigned char QualitySubStatus; 
ihTKBoolean OPCQualityValid; 
unsigned short OPCQuality;
} ihTKRawQuality;
Parameters
NameDescription
DeletedDeleted tag data.
ReplacedReplaced tag data.
QualityStatus QualityStatus of the tag data.
QualitySubStatusQualitySubStatus of the tag data.
OPCQualityValidOPCQualityValid.
OPCQualityOPCQuality.

ihTKQuality

The ihTKQuality structures determines the percentage of good data in the raw quality.

Definition
typedefunion ihTKQuality { 
ihTKRawQuality RawQuality; 
float PercentGood;
}ihTKQuality;
Parameters
NameDescription
ihTKRawQualityRawQuality.
ihTKQualityPercentGood.

ihTKCommentData

The ihTKCommentData structure maintains the comment about Comment Data in the tag, if any.

Definition
typedefstruct ihTKCommentData {
wchar_t*DataTypeHint;
ihTKBlobDataCommentData;
}ihTKCommentData;
Parameters
NameDescription
DataTypeHintData type.
CommentDataComment data.

ihTKComments

The ihTKComments structure maintains the information about comment data.

Definition
typedef struct ihTKComments { 
ihTKTimeStruct StoredOnTimeStamp; 
ihTKTimeStruct CommentTimeStamp; 
wchar_t* SuppliedUsername; 
wchar_t* Username;
ihTKCommentData CommentData;
} ihTKComments;
Parameters
NameDescription
StoredOnTimeStampStored time (Set by Archiver).
CommentTimeStampTimestamp.
SuppliedUsernameSupplied username (optionally given in ihCommentAdd).
UsernameNT user name of writer. (Set by Archiver).
CommentDataComment Data.

ihTKDataProperties

The ihTKDataProperties structure represents the properties of the data.

Definition
typedef struct ihTKDataProperties { 
ihTKTimeStruct TimeStamp; 
ihTKDataType ValueDataType; 
ihTKValue Value;
ihTKQuality Quality;
unsigned char NumberOfComments;
ihTKCommentsPtr Comments;
} ihTKDataProperties;
Parameters
NameDescription
TimeStampTime stamp of the data.
ValueDataTypeData type.
ValueData value.
QualityQuality.
NumberOfCommentsNumber of comments, if any.
CommentsArray of comments.

ihInterfaceTKASyncData

The ihInterfaceTKASyncData structure represents the unsolicited tags' data. ihInterfaceTKASyncData can be defined as an array of pointers if user want to send multiple data for multiple tags in one callback. This callback doesnt return errors, but will log any errors in writing to either the DA log or the collector specific log.

Definition
typedef struct ihInterfaceTKASyncData {
int NumValues; int *TagIds; 
ihTKDataProperties *Values; 
uint32_t *CollectionTimes;
} ihInterfaceTKASyncData;
Parameters
NameDescription
NumValuesNumber of data properties.
*TagIdsTag ids.
*ValuesArray of data properties.
*CollectionTimesCollected Times.
Example
Adding data to ihInterfaceTKASyncData structure.
uint32_tcollectionTime = (uint32_t)time(0); 
int tagId = tag->TagId; 
ihInterfaceTKASyncData asyncData;
memset(&asyncData,0, sizeof(ihInterfaceTKASyncData));
asyncData.NumValues= 1; asyncData.TagIds = &tagId;
asyncData.Values = &data.DataProp;
asyncData.CollectionTimes= &collectionTime;
pColl->ihCollectorToolkitDataCallback(&asyncData);

ihTKGetDataType

The ihTKGetDataType structure indicates the different ways data is collected from source.

Definition
typedef enum ihTKGetDataType { 
ihTKGetDataTimed = 0, 
ihTKGetDataAsync, 
ihTKGetDataDemand
} ihTKGetDataType;
Parameters
NameDescription
ihTKGetDataTimedPolled data. The collector acquires data from a source on a periodic schedule determined by the collector.
ihTKGetDataAsyncAsynchronous data, the collector accepts data from the source whenever the source presents the data.
ihTKGetDataDemandData on demand, the collector accepts data from source whenever there is a demand for data.

ihTKStatus

The ihTKStatus structure contains the error statuses of Historian.

Definition
typedef enum ihTKStatus { 
ihTKSTATUS_OK = 0, 
ihTKSTATUS_FAILED = -1, 
ihTKSTATUS_API_TIMEOUT = -2, 
ihTKSTATUS_NOT_CONNECTED = -3,
ihTKSTATUS_INTERFACE_NOT_FOUND = -4, 
ihTKSTATUS_NOT_SUPPORTED = -5, 
ihTKSTATUS_DUPLICATE_DATA = -6, 
ihTKSTATUS_NOT_VALID_USER = -7, 
ihTKSTATUS_ACCESS_DENIED = -8, 
ihTKSTATUS_WRITE_IN_FUTURE = -9, 
ihTKSTATUS_WRITE_ARCH_OFFLINE = -10, 
ihTKSTATUS_ARCH_READONLY = -11, 
ihTKSTATUS_WRITE_OUTSIDE_ACTIVE = -12, 
ihTKSTATUS_WRITE_NO_ARCH_AVAIL = -13, 
ihTKSTATUS_INVALID_TAGNAME = -14, 
ihTKSTATUS_LIC_TOO_MANY_TAGS = -15, 
ihTKSTATUS_LIC_TOO_MANY_USERS = -16, 
ihTKSTATUS_LIC_INVALID_LIC_DLL = -17, 
ihTKSTATUS_NO_VALUE = -18, 
ihTKSTATUS_DUPLICATE_INTERFACE = -19, 
ihTKSTATUS_NOT_LICENSED = -20, 
ihTKSTATUS_CALC_CIRC_REFERENCE = -21, 
ihTKSTATUS_BACKUP_EXCEEDED_SPACE = -22, 
ihTKSTATUS_INVALID_SERVER_VERSION = -23, 
ihTKSTATUS_DATA_RETRIEVAL_COUNT_EXCEEDED= -24, 
ihTKSTATUS_DELETEDATA_OUTSIDE_ACTIVE = -25, 
ihTKSTATUS_ALARM_ARCHIVER_UNAVAILABLE  = -26, 
ihTKSTATUS_ARGUMENT_INVALID = -27, 
ihTKSTATUS_ARGUMENT_NULL = -28, 
ihTKSTATUS_ARGUMENT_OUT_OF_RANGE = -29, 
ihTKSTATUS_MAX_ERROR_NUM = -30,
} ihTKStatus;
Parameters
NameDescription
ihTKSTATUS_FAILEDGeneric failure.
ihTKSTATUS_API_TIMEOUTServer machine name not found, or server found but Archiver service is not running.
ihTKSTATUS_NOT_ CONNECTEDNot currently connected to a Historian server.
ihTKSTATUS_INTERFACE_ NOT_FOUNDInterface not found.
ihTKSTATUS_NOT_SUPPORTEDReserved.
ihTKSTATUS_DUPLICATE_DATAWriteData was called with error_on_replace = TRUE and the supplied data would have overwritten the existing data.
ihTKSTATUS_NOT_VALID_USERServer found, but invalid username or password.
ihTKSTATUS_ACCESS_DENIEDAccess is denied by the Historian server. Check user name/password or security group membership.
ihTKSTATUS_WRITE_IN_FUTUREWrite time stamp is too far in the future.
ihTKSTATUS_WRITE_ARCH_OFFLINEThere is no Archiver to hold the write time stamp.
ihTKSTATUS_ARCH_READONLYThe archive to hold the write time stamp is marked as read-only.
ihTKSTATUS_WRITE_OUTSIDE_ACTIVEThe write time stamp is before the active hours (now - "data is read only after") setting.
ihTKSTATUS_WRITE_NO_ARCH_AVAILABLENo archive is available to hold the write time stamp.
ihTKSTATUS_INVALID_TAGNAMETagname used is not valid. Tagname does not exist in the Historian server.
ihTKSTATUS_LIC_TOO_MANY_TAGSExceeded tag license count on the server.
ihTKSTATUS_LIC_TOO_MANY_USERS Exceeded user license count on the server.
ihTKSTATUS_LIC_INVALID_LIC_DLLAn invalid license DLL is installed.
ihTKSTATUS_NO_VALUENo value has been passed to the function.
ihTKSTATUS_NOT_LICENSEDYour installation of Historian is not licensed.
ihTKSTATUS_CALC_CIRC_REFERENCEReserved.
ihTKSTATUS_DUPLICATE_INTERFACEReserved.
ihTKSTATUS_BACKUP_EXCEEDED_SPACEReserved.
ihTKSTATUS_INVALID_SERVER_VERSIONYou are attempting to use this API on an invalid version of Historian.
ihTKSTATUS_DATA_RETRIEVAL_COUNT_ EXCEEDEDYou tried to request too many samples in one read request.
ihTKSTATUS_INVALID_PARAMETERGeneric failure when an invalid value is passed into the user API.

ihTKMessageTopic

The ihTKMessageTopic structure posts the status messages of Historian.

Definition
typedef enum ihTKMessageTopic { 
ihTKMessageTopicUndefined=0, 
ihTKConnections, 
ihTKConfigurationAudit, 
ihTKGeneral,
ihTKServiceControl, 
ihTKPerformance, 
ihTKSecurity, 
ihTKMessageTopicMax, 
ihTKAllTopics=10000,
ihTKAlertTopics, ihTKMessageTopics,
} ihTKMessageTopic;
Parameters
NameDescription
ihTKConnectionsConnection related messages.
ihTKConfigurationAuditAudit messages.
ihTKGeneralGeneral messages.
ihTKServiceControl Service control messages.
ihTKPerformancePerformance related messages.
ihTKSecuritySecurity related messages.
ihTKMessageTopicMaxMust be the last one after the basic topics and before the combinations.
ihTKAlertTopicsAny alerts.

ihTKCollectorCallbacks

The ihTKCollectorCallbacks structure controls the way the Async tags functions are performed.

Definition
typedef struct ihTKCollectorCallbacks { 
TKCallBackFunctionNoParams *ShutdownFunc; 
TKCallBackFunctionOneParam *LogMsgFunc; 
TKCallBackFunctionOneParam *DataFunc; 
TKCallBackFunctionOneLongParam *AsyncOverrunFunc; 
TKCallBackFunctionOneLongParam *ChangeInterfaceControlFunc; 
TKCallBackFunctionTwoLongParams *ReconnectFunc; 
TKCallBackFunctionMessageAdd *AddMessageCallback;
//CallbackFunctionAlarmNotification *AlarmNotificationFunc; 
TKCallBackFunctionGetTimeOffset *GetTimeOffsetFunc;
} ihTKCollectorCallbacks;
Parameters
NameDescription
*ShutdownFuncWhen the Collector shuts down, this callback will be called from the toolkit.
*LogMsgFuncWhen user wants to log any information, this call back is used.
*DataFuncWhen data needs to be added, this call back is used.
*AsyncOverrunFuncThis callback is called for data overruns.
*ReconnectFuncWhen user needs to reconnect to Historian, this callback is used.
*AddMessageCallbackWhen user wants to add a message to Historian, this callback is used.
*GetTimeOffsetFuncWhen time offsets need to be adjusted, this callback is used.

ihTKTimeStruct

The ihTKTimeStruct structure contains the time value in seconds and Nanoseconds.

Definition
typedef struct ihTKTimeStruct {
uint32_t Seconds;
uint32_t Nanoseconds;
} ihTKTimeStruct
Parameters
NameDescription
SecondsThe time value in seconds.
NanosecondsThe time value in nanoseconds.

ihTKQualityStatus

The ihTKQualityStatus structure defines the quality of the incoming data value that Historian stores.

Definition
typedef enum ihTKQualityStatus {
ihTKOPCBad = 0, 
ihTKOPCUncertain, 
ihTKOPCNA, ihTKOPCGood,
} ihTKQualityStatus;
Parameters
NameDescription
BadThe quality of the associated data value is bad. There is low or no confidence in the associated data value.
UncertainThere is uncertainty about the associated data value.
NAThe associated data value is unused.
GoodThe quality of the associated data value is good.

ihTKQualitySubStatus

The ihTKQualitySubStatus structure indicates the reasons for the quality of associated data value.

Definition
typedef enum ihTKQualitySubStatus { 
ihTKOPCNonspecific = 0, 
ihTKOPCConfigurationError, 
ihTKOPCNotConnected, 
ihTKOPCDeviceFailure, 
ihTKOPCSensorFailure, 
ihTKOPCLastKnownValue, 
ihTKOPCCommFailure, 
ihTKOPCOutOfService, 
ihTKScaledOutOfRange,
ihTKOffLine, ihTKNoValue, 
ihTKCalculationError, 
ihTKConditionCollectionHalted, 
ihTKCalculationTimeout
} ihTKQualitySubStatus;
Parameters
NameDescription
NonspecificThe quality of the data value due to a nonspecific status.
ConfigurationErrorThe quality of the data value due to a configuration error.
NotConnectedThe quality of the data value due to a non-connectivity.
DeviceFailureThe quality of the data value due to device failure.
SensorFailureThe quality of the data value due to sensor failure.
LastKnownValueThe quality of the data value from the last known value.
CommFailureThe quality of the data value due to sensor failure.
OutOfServiceThe quality of the data value due to an out of service status.
ScaledOutOfRangeThe quality of the data value due to the value being out of range.
OffLineThe quality of the data value due to the source being offline.
NoValueThe quality of the data value if the source does not provide a value.
CalculationErrorThe quality of the data value due to a calculation error.
ConditionCollectionHaltedThe quality of the data due to halting the collection.
CalculationTimeoutThe quality of the data value due to calculation time-out

ihTKDataType

The ihTKDataType structure contains the data types supported by Historian.

Definition
typedef enum ihTKDataType { 
ihTKDataTypeUndefined = 0, 
ihTKScaled,
ihTKFloat, 
ihTKDoubleFloat, 
ihTKInteger, 
ihTKDoubleInteger, 
ihTKFixedString, 
ihTKVariableString,
ihTKBlob, 
ihTKTime, 
ihTKInt64, 
ihTKUInt64, 
ihTKUInt32, 
ihTKUInt16, 
ihTKMaxDataType
} ihTKDataType;
Parameters
NameDescription
ihTKDataTypeUndefinedAn Undefined data type.
ihTKScaledA single precision (32-bit) floating-point type.
ihTKFloatA single precision (32-bit) floating-point type.
ihTKDoubleFloatA double precision (64-bit) floating-point type.
ihTKIntegerA short, signed integral type (16-bit).
ihTKDoubleIntegerA long, signed integral type (32-bit).
ihTKFixedStringA fixed-length UNICODE string The length is determined by Tag.FixedStringLengthtag property.
ihTKVariableStringA variable-length UNICODE string.
ihTKBlobAn unstructured, binary data type.
ihTKTimeA date-time type (64-bit), capable of storing one DateTime instance value.
ihTKInt64A __int64-bit quad integer.
ihTKUInt64A __int64-bit unsigned quad integer.
ihTKUInt32A long, unsigned integral type (32-bit).
ihTKUInt16A short, unsigned integral type (16-bit).
ihTKMaxDataTypeA max data type.

ihTKInterfaceType

The ihTKInterface structure contains the different interfaces that can interact with Historian. For example, ihTKCustom is a custom collector type generated by Toolkit.

Definition
typedef enum ihTKInterfaceType { 
ihTKInterfaceUndefined=0, 
ihTKIFix,
ihTKRandom, 
ihTKOPC, 
ihTKFile, 
ihTKIFixLabData, 
ihTKManualEntry, 
ihTKOther, 
ihTKCalcEngine,
ihTKServerToServer, 
ihTKPI,
ihTKOPCAE, 
ihTKCIMPE, 
ihTKPIDistributor, 
ihTKCIMME, 
ihTKPerfTag, 
ihTKCustom
} ihTKInterfaceType;
Parameters
NameDescription
ihTKIFixInterface for iFix_collector.
ihTKRandomInterface for Simulation collector.
ihTKOPCInterface for OPC DA collector.
ihTKFileInterface for File collector.
ihTKIFixLabDataInterface for Deprecated.
ihTKManualEntryInterface for Deprecated.
ihTKOtherInterface for Deprecated.
ihTKCalcEngineInterface for Calculation collector.
ihTKServerToServerInterface for ServerToServer collector.
ihTKPIInterface for OSI PI collector.
ihTKOPCAEInterface for OPC A&E collector.
ihTKCIMPEInterface for Native CIMPLICITY collector.
ihTKPIDistributorInterface for OSI PI distributor.
ihTKCIMMEInterface for Proficy Machine Edition collector.
ihTKCustomInterface for Custom collector.

ihTKCollectionType

The ihTKCollectionType structure indicates the types of data collection methods Historian supports.

Definition
typedef enum ihTKCollectionType {
ihTKUnsolicited=1, ihTKPolled
} ihTKCollectionType;
Parameters
NameDescription
ihTKUnsolicitedAsynchronous data collection based on incoming data value changes.
ihTKPolledPeriodic data collection based on a configured interval.

ihTKTimeStampType

The ihTKTimeStampType structure stores timestamp for data according to source time or the collector time.

Definition
typedef enum ihTKTimeStampType {
ihTKSource = 1, ihTKInterface,
} ihTKTimeStampType;
Parameters
NameDescription
ihTKSourceStores the timestamp from data source.
ihTKInterfaceStores the timestamp from the collector based on the host computer clock.

ihTKTimeResolution

The ihTKTimeResolution structure contains the time resolution that Historian supports.

Definition
typedef enum ihTKTimeResolution {
ihTKSeconds = 0, 
ihTKMilliseconds, 
ihTKMicroseconds, 
ihTKNanoseconds
} ihTKTimeResolution;
Parameters
NameDescription
ihTKSecondsTime up to a resolution of 1 second.
ihTKMillisecondsTime up to a resolution of 1 millisecond (1-thousandth of a second).
ihTKMicrosecondsTime up to a resolution of 1 microsecond (1-millionth of a second).
ihTKNanosecondsTime up to a resolution of 1 nanosecond (1-billionth of a second).

ihTKTagId

The ihTKTagId structure indicates the GUID of a tag.

Definition
typedef struct { uint32_t  
Data1; unsigned short 
Data2; unsigned short 
Data3;
unsigned char Data4[ 8 ];
} ihTKTagId;

ihTKConditionCollectionComparison

The ihTKConditionCollectionComparison structure eliminates storing the values that are not within the defined range.

Definition
typedef enum ihTKConditionCollectionComparison
{
ihTKConditionComparisonUndefined = 0, 
ihTKConditionComparisonEqual, 
ihTKConditionComparisonLessThan, 
ihTKConditionComparisonLessThanEqual, 
ihTKConditionComparisonGreaterThan, 
ihTKConditionComparisonGreaterThanEqual, 
ihTKConditionComparisonNotEqual
}ihTKConditionCollectionComparison;
Parameters
NameDescription
ihTKConditionComparisonEqualEquality comparison operator.
ihTKConditionComparisonLessThanValue less than the comparison operator.
ihTKConditionComparisonLessThanEqualValue less than or equal comparison operator.
ihTKConditionComparisonGreaterThanValue greater than comparison operator.
ihTKConditionComparisonGreaterThanEqualValue greater than or equal comparison operator.
ihTKConditionComparisonNotEqualInequality comparison operator.

ihTKAlarmInterfaceProperties

Definition
typedef struct ihTKAlarmInterfaceProperties { 
ihTKBoolean SupportsEventFiltering; 
ihTKBoolean SupportsCategoryFiltering; 
ihTKBoolean SupportsSourceFiltering; 
ihTKBoolean SupportsAreaFiltering;
ihTKBoolean SupportsSeverityFiltering;
int NumSimpleEvents; 
wchar_t** SimpleEventList; 
int NumTrackingEvents; 
wchar_t** TrackingEventList; 
int NumConditionEvents;
wchar_t** ConditionEventList;
} ihTKAlarmInterfaceProperties;
Parameters
NameDescription
SupportsEventFilteringIndicates if it supports event filtering.
SupportsCategoryFilteringIndicates if it supports category filtering.
SupportsSourceFilteringIndicates if it supports source filtering.
SupportsAreaFilteringIndicates if it supports area filtering.
SupportsSeverityFilteringIndicates if it supports severity filtering.
NumSimpleEventsNumber of simple events.
SimpleEventListSimple events.
NumTrackingEventsNumber of tracking events.
TrackingEventListTracking events.
NumConditionEventsNumber of condition events.
ConditionEventListCondition events.

ihTKHierarchicalBrowseResponse

The ihTKHierarchicalBrowseResponse structure represents the tags in a hierarchical way.

Definition
typedef struct ihTKHierarchicalBrowseResponse {
int NodeCount;
wchar_t**      NodeNames; 
wchar_t**      FullNodeNames; 
int LeafCount;
wchar_t**      LeafNames;
wchar_t**      FullLeafNames;
} ihTKHierarchicalBrowseResponse;
Parameters
NameDescription
NodeCountNumber of elements in the node.
NodeNamesNames of all the node names.
FullNodeNamesComplete node name.
LeafCountNumber of leaf elements.
LeafNamesNames of all the leaf elements.
FullLeafNamesComplete leaf names.