Package uk.ac.gda.client.live.stream
Class LiveStreamWrapper
java.lang.Object
uk.ac.gda.client.live.stream.LiveStreamWrapper
- All Implemented Interfaces:
org.eclipse.january.dataset.IDatasetConnector,org.eclipse.january.dataset.IDynamicShape,org.eclipse.january.dataset.IFileConnection
public class LiveStreamWrapper
extends Object
implements org.eclipse.january.dataset.IDatasetConnector
Wraps an
IDatasetConnector with reference counting to allow it to be shared by multiple connections.-
Field Summary
Fields inherited from interface org.eclipse.january.dataset.IDynamicShape
UNLIMITED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataListener(org.eclipse.january.dataset.IDataListener l) connect()Connect to an existing dataset.
Callers should useisConfigCompatible(CameraConfiguration, StreamType)to check that the wrapped stream is compatible before calling this function.voidvoidintorg.eclipse.january.dataset.ILazyDatasetint[]getPath()booleanisConfigCompatible(CameraConfiguration cameraConfig, StreamType streamType) Check that the givenCameraConfigurationinvalid input: '&'StreamTypeare compatible with the values used to create this wrapper.booleanbooleanvoidremoveDataListener(org.eclipse.january.dataset.IDataListener l) booleanresize(int... newShape) voidsetDatasetName(String datasetName) voidsetMaxShape(int... maxShape) voidvoidsetWritingExpected(boolean expectWrite) voidstartUpdateChecker(int milliseconds, org.eclipse.january.dataset.IDatasetChangeChecker checker) toString()
-
Constructor Details
-
LiveStreamWrapper
-
-
Method Details
-
connect
Connect to an existing dataset.
Callers should useisConfigCompatible(CameraConfiguration, StreamType)to check that the wrapped stream is compatible before calling this function.- Specified by:
connectin interfaceorg.eclipse.january.dataset.IDatasetConnector- Throws:
org.eclipse.january.DatasetException
-
disconnect
public void disconnect()- Specified by:
disconnectin interfaceorg.eclipse.january.dataset.IDatasetConnector
-
isConfigCompatible
Check that the givenCameraConfigurationinvalid input: '&'StreamTypeare compatible with the values used to create this wrapper.We check the parameters that are used to create the stream, not the ones that are GUI-related.
-
getConnectionCount
public int getConnectionCount() -
toString
-
getPath
- Specified by:
getPathin interfaceorg.eclipse.january.dataset.IFileConnection
-
setPath
- Specified by:
setPathin interfaceorg.eclipse.january.dataset.IFileConnection
-
getDataset
public org.eclipse.january.dataset.ILazyDataset getDataset()- Specified by:
getDatasetin interfaceorg.eclipse.january.dataset.IDynamicShape
-
resize
public boolean resize(int... newShape) - Specified by:
resizein interfaceorg.eclipse.january.dataset.IDynamicShape
-
getMaxShape
public int[] getMaxShape()- Specified by:
getMaxShapein interfaceorg.eclipse.january.dataset.IDynamicShape
-
setMaxShape
public void setMaxShape(int... maxShape) - Specified by:
setMaxShapein interfaceorg.eclipse.january.dataset.IDynamicShape
-
startUpdateChecker
public void startUpdateChecker(int milliseconds, org.eclipse.january.dataset.IDatasetChangeChecker checker) - Specified by:
startUpdateCheckerin interfaceorg.eclipse.january.dataset.IDynamicShape
-
refreshShape
public boolean refreshShape()- Specified by:
refreshShapein interfaceorg.eclipse.january.dataset.IDynamicShape
-
addDataListener
public void addDataListener(org.eclipse.january.dataset.IDataListener l) - Specified by:
addDataListenerin interfaceorg.eclipse.january.dataset.IDynamicShape
-
removeDataListener
public void removeDataListener(org.eclipse.january.dataset.IDataListener l) - Specified by:
removeDataListenerin interfaceorg.eclipse.january.dataset.IDynamicShape
-
fireDataListeners
public void fireDataListeners()- Specified by:
fireDataListenersin interfaceorg.eclipse.january.dataset.IDynamicShape
-
getDatasetName
- Specified by:
getDatasetNamein interfaceorg.eclipse.january.dataset.IDatasetConnector
-
setDatasetName
- Specified by:
setDatasetNamein interfaceorg.eclipse.january.dataset.IDatasetConnector
-
setWritingExpected
public void setWritingExpected(boolean expectWrite) - Specified by:
setWritingExpectedin interfaceorg.eclipse.january.dataset.IDatasetConnector
-
isWritingExpected
public boolean isWritingExpected()- Specified by:
isWritingExpectedin interfaceorg.eclipse.january.dataset.IDatasetConnector
-
connect
- Specified by:
connectin interfaceorg.eclipse.january.dataset.IDatasetConnector- Throws:
org.eclipse.january.DatasetException
-