Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-.NET | API-Java | Examples | Downloads
page generated on 31.05.2023 - 04:45
Static Public Member Functions | List of all members
de.desy.tine.histUtils.THistory Class Reference

THistory is a utility class with numerous static methods for access archive data from either the central archive system of the local history subsystems of targeted servers. More...

Static Public Member Functions

static void setPreferCentralSource (boolean value)
 Establishes a preference for central archive data over local history data in archive calls if this setting is 'true'. More...
 
static void setPreferLocalSource (boolean value)
 Establishes a preference for local history data over central archive data in archive calls if this setting is 'true'. More...
 
static synchronized int getAnnotationTimes (String context, String property, double start, double stop, double[] data, int timeout)
 
static synchronized int getAnnotationTimes (String context, String server, String property, double start, double stop, double[] data, int timeout)
 
static synchronized int getAnnotationTimes (String context, String property, double start, double stop, double[] data, boolean[] isActive, int timeout)
 
static synchronized int getAnnotationTimes (String context, String server, String property, double start, double stop, double[] data, boolean[] isActive, int timeout)
 
static synchronized int getAnnotation (String context, String property, double target, String[] data, int timeout)
 Gets an annotation from the central archive at a selected time. More...
 
static synchronized int getAnnotation (String context, String server, String property, double target, String[] data, int timeout)
 Gets an annotation at a selected time. More...
 
static synchronized int setAnnotation (String context, String text)
 Annotates the designated context in the central archive at the current time. More...
 
static synchronized int setAnnotation (String context, String property, String text)
 Annotates the designated record property in the central archive at the current time. More...
 
static synchronized int setAnnotation (String context, String property, double targetTime, String text, int timeout)
 Annotates the designated record property in the central archive. More...
 
static synchronized int setAnnotation (String context, String property, double targetTime, String text, boolean keepAlive, int timeout)
 Annotates the designated record property in the central archive. More...
 
static synchronized int setAnnotation (String context, String server, String property, double targetTime, String text, boolean keepAlive, int timeout)
 Annotates the designated record property in the central archive. More...
 
static int getTrendData (String context, String server, String property, String device, int index, int fieldIndex, int depthInSeconds, int interval, TCompoundDataObject[] data)
 Gets the current trend of the targeted address. More...
 
static int getArchivedData (String context, String server, String property, String device, double start, double stop, TCompoundDataObject[] data)
 Retrieves an archive data set. More...
 
static int getArchivedData (String context, String server, String property, String device, double start, double stop, TCompoundDataObject[] data, THistorySource src, int timeout)
 Retrieves an archive data set. More...
 
static int getArchivedData (String context, String server, String property, String device, int index, int fieldindex, double start, double stop, TCompoundDataObject[] data, THistorySource src, int timeout, boolean extendedRange)
 Retrieves an archive data set. More...
 
static int getArchivedData (String context, String server, String property, String device, int index, double start, double stop, TCompoundDataObject[] data)
 Retrieves an archive data set. More...
 
static int getArchivedData (String context, String server, String property, String device, int index, double start, double stop, TCompoundDataObject[] data, int timeout)
 Retrieves an archive data set. More...
 
static int getArchivedData (String context, String server, String property, String device, int index, int sample, double start, double stop, TCompoundDataObject[] data, int timeout)
 Retrieves an archive data set. More...
 
static int getArchivedData (String context, String server, String property, String device, int index, int sample, double start, double stop, TCompoundDataObject[] data, int timeout, boolean extendedRange)
 Retrieves an archive data set. More...
 
static int getNumPointsInInterval (String context, String server, String property, String device, double start, double stop)
 Retrieves the total number of stored data points in the interval specified. More...
 
static int getNumPointsInInterval (String context, String server, String property, String device, double start, double stop, int timeout)
 Retrieves the total number of stored data points in the interval specified. More...
 
static int getArchivedSnapshot (String context, String server, String property, String device, double[] targetTime, String[] data)
 Retrieves an archived data array 'snapshot' at the time specified. More...
 
static int getArchivedSnapshot (String context, String server, String property, String device, double[] targetTime, IMAGE data)
 Retrieves an archived data array 'snapshot' at the time specified. More...
 
static int getArchivedSnapshot (String context, String server, String property, String device, double[] targetTime, float[] data)
 Retrieves an archived data array 'snapshot' at the time specified. More...
 
static String[] getArchivedProperties (String context)
 Retrieve a list of properties archived by the central archive server for the context given. More...
 
static String[] getArchivedProperties (String context, String server)
 Retrieve a list of properties archived by the given server. More...
 
static String[] getArchivedProperties (String context, String server, String subsystem)
 Retrieve a list of properties archived by the given server. More...
 
static HstPrp[] getArchivedPropertyList (String context, String server, String subsystem)
 Retrieve a list of properties archived by the given server as a list of HstPrp instances, where additional information is returned along with the property name. More...
 
static String[] getArchivedDevices (String context, String server, String property)
 Retrieve a list of archived devices for the given server and property. More...
 
static String[] getArchivedSubsystems (String context)
 Retrieve a list of available subsystems at the central archive server for the given context. More...
 
static String[] getArchiveServerContexts ()
 Retrieve a list of available contexts where a central archive server exists. More...
 
static String[] getArchiveServerContexts (String importance)
 Retrieve a list of available contexts where a central archive server exists and has the importance specified. More...
 

Detailed Description

THistory is a utility class with numerous static methods for access archive data from either the central archive system of the local history subsystems of targeted servers.


Author
duval

Member Function Documentation

◆ getAnnotation() [1/2]

static synchronized int de.desy.tine.histUtils.THistory.getAnnotation ( String  context,
String  property,
double  target,
String[]  data,
int  timeout 
)
static

Gets an annotation from the central archive at a selected time.

Parameters
contextis the context of the Central Archive Server
propertyis the targeted record keyword name
targetis the desired annotation time
datais the annotation text as a string array
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code

◆ getAnnotation() [2/2]

static synchronized int de.desy.tine.histUtils.THistory.getAnnotation ( String  context,
String  server,
String  property,
double  target,
String[]  data,
int  timeout 
)
static

Gets an annotation at a selected time.

Parameters
contextis the context of the target server
serveris the targeted device server name. If null then the central archive server is assumed.
propertyis the targeted archive property
targetis the desired annotation time
datais the annotation text as a string array
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code

References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getAnnotationTimes() [1/4]

static synchronized int de.desy.tine.histUtils.THistory.getAnnotationTimes ( String  context,
String  property,
double  start,
double  stop,
double[]  data,
boolean[]  isActive,
int  timeout 
)
static
Parameters
contextis the context of the targeted central archive server
propertyis the targeted archive keyword.
startis a UTC double giving the start of the desired range
stopis a UTC double giving the end of the desired range
datais an array of UTC doubles giving the time stamps of any annotations for in the range given. These timestamps can then be used in calls to getAnnotation().
isActiveis a boolean array whose contents determine whether the annotation in question is an 'active' annotation or not.
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code.

References de.desy.tine.histUtils.THistory.getAnnotationTimes().

◆ getAnnotationTimes() [2/4]

static synchronized int de.desy.tine.histUtils.THistory.getAnnotationTimes ( String  context,
String  property,
double  start,
double  stop,
double[]  data,
int  timeout 
)
static
Parameters
contextis the context of the targeted central archive server
propertyis the targeted archive keyword
startis a UTC double giving the start of the desired range
stopis a UTC double giving the end of the desired range
datais an array of UTC doubles giving the time stamps of any annotations for in the range given. These timestamps can then be used in calls to getAnnotation().
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code.

Referenced by de.desy.tine.histUtils.THistory.getAnnotationTimes().

◆ getAnnotationTimes() [3/4]

static synchronized int de.desy.tine.histUtils.THistory.getAnnotationTimes ( String  context,
String  server,
String  property,
double  start,
double  stop,
double[]  data,
boolean[]  isActive,
int  timeout 
)
static
Parameters
contextis the context of the target server
serveris the targeted device server name. If null then the central archive server is assumed.
propertyis the targeted archive property
startis a UTC double giving the start of the desired range
stopis a UTC double giving the end of the desired range
datais an array of UTC doubles giving the time stamps of any annotations for in the range given. These timestamps can then be used in calls to getAnnotation().
isActiveis a boolean array whose contents determine whether the annotation in question is an 'active' annotation or not.
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code.

References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getAnnotationTimes() [4/4]

static synchronized int de.desy.tine.histUtils.THistory.getAnnotationTimes ( String  context,
String  server,
String  property,
double  start,
double  stop,
double[]  data,
int  timeout 
)
static
Parameters
contextis the context of the target server
serveris the targeted device server name. If null then the central archive server is assumed.
propertyis the targeted archive property
startis a UTC double giving the start of the desired range
stopis a UTC double giving the end of the desired range
datais an array of UTC doubles giving the time stamps of any annotations for in the range given. These timestamps can then be used in calls to getAnnotation().
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code.

References de.desy.tine.histUtils.THistory.getAnnotationTimes().

◆ getArchivedData() [1/7]

static int de.desy.tine.histUtils.THistory.getArchivedData ( String  context,
String  server,
String  property,
String  device,
double  start,
double  stop,
TCompoundDataObject[]  data 
)
static

Retrieves an archive data set.

Retrieve an archive data set (value - timestamp pairs) for the target property and device given and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
datais a reference to a (doublet) data array object to contain the returned data. This can be one of FLTINT[], DBLDBL[], NAME64I[], and so on. The array should be dimensioned to the maximum number of points desired (effectively determining a raster over which the archived data will be distributed.
The reference object can also be an array of HISTORY[] object instances, which have been constructed with the desired data type (usually a compound data type) to be returned.
The number of points returned in the call will often be less than array dimension so one should pay attention to the return value of the call.
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

◆ getArchivedData() [2/7]

static int de.desy.tine.histUtils.THistory.getArchivedData ( String  context,
String  server,
String  property,
String  device,
double  start,
double  stop,
TCompoundDataObject[]  data,
THistorySource  src,
int  timeout 
)
static

Retrieves an archive data set.

Retrieve an archive data set (value - timestamp pairs) for the target property and device given and over the time range specified. Both the central archive and local archive are queried for the number of stored points over the interval. Data are usually retrieved from the central archive system if there are at least 500 points over the time interval in question. Otherwise the local archive system is used. By examining the THistorySource object one can see which source was chosen and how many points both sources have over the interval. For dedicated retrieval from one source or the other, please use an overloaded method which does not take the THistorySource parameter!

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
datais a reference to a (doublet) data array object to contain the returned data. This can be one of FLTINT[], DBLDBL[], NAME64I[], and so on. The array should be dimensioned to the maximum number of points desired (effectively determining a raster over which the archived data will be distributed. The reference object can also be an array of HISTORY[] object instances, which have been constructed with the desired data type (usually a compound data type) to be returned.
The src parameter will give the exact number of points actually stored over the interval specified. The number of points returned in the call will often be less than array dimension and less than the exact number of points stored over the interval.
srcis a reference to a THistorySource object to receive the history source information.
timeoutgives the number of milliseconds to wait for the call to complete (usually 1000 is sufficient).
Returns
0 upon success or a TINE error code.

◆ getArchivedData() [3/7]

static int de.desy.tine.histUtils.THistory.getArchivedData ( String  context,
String  server,
String  property,
String  device,
int  index,
double  start,
double  stop,
TCompoundDataObject[]  data 
)
static

Retrieves an archive data set.

Retrieve an archive data set (value - timestamp pairs) for the target property and device given and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
indexis the desired array element index (if the data source represents an array)
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
datais a reference to a (doublet) data array object to contain the returned data. This can be one of FLTINT[], DBLDBL[], NAME64I[], and so on. The array should be dimensioned to the maximum number of points desired (effectively determining a raster over which the archived data will be distributed.
The reference object can also be an array of HISTORY[] object instances, which have been constructed with the desired data type (usually a compound data type) to be returned.
The number of points returned in the call will often be less than array dimension so one should pay attention to the return value of the call.
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

◆ getArchivedData() [4/7]

static int de.desy.tine.histUtils.THistory.getArchivedData ( String  context,
String  server,
String  property,
String  device,
int  index,
double  start,
double  stop,
TCompoundDataObject[]  data,
int  timeout 
)
static

Retrieves an archive data set.

Retrieve an archive data set (value - timestamp pairs) for the target property and device given and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
indexis the desired array element index (if the data source represents an array)
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
datais a reference to a (doublet) data array object to contain the returned data. This can be one of FLTINT[], DBLDBL[], NAME64I[], and so on. The array should be dimensioned to the maximum number of points desired (effectively determining a raster over which the archived data will be distributed.
The reference object can also be an array of HISTORY[] object instances, which have been constructed with the desired data type (usually a compound data type) to be returned.
The number of points returned in the call will often be less than array dimension so one should pay attention to the return value of the call.
timeoutgives the number of milliseconds to wait for the call to complete (usually 1000 is sufficient).
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

◆ getArchivedData() [5/7]

static int de.desy.tine.histUtils.THistory.getArchivedData ( String  context,
String  server,
String  property,
String  device,
int  index,
int  fieldindex,
double  start,
double  stop,
TCompoundDataObject[]  data,
THistorySource  src,
int  timeout,
boolean  extendedRange 
)
static

Retrieves an archive data set.

Retrieve an archive data set (value - timestamp pairs) for the target property and device given and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
indexis the desired array element index (if the data source represents an array)
fieldindexis the desired data type field index (if the stored data is a compound data type or a structure.
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
datais a reference to a (doublet) data array object to contain the returned data. This can be one of FLTINT[], DBLDBL[], NAME64I[], and so on. The array should be dimensioned to the maximum number of points desired (effectively determining a raster over which the archived data will be distributed.
The reference object can also be an array of HISTORY[] object instances, which have been constructed with the desired data type (usually a compound data type) to be returned.
The number of points returned in the call will often be less than array dimension so one should pay attention to the return value of the call.
srcis the THistorySource object reference, which gives information about the history source used in accessing and returning data.
timeoutis the amount of time (milliseconds) to wait for the history call to complete.
extendedRangeif 'true' adds an amount of time (twice the archive heartbeat) to each end of the given time range. This will usually ensure that a plotted trend will be able to extend itself to the boundaries of a graphical display.
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

References de.desy.tine.dataUtils.TDataTime.toString().

◆ getArchivedData() [6/7]

static int de.desy.tine.histUtils.THistory.getArchivedData ( String  context,
String  server,
String  property,
String  device,
int  index,
int  sample,
double  start,
double  stop,
TCompoundDataObject[]  data,
int  timeout 
)
static

Retrieves an archive data set.

Retrieve an archive data set (value - timestamp pairs) for the target property and device given and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
sampleis the desired raster sample. Passing a '0' will instruct the targeted server to select a raster which will best fill in the desired time range. If (e.g.) a '1' is passed then no raster will be used. This means that the desired 'stop' time may not have been reached. Thus the returned data need to be examined in order to determine whether the call should be repeated (after adjusting the 'start' time).
datais a reference to a HISTORY[] data array object to contain the returned data. This object passed should be an array of HISTORY instances, which have been constructed with the desired data type (usually a compound data type) to be returned. The array should be dimensioned to the maximum number of points desired (effectively determining a raster over which the archived data will be distributed.
The number of points returned in the call will often be less than array dimension so one should pay attention to the return value of the call.
timeoutgives the number of milliseconds to wait for the call to complete (usually 1000 is sufficient).
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

◆ getArchivedData() [7/7]

static int de.desy.tine.histUtils.THistory.getArchivedData ( String  context,
String  server,
String  property,
String  device,
int  index,
int  sample,
double  start,
double  stop,
TCompoundDataObject[]  data,
int  timeout,
boolean  extendedRange 
)
static

Retrieves an archive data set.

Retrieve an archive data set (value - timestamp pairs) for the target property and device given and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
sampleis the desired raster sample. Passing a '0' will instruct the targeted server to select a raster which will best fill in the desired time range. If (e.g.) a '1' is passed then no raster will be used. This means that the desired 'stop' time may not have been reached. Thus the returned data need to be examined in order to determine whether the call should be repeated (after adjusting the 'start' time).
datais a reference to a HISTORY[] data array object to contain the returned data. This object passed should be an array of HISTORY instances, which have been constructed with the desired data type (usually a compound data type) to be returned. The array should be dimensioned to the maximum number of points desired (effectively determining a raster over which the archived data will be distributed.
The number of points returned in the call will often be less than array dimension so one should pay attention to the return value of the call.
timeoutgives the number of milliseconds to wait for the call to complete (usually 1000 is sufficient).
extendedRangeif 'true' signals that the call should begin searching for points 2 heartbeat intervals prior to the given start time and end 2 heartbeat intervals past the given stop time.
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

◆ getArchivedDevices()

static String [] de.desy.tine.histUtils.THistory.getArchivedDevices ( String  context,
String  server,
String  property 
)
static

Retrieve a list of archived devices for the given server and property.

Parameters
contextis the targeted server context
serveris the targeted server name
propertyis the targeted property
Returns
a list of available archived device names

References de.desy.tine.queryUtils.TQuery.getDeviceNames().

◆ getArchivedProperties() [1/3]

static String [] de.desy.tine.histUtils.THistory.getArchivedProperties ( String  context)
static

Retrieve a list of properties archived by the central archive server for the context given.

Parameters
contextis the targeted context
Returns
a list of available archived properties

Referenced by de.desy.tine.histUtils.THistory.getArchivedProperties().

◆ getArchivedProperties() [2/3]

static String [] de.desy.tine.histUtils.THistory.getArchivedProperties ( String  context,
String  server 
)
static

Retrieve a list of properties archived by the given server.

Parameters
contextis the targeted server context
serveris the targeted server name
Returns
a list of available archived properties

References de.desy.tine.histUtils.THistory.getArchivedProperties().

◆ getArchivedProperties() [3/3]

static String [] de.desy.tine.histUtils.THistory.getArchivedProperties ( String  context,
String  server,
String  subsystem 
)
static

Retrieve a list of properties archived by the given server.

Parameters
contextis the targeted server context
serveris the targeted server name
subsystemis the targeted subsystem (applicable when the server = "HISTORY", i.e. the central archive server)
Returns
a list of available archived properties

References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().

◆ getArchivedPropertyList()

static HstPrp [] de.desy.tine.histUtils.THistory.getArchivedPropertyList ( String  context,
String  server,
String  subsystem 
)
static

Retrieve a list of properties archived by the given server as a list of HstPrp instances, where additional information is returned along with the property name.

Parameters
contextis the targeted server context
serveris the targeted server name
subsystemis the targeted subsystem (applicable when the server = "HISTORY", i.e. the central archive server)
Returns
a list of available archived properties

References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getArchivedSnapshot() [1/3]

static int de.desy.tine.histUtils.THistory.getArchivedSnapshot ( String  context,
String  server,
String  property,
String  device,
double[]  targetTime,
float[]  data 
)
static

Retrieves an archived data array 'snapshot' at the time specified.

Retrieve an archive data set for the target property and device given at the time specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried. The returned data set represents the entire data array, be it a multi-channel array, trace array, or scalar at a stored time nearest (but not greater than) the given time.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
targetTimeis the targetted time in seconds (UTC double, a TINE timestamp) This is passed as a single-valued array, so that the targetted time can be altered by the call to reflect the time found.
datais a reference to a float data array object to contain the returned data. The array should be dimensioned to the number of points in the data record.
Returns
0 if success or a TINE error code.

◆ getArchivedSnapshot() [2/3]

static int de.desy.tine.histUtils.THistory.getArchivedSnapshot ( String  context,
String  server,
String  property,
String  device,
double[]  targetTime,
IMAGE  data 
)
static

Retrieves an archived data array 'snapshot' at the time specified.

Retrieve an archive data set for the target property and device given at the time specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried. The returned IMAGE represents the image at a stored time nearest (but not greater than) the given time.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
targetTimeis the targetted time in seconds (UTC double, a TINE timestamp) This is passed as a single-valued array, so that the targetted time can be altered by the call to reflect the time found.
datais a reference to an IMAGE data array object to contain the returned data. The array should have a length 1
Returns
0 if success or a TINE error code.

◆ getArchivedSnapshot() [3/3]

static int de.desy.tine.histUtils.THistory.getArchivedSnapshot ( String  context,
String  server,
String  property,
String  device,
double[]  targetTime,
String[]  data 
)
static

Retrieves an archived data array 'snapshot' at the time specified.

Retrieve an archive data set for the target property and device given at the time specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried. The returned data set represents the entire data array, be it a multi-channel array, trace array, or scalar at a stored time nearest (but not greater than) the given time.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
targetTimeis the targetted time in seconds (UTC double, a TINE timestamp) This is passed as a single-valued array, so that the targetted time can be altered by the call to reflect the time found.
datais a reference to a String data array object to contain the returned data. The array should be dimensioned to the number of points in the data record.
Returns
0 if success or a TINE error code.

◆ getArchivedSubsystems()

static String [] de.desy.tine.histUtils.THistory.getArchivedSubsystems ( String  context)
static

Retrieve a list of available subsystems at the central archive server for the given context.

Parameters
contextis the targeted server context
Returns
a list of available subsystems

◆ getArchiveServerContexts() [1/2]

static String [] de.desy.tine.histUtils.THistory.getArchiveServerContexts ( )
static

Retrieve a list of available contexts where a central archive server exists.

Returns
a list of available contexts

References de.desy.tine.queryUtils.TQuery.getContexts().

◆ getArchiveServerContexts() [2/2]

static String [] de.desy.tine.histUtils.THistory.getArchiveServerContexts ( String  importance)
static

Retrieve a list of available contexts where a central archive server exists and has the importance specified.

Parameters
importanceis the targeted importance level (one of "ALL", "IMPORTANT", "CRITICAL", "ESSENTIAL")
Returns
a list of available contexts

References de.desy.tine.queryUtils.TQuery.getContexts().

◆ getNumPointsInInterval() [1/2]

static int de.desy.tine.histUtils.THistory.getNumPointsInInterval ( String  context,
String  server,
String  property,
String  device,
double  start,
double  stop 
)
static

Retrieves the total number of stored data points in the interval specified.

Retrieve the number of points stored for the given parameters and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

◆ getNumPointsInInterval() [2/2]

static int de.desy.tine.histUtils.THistory.getNumPointsInInterval ( String  context,
String  server,
String  property,
String  device,
double  start,
double  stop,
int  timeout 
)
static

Retrieves the total number of stored data points in the interval specified.

Retrieve the number of points stored for the given parameters and over the time range specified. If server is null, an empty string, or "HISTORY", the central archive server is queried for the data. Otherwise the local history subsystem of the device server specified is queried.

Parameters
contextis the desired context
serveris the device server which manages the archived parameter. If null then the central archive will be queried for the property and device
propertyis the desired archived property
deviceis the desired device name
startis the start time in seconds (UTC double, a TINE timestamp)
stopis the stop time in seconds (UTC double, a TINE timestamp)
timeoutgives the number of milliseconds to wait for the call to complete (usually 1000 is sufficient).
Returns
if positive, the number of points returned in the archive call; if negative, the negative of a TINE error code.

◆ getTrendData()

static int de.desy.tine.histUtils.THistory.getTrendData ( String  context,
String  server,
String  property,
String  device,
int  index,
int  fieldIndex,
int  depthInSeconds,
int  interval,
TCompoundDataObject[]  data 
)
static

Gets the current trend of the targeted address.

The call will start an asynchronous listener to obtain the current value and append it to the current trend data. Thus, the call can be made repeatedly (logically, not more often than the given update interval). When the call is NOT made repeatedly then after 5 minutes of idle time (i.e. without an additional call) then the listener will be stopped.

Parameters
contextis the targeted address context
serveris the targeted address server
propertyis the property whose trend is desired
deviceis the targeted address device
indexis the desired index (in case the target property represents an array)
fieldIndexis the desired field index (in case the target property is of a complex or structured format)
depthInSecondsis the desired trend depth in seconds (e.g. 3600 for 1 hour, 86400 for 1 day)
intervalis the desired update interval (passed to the asynchronous listener)
datais the data object to hold the trend data (must be of data type DBLDBL (i.e. DBLTIME) or DBLDBLDBL
Returns
the number of data points in the 'data' array element with non-zero values (maximum is the array length of 'data')

◆ setAnnotation() [1/5]

static synchronized int de.desy.tine.histUtils.THistory.setAnnotation ( String  context,
String  property,
double  targetTime,
String  text,
boolean  keepAlive,
int  timeout 
)
static

Annotates the designated record property in the central archive.

Parameters
contextis the context of the Central Archive Server
propertyis the targeted record keyword name
targetTimeis the desired annotation time (if <= 0 then the current time will be used)
textis the desired annotation text
keepAliveif 'true' this will flag the annotation as 'active' (i.e. valid until cleared by the next annotation). Only valid for central archive annotations.
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code

References de.desy.tine.histUtils.THistory.setAnnotation().

◆ setAnnotation() [2/5]

static synchronized int de.desy.tine.histUtils.THistory.setAnnotation ( String  context,
String  property,
double  targetTime,
String  text,
int  timeout 
)
static

Annotates the designated record property in the central archive.

Parameters
contextis the context of the Central Archive Server
propertyis the targeted record keyword name
targetTimeis the desired annotation time (if <= 0 then the current time will be used)
textis the desired annotation text
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code

References de.desy.tine.histUtils.THistory.setAnnotation().

◆ setAnnotation() [3/5]

static synchronized int de.desy.tine.histUtils.THistory.setAnnotation ( String  context,
String  property,
String  text 
)
static

Annotates the designated record property in the central archive at the current time.

Parameters
contextis the context of the Central Archive Server
propertyis the targeted record keyword name
textis the desired annotation text
Returns
0 upon success or a TINE error code

References de.desy.tine.histUtils.THistory.setAnnotation().

◆ setAnnotation() [4/5]

static synchronized int de.desy.tine.histUtils.THistory.setAnnotation ( String  context,
String  server,
String  property,
double  targetTime,
String  text,
boolean  keepAlive,
int  timeout 
)
static

Annotates the designated record property in the central archive.

Parameters
contextis the context of the Central Archive Server
serveris the targeted device server name. If null then the central archive server is assumed.
propertyis the targeted record keyword name
targetTimeis the desired annotation time (if <= 0 then the current time will be used)
textis the desired annotation text
keepAliveif 'true' this will flag the annotation as 'active' (i.e. valid until cleared by the next annotation)
timeoutis the allowed duration of the annotation call before issuing a timeout message.
Returns
0 upon success or a TINE error code

References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataTime.getDataTimeStamp().

◆ setAnnotation() [5/5]

static synchronized int de.desy.tine.histUtils.THistory.setAnnotation ( String  context,
String  text 
)
static

Annotates the designated context in the central archive at the current time.

Parameters
contextis the context of the Central Archive Server
textis the desired annotation text
Returns
0 upon success or a TINE error code

Referenced by de.desy.tine.histUtils.THistory.setAnnotation().

◆ setPreferCentralSource()

static void de.desy.tine.histUtils.THistory.setPreferCentralSource ( boolean  value)
static

Establishes a preference for central archive data over local history data in archive calls if this setting is 'true'.

Parameters
valueis the desired setting

◆ setPreferLocalSource()

static void de.desy.tine.histUtils.THistory.setPreferLocalSource ( boolean  value)
static

Establishes a preference for local history data over central archive data in archive calls if this setting is 'true'.

Parameters
valueis the desired setting
Note
this setting takes precedence over setPreferCentralSource

The documentation for this class was generated from the following file: