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 Modifier and Type Method Description InetAddressgetAddress()Get the address on which this device was seen.byte[]getHardwareAddress()Get the MAC address reported by the device.StringgetName()Get the name reported by the device.intgetNumber()Get the player/device number reported by the device.byte[]getPacketBytes()Get the raw data bytes of the device announcement packet.longgetTimestamp()Get the last time the device was heard from.StringtoString()
-
-
-
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
-
getName
public String getName()
Get the name reported by the device.- Returns:
- the device name
-
getNumber
public int getNumber()
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
-
-