Legacy Compatibility Tools
The utilities library includes some tools for handling legacy HOPS3 files/formats.
MHO_LegacyRootCodeGenerator
Class |
|
Category |
Legacy Compatibility |
Template Parameters |
None |
Configuration Parameters |
None |
Primary Functionality |
Generates 6-character timestamp-based root codes |
Key Features |
HOPS3-compatible root code generation
Time-based sequential code assignment
Collision avoidance for sub-delta-T intervals (batch processing)
Batch code generation for experiments
|
The MHO_LegacyRootCodeGenerator class generates 6-character timestamp-based root codes compatible with legacy HOPS3 file naming conventions.
MHO_StationCodeMap
Class |
|
Category |
Legacy Compatibility |
Template Parameters |
None |
Configuration Parameters |
Optional legacy code usage |
Primary Functionality |
Maps between 1-character and 2-character station codes |
Key Features |
File-based station code initialization
Legacy DiFX2Mark4 code compatibility
Automatic code assignment for new stations
Bidirectional code mapping
|
The MHO_StationCodeMap class handles mapping between 1-character and 2-character station representations with support for legacy code assignments.
MHO_StationIdentity and MHO_StationIdentifier
Class Family |
|
Category |
Legacy Compatibility |
Template Parameters |
None |
Configuration Parameters |
None |
Primary Functionality |
Associates 1-char, 2-char, and 8-char station identifiers |
Key Features |
Stores and compares station name/code/mk4id triples (MHO_StationIdentity)
Singleton registry mapping identifiers to station names (MHO_StationIdentifier)
Can be built directly from VEX site data (site_ID/mk4_site_ID/site_name)
|
The MHO_StationIdentity class stores and compares the 1-character, 2-character, and 8-character identifiers (station code, mk4 ID, and station name) for a single station, and can be constructed directly from a VEX site block. The MHO_StationIdentifier class is a singleton registry that maps these identifiers to station names. This is a newer mechanism than MHO_StationCodeMap and is not a drop-in replacement for it; both classes are currently used in the codebase (e.g. in the DiFX interface and fringe-fitting libraries).
legacy_hops_date
Class |
|
Category |
Legacy Compatibility |
Template Parameters |
None |
Configuration Parameters |
None |
Primary Functionality |
Legacy HOPS3 date structure compatibility |
Key Features |
Compatible with legacy HOPS3 date struct
Prevents namespace collisions with modern date library
Maintains original field layout; the second field is widened from float to double
|
The legacy_hops_date struct provides compatibility with the legacy HOPS3 date struct. Note that the second field is widened from float (the original HOPS3 type) to double, which may introduce a loss of precision when converting to/from the actual legacy struct.