java.lang.Object
org.mbari.vcr4j.rs422.RS422VideoIO
- All Implemented Interfaces:
Closeable,AutoCloseable,VCRVideoIO,VideoIO<RS422State,RS422Error>
- Since:
- 2016-01-29T16:42:00
- Author:
- Brian Schlining
-
Constructor Summary
ConstructorsConstructorDescriptionRS422VideoIO(InputStream inputStream, OutputStream outputStream, long ioDelay) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.subjects.Subject<VideoCommand<?>>io.reactivex.rxjava3.core.Observable<RS422Error>io.reactivex.rxjava3.core.Observable<VideoIndex>protected InputStreamprotected OutputStreamprotected RS422ResponseParserio.reactivex.rxjava3.core.Observable<RS422State>io.reactivex.rxjava3.core.Observable<RS422Timecode>io.reactivex.rxjava3.core.Observable<RS422Userbits>protected voidreadResponse(byte[] mostRecentCommand, VideoCommand videoCommand) Reads the response to a command from the serial port connected to the VCR.<A extends VideoCommand<?>>
voidsend(A videoCommand) protected voidsendCommand(byte[] command, VideoCommand<?> videoCommand) Sends a command, in the format of a byte[], to the VCR.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mbari.vcr4j.VideoIO
close, getConnectionID
-
Constructor Details
-
RS422VideoIO
- Parameters:
inputStream- The serialPorts inputstreamoutputStream- The serialPorts outputstreamioDelay- The amount of millisecs to wait between request and responses. RXTX seems to need about 10 Purejavacomm about 100.
-
-
Method Details
-
readResponse
protected void readResponse(byte[] mostRecentCommand, VideoCommand videoCommand) throws IOException, RS422Exception, InterruptedException Reads the response to a command from the serial port connected to the VCR. -
send
- Specified by:
sendin interfaceVideoIO<RS422State,RS422Error>
-
sendCommand
Sends a command, in the format of a byte[], to the VCR.- Parameters:
command- The command to send to the VCR
-
getCommandSubject
- Specified by:
getCommandSubjectin interfaceVideoIO<RS422State,RS422Error>
-
getErrorObservable
- Specified by:
getErrorObservablein interfaceVideoIO<RS422State,RS422Error>
-
getIndexObservable
- Specified by:
getIndexObservablein interfaceVideoIO<RS422State,RS422Error> - Returns:
- An Observable for the VideoIndex. If the device is recording, the VideoIndex will also have a timestamp from the computers clock as well as a timecode. Otherwise, only a timecode will be included.
-
getInputStream
-
getOutputStream
-
getResponseParser
-
getStateObservable
- Specified by:
getStateObservablein interfaceVideoIO<RS422State,RS422Error>
-
getTimecodeObservable
- Specified by:
getTimecodeObservablein interfaceVCRVideoIO
-
getUserbitsObservable
- Specified by:
getUserbitsObservablein interfaceVCRVideoIO
-