Class GpioPinDigitalOutputSimulator

  • All Implemented Interfaces:
    com.pi4j.io.gpio.GpioPin, com.pi4j.io.gpio.GpioPinDigital, com.pi4j.io.gpio.GpioPinDigitalOutput, com.pi4j.io.gpio.GpioPinOutput

    public class GpioPinDigitalOutputSimulator
    extends java.lang.Object
    implements com.pi4j.io.gpio.GpioPinDigitalOutput
    Simulates GpioPinDigitalOutput.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(com.pi4j.io.gpio.event.GpioPinListener... gls)  
      void addListener​(java.util.List<? extends com.pi4j.io.gpio.event.GpioPinListener> list)  
      java.util.concurrent.Future<?> blink​(long duration)  
      java.util.concurrent.Future<?> blink​(long delay, long duration)  
      java.util.concurrent.Future<?> blink​(long delay, long duration, com.pi4j.io.gpio.PinState pulseState)  
      java.util.concurrent.Future<?> blink​(long delay, long duration, com.pi4j.io.gpio.PinState pulseState, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> blink​(long delay, long duration, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> blink​(long duration, com.pi4j.io.gpio.PinState pulseState)  
      java.util.concurrent.Future<?> blink​(long duration, com.pi4j.io.gpio.PinState pulseState, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> blink​(long duration, java.util.concurrent.TimeUnit unit)  
      void clearProperties()  
      void export​(com.pi4j.io.gpio.PinMode pm)  
      void export​(com.pi4j.io.gpio.PinMode pm, com.pi4j.io.gpio.PinState ps)  
      java.util.Collection<com.pi4j.io.gpio.event.GpioPinListener> getListeners()  
      com.pi4j.io.gpio.PinMode getMode()  
      java.lang.String getName()  
      com.pi4j.io.gpio.Pin getPin()  
      java.util.Map<java.lang.String,​java.lang.String> getProperties()  
      java.lang.String getProperty​(java.lang.String string)  
      java.lang.String getProperty​(java.lang.String string, java.lang.String string1)  
      com.pi4j.io.gpio.GpioProvider getProvider()  
      com.pi4j.io.gpio.PinPullResistance getPullResistance()  
      com.pi4j.io.gpio.GpioPinShutdown getShutdownOptions()  
      com.pi4j.io.gpio.PinState getState()  
      java.lang.Object getTag()  
      boolean hasListener​(com.pi4j.io.gpio.event.GpioPinListener... gls)  
      boolean hasProperty​(java.lang.String string)  
      void high()  
      boolean isExported()  
      boolean isHigh()  
      boolean isLow()  
      boolean isMode​(com.pi4j.io.gpio.PinMode pm)  
      boolean isPullResistance​(com.pi4j.io.gpio.PinPullResistance ppr)  
      boolean isState​(com.pi4j.io.gpio.PinState ps)  
      void low()  
      java.util.concurrent.Future<?> pulse​(long duration)  
      java.util.concurrent.Future<?> pulse​(long duration, boolean blocking)  
      java.util.concurrent.Future<?> pulse​(long duration, boolean blocking, java.util.concurrent.Callable<java.lang.Void> callback)  
      java.util.concurrent.Future<?> pulse​(long duration, boolean blocking, java.util.concurrent.Callable<java.lang.Void> callback, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> pulse​(long duration, boolean blocking, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState, boolean blocking)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState, boolean blocking, java.util.concurrent.Callable<java.lang.Void> callback)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState, boolean blocking, java.util.concurrent.Callable<java.lang.Void> callback, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState, boolean blocking, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState, java.util.concurrent.Callable<java.lang.Void> callback)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState, java.util.concurrent.Callable<java.lang.Void> callback, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> pulse​(long duration, com.pi4j.io.gpio.PinState pulseState, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> pulse​(long duration, java.util.concurrent.Callable<java.lang.Void> callback)  
      java.util.concurrent.Future<?> pulse​(long duration, java.util.concurrent.Callable<java.lang.Void> callback, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.Future<?> pulse​(long duration, java.util.concurrent.TimeUnit unit)  
      void removeAllListeners()  
      void removeListener​(com.pi4j.io.gpio.event.GpioPinListener... gls)  
      void removeListener​(java.util.List<? extends com.pi4j.io.gpio.event.GpioPinListener> list)  
      void removeProperty​(java.lang.String string)  
      void setMode​(com.pi4j.io.gpio.PinMode pm)  
      void setName​(java.lang.String string)  
      void setProperty​(java.lang.String string, java.lang.String string1)  
      void setPullResistance​(com.pi4j.io.gpio.PinPullResistance ppr)  
      void setShutdownOptions​(com.pi4j.io.gpio.GpioPinShutdown gps)  
      void setShutdownOptions​(java.lang.Boolean bln)  
      void setShutdownOptions​(java.lang.Boolean bln, com.pi4j.io.gpio.PinState ps)  
      void setShutdownOptions​(java.lang.Boolean bln, com.pi4j.io.gpio.PinState ps, com.pi4j.io.gpio.PinPullResistance ppr)  
      void setShutdownOptions​(java.lang.Boolean bln, com.pi4j.io.gpio.PinState ps, com.pi4j.io.gpio.PinPullResistance ppr, com.pi4j.io.gpio.PinMode pm)  
      void setState​(boolean state)  
      void setState​(com.pi4j.io.gpio.PinState state)  
      void setTag​(java.lang.Object o)  
      void toggle()  
      void unexport()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isHigh

        public boolean isHigh()
        Specified by:
        isHigh in interface com.pi4j.io.gpio.GpioPinDigital
      • isLow

        public boolean isLow()
        Specified by:
        isLow in interface com.pi4j.io.gpio.GpioPinDigital
      • getState

        public com.pi4j.io.gpio.PinState getState()
        Specified by:
        getState in interface com.pi4j.io.gpio.GpioPinDigital
      • setState

        public void setState​(boolean state)
        Specified by:
        setState in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • high

        public void high()
        Specified by:
        high in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • low

        public void low()
        Specified by:
        low in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • setState

        public void setState​(com.pi4j.io.gpio.PinState state)
        Specified by:
        setState in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • toggle

        public void toggle()
        Specified by:
        toggle in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • isState

        public boolean isState​(com.pi4j.io.gpio.PinState ps)
        Specified by:
        isState in interface com.pi4j.io.gpio.GpioPinDigital
      • blink

        public java.util.concurrent.Future<?> blink​(long delay,
                                                    long duration)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • blink

        public java.util.concurrent.Future<?> blink​(long delay,
                                                    long duration,
                                                    com.pi4j.io.gpio.PinState pulseState)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • blink

        public java.util.concurrent.Future<?> blink​(long delay,
                                                    long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • blink

        public java.util.concurrent.Future<?> blink​(long delay,
                                                    long duration,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • blink

        public java.util.concurrent.Future<?> blink​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • blink

        public java.util.concurrent.Future<?> blink​(long duration)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • blink

        public java.util.concurrent.Future<?> blink​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • blink

        public java.util.concurrent.Future<?> blink​(long duration,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        blink in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    boolean blocking)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    boolean blocking,
                                                    java.util.concurrent.Callable<java.lang.Void> callback)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    java.util.concurrent.Callable<java.lang.Void> callback)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    boolean blocking)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    boolean blocking,
                                                    java.util.concurrent.Callable<java.lang.Void> callback)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    java.util.concurrent.Callable<java.lang.Void> callback)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    boolean blocking,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    java.util.concurrent.Callable<java.lang.Void> callback,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    boolean blocking,
                                                    java.util.concurrent.Callable<java.lang.Void> callback,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    boolean blocking,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    java.util.concurrent.Callable<java.lang.Void> callback,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    com.pi4j.io.gpio.PinState pulseState,
                                                    boolean blocking,
                                                    java.util.concurrent.Callable<java.lang.Void> callback,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • pulse

        public java.util.concurrent.Future<?> pulse​(long duration,
                                                    java.util.concurrent.TimeUnit unit)
        Specified by:
        pulse in interface com.pi4j.io.gpio.GpioPinDigitalOutput
      • getProvider

        public com.pi4j.io.gpio.GpioProvider getProvider()
        Specified by:
        getProvider in interface com.pi4j.io.gpio.GpioPin
      • getPin

        public com.pi4j.io.gpio.Pin getPin()
        Specified by:
        getPin in interface com.pi4j.io.gpio.GpioPin
      • setName

        public void setName​(java.lang.String string)
        Specified by:
        setName in interface com.pi4j.io.gpio.GpioPin
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface com.pi4j.io.gpio.GpioPin
      • setTag

        public void setTag​(java.lang.Object o)
        Specified by:
        setTag in interface com.pi4j.io.gpio.GpioPin
      • getTag

        public java.lang.Object getTag()
        Specified by:
        getTag in interface com.pi4j.io.gpio.GpioPin
      • setProperty

        public void setProperty​(java.lang.String string,
                                java.lang.String string1)
        Specified by:
        setProperty in interface com.pi4j.io.gpio.GpioPin
      • hasProperty

        public boolean hasProperty​(java.lang.String string)
        Specified by:
        hasProperty in interface com.pi4j.io.gpio.GpioPin
      • getProperty

        public java.lang.String getProperty​(java.lang.String string)
        Specified by:
        getProperty in interface com.pi4j.io.gpio.GpioPin
      • getProperty

        public java.lang.String getProperty​(java.lang.String string,
                                            java.lang.String string1)
        Specified by:
        getProperty in interface com.pi4j.io.gpio.GpioPin
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Specified by:
        getProperties in interface com.pi4j.io.gpio.GpioPin
      • removeProperty

        public void removeProperty​(java.lang.String string)
        Specified by:
        removeProperty in interface com.pi4j.io.gpio.GpioPin
      • clearProperties

        public void clearProperties()
        Specified by:
        clearProperties in interface com.pi4j.io.gpio.GpioPin
      • export

        public void export​(com.pi4j.io.gpio.PinMode pm)
        Specified by:
        export in interface com.pi4j.io.gpio.GpioPin
      • export

        public void export​(com.pi4j.io.gpio.PinMode pm,
                           com.pi4j.io.gpio.PinState ps)
        Specified by:
        export in interface com.pi4j.io.gpio.GpioPin
      • unexport

        public void unexport()
        Specified by:
        unexport in interface com.pi4j.io.gpio.GpioPin
      • isExported

        public boolean isExported()
        Specified by:
        isExported in interface com.pi4j.io.gpio.GpioPin
      • setMode

        public void setMode​(com.pi4j.io.gpio.PinMode pm)
        Specified by:
        setMode in interface com.pi4j.io.gpio.GpioPin
      • getMode

        public com.pi4j.io.gpio.PinMode getMode()
        Specified by:
        getMode in interface com.pi4j.io.gpio.GpioPin
      • isMode

        public boolean isMode​(com.pi4j.io.gpio.PinMode pm)
        Specified by:
        isMode in interface com.pi4j.io.gpio.GpioPin
      • setPullResistance

        public void setPullResistance​(com.pi4j.io.gpio.PinPullResistance ppr)
        Specified by:
        setPullResistance in interface com.pi4j.io.gpio.GpioPin
      • getPullResistance

        public com.pi4j.io.gpio.PinPullResistance getPullResistance()
        Specified by:
        getPullResistance in interface com.pi4j.io.gpio.GpioPin
      • isPullResistance

        public boolean isPullResistance​(com.pi4j.io.gpio.PinPullResistance ppr)
        Specified by:
        isPullResistance in interface com.pi4j.io.gpio.GpioPin
      • getListeners

        public java.util.Collection<com.pi4j.io.gpio.event.GpioPinListener> getListeners()
        Specified by:
        getListeners in interface com.pi4j.io.gpio.GpioPin
      • addListener

        public void addListener​(com.pi4j.io.gpio.event.GpioPinListener... gls)
        Specified by:
        addListener in interface com.pi4j.io.gpio.GpioPin
      • addListener

        public void addListener​(java.util.List<? extends com.pi4j.io.gpio.event.GpioPinListener> list)
        Specified by:
        addListener in interface com.pi4j.io.gpio.GpioPin
      • hasListener

        public boolean hasListener​(com.pi4j.io.gpio.event.GpioPinListener... gls)
        Specified by:
        hasListener in interface com.pi4j.io.gpio.GpioPin
      • removeListener

        public void removeListener​(com.pi4j.io.gpio.event.GpioPinListener... gls)
        Specified by:
        removeListener in interface com.pi4j.io.gpio.GpioPin
      • removeListener

        public void removeListener​(java.util.List<? extends com.pi4j.io.gpio.event.GpioPinListener> list)
        Specified by:
        removeListener in interface com.pi4j.io.gpio.GpioPin
      • removeAllListeners

        public void removeAllListeners()
        Specified by:
        removeAllListeners in interface com.pi4j.io.gpio.GpioPin
      • getShutdownOptions

        public com.pi4j.io.gpio.GpioPinShutdown getShutdownOptions()
        Specified by:
        getShutdownOptions in interface com.pi4j.io.gpio.GpioPin
      • setShutdownOptions

        public void setShutdownOptions​(com.pi4j.io.gpio.GpioPinShutdown gps)
        Specified by:
        setShutdownOptions in interface com.pi4j.io.gpio.GpioPin
      • setShutdownOptions

        public void setShutdownOptions​(java.lang.Boolean bln)
        Specified by:
        setShutdownOptions in interface com.pi4j.io.gpio.GpioPin
      • setShutdownOptions

        public void setShutdownOptions​(java.lang.Boolean bln,
                                       com.pi4j.io.gpio.PinState ps)
        Specified by:
        setShutdownOptions in interface com.pi4j.io.gpio.GpioPin
      • setShutdownOptions

        public void setShutdownOptions​(java.lang.Boolean bln,
                                       com.pi4j.io.gpio.PinState ps,
                                       com.pi4j.io.gpio.PinPullResistance ppr)
        Specified by:
        setShutdownOptions in interface com.pi4j.io.gpio.GpioPin
      • setShutdownOptions

        public void setShutdownOptions​(java.lang.Boolean bln,
                                       com.pi4j.io.gpio.PinState ps,
                                       com.pi4j.io.gpio.PinPullResistance ppr,
                                       com.pi4j.io.gpio.PinMode pm)
        Specified by:
        setShutdownOptions in interface com.pi4j.io.gpio.GpioPin