import * as VScript from "vscript";
import * as _PTP from "./PTP";
import * as _Primitives from "./Primitives";
export declare const lift: {
    readonly AnalogReference: (kwl: string | null, socket: VScript.VSocket) => AnalogReference | null;
    readonly Source: (kwl: string | null, socket: VScript.VSocket) => Source | null;
    readonly SourceCharacteristics: (x: any | null, _: VScript.VSocket) => SourceCharacteristics | null;
    readonly TimestampedTimecode: (x: any | null, _: VScript.VSocket) => TimestampedTimecode | null;
    readonly TimestampedDrift: (x: any | null, _: VScript.VSocket) => TimestampedDrift | null;
    readonly Drift: (x: any | null, _: VScript.VSocket) => Drift | null;
    readonly TimestampedOffset: (x: any | null, _: VScript.VSocket) => TimestampedOffset | null;
    readonly Offset: (x: any | null, _: VScript.VSocket) => Offset | null;
};
export declare const lower: {
    readonly AnalogReference: (ref: AnalogReference | null) => string | null;
    readonly Source: (ref: Source | null) => string | null;
    readonly SourceCharacteristics: (x: SourceCharacteristics | null) => (number | "Error" | "Warning" | "PTP" | "FreeRunningCounter" | "Shift" | "GrainAccurateTime" | "AbsoluteTime" | "g23_98" | "g24" | "g25" | "g29_97" | "g30" | "g50" | "g59_94" | "g60" | "gRTP_48k" | "gRTP_90k" | "gRTP_27M")[] | null;
    readonly TimestampedTimecode: (x: TimestampedTimecode | null) => any[] | null;
    readonly TimestampedDrift: (x: TimestampedDrift | null) => number[] | null;
    readonly Drift: (x: Drift | null) => number[] | null;
    readonly TimestampedOffset: (x: TimestampedOffset | null) => number[] | null;
    readonly Offset: (x: Offset | null) => number[] | null;
};
export declare type ReferenceFrame = "PTP" | "FreeRunningCounter";
export declare type OffsetType = "Shift" | "GrainAccurateTime" | "AbsoluteTime";
/**
  * `UTC` (Universal Time, Coordinated) is the standard for wall clock time.
  It is the standard that all timezones are based on. UTC has leap seconds to
  account for differences in the Earth's rotational speed. *When in doubt,
  always use `UTC`*
  
  * `TAI` (International Atomic Time) is the time standard used by PTP. It is
  a linear time standard that does not have leap seconds. TAI is currently
  ahead of UTC by 37 seconds.
*/
export declare type Standard = "TAI" | "UTC";
export declare type GrainRate = "g23_98" | "g24" | "g25" | "g29_97" | "g30" | "g50" | "g59_94" | "g60" | "gRTP_48k" | "gRTP_90k" | "gRTP_27M";
export declare type MediaClockFrequency = "mcf_48k" | "mcf_90k" | "mcf_27M";
export declare type TimecodeType = "LTC" | "VTC1" | "VTC2";
export interface Offset {
    value: number;
    error: number;
}
export interface TimestampedOffset {
    /**
      PTP-relative time offset of <Source> as defined by the machine's internal
      PTP clock (not necessarily in sync with the PTP master you may have in
      mind)
    */
    value: number;
    error: number;
    fc: number;
    /**
      specifies the micro epoch with respect to which the offset has been
      determined
    */
    micro_epoch_index: number;
}
export interface Drift {
    value: number;
    error: number;
}
export interface TimestampedDrift {
    /**
      speed of <Source> measured relative to `drift_reference_frame`. E.g., if
      value = 5*1e-6, <Source> runs faster than `drift_reference_frame` by
      5ppm.
    */
    value: number;
    error: number;
    fc: number;
    /**
      specifies the micro epoch with respect to which the drift has been
      determined
    */
    micro_epoch_index: number;
}
export interface TimestampedTimecode {
    ltc: any;
    vtc1: any;
    vtc2: any;
    fc: number;
    micro_epoch_index: number;
}
export interface SourceCharacteristics {
    offset_type: OffsetType;
    grain_rate: GrainRate;
    drift_reference: ReferenceFrame;
    remoteness: number;
    cycle_detector: _Primitives.AlertLevel;
}
export declare class Source {
    readonly raw: VScript.Subtree;
    constructor(raw: VScript.Subtree);
    get brief(): VScript.rKeyword<string, string, Source>;
    get characteristics(): VScript.rKeyword<any, SourceCharacteristics | null, this>;
    get drift(): VScript.rKeyword<any, TimestampedDrift | null, this>;
    get offset(): VScript.rKeyword<any, TimestampedOffset | null, this>;
    get time_code(): VScript.rKeyword<any, TimestampedTimecode | null, this>;
    get ptp_traits(): VScript.rKeyword<string | null, _PTP.Traits | null, Source>;
}
export declare class SourceAsTableRow extends Source {
    readonly enclosing_table: VScript.StronglyTypedTable<Source>;
    readonly index: number;
    constructor(raw_row: VScript.TableRow, enclosing_table: VScript.StronglyTypedTable<Source>);
}
/**
  TODO: use this in IOModule (requires AnalogRefTracker/GrainTracker cleanup)
*/
export declare class AnalogReference {
    readonly raw: VScript.Subtree;
    constructor(raw: VScript.Subtree);
    get output(): Source;
    get ptp_traits(): _PTP.Traits;
}
export declare const Enums: {
    readonly TimecodeType: TimecodeType[];
    readonly MediaClockFrequency: MediaClockFrequency[];
    readonly GrainRate: GrainRate[];
    readonly Standard: Standard[];
    readonly OffsetType: OffsetType[];
    readonly ReferenceFrame: ReferenceFrame[];
};
