Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LoggingBase
    • POD1M

Index

Constructors

constructor

Properties

adapter

adapter: IOTileAdapter

device

device: IOTileDevice

Methods

Protected buildLogMessage

  • buildLogMessage(msg: string, extraArgs?: __type | any[]): MessageType
  • Parameters

    • msg: string
    • Optional extraArgs: __type | any[]

    Returns MessageType

downloadData

  • Download all trip data from a POD-1M.

    This method will download waveforms, trip details and environmental data from a POD-1M. If the method returns then all trip information was downloaded successfully. Any error downloading data from the device will cause an exception to be thrown indicating what went wrong.

    The download process proceeds as follows:

    1. Sort and then receive up to 100 waveforms from the device. If we are given a highestReceivedWaveform ID, then all waveforms older than this will be dropped. On newer device firmware, the dropping will happen inside the device itself. On older device firmware (Pre POD-1Mv2), we will drop the waveforms after receiving them.
    2. Check if any of the waveforms need their UTC timestamps fixed up
    3. If UTC fixup is needed, roll back the environmental streamer to the beginning to make sure that the device sends us all potential waveform timestamp markers to allow us to assign utc timestamps.
    4. Download environmental, system and trip data from the device.
    5. If UTC fixup is needed, assign utc timestamps to all waveforms stamped in uptime.
    6. Create IOTileEvent objects for each waveform
    7. Return the list of received reports and the IOTileEvent objects which are guaranteed to have their timestamps in UTC.

    Since many of these steps are fast, not all of them are included in the progress bar. This routine will call ProgressNotifier.startOne()/finishOne() a total of 6 times so that is the amount of space in the progress bar that should be allocated for this routine.

    If this routine is called with the possibility of a sub-progress bar, then it will show progress separately for each report received and for all waveforms as a single progress bar.

    Parameters

    • progress: ProgressNotifier

      A progress notifier that can be used to update a ProgressModal as we go.

    • Optional highestReceivedWaveform: undefined | number

    Returns Promise<[SignedListReport[], IOTileEvent[]]>

downloadReports

getAccelerometerStatus

  • getAccelerometerStatus(): Promise<object>

Private getCompressedWaveforms

  • getCompressedWaveforms(notifier: ProgressNotifier, skipID?: undefined | number): Promise<RawWaveformInfo>
  • Download the top 100 waveforms from the POD-1M device.

    This routine will consume 3 progress steps.

    Parameters

    • notifier: ProgressNotifier
    • Optional skipID: undefined | number

    Returns Promise<RawWaveformInfo>

getShockInfo

  • getShockInfo(shock: number): Promise<ShockInfo>

Protected logDebug

  • logDebug(msg: string, extraArgs?: __type | any[]): void
  • Parameters

    • msg: string
    • Optional extraArgs: __type | any[]

    Returns void

Protected logError

  • logError(msg: string, extraArgs?: __type | any[]): void
  • Parameters

    • msg: string
    • Optional extraArgs: __type | any[]

    Returns void

Protected logException

  • logException(msg: string, error: ErrorType, extraArgs?: undefined | __type): void
  • Parameters

    • msg: string
    • error: ErrorType
    • Optional extraArgs: undefined | __type

    Returns void

Protected logInfo

  • logInfo(msg: string, extraArgs?: __type | any[]): void
  • Parameters

    • msg: string
    • Optional extraArgs: __type | any[]

    Returns void

Protected logTrace

  • logTrace(msg: string, extraArgs?: __type | any[]): void
  • Parameters

    • msg: string
    • Optional extraArgs: __type | any[]

    Returns void

Protected logWarning

  • logWarning(msg: string, extraArgs?: __type | any[]): void
  • Parameters

    • msg: string
    • Optional extraArgs: __type | any[]

    Returns void

Protected setLogLevel

  • setLogLevel(level: LogLevel, applyChildren?: undefined | true | false): void
  • description

    WARNING: This will override the entire category configuration, not just the LogLevel. DO NOT use in production.

    todo

    Keep current config settings and only update LogLevel. It is not apparent how to do this and may require a PR for https://github.com/mreuvers/typescript-logging

    Parameters

    • level: LogLevel
    • Optional applyChildren: undefined | true | false

      default: fase. If set to true then the level will be set for all child categories.

    Returns void

Private sortReadings

  • sortReadings(skipID?: undefined | number): Promise<number>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc