public PortMapping(int port, String internalClient, Protocol protocol) { this( true, new UnsignedIntegerFourBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), internalClient, protocol, null ); }
public PortMapping(int port, String internalClient, Protocol protocol, String description) { this( true, new UnsignedIntegerFourBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), internalClient, protocol, description ); }
public UnsignedIntegerTwoBytes valueOf(String s) throws InvalidValueException { if (s.equals("")) return null; try { return new UnsignedIntegerTwoBytes(s); } catch (NumberFormatException ex) { throw new InvalidValueException("Can't convert string to number or not in range: " + s, ex); } }
@Override public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerFourBytes instanceId, String channelName) throws RenderingControlException { checkChannel(channelName); int vol = (int) (getInstance(instanceId).getVolume() * 100); log.fine("Getting backend volume: " + vol); return new UnsignedIntegerTwoBytes(vol); }
@Override public PortMapping getPortMapping() { try { PortMapping pm = new PortMapping(); pm.setEnabled(enabledField.isSelected()); pm.setLeaseDurationSeconds(new UnsignedIntegerFourBytes(leaseDurationField.getText())); pm.setRemoteHost(remoteHostField.getText()); pm.setExternalPort(new UnsignedIntegerTwoBytes(externalPortField.getText())); pm.setProtocol((PortMapping.Protocol) protocolField.getSelectedItem()); pm.setInternalClient(internalClientField.getText()); pm.setInternalPort(new UnsignedIntegerTwoBytes(internalPortField.getText())); pm.setDescription(descriptionField.getText()); return pm; } catch (Exception ex) { WANIPConnectionControlPoint.LOGGER.info( "Error in port mapping form data: " + ex ); } return null; }
GetGenericPortMappingCallback(ControlPoint controlPoint, Service service, int index) { super(new ActionInvocation(service.getAction("GetGenericPortMappingEntry")), controlPoint); this.index = index; getActionInvocation().setInput("NewPortMappingIndex", new UnsignedIntegerTwoBytes(index)); }
protected PortMappingEntryGet(Service service, ControlPoint controlPoint, long index) { super(new ActionInvocation(service.getAction("GetGenericPortMappingEntry")), controlPoint); getActionInvocation().setInput("NewPortMappingIndex", new UnsignedIntegerTwoBytes(index)); }
@Override public Map.Entry<String, String>[] getAttributes() { return new Map.Entry[]{ new AbstractMap.SimpleEntry<>( "val", new UnsignedIntegerTwoBytesDatatype().getString( new UnsignedIntegerTwoBytes(getValue().getVolume()) ) ), new AbstractMap.SimpleEntry<>( "channel", getValue().getChannel().name() ) }; }
@Override public Map.Entry<String, String>[] getAttributes() { return new Map.Entry[]{ new AbstractMap.SimpleEntry<>( "val", new UnsignedIntegerTwoBytesDatatype().getString( new UnsignedIntegerTwoBytes(getValue().getVolumeDB()) ) ), new AbstractMap.SimpleEntry<>( "channel", getValue().getChannel().name() ) }; }
public SetVolume(UnsignedIntegerFourBytes instanceId, Service service, long newVolume) { super(new ActionInvocation(service.getAction("SetVolume"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Channel", Channel.Master.toString()); getActionInvocation().setInput("DesiredVolume", new UnsignedIntegerTwoBytes(newVolume)); }
public PortMapping(int port, String internalClient, Protocol protocol) { this( true, new UnsignedIntegerFourBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), internalClient, protocol, null ); }
public PortMapping(int port, String internalClient, Protocol protocol, String description) { this( true, new UnsignedIntegerFourBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), internalClient, protocol, description ); }
public UnsignedIntegerTwoBytes valueOf(String s) throws InvalidValueException { if (s.equals("")) return null; try { return new UnsignedIntegerTwoBytes(s); } catch (NumberFormatException ex) { throw new InvalidValueException("Can't convert string to number or not in range: " + s, ex); } }
@Override public UnsignedIntegerTwoBytes getVolume(UnsignedIntegerFourBytes instanceId, String channelName) throws RenderingControlException { checkChannel(channelName); int vol = (int) (getInstance(instanceId).getVolume() * 100); log.fine("Getting backend volume: " + vol); return new UnsignedIntegerTwoBytes(vol); }
@Override public Map.Entry<String, String>[] getAttributes() { return new Map.Entry[]{ new AbstractMap.SimpleEntry<String, String>( "val", new UnsignedIntegerTwoBytesDatatype().getString( new UnsignedIntegerTwoBytes(getValue().getVolume()) ) ), new AbstractMap.SimpleEntry<String, String>( "channel", getValue().getChannel().name() ) }; }
@Override public Map.Entry<String, String>[] getAttributes() { return new Map.Entry[]{ new AbstractMap.SimpleEntry<String, String>( "val", new UnsignedIntegerTwoBytesDatatype().getString( new UnsignedIntegerTwoBytes(getValue().getVolumeDB()) ) ), new AbstractMap.SimpleEntry<String, String>( "channel", getValue().getChannel().name() ) }; }
public SetVolume(UnsignedIntegerFourBytes instanceId, Service service, long newVolume) { super(new ActionInvocation(service.getAction("SetVolume"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Channel", Channel.Master.toString()); getActionInvocation().setInput("DesiredVolume", new UnsignedIntegerTwoBytes(newVolume)); }
public PortMapping(int port, String internalClient, Protocol protocol) { this( true, new UnsignedIntegerFourBytes(0), null, new UnsignedIntegerTwoBytes(port), new UnsignedIntegerTwoBytes(port), internalClient, protocol, null ); }
public UnsignedIntegerTwoBytes valueOf(String s) throws InvalidValueException { if (s.equals("")) return null; try { return new UnsignedIntegerTwoBytes(s); } catch (NumberFormatException ex) { throw new InvalidValueException("Can't convert string to number or not in range: " + s, ex); } }
public SetVolume(UnsignedIntegerFourBytes instanceId, Service service, long newVolume) { super(new ActionInvocation(service.getAction("SetVolume"))); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("Channel", Channel.Master.toString()); getActionInvocation().setInput("DesiredVolume", new UnsignedIntegerTwoBytes(newVolume)); }