public class DeviceSchedules
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addGlobalScheduleAdvertiseListener(OSCVocabulary.OSCAdvertiseListener listener) |
java.util.List<DeviceSchedulerValue> |
getDeviceSchedulerValues()
Get the list of all scheduled devices we have listed
|
static DeviceSchedules |
getInstance() |
DeviceSchedulerValue |
getLeadingDevice()
Get the device that is listed as the first device in our list
|
boolean |
isLeadDevice()
See if we are the current leading device on synchroniser network
|
int |
numberDevices()
Return the number of devices synchonising on network
|
void |
processCurrentMessage(java.lang.String source,
DeviceSchedulerValue value)
Process reception of a DeviceSchedule message
|
boolean |
processStratumMessage(DeviceStratumMessage message)
Process a stratum message to advise us we should change our stratum
|
boolean |
removeExpiredLead(long expiration_millisecond)
If the Device marked as the lead device has not been heard for a certain time, we will remove it from our list
|
boolean |
sendCurrentTime()
Send the current Scheduler information about this device
|
double |
timeRange()
Return the range of time in milliseconds between the maximum and minimum scheduled times
|
float |
totalDiscardCount()
Get the total discards for all devices
|
public void addGlobalScheduleAdvertiseListener(OSCVocabulary.OSCAdvertiseListener listener)
public boolean isLeadDevice()
public int numberDevices()
public static DeviceSchedules getInstance()
public boolean sendCurrentTime()
public float totalDiscardCount()
public boolean processStratumMessage(DeviceStratumMessage message)
message
- the message containing stratumpublic void processCurrentMessage(java.lang.String source, DeviceSchedulerValue value)
source
- the source device that has sent this messagevalue
- the DeviceSchedulerValue message receivedpublic java.util.List<DeviceSchedulerValue> getDeviceSchedulerValues()
DeviceSchedulerValue
we have storedpublic double timeRange()
public boolean removeExpiredLead(long expiration_millisecond)
expiration_millisecond
- the amount of milliseconds that must expire before we decide to remove itpublic DeviceSchedulerValue getLeadingDevice()