Module vcr4j.rs422

Class CommandToBytes

java.lang.Object
org.mbari.vcr4j.rs422.commands.CommandToBytes

public class CommandToBytes extends Object
This utility class converts VideoCommand objects to the appropriate byte commands used by RS422.
Since:
2016-01-28T14:25:00
Author:
Brian Schlining
  • Method Details

    • apply

      public static byte[] apply(VideoCommand cmd)
    • toBytes

      public static byte[] toBytes(VideoCommands cmd)
    • toBytes

      public static byte[] toBytes(RS422VideoCommands cmd)
    • toBytes

      public static byte[] toBytes(PresetTimecodeCmd cmd)
    • toBytes

      public static byte[] toBytes(PresetUserbitsCmd cmd)
    • toBytes

      public static byte[] toBytes(SeekElapsedTimeCmd cmd)
    • toBytes

      public static byte[] toBytes(SeekTimecodeCmd cmd)
    • toBytes

      public static byte[] toBytes(SeekTimestampCmd cmd)
    • toBytes

      public static byte[] toBytes(ShuttleCmd cmd)
    • timecodeToBytes

      public static byte[] timecodeToBytes(Timecode timecode)
    • byteArrayToString

      public static final String byteArrayToString(byte[] b)
      Converts a byte array to a nicely formatted string. Useful for debugging using System.out
      Parameters:
      b - A byte array to view as a string
      Returns:
      The byte array formatted as a string
    • intToTime

      public static byte intToTime(int time)
      Convert an int value to a timecode byte that can be used in sending a seekTimecode command.
      Parameters:
      time - An integer value representing time (hour, minute, second, or frame)
      Returns:
      The byte representiation of that time as a value recognized by a VCR.