Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ProlinkNetwork

Hierarchy

  • ProlinkNetwork

Index

Constructors

  • internal

    Parameters

    • __namedParameters: ConstructOpts

    Returns ProlinkNetwork

Properties

#announceSocket: Socket
#beatSocket: Socket
#config: null | NetworkConfig
#connection: null | ConnectionService
#deviceManager: DeviceManager
#mixstatus: null | MixstatusProcessor
#state: NetworkState = NetworkState.Online
#statusEmitter: StatusEmitter
#statusSocket: Socket

Accessors

  • get control(): null | default
  • Get the @{link Control} service. This service can be used to control the Playstate of CDJs on the network.

    Returns null | default

  • get db(): null | Database
  • Get the @{link Database} service. This service is used to retrieve metadata and listings from devices on the network, automatically choosing the best strategy to access the data.

    Returns null | Database

  • get deviceManager(): DeviceManager
  • Get the @{link DeviceManager} service. This service is used to monitor and react to devices connecting and disconnecting from the prolink network.

    Returns DeviceManager

  • get isConfigured(): boolean
  • Check if the network has been configured. You cannot connect to the network until it has been configured.

    Returns boolean

  • get localdb(): null | LocalDatabase
  • Get the @{link LocalDatabase} service. This service is used to query and sync metadata that is downloaded directly from the rekordbox database present on media connected to the CDJs.

    Returns null | LocalDatabase

  • Get (and initalize) the @{link MixstatusProcessor} service. This service can be used to monitor the 'status' of devices on the network as a whole.

    Returns null | MixstatusProcessor

  • get remotedb(): null | default
  • Get the @{link RemoteDatabase} service. This service is used to query metadata directly from the database service running on Rekordbox and the CDJs themselves.

    NOTE: To use this service to access the CDJ remote database service, the Virtual CDJ must report itself as an ID between 1 and 6. This means there cannot be four physical CDJs on the network to access any CDJs remote database.

    Returns null | default

  • Get the current NetworkState of the network.

    When the network is Online you may use the deviceManager to list and react to devices on the nettwork

    Once the network is Connected you may use the statusEmitter to listen for player status events, query the media databases of devices using the db service (or specifically query the localdb or remotedb).

    Returns NetworkState

  • get statusEmitter(): null | StatusEmitter
  • Get the @{link StatusEmitter} service. This service is used to monitor status updates on each CDJ.

    Returns null | StatusEmitter

Methods

  • autoconfigFromPeers(): Promise<void>
  • Wait for another device to show up on the network to determine which network interface to listen on.

    Defaults the Virtual CDJ ID to 5.

    Returns Promise<void>

  • Configure / reconfigure the network with an explicit configuration.

    You may need to disconnect and re-connect the network after making a networking configuration change.

    Parameters

    Returns void

  • connect(): void
  • Connect to the network.

    The network must first have been configured (either with autoconfigFromPeers or manual configuration). This will then initialize all the network services.

    Returns void

  • disconnect(): Promise<[unknown, unknown, unknown]>
  • Disconnect from the network

    Returns Promise<[unknown, unknown, unknown]>

  • Typescript discriminate helper. Refines the type of the network to one that reflects the connected status. Useful to avoid having to gaurd the service getters from nulls.

    Returns this is ConnectedProlinkNetwork

Generated using TypeDoc