The first record in the control file is a header record that contains the following six integer fields:
An “update in progress” flag
A byte offset in the file of the information being updated
A unique session ID to be assigned by Historical Server to the next recording session
A copy of the unique session ID for use in file corruption detection and recovery
The session ID of the session whose control information was most recently written to the control file
The number of session entries in the control file that are no longer valid because one or more data files or error message files they refer to were deleted
Following this header record are a number of records of different types that describe all of the recording sessions, past and present, known to Historical Server. These records appear in hierarchical sequential order in the control file, where the hierarchy of record types in top-down order is:
Session control
View control
Data item control
Alarm control and filter control
For example, a session that consisted of two views, each with two data items that had one alarm and one filter apiece, would be represented by the following hierarchy of control records, stored in the following order:
session 1
view 1
data item 1
alarm 1
filter 1
data item 2
alarm 2
filter 2
view 2
data item 3
alarm 3
filter 3
data item 4
alarm 4
filter 4
The contents of the various control record types are described in the next sections.