import { EventEmitter } from "node:events"; import type { Logger } from "homebridge"; import type { NetworkDeviceConfig } from "./config"; export default class Pinger extends EventEmitter { private log; private timer; private history; config: NetworkDeviceConfig; constructor(upstreamLog: Logger, config: NetworkDeviceConfig); /** Returns whether or not the target is considered alive. */ executePingCommand(): Promise; /** Ping once. Returns whether or not the target is considered alive. */ ping(): Promise; /** * Poll the state of the target once. * @param immediate Whether or not to return the current state. Uses a buffer otherwise. */ pollState(immediate?: boolean): Promise; /** Start polling the target's state. */ start(): Promise; /** Stop polling the target's state. */ stop(): void; }