Java Code Examples for org.fourthline.cling.model.types.UnsignedIntegerFourBytes#getValue()
The following examples show how to use
org.fourthline.cling.model.types.UnsignedIntegerFourBytes#getValue() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RemoteGENASubscription.java From TVRemoteIME with GNU General Public License v2.0 | 5 votes |
synchronized public void receive(UnsignedIntegerFourBytes sequence, Collection<StateVariableValue> newValues) { if (this.currentSequence != null) { // TODO: Handle rollover to 1! if (this.currentSequence.getValue().equals(this.currentSequence.getBits().getMaxValue()) && sequence.getValue() == 1) { System.err.println("TODO: HANDLE ROLLOVER"); return; } if (this.currentSequence.getValue() >= sequence.getValue()) { return; } int difference; long expectedValue = currentSequence.getValue() + 1; if ((difference = (int) (sequence.getValue() - expectedValue)) != 0) { eventsMissed(difference); } } this.currentSequence = sequence; for (StateVariableValue newValue : newValues) { currentValues.put(newValue.getStateVariable().getName(), newValue); } eventReceived(); }
Example 2
Source File: AVTransportService.java From TVRemoteIME with GNU General Public License v2.0 | 5 votes |
protected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes instanceId, boolean createDefaultTransport) throws AVTransportException { synchronized (stateMachines) { long id = instanceId.getValue(); AVTransportStateMachine stateMachine = stateMachines.get(id); if (stateMachine == null && id == 0 && createDefaultTransport) { log.fine("Creating default transport instance with ID '0'"); stateMachine = createStateMachine(instanceId); stateMachines.put(id, stateMachine); } else if (stateMachine == null) { throw new AVTransportException(AVTransportErrorCode.INVALID_INSTANCE_ID); } log.fine("Found transport control with ID '" + id + "'"); return stateMachine; } }
Example 3
Source File: RemoteGENASubscription.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
synchronized public void receive(UnsignedIntegerFourBytes sequence, Collection<StateVariableValue> newValues) { if (this.currentSequence != null) { // TODO: Handle rollover to 1! if (this.currentSequence.getValue().equals(this.currentSequence.getBits().getMaxValue()) && sequence.getValue() == 1) { System.err.println("TODO: HANDLE ROLLOVER"); return; } if (this.currentSequence.getValue() >= sequence.getValue()) { return; } int difference; long expectedValue = currentSequence.getValue() + 1; if ((difference = (int) (sequence.getValue() - expectedValue)) != 0) { eventsMissed(difference); } } this.currentSequence = sequence; for (StateVariableValue newValue : newValues) { currentValues.put(newValue.getStateVariable().getName(), newValue); } eventReceived(); }
Example 4
Source File: AVTransportService.java From DroidDLNA with GNU General Public License v3.0 | 5 votes |
protected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes instanceId, boolean createDefaultTransport) throws AVTransportException { synchronized (stateMachines) { long id = instanceId.getValue(); AVTransportStateMachine stateMachine = stateMachines.get(id); if (stateMachine == null && id == 0 && createDefaultTransport) { log.fine("Creating default transport instance with ID '0'"); stateMachine = createStateMachine(instanceId); stateMachines.put(id, stateMachine); } else if (stateMachine == null) { throw new AVTransportException(AVTransportErrorCode.INVALID_INSTANCE_ID); } log.fine("Found transport control with ID '" + id + "'"); return stateMachine; } }
Example 5
Source File: Connection.java From TVRemoteIME with GNU General Public License v2.0 | 4 votes |
public StatusInfo(Status status, UnsignedIntegerFourBytes uptime, Error lastError) { this(status, uptime.getValue(), lastError); }
Example 6
Source File: Connection.java From DroidDLNA with GNU General Public License v3.0 | 4 votes |
public StatusInfo(Status status, UnsignedIntegerFourBytes uptime, Error lastError) { this(status, uptime.getValue(), lastError); }