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
Public Member Functions | Static Public Member Functions | List of all members
de.desy.tine.definitions.TFormat Class Reference

TINE data format types. More...

Public Member Functions

short getValue ()
 Returns short value for format enum. More...
 
String toString ()
 The string representation of this TFormat object. More...
 

Static Public Member Functions

static boolean isSimpleFormat (short dataFormat)
 
static boolean isPlotable (short dataFormat)
 Determines whether the given format is plotable in a trend chart (value vs time). More...
 
static boolean containsString (short dataFormat)
 Determines whether the given format contains a string type variable (either fixed-capacity or free) More...
 
static boolean beginsWithString (short dataFormat)
 Determines whether the given format begins with a string type variable (either fixed-capacity or free) More...
 
static boolean endsWithString (short dataFormat)
 Determines whether the given format ends with a string type variable (either fixed-capacity or free) More...
 
static boolean isName (short dataFormat)
 
static boolean isBitfield (short dataFormat)
 
static boolean isStructFormat (short dataFormat)
 
static boolean isNumberFormat (short dataFormat)
 
static boolean isTimeFormat (short dataFormat)
 
static boolean isTaggedStruct (short dataFormat, String dataTag)
 
static boolean isCompoundFormat (short dataFormat)
 determines whether the given format is a compound data type More...
 
static TCompoundDataObject[] makeCompoundDataObjectArray (short dataFormat, String dataTag, int arrayLength)
 makes an array of compound data type objects according to the input given More...
 
static short getBitfieldFormat (short dataFormat)
 
static short getIntegerFormat (short dataFormat)
 
static boolean isNameInt (short dataFormat)
 
static int getFormatHeaderSize (short dataFormat)
 
static int getFormatBodyStart (short dataFormat)
 
static short getFormatDataType (short dataFormat)
 Determines the carried format type according to the format type given. More...
 
static boolean hasHeader (short dataFormat)
 
static boolean isVariableLength (short dataFormat)
 Determines whether the input format is of variable length (one of CF_STRING, CF_AIMAGE, CF_IMAGE, CF_ASPECTRUM) More...
 
static boolean isVariableLengthString (short dataFormat)
 Determines whether the given format is a variable length type. More...
 
static boolean isAdjustableLength (short dataFormat)
 Determines whether the input format is of adjustable length (one of CF_STRING, CF_AIMAGE, CF_ASPECTRUM) More...
 
static boolean isString (short dataFormat)
 
static boolean formatsCanMap (short dataFormat1, short dataFormat2, boolean input)
 Returns true if the input formats can be converted. More...
 
static int formatSizeOf (short dataFormat)
 The size in bytes of the specified data format. More...
 
static String toString (int dataFormat)
 The string representation of the specified data format. More...
 
static String getFormatTag (String dataFormatString)
 Parses an input format string and extracts the given data tag. More...
 
static short getFormatArrayType (String dataFormatString)
 Parses an input format string and extracts the given array type. More...
 
static short getFormatCode (String dataFormatString)
 The format code of the specified String. More...
 
static int getCarriedFormatSize (String tag)
 Returns the size in bytes of a given format type. More...
 
static TFormat valueOf (short fmt)
 

Detailed Description

TINE data format types.

Member Function Documentation

◆ beginsWithString()

static boolean de.desy.tine.definitions.TFormat.beginsWithString ( short  dataFormat)
static

Determines whether the given format begins with a string type variable (either fixed-capacity or free)

Parameters
dataFormatis the tine format to be examined
Returns
true or false.

◆ containsString()

static boolean de.desy.tine.definitions.TFormat.containsString ( short  dataFormat)
static

Determines whether the given format contains a string type variable (either fixed-capacity or free)

Parameters
dataFormatis the tine format to be examined
Returns
true or false.

◆ endsWithString()

static boolean de.desy.tine.definitions.TFormat.endsWithString ( short  dataFormat)
static

Determines whether the given format ends with a string type variable (either fixed-capacity or free)

Parameters
dataFormatis the tine format to be examined
Returns
true or false.

◆ formatsCanMap()

static boolean de.desy.tine.definitions.TFormat.formatsCanMap ( short  dataFormat1,
short  dataFormat2,
boolean  input 
)
static

Returns true if the input formats can be converted.

Parameters
dataFormat1is the first of the format pair
dataFormat2is the second of the format pair
inputspecifies whether the conversion concerns input data (true) or not.
Returns
true if the input formats can be converted

◆ formatSizeOf()

static int de.desy.tine.definitions.TFormat.formatSizeOf ( short  dataFormat)
static

The size in bytes of the specified data format.

Parameters
dataFormatis the tine data type for which the size in bytes is desired
Returns
the size in bytes of the specified data format

Referenced by de.desy.tine.structUtils.TTaggedStructure.addField(), de.desy.tine.definitions.TFormat.getCarriedFormatSize(), de.desy.tine.dataUtils.TDataType.getData(), and de.desy.tine.dataUtils.TDataType.putData().

◆ getBitfieldFormat()

static short de.desy.tine.definitions.TFormat.getBitfieldFormat ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
the associated bit field format if applicable For instance CF_INT16 returns CF_BITFIELD16.

◆ getCarriedFormatSize()

static int de.desy.tine.definitions.TFormat.getCarriedFormatSize ( String  tag)
static

Returns the size in bytes of a given format type.

Parameters
tagis the format string representation
Returns
the carried format size in bytes.

References de.desy.tine.definitions.TFormat.formatSizeOf(), and de.desy.tine.definitions.TFormat.getFormatCode().

◆ getFormatArrayType()

static short de.desy.tine.definitions.TFormat.getFormatArrayType ( String  dataFormatString)
static

Parses an input format string and extracts the given array type.

Parameters
dataFormatStringis the data format string which is to be parsed
Returns
the array type

References de.desy.tine.definitions.TArrayType.getType().

◆ getFormatBodyStart()

static int de.desy.tine.definitions.TFormat.getFormatBodyStart ( short  dataFormat)
static
Parameters
dataFormatis the targeted format data type
Returns
the location of the data body within the corresponding data object.

◆ getFormatCode()

static short de.desy.tine.definitions.TFormat.getFormatCode ( String  dataFormatString)
static

The format code of the specified String.

Parameters
dataFormatStringis the string representation for which the tine data type is desired
Returns
the format code of the specified String

Referenced by de.desy.tine.definitions.TFormat.getCarriedFormatSize(), and de.desy.tine.dataUtils.TDataType.toTDataType().

◆ getFormatDataType()

static short de.desy.tine.definitions.TFormat.getFormatDataType ( short  dataFormat)
static

Determines the carried format type according to the format type given.

This is largely equal to the input format itself. However some formats (CF_SPECTRUM, CF_IMAGE) imply a carried format.

Parameters
dataFormatis the targeted format data type
Returns
the carried format type

◆ getFormatHeaderSize()

static int de.desy.tine.definitions.TFormat.getFormatHeaderSize ( short  dataFormat)
static
Parameters
dataFormatis the targeted format data type
Returns
the header size (in bytes) of the input format (non-null only for CF_IMAGE and CF_SPECTRUM)

Referenced by de.desy.tine.structUtils.TTaggedStructure.addField().

◆ getFormatTag()

static String de.desy.tine.definitions.TFormat.getFormatTag ( String  dataFormatString)
static

Parses an input format string and extracts the given data tag.

Parameters
dataFormatStringis the data format string which is to be parsed
Returns
the data format tag (if found) or an empty string.

◆ getIntegerFormat()

static short de.desy.tine.definitions.TFormat.getIntegerFormat ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
the associated integer format type if applicable. For instance CF_BITFIELD16 returns CF_INT16.

◆ getValue()

short de.desy.tine.definitions.TFormat.getValue ( )

Returns short value for format enum.

Returns
short value for format enum

◆ hasHeader()

static boolean de.desy.tine.definitions.TFormat.hasHeader ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the given format has an associated header (e.g. CF_IMAGE, CF_SPECTRUM)

Referenced by de.desy.tine.structUtils.TTaggedStructure.addField().

◆ isAdjustableLength()

static boolean de.desy.tine.definitions.TFormat.isAdjustableLength ( short  dataFormat)
static

Determines whether the input format is of adjustable length (one of CF_STRING, CF_AIMAGE, CF_ASPECTRUM)

Formats of adjustable length as in the case of variable length types imply that an array of such entities do not have a known total length in bytes as the size of each element is variable. In addition, the transport mechanism is allowed to adjust the size of the transfered data. This is the same list of types as the variable length types, except for the exclusion of CF_IMAGE.
An adjustable image type (CF_AIMAGE) will pass a reference of the adjusted image to the caller whereas a non-adjustable image (CF_IMAGE) will copy the image bytes into the caller's buffer (truncating if necessary).

Parameters
dataFormatis the format to be examined
Returns
true if the format data type is of adjustable length

Referenced by de.desy.tine.dataUtils.TDataType.getArrayLength().

◆ isBitfield()

static boolean de.desy.tine.definitions.TFormat.isBitfield ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the format is a bitfield data type

Referenced by de.desy.tine.definitions.TFormat.isPlotable(), and de.desy.tine.dataUtils.TDataType.setArrayDelimiter().

◆ isCompoundFormat()

static boolean de.desy.tine.definitions.TFormat.isCompoundFormat ( short  dataFormat)
static

determines whether the given format is a compound data type

Parameters
dataFormatis the targeted format
Returns
true if the format is composed of more than a single entity (a TCompoundDataObject composed of at least a doublet).

◆ isName()

static boolean de.desy.tine.definitions.TFormat.isName ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the format is a fixed-length string type

Referenced by de.desy.tine.dataUtils.TDataType.putData().

◆ isNameInt()

static boolean de.desy.tine.definitions.TFormat.isNameInt ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the given format represents a NAME-Integer pair

Referenced by de.desy.tine.dataUtils.TDataType.putData().

◆ isNumberFormat()

static boolean de.desy.tine.definitions.TFormat.isNumberFormat ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the format represents a simple number type

◆ isPlotable()

static boolean de.desy.tine.definitions.TFormat.isPlotable ( short  dataFormat)
static

Determines whether the given format is plotable in a trend chart (value vs time).

Parameters
dataFormatis the tine format to be examined
Returns
true or false.

References de.desy.tine.definitions.TFormat.isBitfield().

◆ isSimpleFormat()

static boolean de.desy.tine.definitions.TFormat.isSimpleFormat ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the format is a 'simple' type, that is composed of single element type (which might be fixed-length string)

◆ isString()

static boolean de.desy.tine.definitions.TFormat.isString ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the format data type represents a string

◆ isStructFormat()

static boolean de.desy.tine.definitions.TFormat.isStructFormat ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the format is a structure

◆ isTaggedStruct()

static boolean de.desy.tine.definitions.TFormat.isTaggedStruct ( short  dataFormat,
String  dataTag 
)
static
Parameters
dataFormatis the targeted format
Returns
true if the format is a tagged structure

◆ isTimeFormat()

static boolean de.desy.tine.definitions.TFormat.isTimeFormat ( short  dataFormat)
static
Parameters
dataFormatis the targeted format
Returns
true if the format represents a compound type with a timestamp as the last element

◆ isVariableLength()

static boolean de.desy.tine.definitions.TFormat.isVariableLength ( short  dataFormat)
static

Determines whether the input format is of variable length (one of CF_STRING, CF_AIMAGE, CF_IMAGE, CF_ASPECTRUM)

Formats of variable length imply that an array of such entities do not have a known total length in bytes as the size of each element is variable.

Parameters
dataFormatis the format to be examined
Returns
true if the format data type is of variable length

◆ isVariableLengthString()

static boolean de.desy.tine.definitions.TFormat.isVariableLengthString ( short  dataFormat)
static

Determines whether the given format is a variable length type.

Parameters
dataFormatis the tine format to be examined
Returns
true or false.

◆ makeCompoundDataObjectArray()

static TCompoundDataObject [] de.desy.tine.definitions.TFormat.makeCompoundDataObjectArray ( short  dataFormat,
String  dataTag,
int  arrayLength 
)
static

makes an array of compound data type objects according to the input given

Parameters
dataFormatis the targeted format (must refer to a TCompoundDataObject type)
dataTagis the targeted data tag (if applicable)
arrayLengthis the size of the array to generate
Returns
an array of TCompoundDataObject objects.

◆ toString() [1/2]

String de.desy.tine.definitions.TFormat.toString ( )

The string representation of this TFormat object.

Returns
The string representation of this TFormat

Referenced by de.desy.tine.definitions.TFormat.toString().

◆ toString() [2/2]

static String de.desy.tine.definitions.TFormat.toString ( int  dataFormat)
static

The string representation of the specified data format.

Parameters
dataFormatis the tine data type for which the string representation is desired
Returns
The string representation of the specified data format

References de.desy.tine.definitions.TFormat.toString().

Referenced by de.desy.tine.queryUtils.TQuery.getDeviceServerReport(), and de.desy.tine.dataUtils.TDataType.putData().

◆ valueOf()

static TFormat de.desy.tine.definitions.TFormat.valueOf ( short  fmt)
static
Parameters
fmtis the targeted format as a short integer
Returns
a TFormat object representation of the input format

Referenced by de.desy.tine.accesslayer.ChannelFactory.getChannel().


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