Interface TrcI2cDevice.CompletionHandler

Enclosing class:
TrcI2cDevice

public static interface TrcI2cDevice.CompletionHandler
The client of this class provides this interface if it wants to be notified when a read or write operation has been completed.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    readCompletion(int regAddress, int length, double timestamp, byte[] data, boolean timedout)
    This method is called when the read operation has been completed.
    void
    writeCompletion(int regAddress, int length, boolean timedout)
    This method is called when the write operation has been completed.
  • Method Details

    • readCompletion

      boolean readCompletion(int regAddress, int length, double timestamp, byte[] data, boolean timedout)
      This method is called when the read operation has been completed.
      Parameters:
      regAddress - specifies the starting register address.
      length - specifies the number of bytes read.
      timestamp - specified the timestamp of the data retrieved.
      data - specifies the data byte array.
      timedout - specifies true if the operation was timed out, false otherwise.
      Returns:
      true if the request should be repeated, false otherwise.
    • writeCompletion

      void writeCompletion(int regAddress, int length, boolean timedout)
      This method is called when the write operation has been completed.
      Parameters:
      regAddress - specifies the starting register address.
      length - specifies the number of bytes read.
      timedout - specifies true if the operation was timed out, false otherwise.