ch.hevs.isi.field

## Class ModbusRegister

- java.lang.Object
- - ch.hevs.isi.field.ModbusRegister

Direct Known Subclasses:
  BooleanRegister, FloatRegister

    public abstract class ModbusRegister
    extends java.lang.Object

### Constructor Summary

Constructors
Constructor and Description
`ModbusRegister()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`int` `getAddress()` get the address of the modbus register
`static ModbusRegister` `getRegisterFromDatapoint(DataPoint dp)` get the modbus register from the desired datapoint
`static void` `poll()` read periodically each modbus register
`abstract void` `read()` function to read a datapoint from the modbus register
`void` `updateMapOfRegisters(java.lang.String label, int address)` add an register to the map of the modbus addresses
`abstract void` `write(DataPoint dp)` function to write datapoint on the modbus register

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ModbusRegister

    public ModbusRegister()

### Method Detail

#### getAddress

    public int getAddress()

get the address of the modbus register

Returns:
  address of the modbus register

#### getRegisterFromDatapoint

    public static ModbusRegister getRegisterFromDatapoint(DataPoint dp)

get the modbus register from the desired datapoint

Parameters:
  `dp` - the desired datapoint
Returns:
  modbus adress of the datapoint

#### updateMapOfRegisters

    public void updateMapOfRegisters(java.lang.String label,
                                     int address)

add an register to the map of the modbus addresses

Parameters:
  `label` - label of the datapoint
  `address` - modbus address of the datapoint

#### poll

    public static void poll()

read periodically each modbus register

#### read

    public abstract void read()

function to read a datapoint from the modbus register

#### write

    public abstract void write(DataPoint dp)

function to write datapoint on the modbus register

Parameters:
  `dp` - datapoint to write on the address