org.openmuc.jmbus
Class MBusLSAP

java.lang.Object
  extended by org.openmuc.jmbus.MBusLSAP

public class MBusLSAP
extends java.lang.Object

M-Bus Link Layer Service Access Point


Constructor Summary
MBusLSAP(int timeout)
           
 
Method Summary
 void closeSerialPort()
           
 void configureSerialPort(java.lang.String device, java.lang.String configStr)
           
 boolean masterToSlaveDataSend(int slaveAddr, byte[] data)
           
 MBusLPDU receiveMessage()
           
 boolean selectComponent(int id, short manuf, byte version, byte medium)
           
 boolean sendLongMessage(int slaveAddr, int cmd, int ci, int length, byte[] data)
           
 void sendShortMessage(int slaveAddr, int cmd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBusLSAP

public MBusLSAP(int timeout)
Method Detail

selectComponent

public boolean selectComponent(int id,
                               short manuf,
                               byte version,
                               byte medium)
                        throws java.util.concurrent.TimeoutException,
                               java.io.IOException
Throws:
java.util.concurrent.TimeoutException
java.io.IOException

receiveMessage

public MBusLPDU receiveMessage()
                        throws java.util.concurrent.TimeoutException,
                               java.io.IOException
Throws:
java.util.concurrent.TimeoutException
java.io.IOException

sendShortMessage

public void sendShortMessage(int slaveAddr,
                             int cmd)
                      throws java.io.IOException
Throws:
java.io.IOException

sendLongMessage

public boolean sendLongMessage(int slaveAddr,
                               int cmd,
                               int ci,
                               int length,
                               byte[] data)

configureSerialPort

public void configureSerialPort(java.lang.String device,
                                java.lang.String configStr)
                         throws java.io.IOException
Throws:
java.io.IOException

masterToSlaveDataSend

public boolean masterToSlaveDataSend(int slaveAddr,
                                     byte[] data)
                              throws java.util.concurrent.TimeoutException,
                                     java.io.IOException
Throws:
java.util.concurrent.TimeoutException
java.io.IOException

closeSerialPort

public void closeSerialPort()