@hg8496/gridvis-client
Version:
A library to access all GridVis data
40 lines (39 loc) • 1.27 kB
TypeScript
/** Types an event can have. */
export declare enum EventTypes {
/** Voltage has been above limit. */
VoltageOver = 0,
/** Voltage has been below limit. */
VoltageUnder = 1,
/** Voltage has been near zero. */
VoltageOutage = 2,
/** Voltage has changed unreasonable fast. Aka rapid voltage change */
VoltageFastChange = 3,
/** Current was over specified limit. */
CurrentOver = 4,
/** Device lost it's supply power. */
PowerFailure = 5,
/** Device supply power returned. */
PowerRecovery = 6
}
declare type EventTypeStrings = keyof typeof EventTypes;
/** Definition of an event.
*/
export interface IEvent {
/** Start time of event in nano seconds in UTC */
startTime: number;
/** End time of event in nano seconds in UTC */
endTime: number;
/** Type of the recorded event. */
eventType: EventTypeStrings;
/** Name of the input of the event. */
input: string;
/** The limit that was configured as the event hit the limit. */
limit?: number;
/** Minimum value that occurred during the event. */
min?: number;
/** Avg value that occurred during the event. */
avg?: number;
/** Maximum value that occurred during the event. */
max?: number;
}
export {};