|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.nokia.m2m.imp.iocontrol.IOControl
The IOControl
class is used to control I/O pin states from the IMlet.
IOControl provides a collection of methods to control some of the special features
available in Nokia 12 GSM M2M module, e.g., the reading and writing of IO pins.
This is a Singleton implementation, so only one instance is allowed and possible.
Use IOControl.getInstance to generate this instance.
If the instance is already created, the existing one will be returned.
This class is thread safe.
Constructor Summary | |
protected |
IOControl()
|
Method Summary | |
int |
getAnalogInputPin(int pin)
Reads the value of the specified analog input pin 1-3. |
int |
getAnalogOutputPin(int pinParam)
Returns the value of an analog output pin. |
boolean |
getDigitalInputPin(int pin)
Reads the value of the specified digital input pin 4-11. |
boolean |
getDigitalOutputPin(int pin)
Reads the value of the specified digital output pin 1-9. |
static IOControl |
getInstance()
This is a singleton method for returning the only instance of a class. |
void |
setAnalogOutputPin(int pinParam,
int valueParam)
Sets the value of an analog output pin. |
void |
setDigitalOutputPin(int pin,
boolean state)
Changes the state of the output pins 1-9. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected IOControl()
Method Detail |
public static IOControl getInstance()
public void setDigitalOutputPin(int pin, boolean state) throws IOException, IllegalArgumentException
pin
- Digital output pin number 1-9state
- Pin state
IOException
- If the state of the pin could not be changed.
IllegalArgumentException
- If the given pin number does not exists.public boolean getDigitalOutputPin(int pin) throws IOException, IllegalArgumentException
pin
- Defines output pin number.
IOException
- If the state of the pin could not be changed.
IllegalArgumentException
- If the given pin number does not exists.public boolean getDigitalInputPin(int pin) throws IOException, IllegalArgumentException
pin
- Defines the number of the digital input pin 4-11.
IOException
IllegalArgumentException
- If the given pin number does not exists.public int getAnalogInputPin(int pin) throws IOException, IllegalArgumentException
pin
- Analog input pin number 1-3.
IOException
- If the state of the pin could not be changed.
IllegalArgumentException
- If the given pin number does not exists.public int getAnalogOutputPin(int pinParam) throws IOException, IllegalArgumentException
pinParam
- Defines analog output pin number.
IOException
- Because there are no analog output pins in the Nokia 12 GSM module.
IllegalArgumentException
public void setAnalogOutputPin(int pinParam, int valueParam) throws IOException, IllegalArgumentException
pinParam
- Defines analog output pin number.valueParam
- Defines the value of analog output pin.
IOException
- Because there are no analog output pins in the Nokia 12 GSM module.
IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |