Class GpioPinDigitalInputSimulator

  • All Implemented Interfaces:
    com.pi4j.io.gpio.GpioPin, com.pi4j.io.gpio.GpioPinDigital, com.pi4j.io.gpio.GpioPinDigitalInput, com.pi4j.io.gpio.GpioPinInput

    public class GpioPinDigitalInputSimulator
    extends java.lang.Object
    implements com.pi4j.io.gpio.GpioPinDigitalInput
    Simulates GpioPinDigitalInput.
    • Constructor Summary

      Constructors 
      Constructor Description
      GpioPinDigitalInputSimulator​(com.pi4j.io.gpio.Pin pin, java.lang.String string, com.pi4j.io.gpio.PinPullResistance ppr)  
    • 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)  
      void addTrigger​(com.pi4j.io.gpio.trigger.GpioTrigger... gts)  
      void addTrigger​(java.util.List<? extends com.pi4j.io.gpio.trigger.GpioTrigger> list)  
      void clearProperties()  
      void export​(com.pi4j.io.gpio.PinMode pm)  
      void export​(com.pi4j.io.gpio.PinMode pm, com.pi4j.io.gpio.PinState ps)  
      int getDebounce​(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()  
      java.util.Collection<com.pi4j.io.gpio.trigger.GpioTrigger> getTriggers()  
      boolean hasDebounce​(com.pi4j.io.gpio.PinState ps)  
      boolean hasListener​(com.pi4j.io.gpio.event.GpioPinListener... gls)  
      boolean hasProperty​(java.lang.String string)  
      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 removeAllListeners()  
      void removeAllTriggers()  
      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 removeTrigger​(com.pi4j.io.gpio.trigger.GpioTrigger... gts)  
      void removeTrigger​(java.util.List<? extends com.pi4j.io.gpio.trigger.GpioTrigger> list)  
      void setDebounce​(int i)  
      void setDebounce​(int i, com.pi4j.io.gpio.PinState... pss)  
      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 setTag​(java.lang.Object o)  
      void unexport()  
      • Methods inherited from class java.lang.Object

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

      • GpioPinDigitalInputSimulator

        public GpioPinDigitalInputSimulator​(com.pi4j.io.gpio.Pin pin,
                                            java.lang.String string,
                                            com.pi4j.io.gpio.PinPullResistance ppr)
    • Method Detail

      • hasDebounce

        public boolean hasDebounce​(com.pi4j.io.gpio.PinState ps)
        Specified by:
        hasDebounce in interface com.pi4j.io.gpio.GpioPinDigitalInput
      • getDebounce

        public int getDebounce​(com.pi4j.io.gpio.PinState ps)
        Specified by:
        getDebounce in interface com.pi4j.io.gpio.GpioPinDigitalInput
      • setDebounce

        public void setDebounce​(int i)
        Specified by:
        setDebounce in interface com.pi4j.io.gpio.GpioPinDigitalInput
      • setDebounce

        public void setDebounce​(int i,
                                com.pi4j.io.gpio.PinState... pss)
        Specified by:
        setDebounce in interface com.pi4j.io.gpio.GpioPinDigitalInput
      • 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
      • isState

        public boolean isState​(com.pi4j.io.gpio.PinState ps)
        Specified by:
        isState in interface com.pi4j.io.gpio.GpioPinDigital
      • 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
      • getTriggers

        public java.util.Collection<com.pi4j.io.gpio.trigger.GpioTrigger> getTriggers()
        Specified by:
        getTriggers in interface com.pi4j.io.gpio.GpioPinInput
      • addTrigger

        public void addTrigger​(com.pi4j.io.gpio.trigger.GpioTrigger... gts)
        Specified by:
        addTrigger in interface com.pi4j.io.gpio.GpioPinInput
      • addTrigger

        public void addTrigger​(java.util.List<? extends com.pi4j.io.gpio.trigger.GpioTrigger> list)
        Specified by:
        addTrigger in interface com.pi4j.io.gpio.GpioPinInput
      • removeTrigger

        public void removeTrigger​(com.pi4j.io.gpio.trigger.GpioTrigger... gts)
        Specified by:
        removeTrigger in interface com.pi4j.io.gpio.GpioPinInput
      • removeTrigger

        public void removeTrigger​(java.util.List<? extends com.pi4j.io.gpio.trigger.GpioTrigger> list)
        Specified by:
        removeTrigger in interface com.pi4j.io.gpio.GpioPinInput
      • removeAllTriggers

        public void removeAllTriggers()
        Specified by:
        removeAllTriggers in interface com.pi4j.io.gpio.GpioPinInput