org.openmuc.canopen.modul
Class CANopenDS404Modul

java.lang.Object
  extended by org.openmuc.canopen.modul.CANopenDS404Modul

public class CANopenDS404Modul
extends java.lang.Object

Manages one module in a CAN network.
Protocol: DS-404


Constructor Summary
CANopenDS404Modul(int modulID, CANopenLib lib)
          Initialize a CAN Modul.
 
Method Summary
 int getChannels()
          All available channels.
 int getDecimalDigits(int channelID)
          Gets the Decimal Digits of the specific CAN
 java.lang.String getName()
          The Name of the device e.g.
 double getValue(int channelID)
          Gets the value of the specific CAN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CANopenDS404Modul

public CANopenDS404Modul(int modulID,
                         CANopenLib lib)
Initialize a CAN Modul.

Parameters:
modulID - ID of the modul.
lib - CANopenLib to connect.
Method Detail

getValue

public double getValue(int channelID)
                throws java.io.IOException,
                       TimeoutException
Gets the value of the specific CAN

Parameters:
channelID -
Returns:
Physical value of the CAN
Throws:
java.io.IOException - if parameter have wrong format, or read returns wrong data, or no socket.
TimeoutException - if read times out

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                TimeoutException
The Name of the device e.g. "1.ti" for temperature sensor.

Returns:
The device name.
Throws:
java.io.IOException - if parameter have wrong format, or read returns wrong data, or no socket.
TimeoutException - if read times out

getDecimalDigits

public int getDecimalDigits(int channelID)
                     throws java.io.IOException,
                            TimeoutException
Gets the Decimal Digits of the specific CAN

Parameters:
channelID -
Returns:
Integer of Digits.
Throws:
java.io.IOException - if parameter have wrong format, or read returns wrong data, or no socket.
TimeoutException - if read times out

getChannels

public int getChannels()
                throws TimeoutException
All available channels.

Returns:
The number of Channels available 1...199.
Throws:
TimeoutException - if read times out