Class SourceService

Service for getting information about Sources and Signals

Hierarchy

  • SourceService

Constructors

  • Parameters

    • eventTarget: EventTarget

    Returns SourceService

Properties

eventTarget: any

Methods

  • Returns the generated script code for getting the value of a given signal

    Deprecated

    use getGetSignalScript instead

    Parameters

    • sourceID: string

      The ID of the source containing the signal to get

    • signalID: string

      The ID of the signal to get

    Returns Promise<string>

  • Returns the generated script code for setting the signal to the given value

    Deprecated

    use getSetSignalScript instead

    Parameters

    • sourceID: string

      The ID of the source containing the signal to set

    • signalID: string

      The ID of the signal to set

    • value: SignalValue

      The value to set the signal to - for digital values use 0 or 1, for registers use only integers, for analog values use any float

    Returns Promise<string>

  • Returns an object literal containing a mapping of SignalIDs -> AnalogDomains

    Deprecated

    should be handled by the individual contribution

    Parameters

    • sourceID: string

      The ID of the Source for which to get Domain data

    Returns Promise<{
        [signalID: string]: SignalAnalogDomainValueEnum;
    }>

  • Returns the generated script code for getting the value of a given signal

    Parameters

    • sourceGroupID: string

      The Source group, containing the source to provide events for

    • sourceID: string

      The ID of the source containing the signal to get

    • signalID: string

      The ID of the signal to get

    Returns Promise<string>

  • Returns the generated script code for setting the signal to the given value

    Parameters

    • sourceGroupID: string

      The Source group, containing the source and signal to provide script for

    • sourceID: string

      The ID of the source containing the signal to set

    • signalID: string

      The ID of the signal to set

    • value: SignalValue

      The value to set the signal to - for digital values use 0 or 1, for registers use only integers, for analog values use any float

    Returns Promise<string>

  • Returns an object literal containing a mapping of SignalIDs -> Labels

    Deprecated

    Source contributions will be responsible for providing labels for signals directly

    Parameters

    • sourceID: string

      The ID of the Source for which to get the Label mappings

    Returns Promise<{
        [signalId: string]: string;
    }>

  • Returns an object literal containing a mapping of SignalIDs -> Presets

    Deprecated

    Source contributions will be responsible for handling presets themselves

    Parameters

    • sourceID: string

      The ID of the Source for which to get the Preset mappings

    Returns Promise<SourcePresets>

  • Returns an Observable providing Signal events

    Deprecated

    use getSourceUpdates instead

    Parameters

    • sourceID: string

      The Source containing the Signals to provide events for

    • Optional filter: Partial<Pick<Signal, "direction" | "valueType">>

      SignalFilter used to filter only events for Signals which match the filter

    Returns Observable<SignalEvent>

  • Returns the list of Signals in a Source

    Deprecated

    use getSourceSignals instead

    Parameters

    • sourceID: string

      The Source to list Signals for

    • Optional filter: Partial<Pick<Signal, "direction" | "valueType">>

      SignalFilter used to filter only Signals which match the filter

    Returns Promise<Signal[]>

  • Returns the list of Signals in a Source

    Parameters

    • sourceGroupID: string

      The Source group, containing the source to provide signals for

    • sourceID: string

      The Source to list Signals for

    • Optional filter: Partial<Pick<Signal, "direction" | "valueType">>

      SignalFilter used to filter only Signals which match the filter

    Returns Promise<Signal[]>

  • Returns an Observable providing Signal events

    Parameters

    • sourceGroupID: string

      The Source group, containing the source to provide events for

    • sourceID: string

      The Source containing the Signals to provide events for

    • Optional filter: Partial<Pick<Signal, "direction" | "valueType">>

      SignalFilter used to filter only events for Signals which match the filter

    Returns Observable<SignalEvent>

  • Returns the ID's of Sources that are available to the application

    Parameters

    • Optional filter: Partial<Pick<Signal, "direction" | "valueType">>

      SignalFilter used to filter only Sources which contain Signals matching the filter

    Returns Promise<string[]>

  • Sets a value on a signal

    Deprecated

    use setSourceSignalValue instead

    Parameters

    • sourceID: string

      The ID of the Source, containing the Signal to set

    • signalID: string

      The ID of the Signal to set

    • value: SignalBooleanValue | SignalFloatValue

      The value to set

    Returns Promise<void>

  • Sets a value on a signal

    Parameters

    • sourceGroupID: string

      The Source group, containing the source to provide events for

    • sourceID: string

      The ID of the Source, containing the Signal to set

    • signalID: string

      The ID of the Signal to set

    • value: SignalBooleanValue | SignalFloatValue

      The value to set

    Returns Promise<void>

Generated using TypeDoc