Class DeviceAnnouncement


  • public class DeviceAnnouncement
    extends Object
    Represents a device announcement seen on a DJ Link network. A device announcement can be passed to VirtualCdj.getLatestStatusFor(DeviceAnnouncement) to find the current detailed status for that device, as long as the Virtual CDJ is active.
    Author:
    James Elliott
    • Constructor Detail

      • DeviceAnnouncement

        public DeviceAnnouncement​(DatagramPacket packet)
        Constructor sets all the immutable interpreted fields based on the packet content.
        Parameters:
        packet - the device announcement packet that was received
    • Method Detail

      • getAddress

        public InetAddress getAddress()
        Get the address on which this device was seen.
        Returns:
        the network address from which the device is communicating
      • getTimestamp

        public long getTimestamp()
        Get the last time the device was heard from.
        Returns:
        the millisecond timestamp at which we last received an announcement from this device
      • getDeviceName

        public String getDeviceName()
        Get the name reported by the device.
        Returns:
        the device name
      • getDeviceNumber

        public int getDeviceNumber()
        Get the player/device number reported by the device.
        Returns:
        the player number found in the device announcement packet
      • getName

        @Deprecated
        public String getName()
        Deprecated.
        use getDeviceName() instead for consistency with the device update classes
        Get the name reported by the device.
        Returns:
        the device name
      • getNumber

        @Deprecated
        public int getNumber()
        Deprecated.
        use getDeviceNumber() instead for consistency with the device update classes
        Get the player/device number reported by the device.
        Returns:
        the player number found in the device announcement packet
      • getHardwareAddress

        public byte[] getHardwareAddress()
        Get the MAC address reported by the device.
        Returns:
        the device's Ethernet address
      • getPacketBytes

        public byte[] getPacketBytes()
        Get the raw data bytes of the device announcement packet.
        Returns:
        the data sent by the device to announce its presence on the network