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.dataUtils.TDataTime Class Reference

TDataTime offers some useful Data and Time Stamp utilities. More...

Static Public Member Functions

static long getDataTimeStampOffset ()
 
static void setDataTimeStampOffset (long offset)
 Sets the TINE time synchronization offset. More...
 
static int systemStartGlobalSynchronization ()
 Starts the TINE time synchronization where a TINE Time Server is assumed to be running and delivering a reference time stamp per multicast. More...
 
static double getDataTimeStamp ()
 Gets the current TINE data timestamp. More...
 
static long getLongDataTimeStamp ()
 Gets the current TINE data timestamp. More...
 
static long getLongDataTimeStamp (double timeStamp)
 Converts a double timestamp (seconds) to a long timestamp (milliseconds). More...
 
static double getDataTimeStamp (long longtimestamp)
 Converts a long timestamp (milliseconds) to a double timestamp (seconds). More...
 
static String toString (long lTimeStamp)
 Converts the input timestamp to a string in the form dow mon dd hh:mm:ss.msec zzz yyyy. More...
 
static String toString (double dTimeStamp)
 Converts the input timestamp to a string in the form dow mon dd hh:mm:ss.msec zzz yyyy. More...
 

Detailed Description

TDataTime offers some useful Data and Time Stamp utilities.

Author
duval

Member Function Documentation

◆ getDataTimeStamp() [1/2]

static double de.desy.tine.dataUtils.TDataTime.getDataTimeStamp ( )
static

Gets the current TINE data timestamp.

Returns
the current TINE data timestamp as a UTC double containing seconds since 1.1.1970 with a fractional part. obtained via applying the current TINE time synchronization offset to the system clock

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

Referenced by de.desy.tine.server.equipment.TEquipmentModuleFactory.getPortOffset(), and de.desy.tine.histUtils.THistory.setAnnotation().

◆ getDataTimeStamp() [2/2]

static double de.desy.tine.dataUtils.TDataTime.getDataTimeStamp ( long  longtimestamp)
static

Converts a long timestamp (milliseconds) to a double timestamp (seconds).

Parameters
timeStampis the timestamp in milliseconds to be converted.
Returns
the current TINE data timestamp as a UTC double containing seconds since 1.1.1970 with a fractional part.

◆ getDataTimeStampOffset()

static long de.desy.tine.dataUtils.TDataTime.getDataTimeStampOffset ( )
static
Returns
the current TINE time synchronization offset

Referenced by de.desy.tine.dataUtils.TDataTime.getLongDataTimeStamp().

◆ getLongDataTimeStamp() [1/2]

static long de.desy.tine.dataUtils.TDataTime.getLongDataTimeStamp ( )
static

Gets the current TINE data timestamp.

Returns
the current TINE data timestamp as a UTC long containing milliseconds since 1.1.1970. obtained via applying the current TINE time synchronization offset to the system clock

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

Referenced by de.desy.tine.dataUtils.TDataTime.getDataTimeStamp().

◆ getLongDataTimeStamp() [2/2]

static long de.desy.tine.dataUtils.TDataTime.getLongDataTimeStamp ( double  timeStamp)
static

Converts a double timestamp (seconds) to a long timestamp (milliseconds).

Parameters
timeStampis the timestamp in seconds (with fraction part) to be converted.
Returns
the current TINE data timestamp as a UTC long containing milliseconds since 1.1.1970.

◆ setDataTimeStampOffset()

static void de.desy.tine.dataUtils.TDataTime.setDataTimeStampOffset ( long  offset)
static

Sets the TINE time synchronization offset.

Parameters
offsetis the offset to be applied to the TINE timestamp

◆ systemStartGlobalSynchronization()

static int de.desy.tine.dataUtils.TDataTime.systemStartGlobalSynchronization ( )
static

Starts the TINE time synchronization where a TINE Time Server is assumed to be running and delivering a reference time stamp per multicast.

Note
this synchronization applies a time offset to timestamps obtained via calls to getDataTimeStamp()
Returns
0 upon success otherwise a TINE error code

References de.desy.tine.client.TLink.attach().

◆ toString() [1/2]

static String de.desy.tine.dataUtils.TDataTime.toString ( double  dTimeStamp)
static

Converts the input timestamp to a string in the form dow mon dd hh:mm:ss.msec zzz yyyy.

Parameters
dTimeStampis the timestamp (in seconds with fractional part) to be converted
Returns
string representation of the given timestamp

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

◆ toString() [2/2]

static String de.desy.tine.dataUtils.TDataTime.toString ( long  lTimeStamp)
static

Converts the input timestamp to a string in the form dow mon dd hh:mm:ss.msec zzz yyyy.

Parameters
lTimeStampis the timestamp (in milliseconds) to be converted
Returns
string representation of the given timestamp

Referenced by de.desy.tine.histUtils.THistory.getArchivedData(), and de.desy.tine.dataUtils.TDataTime.toString().


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