Class ProlinkNetwork

Hierarchy

  • ProlinkNetwork

Constructors

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 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 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 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 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 remotedb(): null | default
  • Get the 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 state(): NetworkState
  • 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 StatusEmitter service. This service is used to monitor status updates on each CDJ.

    Returns null | StatusEmitter

Methods

  • 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 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 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