com.nokia.m2m.orb.idl.iomodule
Interface IOControlOperations


public interface IOControlOperations

Module ORB servant implementing the IOControlOperations interface.
Reference to this servant can be obtained by using following name:

Some of the methods are only supported by the real Nokia 12 GSM module, not by the Nokia 12 IMP 1.0 Concept Simulator.
Methods not supported by the Nokia 12 IMP 1.0 Concept Simulator are defined in this interfaces for compatibility but they will not implement any functionality. The following methods are supported both by the Nokia 12 GSM module and the Nokia 12 IMP 1.0 Concept Simulator:


Method Summary
 com.nokia.m2m.orb.idl.iomodule.AnalogAlarmLimits getInputPinAlarmLimits(short pinNumber)
          Returns the alarm limits of an analog input pin.
 short getInputPinAlarmPeriod(short pinNumber)
          Returns the alarm time of an analog input pin.
 com.nokia.m2m.orb.idl.iomodule.PinMode getInputPinMode(short pinNumber)
          Returns the input mode of a given pin number.
 int getInputPinValue(short pinNumber)
          Returns the current value of an input pin.
 int[] getInputPinValueList(short[] pinNumbers)
          Returns the values of multiple input pins.
 int getOutputPinValue(short pinNumber)
          Returns the value of an output pin.
 int[] getOutputPinValueList(short[] pinNumbers)
          Returns the values of multiple digital output pins.
 int numberOfInputPins()
          Returns the total number of input pins.
 int numberOfOutputPins()
          Returns the total number of output pins.
 void removeIOControlObserver(com.nokia.m2m.orb.idl.iomodule.IOControlObserver observer, short[] pinNumbers)
          Method call is used for canceling I/O control observer.
 void setInputPinModeAlarming(short pinNumber, com.nokia.m2m.orb.idl.iomodule.AnalogAlarmLimits limits)
          Method call is used for setting the mode of a given input pin to analog and alarming.
 void setInputPinModeAnalog(short pinNumber)
          Method call is used for setting the mode of a given input pin to analog.
 void setInputPinModeDigital(short pinNumber)
          Method call is used for setting the mode of a given input pin to digital.
 void setInputPinModePeriodical(short pinNumber, short interval)
          Method call is used for setting the mode of a given input pin to analog and periodical.
 void setIOControlObserver(com.nokia.m2m.orb.idl.iomodule.IOControlObserver observer, short[] pinNumbers)
          Method call is used for subscribing input events.
 void setOutputPinValue(short pinNumber, int value)
          Sets the value of a digital output pin.
 void setOutputPinValueList(short[] pinNumbers, int[] values)
          Sets the values of multiple digital output pins.
 

Method Detail

numberOfInputPins

public int numberOfInputPins()
Returns the total number of input pins. All the input pins might not be in use, depending on the configuration. Please refer to terminal documentation for the number of pins in the terminal.


numberOfOutputPins

public int numberOfOutputPins()
Returns the total number of output pins. All the output pins might not be in use, depending on the configuration. Please refer to terminal documentation for the number of pins in the terminal.


getInputPinMode

public com.nokia.m2m.orb.idl.iomodule.PinMode getInputPinMode(short pinNumber)
                                                       throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange
Returns the input mode of a given pin number. If the pin number is 1, 2 or 3, the queried pin is analog input pin 1, analog input pin 2 or analog input pin 3. Pin numbers 4 or higher refer to digital input pins. Therefore pin number 4 refers to digital input pin 1, pin number 5 refers to digital input pin 2, etc.

Parameters:
pinNumber - Defines the pin number queried. If the pin number is 1, 2 or 3, the pin number refers to analog pin. Pin numbers 4 or higher refer to digital input pins.
Returns:
The pin mode, which can be ANALOG_PERIODICAL, ANALOG_ALARMING, ANALOG or DIGITAL.
Throws:
com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange

getInputPinAlarmLimits

public com.nokia.m2m.orb.idl.iomodule.AnalogAlarmLimits getInputPinAlarmLimits(short pinNumber)
                                                                        throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange,
                                                                               com.nokia.m2m.orb.idl.iomodule.InvalidPinMode
Returns the alarm limits of an analog input pin.

Parameters:
pinNumber - Defines the pin number. If the pin number is 1, 2 or 3, the pin number refers to analog pin. Pin numbers 4 or higher refer to digital input pins.
Returns:
The pin alarm limits.
Throws:
com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange
com.nokia.m2m.orb.idl.iomodule.InvalidPinMode

getInputPinAlarmPeriod

public short getInputPinAlarmPeriod(short pinNumber)
                             throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange,
                                    com.nokia.m2m.orb.idl.iomodule.InvalidPinMode
Returns the alarm time of an analog input pin.

Parameters:
pinNumber - Defines the pin number. If the pin number is 1, 2 or 3, the pin number refers to analog pin. Pin numbers 4 or higher refer to digital input pins.
Returns:
Throws:
PinNumberOutOfRange
InvalidPinMode, - if the queried input pin is digital.
com.nokia.m2m.orb.idl.iomodule.InvalidPinMode

setInputPinModeDigital

public void setInputPinModeDigital(short pinNumber)
                            throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange,
                                   com.nokia.m2m.orb.idl.iomodule.InvalidPinMode
Method call is used for setting the mode of a given input pin to digital. The terminal must be reset to activate the mode change.

Parameters:
pinNumber -
Throws:
PinNumberOutOfRange
InvalidPinMode

setInputPinModeAnalog

public void setInputPinModeAnalog(short pinNumber)
                           throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange,
                                  com.nokia.m2m.orb.idl.iomodule.InvalidPinMode
Method call is used for setting the mode of a given input pin to analog. The terminal must be reset to activate the mode change.

Parameters:
pinNumber -
Throws:
PinNumberOutOfRange
InvalidPinMode

setInputPinModeAlarming

public void setInputPinModeAlarming(short pinNumber,
                                    com.nokia.m2m.orb.idl.iomodule.AnalogAlarmLimits limits)
                             throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange,
                                    com.nokia.m2m.orb.idl.iomodule.PeriodOutOfRange,
                                    com.nokia.m2m.orb.idl.iomodule.LowLimitOutOfRange,
                                    com.nokia.m2m.orb.idl.iomodule.InvalidPinMode,
                                    com.nokia.m2m.orb.idl.iomodule.HighLimitOutOfRange
Method call is used for setting the mode of a given input pin to analog and alarming. The terminal must be reset to activate the mode change. Note: When a terminal uses M2M System Protocol or AT commands as its connection type some input pins and output pins are disabled. This may affect some applications using those pins.

Parameters:
pinNumber -
limits -
Throws:
PinNumberOutOfRange
InvalidPinMode
PeriodOutOfRange
HighLimitOutOfRange
LowLimitOutOfRange

setInputPinModePeriodical

public void setInputPinModePeriodical(short pinNumber,
                                      short interval)
                               throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange,
                                      com.nokia.m2m.orb.idl.iomodule.PeriodOutOfRange,
                                      com.nokia.m2m.orb.idl.iomodule.InvalidPinMode
Method call is used for setting the mode of a given input pin to analog and periodical. The terminal must be reset to activate the mode change. Note: When a terminal uses M2M System Protocol or AT commands as its connection type some input pins and output pins are disabled. This may affect some applications using those pins.

Parameters:
pinNumber -
interval -
Throws:
PinNumberOutOfRange
InvalidPinMode
PeriodOutOfRange

getInputPinValue

public int getInputPinValue(short pinNumber)
                     throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange
Returns the current value of an input pin. If the input pin is digital, the returned value is 1 if the pin is selected and 0 if the pin is not selected.

Parameters:
pinNumber - Defines the pin number. If the pin number is 1, 2 or 3, the pin number refers to analog pin. Pin numbers 4 or higher refer to digital input pins.
Returns:
The value of the queried analog or digital input pin. If the queried pin is digital and the returned value is 1, the digital input pin is selected. If the queried the pin is digital and the returned value is 0, the digital input pin is not selected.
Throws:
com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange

getInputPinValueList

public int[] getInputPinValueList(short[] pinNumbers)
                           throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList
Returns the values of multiple input pins. The return value array can contain values for both analog and digital input

Parameters:
pinNumbers - An array of pin numbers to be queried. Each pin number in in the array has following meaning: Pin numbers 1, 2 and 3 refer to analog pins and pin numbers 4 or higher refer to digital pins.
Returns:
Throws:
com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList

setOutputPinValue

public void setOutputPinValue(short pinNumber,
                              int value)
                       throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange,
                              com.nokia.m2m.orb.idl.iomodule.PinValueOutOfRange
Sets the value of a digital output pin.

Parameters:
pinNumber - Defines the pin number for the digital output pin.
value - Defines the value of digital output pin. If the value is set to 0, then the digital output pin is turned off. Otherwise the digital output pin is turned on.
Throws:
com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange
com.nokia.m2m.orb.idl.iomodule.PinValueOutOfRange

setOutputPinValueList

public void setOutputPinValueList(short[] pinNumbers,
                                  int[] values)
                           throws com.nokia.m2m.orb.idl.iomodule.PinValueOutOfRangeList,
                                  com.nokia.m2m.orb.idl.iomodule.ListsNotEven,
                                  com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList
Sets the values of multiple digital output pins.

Parameters:
pinNumbers - Defines multible pin numbers to be referred. For each pin number defined, 1, 2 and 3 refer to analog pin and numbers 4 or higher refer to digital pin.
values - Defines multible pin values. For each value defined, 0 means that the pin is turned off and other values mean that the pin is turned on.
Throws:
com.nokia.m2m.orb.idl.iomodule.PinValueOutOfRangeList
com.nokia.m2m.orb.idl.iomodule.ListsNotEven
com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList

getOutputPinValue

public int getOutputPinValue(short pinNumber)
                      throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRange
Returns the value of an output pin. Return value 0 means that the output pin is not selected and return value 1 will means that the pin is selected.

Parameters:
pinNumber - Defines digital output pin number to be queried.
Returns:
0 if the digital output pin is not selected, otherwise returns 1.
Throws:
PinNumberOutOfRange

getOutputPinValueList

public int[] getOutputPinValueList(short[] pinNumbers)
                            throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList
Returns the values of multiple digital output pins. For each returned entry, 0 means that the output pin is not selected and 1 means that the pin is selected.

Parameters:
pinNumbers - Defines pin numbers to be queried.
Returns:
An array of digital output pin values. The first entry in the array refers to the return value of the first pin number in the pinNumbers array, the second returned value refers to the second item in the parameters array, etc.
Throws:
com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList

setIOControlObserver

public void setIOControlObserver(com.nokia.m2m.orb.idl.iomodule.IOControlObserver observer,
                                 short[] pinNumbers)
                          throws com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList
Method call is used for subscribing input events. When an I/O event occurs the terminal calls the pinStateChanged method of the observer object. An observer can be set to an input pin, which is either in digital, analog alarming, or analog periodical mode.

Parameters:
observer -
pinNumbers -
Throws:
PinNumberOutOfRangeList

removeIOControlObserver

public void removeIOControlObserver(com.nokia.m2m.orb.idl.iomodule.IOControlObserver observer,
                                    short[] pinNumbers)
                             throws com.nokia.m2m.orb.idl.iomodule.ObserverNotExists,
                                    com.nokia.m2m.orb.idl.iomodule.PinNumberOutOfRangeList
Method call is used for canceling I/O control observer. The whole observer is not removed until all observer pins are unsubscribed.

Parameters:
observer -
pinNumbers -
Throws:
ObserverNotExists
PinNumberOutOfRangeList


Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.

Portions of this document are under the following copyright:
Copyright © 2003 Nokia. All rights reserved.