public class WatchdogTimerConfig extends java.lang.Object implements PeripheralConfig<WatchdogTimer>, PeripheralConfig.HardwareAddressing
WatchdogTimerConfig class encapsulates the hardware addressing information, and static and dynamic
configuration parameters of a watchdog timer.
Some hardware addressing parameter, and static and dynamic configuration parameters may be set to PeripheralConfig.DEFAULT.
Whether such default settings are supported is platform- as well as peripheral driver-dependent.
An instance of WatchdogTimerConfig can be passed to the PeripheralManager.open(PeripheralConfig) or
PeripheralManager.open(Class, PeripheralConfig) method to open the designated watchdog timer with the specified
configuration. A PeripheralConfigInvalidException is thrown when attempting to open a peripheral device with
an invalid or unsupported configuration.PeripheralConfig.HardwareAddressingDEFAULT| Constructor and Description |
|---|
WatchdogTimerConfig(int deviceNumber,
int timerNumber)
Creates a new
WatchdogTimerConfig with the specified hardware addressing information. |
WatchdogTimerConfig(java.lang.String deviceName,
int timerNumber)
Creates a new
WatchdogTimerConfig with the specified hardware addressing information. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Checks two
WatchdogTimerConfig objects for equality. |
java.lang.String |
getDeviceName()
Gets the configured device name (such as to its device file name on UNIX systems).
|
int |
getDeviceNumber()
Gets the configured device number.
|
int |
getTimerNumber()
Gets the configured timer number.
|
int |
hashCode()
Returns the hash code value for this object.
|
public WatchdogTimerConfig(java.lang.String deviceName,
int timerNumber)
WatchdogTimerConfig with the specified hardware addressing information.deviceName - the device name (such as to its device file name on UNIX systems).timerNumber - the hardware timer's number (a positive or zero integer) or PeripheralConfig.DEFAULT.java.lang.IllegalArgumentException - if timerNumber is not in the defined range.java.lang.NullPointerException - if device name is null.public WatchdogTimerConfig(int deviceNumber,
int timerNumber)
WatchdogTimerConfig with the specified hardware addressing information.deviceNumber - the device number (a positive or zero integer) or PeripheralConfig.DEFAULT.timerNumber - the hardware timer's number (a positive or zero integer) or PeripheralConfig.DEFAULT.java.lang.IllegalArgumentException - if timerNumber is not in the defined range.java.lang.NullPointerException - if device name is null.public int getTimerNumber()
PeripheralConfig.DEFAULT.public int getDeviceNumber()
getDeviceNumber in interface PeripheralConfig.HardwareAddressingPeripheralConfig.DEFAULT.public java.lang.String getDeviceName()
getDeviceName in interface PeripheralConfig.HardwareAddressingnull.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
WatchdogTimerConfig objects for equality.equals in class java.lang.Objectobj - the object to test for equality with this object.true if obj is a WatchdogTimerConfig and has
the same hardware addressing information and configuration parameter values
as this WatchdogTimerConfig object.Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved.
Legal Notices
ing HTML relocate