Tagged Structure The transfer of 'user-defined' data structures is allowed in TINE. More...
Public Member Functions | |
TTaggedStructure (String name) | |
Creates a tagged structure with the given name. More... | |
TTaggedStructure () | |
Creates a tagged structure using the class name as the structure tag. More... | |
String | getName () |
Returns the structure's assigned tag name. More... | |
int | getSizeInBytes () |
Returns the structure's data size in bytes. More... | |
void | fixExtendedBytes () |
scan thru the extended space and fix the reference and the total size | |
void | initDone () |
Terminates the tagged structure definition and signals that the tagged structure is ready for use. More... | |
void | addField (byte[] field, String fieldName) |
void | addField (char[] field, String fieldName) |
void | addField (short[] field, String fieldName) |
void | addField (int[] field, String fieldName) |
void | addField (float[] field, String fieldName) |
void | addField (double[] field, String fieldName) |
void | addField (long[] field, String fieldName) |
void | addField (TString field, String fieldName) |
void | addField (StringBuffer field, String fieldName) |
void | addField (TCompoundDataObject field, String fieldName) |
void | addField (TCompoundDataObject[] field, String fieldName) |
void | addField (TTaggedStructure field, String fieldName) |
void | addField (TTaggedStructure[] field, String fieldName) |
Tagged Structure The transfer of 'user-defined' data structures is allowed in TINE.
In order to avoid nasty problems concerning alignment and byte swapping it is strongly suggested to extend the TTaggedStructure class when creating a data structure.
de.desy.tine.structUtils.TTaggedStructure.TTaggedStructure | ( | String | name | ) |
Creates a tagged structure with the given name.
name | is the name to be used as the structure tag. Note that only the first 16 characters of the given name will be used as the tag name! |
de.desy.tine.structUtils.TTaggedStructure.TTaggedStructure | ( | ) |
Creates a tagged structure using the class name as the structure tag.
Note that only the first 16 characters of the class name will be used as the tag name!
Example:
Referenced by de.desy.tine.structUtils.TTaggedStructure.addField().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | byte[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
Referenced by de.desy.tine.structUtils.TTaggedStructure.addField().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | char[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | double[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.definitions.TFormat.formatSizeOf().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | float[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.definitions.TFormat.formatSizeOf().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | int[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.structUtils.TTaggedStructure.addField().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | long[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.definitions.TFormat.formatSizeOf().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | short[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.definitions.TFormat.formatSizeOf().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | StringBuffer | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | TCompoundDataObject | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.definitions.TFormat.formatSizeOf(), de.desy.tine.types.TCompoundDataObject.getFormat(), de.desy.tine.definitions.TFormat.getFormatHeaderSize(), de.desy.tine.types.TCompoundDataObject.getSizeInBytes(), and de.desy.tine.definitions.TFormat.hasHeader().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | TCompoundDataObject[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.types.TCompoundDataObject.getSizeInBytes().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | TString | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | TTaggedStructure | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.structUtils.TTaggedStructure.getName(), and de.desy.tine.structUtils.TTaggedStructure.TTaggedStructure().
void de.desy.tine.structUtils.TTaggedStructure.addField | ( | TTaggedStructure[] | field, |
String | fieldName | ||
) |
field | is the structure field to add to the tagged structure |
fieldName | is the name of the structure field |
References de.desy.tine.structUtils.TTaggedStructure.getName(), and de.desy.tine.structUtils.TTaggedStructure.TTaggedStructure().
String de.desy.tine.structUtils.TTaggedStructure.getName | ( | ) |
Returns the structure's assigned tag name.
Referenced by de.desy.tine.structUtils.TTaggedStructure.addField(), de.desy.tine.dataUtils.TDataType.getData(), de.desy.tine.dataUtils.TDataType.putData(), and de.desy.tine.dataUtils.TDataType.TDataType().
int de.desy.tine.structUtils.TTaggedStructure.getSizeInBytes | ( | ) |
Returns the structure's data size in bytes.
Referenced by de.desy.tine.dataUtils.TDataType.getData(), de.desy.tine.dataUtils.TDataType.putData(), and de.desy.tine.dataUtils.TDataType.TDataType().
void de.desy.tine.structUtils.TTaggedStructure.initDone | ( | ) |
Terminates the tagged structure definition and signals that the tagged structure is ready for use.
This method plays an integral role in defining the tagged structure. It should be called following all calls to addField().