pamoja for TypeScript - v0.2.0
    Preparing search index...

    Variable clockConst

    clock: { ClockSync: typeof LorawanClockSync; PORT: number } = ...

    Application layer clock synchronization, TS003-2.0.0, on port 202.

    A device that has no clock of its own still needs the time: a multicast window and a scheduled reboot both depend on it. The device says what time it believes it is, the server answers with the difference, and a four-bit token keeps a late answer from pulling a corrected clock back.

    Type Declaration

    • ReadonlyClockSync: typeof LorawanClockSync

      The clock synchronization package running on a device.

    • ReadonlyPORT: number

      The port this package is spoken on.

    const sync = new clock.ClockSync()
    const request = sync.request(deviceTime, true)
    // ... the server answers on port clock.PORT
    const { correction } = sync.heard(answer)