public class MdsDataProvider extends Object implements DataProvider
| Modifier and Type | Class and Description |
|---|---|
static interface |
MdsDataProvider.AsyncDataSource |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
connected |
protected String |
error |
protected String |
experiment |
protected MdsConnection |
mds |
protected boolean |
open |
protected String |
provider |
protected long |
shot |
protected boolean |
use_compression |
protected int |
var_idx |
LOGIN_CANCEL, LOGIN_ERROR, LOGIN_OK| Constructor and Description |
|---|
MdsDataProvider() |
MdsDataProvider(String provider) |
MdsDataProvider(String exp,
int s) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(ConnectionListener l)
Method AddConnectionListener is called by jScope after the instantiation of a
DataProvider implementation, in order to be notified of the status of data
transfer.
|
void |
addUpdateEventListener(UpdateEventListener l,
String event_name)
Method AddUpdateEventListener is called by jScope when asynchronous update on
event is defined.
|
protected void |
CheckConnection() |
protected boolean |
CheckOpen() |
protected boolean |
CheckOpen(String experiment,
long shot,
String defaultNode) |
void |
close()
Method Dispose is called by jScope each time a DataProvider is no more used.
|
protected void |
dispatchConnectionEvent(ConnectionEvent e) |
void |
enableAsyncUpdate(boolean enable) |
protected void |
finalize() |
byte[] |
GetAllFrames(String in_frame) |
MdsDataProvider.AsyncDataSource |
getAsynchSource() |
byte[] |
GetByteArray(String in) |
byte[] |
GetByteArray(String in,
Vector<Descriptor> args) |
protected MdsConnection |
getConnection() |
protected MdsConnection |
getConnection(String arg) |
double[] |
GetDoubleArray(String in) |
String |
getError()
If an error is encountered in the evaluation of a signal (GetWaveData or
GetResampledWaveData returning null or generating IOException), jScope calls
ErrorString method to retrieve the description of the error just occurred.
|
protected String |
GetExperimentName(String in_frame) |
double |
getFloat(String in,
int row,
int col,
int index)
Method GetFloat is called by jScope to evaluate x min, x max, y min, y max
when defined in the stup data source popup form.
|
float[] |
GetFloatArray(String in) |
byte[] |
GetFrameAt(String in_frame,
int frame_idx) |
FrameData |
getFrameData(String in_y,
String in_x,
float time_min,
float time_max)
GetFrameData is called by jScope to retrieve and display a frame sequence.
|
float[] |
GetFrameTimes(String in_frame) |
int[] |
getIntArray(String in) |
protected int[] |
getNumDimensions(String in_y) |
protected String |
getProvider() |
mds.provider.MdsDataProvider.RealArray |
GetRealArray(String in) |
long[] |
getShots(String in,
String experiment)
Evaluate the passed string to provide an array of shot numbers.
|
String |
getString(String _in,
int row,
int col,
int index)
GetString is called by jScope to evaluate title, X label and Y label.
|
String |
getStringValue(String expr) |
WaveData |
getWaveData(String in,
int row,
int col,
int index)
Method GetWaveData called by jScope when a waveform has to be evaluated and
only the Y axis is defined.
|
WaveData |
getWaveData(String in_y,
String in_x,
int col,
int row,
int index)
Method GetWaveData called by jScope when a waveform has to be evaluated and
both X and Y axis are defined.
|
int |
inquireCredentials(JFrame f,
DataServerItem server_item)
Some DataProvider implemenations may require additional information (e.g.
|
boolean |
isBusy()
Can be used to check if provider is busy (helps scheduling).
|
protected boolean |
NotYetNumber(String in) |
protected boolean |
NotYetString(String in) |
void |
removeConnectionListener(ConnectionListener l)
Called by jScope when transfer notification is no more requested.
|
void |
removeUpdateEventListener(UpdateEventListener l,
String event_name)
Method RemoveUpdateEventListeneris called by jScope when the display of a
waveform panel is no more triggered by an event.
|
protected void |
resetPrevious() |
void |
setArgument(String arg)
As DataProvider implementations are instantiated by jScope by means of the
Class.newInstance(), no arguments can be passed to the constructor method.
|
void |
SetCompression(boolean state) |
void |
setEnvironment(String in)
Defines the environment for data retrieval.
|
boolean |
SupportsCompression() |
boolean |
supportsTunneling()
Enable tunneling activation.
|
void |
update(String experiment,
long shot)
Method Update is called by jScope to notify the experiment name and the shot
number.
|
void |
Update(String experiment,
long shot,
boolean resetExperiment) |
protected String provider
protected String experiment
protected long shot
protected boolean open
protected boolean connected
protected final MdsConnection mds
protected String error
protected boolean use_compression
protected int var_idx
public MdsDataProvider()
public MdsDataProvider(String provider)
public MdsDataProvider(String exp, int s)
public void addConnectionListener(ConnectionListener l)
DataProvideraddConnectionListener in interface DataProviderl - The ConnectionListener which has to be notified by means of method
processConnectionEvent(ConnenctionEvent)ConnectionListener,
ConnectionEventpublic void addUpdateEventListener(UpdateEventListener l, String event_name) throws IOException
DataProvideraddUpdateEventListener in interface DataProviderl - The passed instance of UpdateEventListener.event_name - The name of the event for which the UpdateEventListener is
registering.IOExceptionUpdateEventListener,
UpdateEventprotected void CheckConnection()
throws IOException
IOExceptionprotected boolean CheckOpen()
throws IOException
IOExceptionprotected boolean CheckOpen(String experiment, long shot, String defaultNode) throws IOException
IOExceptionpublic void close()
DataProviderclose in interface AutoCloseableclose in interface DataProviderprotected void dispatchConnectionEvent(ConnectionEvent e)
public void enableAsyncUpdate(boolean enable)
public byte[] GetAllFrames(String in_frame) throws IOException
IOExceptionpublic MdsDataProvider.AsyncDataSource getAsynchSource()
public byte[] GetByteArray(String in) throws IOException
IOExceptionpublic byte[] GetByteArray(String in, Vector<Descriptor> args) throws IOException
IOExceptionprotected MdsConnection getConnection()
protected MdsConnection getConnection(String arg)
public double[] GetDoubleArray(String in) throws IOException
IOExceptionpublic String getError()
DataProvidergetError in interface DataProviderpublic double getFloat(String in, int row, int col, int index) throws IOException
DataProvidergetFloat in interface DataProviderin - The specification of the value.IOExceptionpublic float[] GetFloatArray(String in) throws IOException
IOExceptionpublic byte[] GetFrameAt(String in_frame, int frame_idx) throws IOException
IOExceptionpublic FrameData getFrameData(String in_y, String in_x, float time_min, float time_max) throws IOException
DataProvidergetFrameData in interface DataProviderin_y - The frame sequence specification as defined in the frames
field of the setup data popup dialogin_x - The definition of the time specification for the frame list
as defined in the times field of the setup data popup
dialog.time_min - Initial considered time for the frame sequence.time_max - Final considered time for the frame sequence.IOExceptionFrameDatapublic float[] GetFrameTimes(String in_frame)
public int[] getIntArray(String in) throws IOException
IOExceptionprotected int[] getNumDimensions(String in_y) throws IOException
IOExceptionprotected String getProvider()
public mds.provider.MdsDataProvider.RealArray GetRealArray(String in) throws IOException
IOExceptionpublic long[] getShots(String in, String experiment) throws IOException
DataProvidergetShots in interface DataProviderin - The shot(s) specification as typed in the "Shot" field of
jScope panelIOExceptionpublic String getString(String _in, int row, int col, int index) throws IOException
DataProvidergetString in interface DataProvider_in - The specification of the label or title.IOExceptionpublic String getStringValue(String expr) throws IOException
IOExceptionpublic WaveData getWaveData(String in, int row, int col, int index)
DataProvidergetWaveData in interface DataProviderin - The specification of the signal, typed in the Y axis field of
the setup data source popup form, or in the lower right window
of jScope.row - Row number of the corresponding panelcol - Column number of the corresponding panelindex - Index the corresponding panelWaveDatapublic WaveData getWaveData(String in_y, String in_x, int col, int row, int index)
DataProvidergetWaveData in interface DataProviderin_y - Y axis specification as typed in the setup data source popupo
dialog.in_x - X axis specification as typed in the setup data source popupo
dialog.col - Row number of the corresponding panelrow - Column number of the corresponding panelindex - Index the corresponding panelWaveDatapublic int inquireCredentials(JFrame f, DataServerItem server_item)
DataProviderinquireCredentials in interface DataProviderf - The container Frame.public boolean isBusy()
DataProviderisBusy in interface DataProviderprotected boolean NotYetNumber(String in)
protected boolean NotYetString(String in)
public void removeConnectionListener(ConnectionListener l)
DataProviderremoveConnectionListener in interface DataProviderl - The previously registered ConnectionListener.ConnectionListenerpublic void removeUpdateEventListener(UpdateEventListener l, String event_name) throws IOException
DataProviderremoveUpdateEventListener in interface DataProviderl - The instance of UpdateEventListener previously registered.event_name - The event to which the listener was previously registered.IOExceptionUpdateEventListenerprotected void resetPrevious()
public void setArgument(String arg) throws IOException
DataProvidersetArgument in interface DataProviderarg - The argument passed to the DataProvider implementation.IOExceptionpublic void SetCompression(boolean state)
public void setEnvironment(String in) throws IOException
DataProvidersetEnvironment in interface DataProviderin - The variable definition expressed as name value pair.IOExceptionpublic boolean SupportsCompression()
public boolean supportsTunneling()
DataProvidersupportsTunneling in interface DataProviderpublic void update(String experiment, long shot)
DataProviderupdate in interface DataProviderexperiment - The experiment namepublic void Update(String experiment, long shot, boolean resetExperiment)
Copyright © 2023. All rights reserved.