Module vcr4j.rs422

Class RS422Error

java.lang.Object
org.mbari.vcr4j.rs422.RS422Error
All Implemented Interfaces:
VideoError

public class RS422Error extends Object implements VideoError
  • Field Details

    • OTHER_ERROR

      public static final int OTHER_ERROR
      See Also:
    • CHECKSUM_ERROR

      public static final int CHECKSUM_ERROR
      SONY - Checksum error in the command sent
      See Also:
    • FRAMING_ERROR

      public static final int FRAMING_ERROR
      SONY - VCR reports a serial framing error
      See Also:
    • OK

      public static final int OK
      Everything is OK
      See Also:
    • OVERRUN_ERROR

      public static final int OVERRUN_ERROR
      SONY - Overran the VCR's command buffer
      See Also:
    • PARITY_ERROR

      public static final int PARITY_ERROR
      SONY - Parity error on a command byte
      See Also:
    • TIMEOUT

      public static final int TIMEOUT
      SONY - VCR reports Timeout on recieving command
      See Also:
    • UNDEFINED_COMMAND

      public static final int UNDEFINED_COMMAND
      SONY - Invalid command sent to VCR
      See Also:
  • Constructor Details

    • RS422Error

      public RS422Error(int error)
    • RS422Error

      public RS422Error(int error, VideoCommand<?> videoCommand)
    • RS422Error

      public RS422Error(String errorMsg)
    • RS422Error

      public RS422Error(String errorMsg, VideoCommand<?> videoCommand)
    • RS422Error

      public RS422Error(int error, String errorMsg, VideoCommand<?> videoCommand)
  • Method Details

    • isChecksumError

      public boolean isChecksumError()
    • getError

      public int getError()
      Although this is a potentially useful method. Most programs will be getter served by the getErrorMsg() or toString() methods.
      Returns:
      the integer error code
    • hasError

      public boolean hasError()
      Specified by:
      hasError in interface VideoError
      Returns:
      true if an error condition occurred in response to a command
    • isFramingError

      public boolean isFramingError()
    • isOK

      public boolean isOK()
    • isOverrunError

      public boolean isOverrunError()
    • isParityError

      public boolean isParityError()
    • isTimeout

      public boolean isTimeout()
    • isUndefinedCommand

      public boolean isUndefinedCommand()
    • getVideoCommand

      public Optional<VideoCommand<?>> getVideoCommand()
      Specified by:
      getVideoCommand in interface VideoError
      Returns:
      The command that triggered the error
    • getMessage

      public String getMessage()
    • equals

      public boolean equals(Object o)
      RS422Error objects are equal if they have the same error code
      Overrides:
      equals in class Object
      Parameters:
      o - The object to be compared
      Returns:
      true if equals
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object