public class I2CPermission extends DevicePermission
I2CPermission
class defines permissions for I2C slave device access.
A I2CPermission
permission has a target name and a list of actions.
The target name contains hardware addressing information. The format is the one defined for the
base DevicePermission
class with the following addition:
{channel-desc}
- The
{channel-desc}
string (described inDevicePermission
) is the hexadecimal string representation of a device address on the I2C bus as may be returned by a call toI2CDeviceConfig.getAddress
. The characters in the string must all be hexadecimal digits.
The supported actions are open
and powermanage
as defined in DevicePermission
.
DeviceManager.open
,
PowerManaged
OPEN, POWER_MANAGE
Constructor and Description |
---|
I2CPermission(java.lang.String name)
Constructs a new
ADCPermission with the specified target name and the implicit
open action. |
I2CPermission(java.lang.String name,
java.lang.String actions)
Constructs a new
I2CPermission instance with the specified target name and action
list. |
equals, getActions, hashCode, implies, newPermissionCollection
public I2CPermission(java.lang.String name)
ADCPermission
with the specified target name and the implicit
open
action.
The target name is normalized so that leading and trailing spaces are removed
and each occurrence of {controller-number}
and {channel-desc}
is respectively represented in its canonical
decimal and hexadecimal representation form (without leading zeros).name
- the target name (as defined above).java.lang.NullPointerException
- if name
is null
.java.lang.IllegalArgumentException
- if name
is not properly formatted.getName
public I2CPermission(java.lang.String name, java.lang.String actions)
I2CPermission
instance with the specified target name and action
list.
The target name is normalized so that leading and trailing spaces are removed
and each occurrence of {controller-number}
and {channel-desc}
is respectively represented in its canonical
decimal and hexadecimal representation form (without leading zeros).name
- the target name (as defined above).actions
- comma-separated list of device operations: open
or powermanage
.java.lang.NullPointerException
- if name
is null
.java.lang.IllegalArgumentException
- actions
is null
, empty or contains an action other than the
specified possible actions,name
is not properly formatted.getName
Copyright © 2012, 2015, Oracle and/or its affiliates. All rights reserved.
Legal Notices