public class PWMException
extends java.lang.Exception
The exception stores information of which PWM channel caused it and the type of exception thrown.
Modifier and Type | Field | Description |
---|---|---|
static int |
CHANGE_PERIOD_WHILE_ENABLED |
Period cannot be changed while PWM is enabled.
|
protected int |
channelIndex |
|
protected PWMChip |
chip |
|
protected int |
exceptionType |
|
static int |
INVALID_PERIOD |
Period is invalid.
|
static int |
OPERATION_NOT_SUPPORTED |
The requested action is not supported.
|
static int |
PERIOD_ZERO |
Period cannot be 0.
|
static int |
PWM_CHANNEL_NOT_AVAILABLE |
The provided PWM channel index is not available.
|
static int |
PWM_CHIP_NOT_AVAILABLE |
The provided PWM chip index is not available.
|
static int |
READING_ERROR |
Error reading from PWM channel files.
|
static long |
serialVersionUID |
|
static int |
UNSPECIFIED_EXCEPTION |
Any exception that does not specify a specific issue.
|
static int |
WRITING_ERROR |
Error writing to PWM channel files.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getPWMChannelIndex() |
Retrieves the PWM channel index associated to this exception.
|
PWMChip |
getPWMChip() |
Retrieves the PWM chip associated to this exception.
|
int |
getType() |
Retrieves the exception type.
|
public static final long serialVersionUID
public static final int UNSPECIFIED_EXCEPTION
public static final int PWM_CHIP_NOT_AVAILABLE
public static final int PWM_CHANNEL_NOT_AVAILABLE
public static final int READING_ERROR
public static final int WRITING_ERROR
public static final int OPERATION_NOT_SUPPORTED
public static final int PERIOD_ZERO
public static final int INVALID_PERIOD
public static final int CHANGE_PERIOD_WHILE_ENABLED
protected int exceptionType
protected int channelIndex
protected PWMChip chip
public PWMChip getPWMChip()
public int getPWMChannelIndex()
public int getType()
UNSPECIFIED_EXCEPTION
if not explicitly set.PWM_CHIP_NOT_AVAILABLE
,
PWM_CHANNEL_NOT_AVAILABLE
,
READING_ERROR
,
UNSPECIFIED_EXCEPTION
,
WRITING_ERROR