Class GrpcClientServoDevice
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDevice
-
- com.diozero.internal.provider.remote.grpc.GrpcClientServoDevice
-
- All Implemented Interfaces:
DeviceInterface,GpioDeviceInterface,InternalDeviceInterface,InternalServoDeviceInterface,AutoCloseable
public class GrpcClientServoDevice extends AbstractDevice implements InternalServoDeviceInterface
-
-
Constructor Summary
Constructors Constructor Description GrpcClientServoDevice(GrpcClientDeviceFactory deviceFactory, String key, PinInfo pinInfo, int frequency, int minPulseWidthUs, int maxPulseWidthUs, int initialPulseWidthUs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseDevice()intgetGpio()intgetPulseWidthUs()intgetServoFrequency()intgetServoNum()voidsetPulseWidthUs(int pulseWidthUs)voidsetServoFrequency(int frequencyHz)-
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.InternalServoDeviceInterface
getMode
-
-
-
-
Constructor Detail
-
GrpcClientServoDevice
public GrpcClientServoDevice(GrpcClientDeviceFactory deviceFactory, String key, PinInfo pinInfo, int frequency, int minPulseWidthUs, int maxPulseWidthUs, int initialPulseWidthUs)
-
-
Method Detail
-
getGpio
public int getGpio()
- Specified by:
getGpioin interfaceGpioDeviceInterface
-
getServoNum
public int getServoNum()
- Specified by:
getServoNumin interfaceInternalServoDeviceInterface
-
getPulseWidthUs
public int getPulseWidthUs() throws RuntimeIOException- Specified by:
getPulseWidthUsin interfaceInternalServoDeviceInterface- Throws:
RuntimeIOException
-
setPulseWidthUs
public void setPulseWidthUs(int pulseWidthUs) throws RuntimeIOException- Specified by:
setPulseWidthUsin interfaceInternalServoDeviceInterface- Throws:
RuntimeIOException
-
getServoFrequency
public int getServoFrequency()
- Specified by:
getServoFrequencyin interfaceInternalServoDeviceInterface
-
setServoFrequency
public void setServoFrequency(int frequencyHz) throws RuntimeIOException- Specified by:
setServoFrequencyin interfaceInternalServoDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
protected void closeDevice() throws RuntimeIOException- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-
-