GPIO Agent which allows access to Linux GPIO subsystem (sysfs). This agents assumes that the Linux GPIO lines have been "exported" and have the right permissions and the JVM security policy enables read/write permissions on the appropriate files For eg. To be able to control a Linux GPIO Line "80", - The GPIO Line "80" has to be exported using `cat 80 > /sys/class/gpio/export` - The user which JVM runs as should have read/write permissions for - the file `/sys/class/gpio/gpio80/value` - the file `/sys/class/gpio/gpio80/direction` This can be done using ``` chown ubuntu:ubuntu "/sys/class/gpio/gpio80/value" chmod g+rw "/sys/class/gpio/gpio80/value" chown ubuntu:ubuntu "/sys/class/gpio/gpio80/direction" chmod g+rw "/sys/class/gpio/gpio80/direction" ``` - JVM `security.policy` should enable read/write permissions for - the file `/sys/class/gpio/gpio80/value` - the file `/sys/class/gpio/gpio80/direction` This can be done using ``` permission java.io.FilePermission "/sys/class/gpio/gpio85/value", "read, write"; ```
Modifiers | Name | Description |
---|---|---|
static String |
description |
|
static String |
title |
Methods inherited from class | Name |
---|---|
class UnetAgent |
addCapability, allOf, deregister, deregister, die, get, get, getBuildInfo, getLogLevel, getParam, getParameterClasses, getParameterClasses, getParameterList, getParameterList, getServices, getTitle, getVersion, init, isReadOnly, longValue, processMessage, processQuery, processRequest, register, register, set, set, setLogLevel, setParam, setup, shutdown, startup, subscribeForService, subscribeForService, trace, trace, trace, unsubscribeForService, unsubscribeForService |
Copyright 2013-21, Acoustic Research Laboratory, National University of Singapore, and Subnero Pte Ltd