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
-
Name Description InterfaceType
Indicates the collector responsible for collecting data for the tag. MultipleInstancesAllowed
Indicates whether multiple instances are allowed. MinimumInterval
Indicates the minimum interval the collector uses. MaxTagsPerRead
Indicates the maximum tags per read. CanReadASync
Indicates whether Async tags can be read. CanBrowseSource
If True, this column indicates that the collector is capable of browsing its source for tags. CanSourceTimestamp
Indicates whether the data source is capable of providing timestamps along with the data. ForceInputScaling
Forces input scaling to be used. NeedMsgPump
Indicates whether a message pump is required. ForcedScaleHI
Forces to use Hi Scaling. ForcedScaleLO
Forces to use Low scaling. ForceAsyncSource
Forces to use Async source. ForcePolledSource
Forces to use polled source. AsyncAllowAdjustWhenSource
Forces Async to allow adjust when source. PolledAllowAdjustWhenSource
Forces to polled to allow adjust when source. DontWriteASyncOfflineValue
Forces not to write Async offline value. DontWritePolledOfflineValue
Forces not to write polled offline values. DoesReloadMode
Uses the reload mode. DoesLagTimes
Defines the lag times. IsHistoricalCollector
Indicates whether it is a historical collector. CanBrowseHierarchical
Indicates whether a hierarchical browse can be done. ReloadModeName
Reload mode name. CalcLibraryTagCallback
Call back function for calculation tag. CalcLibraryTagCallbackParam
Calculation tag call back parameters CanSendOPCQuality
Indicates 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
-
Name Description CanBrowseSource
If True, this column indicates that the collector is capable of browsing its source for tags. CanSourceTimestamp
Indicates whether the data source is capable of providing timestamps along with the data. ForcePolled
If you set as true then collection type will be forced to be ihPolled
.DoOnFly
Indicates whether to enable or disable on the fly changes. CustomProp1
The general (or spare) configuration fields for the collector. The CollectorGeneral1
column is not user defined; it is different for each collector.CustomProp2
The general (or spare) configuration fields for the collector. The CollectorGeneral2
column is not user defined; it is different for each collector.CustomProp3
The general (or spare) configuration fields for the collector. The CollectorGeneral3
column is not user defined; it is different for each collector.CustomProp4
The general (or spare) configuration fields for the collector. The CollectorGeneral4
column is not user defined; it is different for each collector.CustomProp5
The 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. MinimumDiskFreeBufferSize
The minimum size (in MB) of disk buffer for buffering outgoing data. MaximumMemoryBufferSize
The maximum size of memory buffer (in MB) for buffering outgoing data. ShouldAdjustTime
If the data source supplies the timestamps, the ShouldAdjustTime
value is False. If the collector supplies the timestamps, theShouldAdjustTime
value is True.ShouldQueueWrites
Indicates whether queue writes are allowed or not. SourceTimeInLocalTime
Applicable only for data source timestamps. Indicates whether the timestamps use local time. If SourceTimeInLocalTime
is False, then UTC time is used.CollectionDelay
The 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. DefaultCollectionInterval
The 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.
DefaultCollectorCompression
Indicates whether the default collector compression is enabled for tags added by the collector. DefaultCollectorCompressionDeadband
The default collector compression deadband for tags added by the collector. DefaultCollectorCompressionTimeout
Indicates 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.
DefaultSpikeLogic
Indicates whether the Spike Logic is enabled. DefaultSpikeMultiplier
Indicates the default Spike Logic multiplier. DefaultSpikeInterval
Indicates the default Spike Logic interval. DataRecoveryQueueEnabled
Indicates whether the Recovery queue is enabled. DefaultAbsoluteDeadbanding
Indicates if the absolute deadband is enabled. RedundancyEnabled
Indicates that the collector redundancy is enabled. RedundancyPrincipalCollector[500]
Indicates the principal collector. RedundancyIsActiveCollector
Indicates 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 byihCollectorToolkitGetEnumeratedSets
implementation.ihCollectorToolkitGetEnumeratedSets
is fired every x minutes, where x is the value ofSyncThreadInterval
.
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
-
Name Description InterfaceDefName
The name of the Custom Collector. InterfaceType
ihTKCustom
- specifies the custom collector type.IsSystemInterface
Boolean. If true, specifies whether it is a System collector or a custom collector. Default - false. General1Description
Collector general-1 property description. General2Description
Collector general-2 property description. General3Description
Collector general-3 property description. General4Description
Collector general-4 property description. General5Description
Collector general-5 property description. The parameters
General1Description
,General2Description
toGeneral5Description
, 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
-
Name Description *ArchiveTagName
Tag name of the archive. *Tag
Name of the tag. DataProp
Properties of the data. ErrorStatus
Status of the error. GetDataType
Data type. *ErrorMessage
Error message. CollectionTime
Collection time. *CustomProp1
CustomProp1
property description.*CustomProp2
CustomProp2
property description.*CustomProp3
CustomProp3
property description.*CustomProp4
CustomProp4
property description.*CustomProp5
CustomProp5
property description. - Example
- Populating data for a single tag.
ihInterfaceTKDataInfodata; memset(&data,0, sizeof(ihInterfaceTKDataInfo)); data.Tag= L”computername.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
-
Name Description Tagname
Tagname property of the tag. Description
User description of the tag. EngineeringUnits
Engineering units description of the tag. Comment
User comment associated with the selected tag. DataType
The data type returned in this column is the data type that is defined in Historian Administrator application. FixedStringLength
Zero unless the data type is FixedString
. If the data type isFixedString
, this number represents the maximum length of the string value.InterfaceName
Name of the collector responsible for collecting data for the specified tag. SourceAddress
Address used to identify the tag at the data source. For iFIXsystems
, this isNTF
(Node.Tag.Field
).CollectionType
Types of collection used to acquire data for the tag. CollectionInterval
The time interval, in milliseconds, between readings of data from this tag. CollectionOffset
The time shift from midnight, in milliseconds, for collection of data from this tag. LoadBalancing
Indicates 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. TimeStampType
The 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.
HiEngineeringUnits
The high end of the engineering units range. Used only for scaled data types and input scaled tags. LoEngineeringUnits
The 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.HiScale
The high end value of the input scaling range used for the tag. LoScale
The 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 deadband centered around the last collected value. The collector passes (to the archiver) any new value that falls outside the deadband and then centers the deadband around the new value.
InterfaceDeadbandPercentRange
The current value of the compression deadband. ArchiveCompression
Indicates whether the archive collector compression is enabled for the tag. ArchiveDeadbandPercentRange
The current value of the archive compression deadband. CustomProp1
The general (or spare) configuration fields for the collector. The CustomProp1
column is not user-defined; it is different for each collector.CustomProp2
The general (or spare) configuration fields for the collector. The CustomProp2
column is not user-defined; it is different for each collector.CustomProp3
The general (or spare) configuration fields for the collector. The CustomProp3
column is not user-defined; it is different for each collector.CustomProp4
The general (or spare) configuration fields for the collector. The CustomProp4
column is not user-defined; it is different for each collector.CustomProp5
The general (or spare) configuration fields for the collector. The CustomProp5
column is not user-defined; it is different for each collector.ReadSecurityGroup
The name of the Windows security group controlling the reading of data for the tag. WriteSecurityGroup
The name of the Windows security group controlling the writing of data for the tag. AdministratorSecurityGroup
The name of the Windows security group responsible for controlling configuration changes for the tag. LastModified
The date and time that the tag configuration for this tag was last modified. The time structure includes milliseconds. LastModifiedUser
The user name of the Windows user who last modified this tag's configuration. InterfaceType
The 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 deadband.
The data archiver treats the incoming sample after the timeout occurs as if it exceeded compression. It then stores the pending sample.
InterfaceCompressionTimeout
Indicates the maximum amount of time the collector will wait between sending samples to the archiver. SpikeLogic
Indicates whether the Spike Logic is enabled for the tag. SpikeLogicOverride
Indicates whether the Spike Logic setting for this tag overrides the collector. InterfaceAbsoluteDeadbanding
Indicates if absolute collector deadbanding is enabled for this tag. InterfaceAbsoluteDeadband
Indicates the value for absolute collector deadband. ArchiveAbsoluteDeadbanding
Indicates if absolute archive deadband is enabled for this tag. ArchiveAbsoluteDeadband
Indicates the value for absolute archive deadband. StepValue
Indicates if the StepValue
property is enabled for the tag.TimeResolution
Indicates the timestamp resolution in seconds, milliseconds, or microseconds. ConditionCollectionEnabled
Indicates whether condition-based collection is enabled. ConditionCollectionTriggerTag
Tag condition-based collection trigger tag. ConditionCollectionComparison
Tag condition-based collection comparison operator. ConditionCollectionCompareValue
Tag condition-based collection compare value. ConditionCollectionMarkers
Indicates whether to employ condition-based collection markers. TagId
TagID
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
-
Name Description AllFields
Tag request contains all fields. Tagname
Tag request contains Tagname
.Description
Tag request contains Description
.EngineeringUnits
Tag request contains EngineeringUnits
.Comment
Tag request contains Comment
.DataType
Tag request contains DataType
.FixedStringLength
Tag request contains FixedStringLength
.InterfaceName
Tag request contains InterfaceName
.SourceAddress
Tag request contains SourceAddress
.CollectionType
Tag request contains CollectionType
.CollectionInterval
Tag request contains CollectionInterval
.CollectionOffset
Tag request contains CollectionOffset
.LoadBalancing
Tag request contains LoadBalancing
.TimeStampType
Tag request contains TimeStampType
.HiEngineeringUnits
Tag request contains HiEngineeringUnits
.LoEngineeringUnits
Tag request contains LoEngineeringUnits
.InputScaling
Tag request contains InputScaling
.HiScale
Tag request contains HiScale
.LoScale
Tag request contains LoScale
.InterfaceCompression
Tag request contains InterfaceCompression
.InterfaceDeadbandPercentRange
Tag request contains InterfaceDeadbandPercentRange
.ArchiveCompression
Tag request contains ArchiveCompression
.ArchiveDeadbandPercentRange
Tag request contains ArchiveDeadbandPercentRange
.CustomProp1
Tag request contains CustomProp1
.CustomProp2
Tag request contains CustomProp2
.CustomProp3
Tag request contains CustomProp3
.CustomProp4
Tag request contains CustomProp4
.CustomProp5
Tag request contains CustomProp5
.ReadSecurityGroup
Tag request contains ReadSecurityGroup
.WriteSecurityGroup
Tag request contains WriteSecurityGroup
.AdministratorSecurityGroup
Tag request contains AdministratorSecurityGroup
.ObsoleteField
Tag request contains ObsoleteField
.LastModified
Tag request contains LastModified
.LastModifiedUser
Tag request contains LastModifiedUser
.InterfaceType
Tag request contains InterfaceType
.TimeResolution
Tag request contains TimeResolution
.UTCBias
Tag request contains UTCBias
.AverageCollectionTime
Tag request contains AverageCollectionTime
.CalculationDependencies
Tag request contains CalculationDependencies
.CollectionDisabled
Tag request contains CollectionDisabled
.ArchiveCompressionTimeout
Tag request contains ArchiveCompressionTimeout
.SpikeLogic
Tag request contains SpikeLogic
.SpikeLogicOverride
Tag request contains SpikeLogicOverride
.InterfaceAbsoluteDeadbanding
Tag request contains InterfaceAbsoluteDeadbanding
.InterfaceAbsoluteDeadband
Tag request contains InterfaceAbsoluteDeadband
.ArchiveAbsoluteDeadbanding
Tag request contains ArchiveAbsoluteDeadbanding
.ArchiveAbsoluteDeadband
Tag request contains ArchiveAbsoluteDeadband
.StepValue
Tag request contains StepValue
.MaxTagsToRetrieve
Tag request contains MaxTagsToRetrieve
.ConditionCollectionEnabled
Tag request contains ConditionCollectionEnabled
.ConditionCollectionTriggerTag
Tag request contains ConditionCollectionTriggerTag
.ConditionCollectionComparison
Tag request contains ConditionCollectionComparison
.ConditionCollectionCompareValue
Tag request contains ConditionCollectionCompareValue
.ConditionCollectionMarkers
Tag request contains ConditionCollectionMarkers
.TagId
Tag 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
-
Name Description TagnameMask
Tag name mask criteria. NumberOfTags
Number of tags for a tag. TagnameArray
Tag name array of a tag. DescriptionMask
Tag description mask criteria. EngineeringUnits
Tag engineering units criteria. Comment
Tag comment criteria. DataType
Tag data type criteria. FixedStringLength
Tag fixed string length criteria. InterfaceName
Tag interface name. SourceAddress
Tag source address criteria. CollectionType
Tag collection type criteria. CollectionInterval
Tag collection interval criteria. CollectionOffset
Tag collection offset criteria. LoadBalancing
Tag load balancing enabled criteria. TimeStampType
Tag timestamp type criteria. HiEngineeringUnits
Tag high engineering unit criteria. LoEngineeringUnits
Tag low engineering unit criteria. InputScaling
Tag input scaling enabled criteria. HiScale
Tag high scale value criteria. LoScale
Tag low scale value criteria. InterfaceCompression
Tag interface compression. InterfaceDeadbandPercentRange
Tag interface deadband percentage range. ArchiveCompression
Tag archive compression enabled criteria. CustomProp1
Tag custom property 1. CustomProp2
Tag custom property 2. CustomProp3
Tag custom property 3. CustomProp4
Tag custom property 4. CustomProp5
Tag custom property 5. ReadSecurityGroup
Tag read security group name criteria. WriteSecurityGroup
Tag write security group name criteria. AdministratorSecurityGroup
Tag administrator security group name criteria. LastModified
Tag last modified time criteria. LastModifiedUser
Tag last modified user name criteria. InterfaceType
Tag interface type. ObsoleteField
Tag obsolete field. UTCBias
Tag UTC bias criteria. AverageCollectionTime
Tag average collection time. CollectionDisabled
Tag collection disabled criteria. ArchiveCompressionTimeout
Tag archive-compression time out criteria. InterfaceCompressionTimeout
Tag interface compression time out. SpikeLogic
Tag spike logic enabled criteria. SpikeLogicOverride
Tag spike logic override enabled criteria. InterfaceAbsoluteDeadbanding
Tag interface absolute deadbanding. ArchiveAbsoluteDeadbanding
Tag archive compression absolute deadband criteria. SourceAddressIsMask
Whether to interpret source address criteria as a wildcard expression. StepValue
Tag step value enabled criteria. MaxTagsToRetrieve
Maximum number of tags to retrieve per query. TimeResolution
Tag time resolution criteria. ConditionCollectionEnabled
Tag condition-based collection enabled criteria. ConditionCollectionTriggerTag
Tag condition-based collection trigger tag criteria. ConditionCollectionComparison
Tag condition-based collection comparison operator criteria. ConditionCollectionCompareValue
Tag condition-based collection compare value criteria. ConditionCollectionMarkers
Tag condition-based collection markers enabled criteria. TagId
TagId 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
-
Name Description ihTKDataTypeUndefined
An Undefined data type. ihTKScaled
A single precision (32-bit) floating-point type. ihTKFloat
A single precision (32-bit) floating-point type. ihTKDoubleFloat
A double precision (64-bit) floating-point type. ihTKInteger
A short, signed integral type (16-bit). ihTKDoubleInteger
A long, signed integral type (32-bit). ihTKFixedString
A fixed-length UNICODE string The length is determined by Tag.FixedStringLengthtag property
.ihTKVariableString
A variable-length UNICODE string. ihTKBlob
An unstructured, binary data type. ihTKTime
A date-time type (64-bit), capable of storing one DateTime instance value. ihTKInt64
A __int64-bit quad integer. ihTKUInt64
A __int64-bit unsigned quad integer. ihTKUInt32
A long, unsigned integral type (32-bit). ihTKUInt16
A short, unsigned integral type (16-bit). ihTKMaxDataType
A 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
-
Name Description TagId
TagId of the tag to be stored. *ArchiveTagName
Tag name of the corresponding TagId stored in the archiver. *Tag
Tag name used as primary key. Interval
Collection interval of the tag. DeadbandPct
Deadband percentage used for compression. DataType
Datatype of the tag. UseSourceTimeStamp
Enables you to specify to use source time stamp or collector timestamp. *CustomProp1
The general (or spare) configuration fields for the collector. The CustomProp1 column is not user-defined; it is different for each collector. *CustomProp2
The general (or spare) configuration fields for the collector. The CustomProp2 column is not user-defined; it is different for each collector. *CustomProp3
The general (or spare) configuration fields for the collector. The CustomProp3 column is not user-defined; it is different for each collector. *CustomProp4
The general (or spare) configuration fields for the collector. The CustomProp4 column is not user-defined; it is different for each collector. *CustomProp5
The 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
-
Name Description TagId
TagId of the tag to be stored. *ArchiveTagName
Tag name of the corresponding tagid stored in the archiver. *Tag
Tag name used as primary key. Interval
Collection interval of the tag. Offset
Offset from midnight (in seconds) to force sampling at a specific time of day. DeadbandPercentage
Deadband percentage used for compression. ihTKDataType
DataType
Datatype of the tag. UseSourceTimeStamp
Enables you to specify to use source time stamp or collector timestamp. *CustomProp1
The general (or spare) configuration fields for the collector. The CollectorGeneral1 column is not user-defined; it is different for each collector. *CustomProp2
The general (or spare) configuration fields for the collector. The CollectorGeneral2 column is not user-defined; it is different for each collector. *CustomProp3
The general (or spare) configuration fields for the collector. The CollectorGeneral3 column is not user-defined; it is different for each collector. *CustomProp4
The general (or spare) configuration fields for the collector. The CollectorGeneral4 column is not user-defined; it is different for each collector. *CustomProp5
The 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
-
Name Description RequestedFields
Tag fields structure, which can be used to retrieve the specific fields of tags. Criteria
Criteria structure, which can be used to query the tags based on the fields that are set. CriteriaFields
Tag 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.NumberOfRecords
Number of TagRecords
.TagRecords
Array of TagRecords
. EachTagRecord
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
-
Name Description Blob
Blob data. BlobSize
Blob 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
-
Name Description Integer
Single integer. DoubleInteger
Double integer. Float
Float. DoubleFloat
Double float. Blob
Blob. String
String. Time
Timestamp structure with seconds and nanoseconds. Int64
Quad integer. UInt64
Unsigned quad integer. UInt32
Unsigned double integer. UInt16
Unsigned 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
-
Name Description Deleted
Deleted tag data. Replaced
Replaced tag data. QualityStatus
QualityStatus of the tag data. QualitySubStatus
QualitySubStatus of the tag data. OPCQualityValid
OPCQualityValid. OPCQuality
OPCQuality.
ihTKQuality
The ihTKQuality
structures determines the percentage of good data in the raw quality.
- Definition
-
typedefunion ihTKQuality { ihTKRawQuality RawQuality; float PercentGood; }ihTKQuality;
- Parameters
-
Name Description ihTKRawQuality
RawQuality. ihTKQuality
PercentGood.
ihTKCommentData
The ihTKCommentData
structure maintains the comment about Comment Data in the tag, if any.
- Definition
-
typedefstruct ihTKCommentData { wchar_t*DataTypeHint; ihTKBlobDataCommentData; }ihTKCommentData;
- Parameters
-
Name Description DataTypeHint
Data type. CommentData
Comment 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
-
Name Description StoredOnTimeStamp
Stored time (Set by Archiver). CommentTimeStamp
Timestamp. SuppliedUsername
Supplied username (optionally given in ihCommentAdd
).Username
NT user name of writer. (Set by Archiver). CommentData
Comment 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
-
Name Description TimeStamp
Time stamp of the data. ValueDataType
Data type. Value
Data value. Quality
Quality. NumberOfComments
Number of comments, if any. Comments
Array 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 doesn’t 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
-
Name Description NumValues
Number of data properties. *TagIds
Tag ids. *Values
Array of data properties. *CollectionTimes
Collected 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
-
Name Description ihTKGetDataTimed
Polled data. The collector acquires data from a source on a periodic schedule determined by the collector. ihTKGetDataAsync
Asynchronous data, the collector accepts data from the source whenever the source presents the data. ihTKGetDataDemand
Data 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
-
Name Description ihTKSTATUS_FAILED
Generic failure. ihTKSTATUS_API_TIMEOUT
Server machine name not found, or server found but Archiver service is not running. ihTKSTATUS_NOT_ CONNECTED
Not currently connected to a Historian server. ihTKSTATUS_INTERFACE_ NOT_FOUND
Interface not found. ihTKSTATUS_NOT_SUPPORTED
Reserved. ihTKSTATUS_DUPLICATE_DATA
WriteData was called with error_on_replace = TRUE
and the supplied data would have overwritten the existing data.ihTKSTATUS_NOT_VALID_USER
Server found, but invalid username or password. ihTKSTATUS_ACCESS_DENIED
Access is denied by the Historian server. Check user name/password or security group membership. ihTKSTATUS_WRITE_IN_FUTURE
Write time stamp is too far in the future. ihTKSTATUS_WRITE_ARCH_OFFLINE
There is no Archiver to hold the write time stamp. ihTKSTATUS_ARCH_READONLY
The archive to hold the write time stamp is marked as read-only. ihTKSTATUS_WRITE_OUTSIDE_ACTIVE
The write time stamp is before the active hours (now - "data is read only after") setting. ihTKSTATUS_WRITE_NO_ARCH_AVAILABLE
No archive is available to hold the write time stamp. ihTKSTATUS_INVALID_TAGNAME
Tagname used is not valid. Tagname does not exist in the Historian server. ihTKSTATUS_LIC_TOO_MANY_TAGS
Exceeded tag license count on the server. ihTKSTATUS_LIC_TOO_MANY_USERS
Exceeded user license count on the server. ihTKSTATUS_LIC_INVALID_LIC_DLL
An invalid license DLL is installed. ihTKSTATUS_NO_VALUE
No value has been passed to the function. ihTKSTATUS_NOT_LICENSED
Your installation of Historian is not licensed. ihTKSTATUS_CALC_CIRC_REFERENCE
Reserved. ihTKSTATUS_DUPLICATE_INTERFACE
Reserved. ihTKSTATUS_BACKUP_EXCEEDED_SPACE
Reserved. ihTKSTATUS_INVALID_SERVER_VERSION
You are attempting to use this API on an invalid version of Historian. ihTKSTATUS_DATA_RETRIEVAL_COUNT_ EXCEEDED
You tried to request too many samples in one read request. ihTKSTATUS_INVALID_PARAMETER
Generic 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
-
Name Description ihTKConnections
Connection related messages. ihTKConfigurationAudit
Audit messages. ihTKGeneral
General messages. ihTKServiceControl
Service control messages. ihTKPerformance
Performance related messages. ihTKSecurity
Security related messages. ihTKMessageTopicMax
Must be the last one after the basic topics and before the combinations. ihTKAlertTopics
Any alerts.
ihTKCollectorCallbacks
The ihTKCollectorCallbacks
structure controls the way the Async tag’s 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
-
Name Description *ShutdownFunc
When the Collector shuts down, this callback will be called from the toolkit. *LogMsgFunc
When user wants to log any information, this call back is used. *DataFunc
When data needs to be added, this call back is used. *AsyncOverrunFunc
This callback is called for data overruns. *ReconnectFunc
When user needs to reconnect to Historian, this callback is used. *AddMessageCallback
When user wants to add a message to Historian, this callback is used. *GetTimeOffsetFunc
When 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
-
Name Description Seconds
The time value in seconds. Nanoseconds
The 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
-
Name Description Bad
The quality of the associated data value is bad. There is low or no confidence in the associated data value. Uncertain
There is uncertainty about the associated data value. NA
The associated data value is unused. Good
The 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
-
Name Description Nonspecific
The quality of the data value due to a nonspecific status. ConfigurationError
The quality of the data value due to a configuration error. NotConnected
The quality of the data value due to a non-connectivity. DeviceFailure
The quality of the data value due to device failure. SensorFailure
The quality of the data value due to sensor failure. LastKnownValue
The quality of the data value from the last known value. CommFailure
The quality of the data value due to sensor failure. OutOfService
The quality of the data value due to an out of service status. ScaledOutOfRange
The quality of the data value due to the value being out of range. OffLine
The quality of the data value due to the source being offline. NoValue
The quality of the data value if the source does not provide a value. CalculationError
The quality of the data value due to a calculation error. ConditionCollectionHalted
The quality of the data due to halting the collection. CalculationTimeout
The 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
-
Name Description ihTKDataTypeUndefined
An Undefined data type. ihTKScaled
A single precision (32-bit) floating-point type. ihTKFloat
A single precision (32-bit) floating-point type. ihTKDoubleFloat
A double precision (64-bit) floating-point type. ihTKInteger
A short, signed integral type (16-bit). ihTKDoubleInteger
A long, signed integral type (32-bit). ihTKFixedString
A fixed-length UNICODE string The length is determined by Tag.FixedStringLengthtag
property.ihTKVariableString
A variable-length UNICODE string. ihTKBlob
An unstructured, binary data type. ihTKTime
A date-time type (64-bit), capable of storing one DateTime
instance value.ihTKInt64
A __int64-bit quad integer. ihTKUInt64
A __int64-bit unsigned quad integer. ihTKUInt32
A long, unsigned integral type (32-bit). ihTKUInt16
A short, unsigned integral type (16-bit). ihTKMaxDataType
A 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
-
Name Description ihTKIFix
Interface for iFix_collector. ihTKRandom
Interface for Simulation collector. ihTKOPC
Interface for OPC DA collector. ihTKFile
Interface for File collector. ihTKIFixLabData
Interface for Deprecated. ihTKManualEntry
Interface for Deprecated. ihTKOther
Interface for Deprecated. ihTKCalcEngine
Interface for Calculation collector. ihTKServerToServer
Interface for ServerToServer collector. ihTKPI
Interface for OSI PI collector. ihTKOPCAE
Interface for OPC A&E collector. ihTKCIMPE
Interface for Native CIMPLICITY collector. ihTKPIDistributor
Interface for OSI PI distributor. ihTKCIMME
Interface for Proficy Machine Edition collector. ihTKCustom
Interface 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
-
Name Description ihTKUnsolicited
Asynchronous data collection based on incoming data value changes. ihTKPolled
Periodic 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
-
Name Description ihTKSource
Stores the timestamp from data source. ihTKInterface
Stores 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
-
Name Description ihTKSeconds
Time up to a resolution of 1 second. ihTKMilliseconds
Time up to a resolution of 1 millisecond (1-thousandth of a second). ihTKMicroseconds
Time up to a resolution of 1 microsecond (1-millionth of a second). ihTKNanoseconds
Time 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
-
Name Description ihTKConditionComparisonEqual
Equality comparison operator. ihTKConditionComparisonLessThan
Value less than the comparison operator. ihTKConditionComparisonLessThanEqual
Value less than or equal comparison operator. ihTKConditionComparisonGreaterThan
Value greater than comparison operator. ihTKConditionComparisonGreaterThanEqual
Value greater than or equal comparison operator. ihTKConditionComparisonNotEqual
Inequality 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
-
Name Description SupportsEventFiltering
Indicates if it supports event filtering. SupportsCategoryFiltering
Indicates if it supports category filtering. SupportsSourceFiltering
Indicates if it supports source filtering. SupportsAreaFiltering
Indicates if it supports area filtering. SupportsSeverityFiltering
Indicates if it supports severity filtering. NumSimpleEvents
Number of simple events. SimpleEventList
Simple events. NumTrackingEvents
Number of tracking events. TrackingEventList
Tracking events. NumConditionEvents
Number of condition events. ConditionEventList
Condition 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
-
Name Description NodeCount
Number of elements in the node. NodeNames
Names of all the node names. FullNodeNames
Complete node name. LeafCount
Number of leaf elements. LeafNames
Names of all the leaf elements. FullLeafNames
Complete leaf names.