Module vcr4j.rs422

Class UserbitsAsTimeDecorator

java.lang.Object
org.mbari.vcr4j.rs422.decorators.UserbitsAsTimeDecorator
All Implemented Interfaces:
Decorator

public class UserbitsAsTimeDecorator extends Object implements Decorator
Decorator that listens for RequestUserbitsAsTimeCmds. Usage:
 VideoIO<RS422State, RS422Error> io = // ...
 UserbitsAsTimeDecorator decorator = new UserbitsAsTimeDecorator(io);
 decorator.getIndexObservable().subscribe(index -> doSomething());

 io.send(RequestUserbitsAsTimeCmd.COMMAND);
 
This classes indexObservable will have VideoIndexs with both timestamp and timecode fields set.
Since:
2016-01-29T15:06:00
Author:
Brian Schlining
  • Constructor Details

    • UserbitsAsTimeDecorator

      public UserbitsAsTimeDecorator(VCRVideoIO io)
  • Method Details

    • userbitsAsInstant

      public static Instant userbitsAsInstant(byte[] userbits)
    • getIndexObservable

      public io.reactivex.rxjava3.core.Observable<VideoIndex> getIndexObservable()
      When using this decorator, use this indexObservable to get VideoIndexs that containg both timecode and timestamp
      Returns:
      An observable that contains both timecode and timestamp (calculated from userbits)
    • unsubscribe

      public void unsubscribe()
      Specified by:
      unsubscribe in interface Decorator