Class RemotePwmOutputDevice
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDevice
-
- com.diozero.internal.provider.remote.devicefactory.RemotePwmOutputDevice
-
- All Implemented Interfaces:
DeviceInterface,GpioDeviceInterface,InternalDeviceInterface,PwmOutputDeviceInterface,AutoCloseable
public class RemotePwmOutputDevice extends AbstractDevice implements PwmOutputDeviceInterface
-
-
Constructor Summary
Constructors Constructor Description RemotePwmOutputDevice(RemoteDeviceFactory deviceFactory, String key, PinInfo pinInfo, int frequency, float initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseDevice()intgetGpio()intgetPwmFrequency()intgetPwmNum()floatgetValue()voidsetPwmFrequency(int frequencyHz)voidsetValue(float value)-
Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isOpen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.diozero.api.DeviceInterface
close
-
Methods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isOpen
-
Methods inherited from interface com.diozero.internal.spi.PwmOutputDeviceInterface
getMode
-
-
-
-
Constructor Detail
-
RemotePwmOutputDevice
public RemotePwmOutputDevice(RemoteDeviceFactory deviceFactory, String key, PinInfo pinInfo, int frequency, float initialValue)
-
-
Method Detail
-
getGpio
public int getGpio()
- Specified by:
getGpioin interfaceGpioDeviceInterface
-
getPwmNum
public int getPwmNum()
- Specified by:
getPwmNumin interfacePwmOutputDeviceInterface
-
getValue
public float getValue() throws RuntimeIOException- Specified by:
getValuein interfacePwmOutputDeviceInterface- Throws:
RuntimeIOException
-
setValue
public void setValue(float value) throws RuntimeIOException- Specified by:
setValuein interfacePwmOutputDeviceInterface- Throws:
RuntimeIOException
-
getPwmFrequency
public int getPwmFrequency()
- Specified by:
getPwmFrequencyin interfacePwmOutputDeviceInterface
-
setPwmFrequency
public void setPwmFrequency(int frequencyHz) throws RuntimeIOException- Specified by:
setPwmFrequencyin interfacePwmOutputDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
protected void closeDevice() throws RuntimeIOException- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-
-