Archiver Functions

Archiver Functions Overview

This group of functions provides a means to read and write a set of archiver properties. A minimum of properties (only those related to reads, writes, and tag browses) are available. See the code comments in the Historian User API header (ihuapi.h) for more details.

Archiver Functions

ihuSetArchiverProperty

Use the ihuSetArchiveProperty function to change the value of specific Historian server options.

Prototype

ihuSetArchiverProperty
(long serverhandle,
MSO Char *ArchiveProperty,
MSO Char *PropertyValue)

The following properties are supported:

Table 1. Archiver Properties
PropertyRead/Write AccessValuesDescription
ARCHIVER_PROP_CREATEOFFLINEARCHIVESRead/Write1, 0When set to 0. (false) writes before the start time of the earliest archive are not enabled. Set to 1 only when you are migrating legacy data, and set the value back to 0 after migration is complete. Leaving this value set to 1 can cause excessive archive creation, especially when data is sent to the archiver out of order.
ARCHIVER_PROP_CONFIGSERIALNUMBERRead-OnlyA large value that changes when the tag configuration changes. Typically used to cache configuration properties such as a set of tags. You can determine when your cache is out of date by comparing your saved serial number with the current serial number.
ARCHIVER_PROP_ACTIVEHOURSRead/Write1-232800 hours (30 years)The number of hours before the present time that the archive data became read-only. When migrating legacy data, you might need to set a large value.
SECURITY_PROP_STRICTCLIENTAUTHENTICATIONRead/Write1. 0Enables or disables strict client authentication. Set to 1 (true) by default for new Historian installations. When set to 1, only version 4.7 or later clients can access the Historian server.
SECURITY_PROP_STRICTCOLLECTORAUTHENTICATIONRead/Write1. 0Enables or disables strict collector authentication. Set to 1 (true) by default for new Historian installations. When set to 1, only version 4.7 or later collectors can access the Historian server.

Returns

The ihuSetArchiverProperty returns the following values:

  • ihuSTATUS_INVALID_PARAMETER
  • ihuSTATUS_OK
  • ihuSTATUS_ACCESS_DENIED
To change this property...You must be a member of this group...
ARCHIVER_PROP_CREATEOFFLINEARCHIVESihArchive Admins or ihSecurity Admins
ARCHIVER_PROP_ACTIVEHOURSihArchive Admins
SECURITY_PROP_STRICTCLIENTAUTHENTICATIONihArchive Admins
SECURITY_PROP_STRICTCOLLECTORAUTHENTICATIONihArchive Admins

ihuGetArchiverProperty

Use the ihuGetArchiverProperty function to read the value of certain archiver properties.

Prototype

ihuGetArchiverProperty {
  in long serverhandle,
  in MSO Char *ArchiveProperty,
  out MSO Char *PropertyValue
};

Remarks

To read properties, you must be a member of the ih Readers security group. There is no need for you to be a member of the ih Security Admins or ih Archive Admins groups, unless you want to change property values.

Returns

  • ihuSTATUS_OK
  • ihuSTATUS_INVALID_PARAMETER
  • ihuSTATUS_ACCESS_DENIED