Package org.deepsymmetry.beatlink
Class DeviceAnnouncement
- java.lang.Object
-
- org.deepsymmetry.beatlink.DeviceAnnouncement
-
public class DeviceAnnouncement extends Object
Represents a device announcement seen on a DJ Link network. A device announcement can be passed toVirtualCdj.getLatestStatusFor(DeviceAnnouncement)
to find the current detailed status for that device, as long as the Virtual CDJ is active.- Author:
- James Elliott
-
-
Constructor Summary
Constructors Constructor Description DeviceAnnouncement(DatagramPacket packet)
Constructor sets all the immutable interpreted fields based on the packet content.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description InetAddress
getAddress()
Get the address on which this device was seen.String
getDeviceName()
Get the name reported by the device.int
getDeviceNumber()
Get the player/device number reported by the device.byte[]
getHardwareAddress()
Get the MAC address reported by the device.String
getName()
Deprecated.usegetDeviceName()
instead for consistency with the device update classesint
getNumber()
Deprecated.usegetDeviceNumber()
instead for consistency with the device update classesbyte[]
getPacketBytes()
Get the raw data bytes of the device announcement packet.long
getTimestamp()
Get the last time the device was heard from.String
toString()
-
-
-
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.usegetDeviceName()
instead for consistency with the device update classesGet the name reported by the device.- Returns:
- the device name
-
getNumber
@Deprecated public int getNumber()
Deprecated.usegetDeviceNumber()
instead for consistency with the device update classesGet 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
-
-