org.openmuc.jmbus
Class MBusASAP

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

public class MBusASAP
extends java.lang.Object

M-Bus Application Layer Service Access Point


Field Summary
static byte APL_RESET_ALL
           
static byte APL_RESET_CALIBRATION
           
static byte APL_RESET_DEVELOPMENT
           
static byte APL_RESET_ENHANCED_BILLING
           
static byte APL_RESET_INST_VALUES
           
static byte APL_RESET_INSTALLATION
           
static byte APL_RESET_LOAD_MANAGEMENT
           
static byte APL_RESET_MANUFACTURING
           
static byte APL_RESET_MULTI_TARIF_BILLING
           
static byte APL_RESET_SELFTEST
           
static byte APL_RESET_SIMPLE_BILLING
           
static byte APL_RESET_TESTING
           
static byte APL_RESET_USER_DATA
           
 
Constructor Summary
MBusASAP(java.lang.String serialPort, java.lang.String configStr)
          default timeout = 1s
MBusASAP(java.lang.String serialPort, java.lang.String configStr, int timeout)
           
 
Method Summary
 void applicationReset(java.lang.String meterAddr)
           
 void applicationReset(java.lang.String meterAddr, byte subCode)
           
 void closeSerialPort()
           
 VariableDataResponse readMeter(java.lang.String meterAddr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APL_RESET_ALL

public static final byte APL_RESET_ALL
See Also:
Constant Field Values

APL_RESET_USER_DATA

public static final byte APL_RESET_USER_DATA
See Also:
Constant Field Values

APL_RESET_SIMPLE_BILLING

public static final byte APL_RESET_SIMPLE_BILLING
See Also:
Constant Field Values

APL_RESET_ENHANCED_BILLING

public static final byte APL_RESET_ENHANCED_BILLING
See Also:
Constant Field Values

APL_RESET_MULTI_TARIF_BILLING

public static final byte APL_RESET_MULTI_TARIF_BILLING
See Also:
Constant Field Values

APL_RESET_INST_VALUES

public static final byte APL_RESET_INST_VALUES
See Also:
Constant Field Values

APL_RESET_LOAD_MANAGEMENT

public static final byte APL_RESET_LOAD_MANAGEMENT
See Also:
Constant Field Values

APL_RESET_INSTALLATION

public static final byte APL_RESET_INSTALLATION
See Also:
Constant Field Values

APL_RESET_TESTING

public static final byte APL_RESET_TESTING
See Also:
Constant Field Values

APL_RESET_CALIBRATION

public static final byte APL_RESET_CALIBRATION
See Also:
Constant Field Values

APL_RESET_MANUFACTURING

public static final byte APL_RESET_MANUFACTURING
See Also:
Constant Field Values

APL_RESET_DEVELOPMENT

public static final byte APL_RESET_DEVELOPMENT
See Also:
Constant Field Values

APL_RESET_SELFTEST

public static final byte APL_RESET_SELFTEST
See Also:
Constant Field Values
Constructor Detail

MBusASAP

public MBusASAP(java.lang.String serialPort,
                java.lang.String configStr,
                int timeout)
         throws java.io.IOException
Parameters:
serialPort -
configStr -
timeout - Socket receive timeout in millis
Throws:
java.io.IOException

MBusASAP

public MBusASAP(java.lang.String serialPort,
                java.lang.String configStr)
         throws java.io.IOException
default timeout = 1s

Parameters:
serialPort -
configStr -
Throws:
java.io.IOException
Method Detail

readMeter

public VariableDataResponse readMeter(java.lang.String meterAddr)
                               throws java.io.IOException,
                                      java.util.concurrent.TimeoutException
Parameters:
meterAddr - e.g. p1 or s...
Throws:
java.io.IOException
java.util.concurrent.TimeoutException

applicationReset

public void applicationReset(java.lang.String meterAddr)
                      throws java.io.IOException,
                             java.util.concurrent.TimeoutException
Throws:
java.io.IOException
java.util.concurrent.TimeoutException

applicationReset

public void applicationReset(java.lang.String meterAddr,
                             byte subCode)
                      throws java.io.IOException,
                             java.util.concurrent.TimeoutException
Throws:
java.io.IOException
java.util.concurrent.TimeoutException

closeSerialPort

public void closeSerialPort()