com.datecs.linea

## Class LineaPro

- java.lang.Object
- - com.datecs.linea.LineaPro

-     public class LineaPro
      extends java.lang.Object

  This class implements support for LineaPro devices.

  All methods are internally synchronized with instance of current object.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `LineaPro.BarcodeListener` Interface definition for Barcode event callback.
    `static class` | `LineaPro.BatteryInfo` Battery information.
    `static interface` | `LineaPro.ButtonListener` Interface definition for button event callback.
    `static interface` | `LineaPro.ConnectionListener` Interface definition for a Printer event callback.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BARCODE_MODE_MOTION_DETECT` Barcode engine into motion detect mode.
    `static int` | `BARCODE_MODE_MULTI_SCAN` Barcode engine into multiple scan mode.
    `static int` | `BARCODE_MODE_MULTI_SCAN_NO_DUPLICATE` Barcode engine into multiple scan mode with no duplicates.
    `static int` | `BARCODE_MODE_SINGLE_SCAN` Barcode engine into single scan mode.
    `static int` | `BARCODE_MODE_SINGLE_SCAN_ON_RELEASE` Barcode engine into single scan mode.
    `static int` | `RFID_MODULE_CLRC663` CLRC663 RFID chip.
    `static int` | `RFID_MODULE_MURATA` MURATA RFID chip.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LineaPro(java.io.InputStream inputStream, java.io.OutputStream outputStream)` Constructs a new instance of this class from a given streams.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `bcGetEngine()` Get barcode engine.
    `int` | `bcGetMode()` Get barcode scan mode.
    `int` | `bcGetTimeout()` Get barcode timeout.
    `byte[]` | `bcRead()` Read data from barcode module.
    `void` | `bcRestoreDefaultMode()` Reset barcode scanner to default state.
    `void` | `bcSetBeep(int volume, int[] pattern)` Set the sound to play sounds on barcode scan.
    `void` | `bcSetKeepAlive(boolean on)` Set barcode scanner to be always ready for scanning and do not go to sleep state.
    `void` | `bcSetMode(int mode)` Set barcode scan mode.
    `void` | `bcSetTimeout(int timeout)` Set barcode timeout.
    `void` | `bcStartScan()` Start barcode scanning.
    `void` | `bcStartUpdateMode(byte[] data)` Set barcode scanner in firmware update mode.
    `void` | `bcStopBeep()` Stop play sounds on barcode scan.
    `void` | `bcStopScan()` Stop barcode scanning.
    `void` | `bcVendorInit(byte[] data)` Set vendor specific initialization command to barcode scanner.
    `void` | `bcWrite(byte[] data)` Write data to barcode module.
    `void` | `beep(int volume, int[] pattern)` Play sounds on device speaker.
    `void` | `beep(int volume, int frequency, int duration)` Play sounds on device speaker.
    `void` | `close()` Close the streams and release all associated resources.
    `void` | `enableBatteryCharge(boolean enable)` Enable mobile device battery charge when device is not powered.
    `void` | `enableExternalSpeaker(boolean on)` Enable external speaker as default audio source.
    `void` | `enableExternalSpeakerButton(boolean on)` Enable external speaker button.
    `void` | `enableMaxCurrent(boolean on)` Enable max current throughput for the gang charger.
    `void` | `enableScanButton(boolean enable)` Enable or disable device scan button.
    `void` | `fwErase()` Erase current firmware.
    `void` | `fwStart()` Start firmware update.
    `void` | `fwStop()` End firmware update.
    `void` | `fwUpdate(byte[] data)` Update firmware.
    `void` | `fwWrite(int address, byte[] data)` Write firmware chunk.
    `int` | `getAutoOffTime(boolean connected)` Get the time after which the device shall automatically goes off.
    `LineaPro.BatteryInfo` | `getBatteryInfo()` Get extended battery information.
    `int` | `getBatteryLevel()` Return device battery level.
    `float` | `getBatteryVoltage()` Return device battery voltage.
    `int` | `getDeviceMode()` Get the device mode.
    `LineaProInformation` | `getInformation()` Get device information.
    `java.util.Calendar` | `getRTC()` Get real time clock.
    `boolean` | `isBatteryChargeEnabled()` Return whether mobile device battery charge is enabled.
    `boolean` | `isExternalSpeakerButtonEnabled()` Get whether external speaker button is enabled.
    `boolean` | `isExternalSpeakerEnabled()` Get whether external speaker is enabled.
    `boolean` | `isMaxCurrentEnabled()` Get whether max current is enabled.
    `boolean` | `isScanButtonEnabled()` Return whether scan button is enabled.
    `RC663` | `rfidGetModule()` Returns instance to RFID module
    `byte[]` | `rfidTransmit(int module, byte[] data)` Transmit data to RFID module.
    `void` | `saveSettings()` Force save settings.
    `void` | `setAutoOffTime(boolean connected, int autoOffTime)` Set the time after which the device shall automatically goes off.
    `void` | `setBarcodeListener(LineaPro.BarcodeListener listener)` Set on barcode listener.
    `void` | `setButtonListener(LineaPro.ButtonListener listener)` Set button switch listener.
    `void` | `setConnectionListener(LineaPro.ConnectionListener listener)` Set a callback listener to notify the connection state is changed.
    `static void` | `setDebug(boolean on)` Turn on/off debugging.
    `void` | `setDeviceMode(int mode)` Set the device mode.
    `void` | `setLED(boolean red, boolean green, boolean blue)` Turn on the LEDs.
    `void` | `setRTC(java.util.Calendar clock)` Set real time clock.
    `void` | `startVibrator(int duration)` Turn on the vibrator for a specified time.
    `void` | `turnOff()` Turn off the device.

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

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

- - ### Field Detail

    - #### BARCODE_MODE_SINGLE_SCAN

          public static final int BARCODE_MODE_SINGLE_SCAN

      Barcode engine into single scan mode.
      See Also:
        Constant Field Values

    - #### BARCODE_MODE_MULTI_SCAN

          public static final int BARCODE_MODE_MULTI_SCAN

      Barcode engine into multiple scan mode.
      See Also:
        Constant Field Values

    - #### BARCODE_MODE_MOTION_DETECT

          public static final int BARCODE_MODE_MOTION_DETECT

      Barcode engine into motion detect mode.
      See Also:
        Constant Field Values

    - #### BARCODE_MODE_SINGLE_SCAN_ON_RELEASE

          public static final int BARCODE_MODE_SINGLE_SCAN_ON_RELEASE

      Barcode engine into single scan mode. The scan is perform on button release.
      See Also:
        Constant Field Values

    - #### BARCODE_MODE_MULTI_SCAN_NO_DUPLICATE

          public static final int BARCODE_MODE_MULTI_SCAN_NO_DUPLICATE

      Barcode engine into multiple scan mode with no duplicates.
      See Also:
        Constant Field Values

    - #### RFID_MODULE_MURATA

          public static final int RFID_MODULE_MURATA

      MURATA RFID chip.
      See Also:
        Constant Field Values

    - #### RFID_MODULE_CLRC663

          public static final int RFID_MODULE_CLRC663

      CLRC663 RFID chip.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LineaPro

          public LineaPro(java.io.InputStream inputStream,
                          java.io.OutputStream outputStream)

      Constructs a new instance of this class from a given streams.
      Parameters:
        `inputStream` - the input stream.
        `outputStream` - the output stream.

  - ### Method Detail

    - #### close

          public void close()
                     throws java.io.IOException

      Close the streams and release all associated resources.
      Throws:
        `java.io.IOException` - If an I/O error occurs.

    - #### setDebug

          public static void setDebug(boolean on)

      Turn on/off debugging.
      Parameters:
        `on` - the debugging state.

    - #### setConnectionListener

          public void setConnectionListener(LineaPro.ConnectionListener listener)

      Set a callback listener to notify the connection state is changed.
      Parameters:
        `listener` - the listener.

    - #### setBarcodeListener

          public void setBarcodeListener(LineaPro.BarcodeListener listener)

      Set on barcode listener.
      Parameters:
        `listener` - the listener.

    - #### setButtonListener

          public void setButtonListener(LineaPro.ButtonListener listener)

      Set button switch listener.
      Parameters:
        `listener` - the listener.

    - #### turnOff

          public void turnOff()
                       throws java.io.IOException,
                              LineaProException

      Turn off the device.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### saveSettings

          public void saveSettings()
                            throws java.io.IOException,
                                   LineaProException

      Force save settings.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### setRTC

          public void setRTC(java.util.Calendar clock)
                      throws java.io.IOException,
                             LineaProException

      Set real time clock.
      Parameters:
        `clock` - RTC value.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### getRTC

          public java.util.Calendar getRTC()
                                    throws java.io.IOException,
                                           LineaProException

      Get real time clock.
      Returns:
        RTC value
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### getInformation

          public LineaProInformation getInformation()
                                             throws java.io.IOException,
                                                    LineaProException

      Get device information.
      Returns:
        Device information.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### getBatteryVoltage

          public float getBatteryVoltage()
                                  throws java.io.IOException,
                                         LineaProException

      Return device battery voltage.
      Returns:
        the battery level in Volts.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### getBatteryLevel

          public int getBatteryLevel()
                              throws java.io.IOException,
                                     LineaProException

      Return device battery level.
      Returns:
        the battery level in percents.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### beep

          public void beep(int volume,
                           int[] pattern)
                    throws java.io.IOException,
                           LineaProException

      Play sounds on device speaker.

      The sounds are played in background.

      Maximum 10 sounds can be set at once.

      Parameters:
        `volume` - the volume in percents.
        `pattern` - the array that contains patterns of frequency(Hz) and duration (milliseconds).
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### beep

          public void beep(int volume,
                           int frequency,
                           int duration)
                    throws java.io.IOException,
                           LineaProException

      Play sounds on device speaker.

      The sounds are played in background.

      Parameters:
        `volume` - the volume in percents.
        `frequency` - the sound frequency in Hertz.
        `duration` - the sound duration in Milliseconds.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### setAutoOffTime

          public void setAutoOffTime(boolean connected,
                                     int autoOffTime)
                              throws java.io.IOException,
                                     LineaProException

      Set the time after which the device shall automatically goes off.
      Parameters:
        `connected` - specify whether the time is related to device which is connected or not.
        `autoOffTime` - the time value in milliseconds.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### getAutoOffTime

          public int getAutoOffTime(boolean connected)
                             throws java.io.IOException,
                                    LineaProException

      Get the time after which the device shall automatically goes off.
      Parameters:
        `connected` - Specify whether the time is related to device which is connected or not.
      Returns:
        The time value in milliseconds.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### getDeviceMode

          public int getDeviceMode()
                            throws java.io.IOException,
                                   LineaProException

      Get the device mode.
      Returns:
        The device mode value: 1 - samsung s4, 2 - samsung s5
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### setDeviceMode

          public void setDeviceMode(int mode)
                             throws java.io.IOException,
                                    LineaProException

      Set the device mode.
      Parameters:
        `mode` - The device mode value: 1 - samsung s4, 2 - samsung s5
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcStartScan

          public void bcStartScan()
                           throws java.io.IOException,
                                  LineaProException

      Start barcode scanning.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcStopScan

          public void bcStopScan()
                          throws java.io.IOException,
                                 LineaProException

      Stop barcode scanning.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcSetTimeout

          public void bcSetTimeout(int timeout)
                            throws java.io.IOException,
                                   LineaProException

      Set barcode timeout.
      Parameters:
        `timeout` - the timeout in milliseconds.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcGetTimeout

          public int bcGetTimeout()
                           throws java.io.IOException,
                                  LineaProException

      Get barcode timeout.
      Returns:
        The barcode timeout in milliseconds.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcSetMode

          public void bcSetMode(int mode)
                         throws java.io.IOException,
                                LineaProException

      Set barcode scan mode.
      Parameters:
        `mode` - the scan mode. The value can be one of BARCODE_MODE_* constant values.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcGetMode

          public int bcGetMode()
                        throws java.io.IOException,
                               LineaProException

      Get barcode scan mode.
      Returns:
        the scan mode. The value can be one of BARCODE_MODE_* constant values.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### enableScanButton

          public void enableScanButton(boolean enable)
                                throws java.io.IOException,
                                       LineaProException

      Enable or disable device scan button.
      Parameters:
        `enable` - true to enable scan button; otherwise false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### isScanButtonEnabled

          public boolean isScanButtonEnabled()
                                      throws java.io.IOException,
                                             LineaProException

      Return whether scan button is enabled.
      Returns:
        true if the scan button is enabled; otherwise returns false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### enableBatteryCharge

          public void enableBatteryCharge(boolean enable)
                                   throws java.io.IOException,
                                          LineaProException

      Enable mobile device battery charge when device is not powered.
      Parameters:
        `enable` - true to enable battery charge; otherwise false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### isBatteryChargeEnabled

          public boolean isBatteryChargeEnabled()
                                         throws java.io.IOException,
                                                LineaProException

      Return whether mobile device battery charge is enabled.
      Returns:
        true if battery charge is enabled; otherwise returns false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcGetEngine

          public java.lang.Object bcGetEngine()
                                       throws java.io.IOException,
                                              LineaProException

      Get barcode engine.
      Returns:
        barcode engine.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcSetBeep

          public void bcSetBeep(int volume,
                                int[] pattern)
                         throws java.io.IOException,
                                LineaProException

      Set the sound to play sounds on barcode scan.

      The sounds are played in background.

      Maximum 10 sounds can be set at once.

      Parameters:
        `volume` - the volume in percents.
        `pattern` - the array that contains patterns of frequency(Hz) and duration (milliseconds).
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcStopBeep

          public void bcStopBeep()
                          throws java.io.IOException,
                                 LineaProException

      Stop play sounds on barcode scan.

      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcRead

          public byte[] bcRead()
                        throws java.io.IOException,
                               LineaProException

      Read data from barcode module.
      Returns:
        the barcode data.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcWrite

          public void bcWrite(byte[] data)
                       throws java.io.IOException,
                              LineaProException

      Write data to barcode module.
      Parameters:
        `data` - the barcode data.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcSetKeepAlive

          public void bcSetKeepAlive(boolean on)
                              throws java.io.IOException,
                                     LineaProException

      Set barcode scanner to be always ready for scanning and do not go to sleep state.
      Parameters:
        `on` - true to keep barcode on; otherwise false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcVendorInit

          public void bcVendorInit(byte[] data)
                            throws java.io.IOException,
                                   LineaProException

      Set vendor specific initialization command to barcode scanner.
      Parameters:
        `data` - vendor specific initialization data, executed ones after a connection is established.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcStartUpdateMode

          public void bcStartUpdateMode(byte[] data)
                                 throws java.io.IOException,
                                        LineaProException

      Set barcode scanner in firmware update mode.
      Parameters:
        `data` - vendor specific data.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### bcRestoreDefaultMode

          public void bcRestoreDefaultMode()
                                    throws java.io.IOException,
                                           LineaProException

      Reset barcode scanner to default state.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### setLED

          public void setLED(boolean red,
                             boolean green,
                             boolean blue)
                      throws java.io.IOException,
                             LineaProException

      Turn on the LEDs. (Linea medical device)
      Parameters:
        `red` - turn on/off the red led.
        `green` - turn on/off the green led.
        `blue` - turn on/off the blue led.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### startVibrator

          public void startVibrator(int duration)
                             throws java.io.IOException,
                                    LineaProException

      Turn on the vibrator for a specified time. (Linea medical device)
      Parameters:
        `duration` - the vibration duration in milliseconds.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### enableExternalSpeaker

          public void enableExternalSpeaker(boolean on)
                                     throws java.io.IOException,
                                            LineaProException

      Enable external speaker as default audio source. (Linea medical device)
      Parameters:
        `on` - true to enable external speaker, otherwise disable it.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### isExternalSpeakerEnabled

          public boolean isExternalSpeakerEnabled()
                                           throws java.io.IOException,
                                                  LineaProException

      Get whether external speaker is enabled.
      Returns:
        true if external speaker is enabled; otherwise returns false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### enableExternalSpeakerButton

          public void enableExternalSpeakerButton(boolean on)
                                           throws java.io.IOException,
                                                  LineaProException

      Enable external speaker button.
      Parameters:
        `on` - true to enable external speaker, otherwise disable it.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### isExternalSpeakerButtonEnabled

          public boolean isExternalSpeakerButtonEnabled()
                                                 throws java.io.IOException,
                                                        LineaProException

      Get whether external speaker button is enabled.
      Returns:
        true if external speaker is enabled; otherwise returns false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### enableMaxCurrent

          public void enableMaxCurrent(boolean on)
                                throws java.io.IOException,
                                       LineaProException

      Enable max current throughput for the gang charger.
      Parameters:
        `on` - true to enable max current, otherwise disable it.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### isMaxCurrentEnabled

          public boolean isMaxCurrentEnabled()
                                      throws java.io.IOException,
                                             LineaProException

      Get whether max current is enabled.
      Returns:
        true if external speaker is enabled; otherwise returns false.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### getBatteryInfo

          public LineaPro.BatteryInfo getBatteryInfo()
                                              throws java.io.IOException,
                                                     LineaProException

      Get extended battery information.
      Returns:
        battery information;
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### rfidTransmit

          public byte[] rfidTransmit(int module,
                                     byte[] data)
                              throws java.io.IOException,
                                     LineaProException

      Transmit data to RFID module.
      Parameters:
        `module` - module type. The parameter can be one of RFID_MODULE_* constant values.
        `data` - data to be send.
      Returns:
        received data.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### rfidGetModule

          public RC663 rfidGetModule()
                              throws java.io.IOException

      Returns instance to RFID module
      Returns:
        RFID module.
      Throws:
        `java.io.IOException` - If an I/O error occurs.

    - #### fwStart

          public void fwStart()
                       throws java.io.IOException,
                              LineaProException

      Start firmware update.

      For AM devices authentication is need.

      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### fwErase

          public void fwErase()
                       throws java.io.IOException,
                              LineaProException

      Erase current firmware.

      This command can be executed only if start firmware update is executed.

      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### fwWrite

          public void fwWrite(int address,
                              byte[] data)
                       throws java.io.IOException,
                              LineaProException

      Write firmware chunk.

      This command can be executed only if start firmware update is executed.

      Parameters:
        `address` - the address to write data.
        `data` - the data chunk. The data size can be maximum of 2044 bytes.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### fwStop

          public void fwStop()
                      throws java.io.IOException,
                             LineaProException

      End firmware update.

      This command can be executed only if start firmware update is executed.

      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.

    - #### fwUpdate

          public void fwUpdate(byte[] data)
                        throws java.io.IOException,
                               LineaProException

      Update firmware.
      Parameters:
        `data` - the firmware data.
      Throws:
        `java.io.IOException` - If an I/O error occurs.
        `LineaProException` - if LineaPro error occurs.