Class GrpcClientPwmOutputDevice
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDevice
-
- com.diozero.internal.provider.remote.grpc.GrpcClientPwmOutputDevice
-
- All Implemented Interfaces:
DeviceInterface,GpioDeviceInterface,InternalDeviceInterface,InternalPwmOutputDeviceInterface,AutoCloseable
public class GrpcClientPwmOutputDevice extends AbstractDevice implements InternalPwmOutputDeviceInterface
-
-
Constructor Summary
Constructors Constructor Description GrpcClientPwmOutputDevice(GrpcClientDeviceFactory 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, isChild, isOpen, setChild
-
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, isChild, isOpen, setChild
-
Methods inherited from interface com.diozero.internal.spi.InternalPwmOutputDeviceInterface
getMode
-
-
-
-
Constructor Detail
-
GrpcClientPwmOutputDevice
public GrpcClientPwmOutputDevice(GrpcClientDeviceFactory 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 interfaceInternalPwmOutputDeviceInterface
-
getValue
public float getValue() throws RuntimeIOException- Specified by:
getValuein interfaceInternalPwmOutputDeviceInterface- Throws:
RuntimeIOException
-
setValue
public void setValue(float value) throws RuntimeIOException- Specified by:
setValuein interfaceInternalPwmOutputDeviceInterface- Throws:
RuntimeIOException
-
getPwmFrequency
public int getPwmFrequency()
- Specified by:
getPwmFrequencyin interfaceInternalPwmOutputDeviceInterface
-
setPwmFrequency
public void setPwmFrequency(int frequencyHz) throws RuntimeIOException- Specified by:
setPwmFrequencyin interfaceInternalPwmOutputDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
protected void closeDevice() throws RuntimeIOException- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-
-