java.lang.Object
com.pi4j.common.IdentityBase<T>
com.pi4j.extension.ExtensionBase<com.pi4j.platform.Platform>
com.pi4j.platform.PlatformBase<com.pi4j.plugin.raspberrypi.platform.RaspberryPiPlatform>
com.pi4j.plugin.raspberrypi.platform.RaspberryPiPlatform
com.pi4j.crowpi.helpers.CrowPiPlatform
- All Implemented Interfaces:
com.pi4j.common.Describable
,com.pi4j.common.Identity
,com.pi4j.common.Lifecycle<com.pi4j.platform.Platform>
,com.pi4j.extension.Extension<com.pi4j.platform.Platform>
,com.pi4j.internal.IOCreator
,com.pi4j.internal.ProviderAliases
,com.pi4j.internal.ProviderProvider
,com.pi4j.platform.Platform
public class CrowPiPlatform
extends com.pi4j.plugin.raspberrypi.platform.RaspberryPiPlatform
Custom Pi4J platform class which ensures that PiGPIO is used for interacting with the hardware components.
Without these overrides the auto-detection is not guaranteed to pick a well-known working set of plugins.
-
Field Summary
Fields inherited from class com.pi4j.platform.PlatformBase
context, logger, providers
Fields inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.pi4j.context.Context
Helper method for instantiating a new Pi4J context based on theCrowPiPlatform
platform with PiGPIO plugins.protected String[]
Override default providers which would otherwise be inherited fromRaspberryPiPlatform
with an empty list.Methods inherited from class com.pi4j.plugin.raspberrypi.platform.RaspberryPiPlatform
enabled, priority
Methods inherited from class com.pi4j.platform.PlatformBase
addProvider, create, create, create, initialize, provider, providers, shutdown
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.internal.IOCreator
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create
Methods inherited from interface com.pi4j.common.Lifecycle
initialize, shutdown
Methods inherited from interface com.pi4j.platform.Platform
create, create, create, describe, hasProvider, hasProvider, hasProvider, provider, provider, provider, provider, providers
Methods inherited from interface com.pi4j.internal.ProviderAliases
ain, analogInput, analogOutput, aout, digitalInput, digitalOutput, din, dout, getAnalogInputProvider, getAnalogOutputProvider, getDigitalInputProvider, getDigitalOutputProvider, getI2CProvider, getPwmProvider, getSerialProvider, getSpiProvider, i2c, pwm, serial, spi
Methods inherited from interface com.pi4j.internal.ProviderProvider
getProvider, getProvider, getProvider, getProvider
-
Constructor Details
-
CrowPiPlatform
public CrowPiPlatform()
-
-
Method Details
-
buildNewContext
public static com.pi4j.context.Context buildNewContext()Helper method for instantiating a new Pi4J context based on theCrowPiPlatform
platform with PiGPIO plugins.- Returns:
- Pi4J context instance
-
getProviders
Override default providers which would otherwise be inherited fromRaspberryPiPlatform
with an empty list. This is required for manually controlling which providers are being loaded as part ofbuildNewContext()
.- Overrides:
getProviders
in classcom.pi4j.plugin.raspberrypi.platform.RaspberryPiPlatform
- Returns:
- Empty provider list
-