About Interfaces

A collector is an interface through which data can be sent to the Data Archiver.

The custom collector is a 32 bit windows executable, where you need to implement only the collector specific functionality. The toolkit provides the code that schedules collection, performs compression and buffering, and writes data to the Data Archiver.

The following is a list to provide better understanding.

Interfaces Enabling Basic Functionality

  • ihCollectorToolkitPreInitialize
  • ihCollectorToolkitInitialize
  • ihCollectorToolkitInitializeCompleted
  • ihCollectorToolkitDefinitionInitialize
  • ihCollectorToolkitReset
  • ihCollectorToolkitPropertyUpdate
  • ihCollectorGetTags
  • ihCollectorToolkitShutdown

Interfaces Enabling Advanced Functionality

These interfaces are further categorized as follows.

The following methods are used to perform operations on Polled tags:

  • ihCollectorToolkitPolledInit
  • ihCollectorToolkitPolledInitCompleted
  • ihCollectorToolkitASyncStartReading
  • ihCollectorToolkitASyncAddTag
  • ihCollectorToolkitASyncDeleteTag
  • ihCollectorToolkitASyncReload
  • ihCollectorToolkitDataCallback

The following methods are used to perform operations on Hierarchical and Miscellaneous functions:

  • ihCollectorToolkitGetTagsHierarchical
  • ihCollectorToolkitDestroyGroupData
  • ihCollectorToolkitWriteValue
  • ihCollectorToolkitDebugModeChange
  • ihCollectorToolkitMiscReload
  • ihCollectorToolkitGetData

Collector Development

You can develop a collector that uses polled reads or unsolicited reads or both. Polled reads are grouped within the shell are present to collector specific code a list of tags to be polled. The collector specific code can do whatever grouping is necessary or efficient for that data source. Unsolicited tags are simply passed on by one to the collector specific code at collector start up and on configuration change. It is up to the collector specific code to group tags and report data changes into the collector shell.

You can support tag browse or you can hard code responses to browse requests and require the tags to be created in some other way such as the Microsoft Excel tag import.

Throughout development, consider what information would be useful to see in the collector logs to troubleshoot issues and use the debug mode functionality to control what messages should appear. Your collector specific code will be notified of changes to debug mode in the ihCollectorToolkitDebugModeChange function.

Collection can be paused and resumed without the collector exe being restarted. Pause and resume are relayed to the collector specific code in the ihCollectorToolkitReset function.

Your collector can choose to support a heartbeat, status, and rate functionality via the ihCollectorToolkitWriteValue function. In this case the collector would write into the data source in addition to the reading done during collection. The toolkit will call the write function once per minute and you will need to write to the data source.

Your collector can react to configuration changes sent to collector specific code in the ihCollectorToolkitPropertyUpdate function. These are changes to the collector itself in the General1-5 fields not changes to the tag list

Possibly the most complex design decision is if you should support on-the-fly configuration changes or require collector restart. Adding or removing tags to collection or changing collection intervals for active tags is not always possible for all data sources. Consider this as an advanced feature.