com.unitech.lib.htx.protocol

## Class ProtocolHT730

- java.lang.Object
- - com.unitech.lib.reader.protocol.Protocol
  - - com.unitech.lib.htx.protocol.ProtocolHT730

- All Implemented Interfaces:
    IProtocol

      public class ProtocolHT730
      extends Protocol

- - ### Field Summary

    - ### Fields inherited from class com.unitech.lib.reader.protocol.Protocol

      `_baseTransport, _lastError, DEBUG, DETAIL, INFO, IO, TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtocolHT730(BaseTransport baseTransport, IProtocolEventListener listener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearBuffer()`
    `ResultCode` | `post(byte[] data)` Send data to module
    `int` | `read(byte[] data, int length)`
    `Response` | `send(byte[] data, int timeout)` Send the data to module and receive the response
    `boolean` | `start()`
    `void` | `stop()`
    `void` | `triggerEvent(int cmd, int sub, java.lang.Object data)`
    `int` | `write(byte[] data, int length)`

    - ### Methods inherited from class com.unitech.lib.reader.protocol.Protocol

      `getTransport`

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

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

- - ### Constructor Detail

    - #### ProtocolHT730

          public ProtocolHT730(BaseTransport baseTransport,
                               IProtocolEventListener listener)

  - ### Method Detail

    - #### start

          public boolean start()

      Specified by:
        `start` in class `Protocol`

    - #### stop

          public void stop()

      Specified by:
        `stop` in class `Protocol`

    - #### post

          public ResultCode post(byte[] data)

      Description copied from interface: `IProtocol`
      Send data to module
      Parameters:
        `data` - The byte array to send to module.
      Returns:
        The result of post

    - #### send

          public Response send(byte[] data,
                               int timeout)

      Description copied from interface: `IProtocol`
      Send the data to module and receive the response
      Parameters:
        `data` - The byte array to send to module.
        `timeout` - The timeout value to receive the response and unit is millisecond.
      Returns:
        The Response class contain the response from module

    - #### read

          public int read(byte[] data,
                          int length)

    - #### clearBuffer

          public void clearBuffer()

    - #### write

          public int write(byte[] data,
                           int length)

    - #### triggerEvent

          public void triggerEvent(int cmd,
                                   int sub,
                                   java.lang.Object data)