Module diozero.provider.remote
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
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcClientServoDevice(GrpcClientDeviceFactory deviceFactory, String key, PinInfo pinInfo, int frequency, int minPulseWidthUs, int maxPulseWidthUs, int initialPulseWidthUs) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidintgetGpio()intintintvoidsetPulseWidthUs(int pulseWidthUs) voidsetServoFrequency(int frequencyHz) Methods inherited from class com.diozero.internal.spi.AbstractDevice
close, getDeviceFactory, getKey, isChild, isOpen, setChildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.diozero.api.DeviceInterface
closeMethods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isChild, isOpen, setChildMethods inherited from interface com.diozero.internal.spi.InternalServoDeviceInterface
getMode
-
Constructor Details
-
GrpcClientServoDevice
public GrpcClientServoDevice(GrpcClientDeviceFactory deviceFactory, String key, PinInfo pinInfo, int frequency, int minPulseWidthUs, int maxPulseWidthUs, int initialPulseWidthUs)
-
-
Method Details
-
getGpio
public int getGpio()- Specified by:
getGpioin interfaceGpioDeviceInterface
-
getServoNum
public int getServoNum()- Specified by:
getServoNumin interfaceInternalServoDeviceInterface
-
getPulseWidthUs
- Specified by:
getPulseWidthUsin interfaceInternalServoDeviceInterface- Throws:
RuntimeIOException
-
setPulseWidthUs
- Specified by:
setPulseWidthUsin interfaceInternalServoDeviceInterface- Throws:
RuntimeIOException
-
getServoFrequency
public int getServoFrequency()- Specified by:
getServoFrequencyin interfaceInternalServoDeviceInterface
-
setServoFrequency
- Specified by:
setServoFrequencyin interfaceInternalServoDeviceInterface- Throws:
RuntimeIOException
-
closeDevice
- Specified by:
closeDevicein classAbstractDevice- Throws:
RuntimeIOException
-