Tagged Structure The transfer of 'user-defined' data structures is allowed in TINE.
More...
Inherited by de.desy.tine.addrUtils.GrpMbr, de.desy.tine.alarmUtils.ApcBlk, de.desy.tine.alarmUtils.CasSrvInfo, de.desy.tine.histUtils.DAQFltr, de.desy.tine.histUtils.DAQPrm, de.desy.tine.histUtils.DAQRec, de.desy.tine.histUtils.HstCfg, de.desy.tine.histUtils.HstView, de.desy.tine.histUtils.McaCfg, de.desy.tine.histUtils.PrfCfg, de.desy.tine.server.alarms.TAlarmDefinition, de.desy.tine.server.alarms.TAlarmDefinitionStructure, de.desy.tine.server.alarms.TAlarmMessage, de.desy.tine.server.alarms.TAlarmMessageStructure, de.desy.tine.server.alarms.TAlarmWatchEntry, de.desy.tine.server.alarms.TCASAlarmMessage, de.desy.tine.server.connections.TClientStruct, de.desy.tine.server.connections.TConnectionStruct, de.desy.tine.server.connections.TContractEntry, de.desy.tine.server.connections.TContractStruct, de.desy.tine.server.equipment.TEquipmentManifest, de.desy.tine.server.equipment.TWriteAccessInfo, de.desy.tine.server.histories.THistoryRecordStruct, de.desy.tine.server.logger.Clog, de.desy.tine.server.logger.ClogFilter, de.desy.tine.server.TActivityStruct, and de.desy.tine.traceUtils.TTraceHeader.
List of all members.
Public Member Functions |
| | TTaggedStructure (String name) |
| | Creates a tagged structure with the given name.
|
| | TTaggedStructure () |
| | Creates a tagged structure using the class name as the structure tag.
|
| String | getName () |
| | Returns the structure's assigned tag name.
|
| int | getSizeInBytes () |
| | Returns the structure's data size in bytes.
|
|
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.
|
| 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) |
Detailed Description
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.
Constructor & Destructor Documentation
| de.desy.tine.structUtils.TTaggedStructure.TTaggedStructure |
( |
String |
name | ) |
|
Creates a tagged structure with the given name.
- Parameters:
-
| 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! |
- Note:
- The addField() method must be called for each element of the structure data element.
-
Properties using tagged structures should register themselves correctly, either by passing the structure name when creating the TExportProperty() or if using a configuration file such as exports.csv or fec.xml, then by supplying the structure name there (as in FORMAT -> struct.MYTAG, where "MYTAG" is the tagged structure 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!
- Note:
- The addField() method must be called for each element of the structure data element.
Example:
class TEST1 extends TTaggedStructure
{
float[] fval = new float[3];
int[] ival = new int[2];
short[] sval1 = new short[1];
short[] sval2 = new short[1];
char[] s = new char[32];
TEST1()
{
super();
addField(fval,"fval");
addField(ival,"ival");
addField(sval1,"sval1");
addField(sval2,"sval2");
addField(s,"text");
initDone();
}
}
TEST1 t1 = new TEST1();
TDataType struct_dout = new TDataType(t1);
TDataType struct_din = new TDataType();
TLink st = new TLink("/TEST/SINE/SINEDEV_0","STRUCTTEST",struct_dout,struct_din,TAccess.CA_READ);
if (st.execute(500,true) == 0)
{
System.out.print(t1.toString());
}
else
{
System.out.print(st.getLastError());
}
st.cancel();
- Note:
- Properties using tagged structures should register themselves correctly, either by passing the structure name when creating the TExportProperty() or if using a configuration file such as exports.csv or fec.xml, then by supplying the structure name there (as in FORMAT -> struct.MYTAG, where "MYTAG" is the tagged structure name).
Member Function Documentation
| void de.desy.tine.structUtils.TTaggedStructure.addField |
( |
byte[] |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
( |
char[] |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
|
) |
| |
- Parameters:
-
| 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 |
( |
short[] |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
|
) |
| |
- Parameters:
-
| 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 |
( |
int[] |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
( |
float[] |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
|
) |
| |
- Parameters:
-
| 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 |
( |
long[] |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
( |
TString |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
( |
StringBuffer |
field, |
|
|
String |
fieldName |
|
) |
| |
- Parameters:
-
| 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 |
|
) |
| |
- Parameters:
-
| 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 |
|
) |
| |
- Parameters:
-
| field | is the structure field to add to the tagged structure |
| fieldName | is the name of the structure field |
| String de.desy.tine.structUtils.TTaggedStructure.getName |
( |
| ) |
|
Returns the structure's assigned tag name.
- Returns:
- The structure's assigned tag name as a string.
| int de.desy.tine.structUtils.TTaggedStructure.getSizeInBytes |
( |
| ) |
|
Returns the structure's data size in bytes.
- Returns:
- The structure's data size in bytes.
| 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().
The documentation for this class was generated from the following file: