java.lang.Object
com.pi4j.common.IdentityBase
com.pi4j.io.IOBase<Pwm,PwmConfig,PwmProvider>
com.pi4j.io.pwm.PwmBase
com.pi4j.plugin.linuxfs.provider.pwm.LinuxFsPwm
- All Implemented Interfaces:
Describable
,Identity
,Lifecycle
,Extension
,IO<Pwm,
,PwmConfig, PwmProvider> OnOff<Pwm>
,OnOffRead<Pwm>
,OnOffWrite<Pwm>
,Pwm
LinuxFsPwm class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected org.slf4j.Logger
protected final com.pi4j.plugin.linuxfs.internal.LinuxPwm
Fields inherited from class com.pi4j.io.pwm.PwmBase
dutyCycle, frequency, onState, polarity, presets
Fields inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
-
Constructor Summary
ConstructorsConstructorDescriptionLinuxFsPwm
(com.pi4j.plugin.linuxfs.internal.LinuxPwm pwm, PwmProvider provider, PwmConfig config) Constructor for PiGpioPwmHardware. -
Method Summary
Methods inherited from class com.pi4j.io.pwm.PwmBase
addPreset, applyPreset, deletePreset, getDutyCycle, getFrequency, getPreset, getPresets, setDutyCycle, setFrequency
Methods inherited from class com.pi4j.io.IOBase
config, context, describe, description, name, provider
Methods inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pi4j.common.Identity
description, getDescription, getId, getMetadata, getName, id, metadata, name
Methods inherited from interface com.pi4j.io.pwm.Pwm
actualFrequency, addPreset, address, applyPreset, deletePreset, dutyCycle, dutyCycle, frequency, frequency, getAddress, getDutyCycle, getFrequency, getPolarity, getPreset, getPresets, getPwmType, isOff, on, on, polarity, preset, presets, pwmType, setDutyCycle, setFrequency
-
Field Details
-
pwm
protected final com.pi4j.plugin.linuxfs.internal.LinuxPwm pwm -
actualFrequency
protected int actualFrequency -
logger
protected org.slf4j.Logger logger
-
-
Constructor Details
-
LinuxFsPwm
public LinuxFsPwm(com.pi4j.plugin.linuxfs.internal.LinuxPwm pwm, PwmProvider provider, PwmConfig config) Constructor for PiGpioPwmHardware.
- Parameters:
pwm
- aLinuxPwm
object.provider
- aPwmProvider
object.config
- aPwmConfig
object.
-
-
Method Details
-
initialize
- Specified by:
initialize
in interfaceLifecycle
- Overrides:
initialize
in classPwmBase
- Throws:
InitializeException
-
on
- Specified by:
on
in interfaceOnOffWrite<Pwm>
- Specified by:
on
in interfacePwm
- Throws:
IOException
-
off
- Specified by:
off
in interfaceOnOffWrite<Pwm>
- Specified by:
off
in interfacePwm
- Throws:
IOException
-
isOn
public boolean isOn() -
getActualFrequency
- Specified by:
getActualFrequency
in interfacePwm
- Overrides:
getActualFrequency
in classPwmBase
- Throws:
IOException
-
shutdown
- Specified by:
shutdown
in interfaceLifecycle
- Overrides:
shutdown
in classPwmBase
- Throws:
ShutdownException
-