Package de.desy.tine.structUtils

Examples of de.desy.tine.structUtils.TStructDescription$Field


   * Defines the stock structure as a static TStructDescription.
   * 
   */
  private static void initStructDescription()
  {
    stockStruct = new TStructDescription("PRPQSr4");
    stockStruct.beginDefinition();
    stockStruct.addField("property",TFormat.CF_TEXT, TStrings.PROPERTY_NAME_SIZE);
    stockStruct.addField("description",TFormat.CF_TEXT, TStrings.PROPERTY_DESC_SIZE);
    stockStruct.addField("redirection",TFormat.CF_TEXT, TStrings.PROPERTY_REDIR_SIZE);
    stockStruct.addField("tagOut",TFormat.CF_TEXT, TStrings.TAG_NAME_SIZE);
    stockStruct.addField("tagIn",TFormat.CF_TEXT, TStrings.TAG_NAME_SIZE);
    stockStruct.addField("units",TFormat.CF_TEXT, TStrings.UNITS_SIZE);
    stockStruct.addField("min",TFormat.CF_FLOAT, 1);
    stockStruct.addField("max",TFormat.CF_FLOAT, 1);
    stockStruct.addField("sizeOut",TFormat.CF_LONG, 1);
    stockStruct.addField("sizeIn",TFormat.CF_LONG, 1);
    stockStruct.addField("overloads",TFormat.CF_LONG, 1);
    stockStruct.addField("historyShort",TFormat.CF_SHORT, 1);
    stockStruct.addField("historyLong",TFormat.CF_SHORT, 1);
    stockStruct.addField("formatOut",TFormat.CF_BYTE, 1);
    stockStruct.addField("formatIn",TFormat.CF_BYTE, 1);
    stockStruct.addField("access",TFormat.CF_BYTE, 1);
    stockStruct.addField("graphType",TFormat.CF_BYTE, 1);
    stockStruct.addField("rangeUnits",TFormat.CF_TEXT, TStrings.UNITS_SIZE);
    stockStruct.addField("rangeMin",TFormat.CF_FLOAT, 1);
    stockStruct.addField("rangeMax",TFormat.CF_FLOAT, 1);
    stockStruct.addField("numRows",TFormat.CF_SHORT, 1);
    stockStruct.addField("rowSize",TFormat.CF_SHORT, 1);
    stockStruct.addField("arrayType",TFormat.CF_SHORT, 1);
    stockStruct.addField("reserved",TFormat.CF_SHORT, 3);
    stockStruct.setArraySize(nice_query_size);
    stockStruct.endDefinition();
    TStructRegistry.add(getStructDescription());

    stockStruct = new TStructDescription("XPQS");
    stockStruct.beginDefinition();
    stockStruct.addField("property",TFormat.CF_TEXT, 32);
    stockStruct.addField("description",TFormat.CF_TEXT, 64);
    stockStruct.addField("redirection",TFormat.CF_TEXT, 32);
    stockStruct.addField("tagOut",TFormat.CF_TEXT, 8);
    stockStruct.addField("tagIn",TFormat.CF_TEXT, 8);
    stockStruct.addField("units",TFormat.CF_TEXT, 16);
    stockStruct.addField("min",TFormat.CF_FLOAT, 1);
    stockStruct.addField("max",TFormat.CF_FLOAT, 1);
    stockStruct.addField("sizeOut",TFormat.CF_LONG, 1);
    stockStruct.addField("sizeIn",TFormat.CF_LONG, 1);
    stockStruct.addField("overloads",TFormat.CF_LONG, 1);
    stockStruct.addField("shortDepth",TFormat.CF_SHORT, 1);
    stockStruct.addField("longDepth",TFormat.CF_SHORT, 1);
    stockStruct.addField("formatOut",TFormat.CF_BYTE, 1);
    stockStruct.addField("formatIn",TFormat.CF_BYTE, 1);
    stockStruct.addField("access",TFormat.CF_BYTE, 1);
    stockStruct.addField("graphType",TFormat.CF_BYTE, 1);
    stockStruct.addField("rangeUnits",TFormat.CF_TEXT, 16);
    stockStruct.addField("rangeMin",TFormat.CF_FLOAT, 1);
    stockStruct.addField("rangeMax",TFormat.CF_FLOAT, 1);
    stockStruct.addField("numRows",TFormat.CF_SHORT, 1);
    stockStruct.addField("rowSize",TFormat.CF_SHORT, 1);
    stockStruct.addField("arrayType",TFormat.CF_SHORT, 1);
    stockStruct.addField("reserved",TFormat.CF_SHORT, 3);
    stockStruct.setArraySize(nice_query_size);
    stockStruct.endDefinition();
    TStructRegistry.add(getStructDescription());
    // get the remaining stock structures into the registry
    new TWriteAccessInfo("","","","","",0);
    new TClient();
    new TConnectionStruct();
    new TContractEntry();
    new TServerSettings();
    new THistoryRecordStruct();
    TAlarmMessage5.initStructDescription();
    new TAlarmWatchEntry();
   
    stockStructLegacy = new TStructDescription("PQS");
    stockStructLegacy.beginDefinition();
    stockStructLegacy.addField("property",TFormat.CF_TEXT, 32);
    stockStructLegacy.addField("description",TFormat.CF_TEXT, 32);
    stockStructLegacy.addField("size",TFormat.CF_SHORT, 1);
    stockStructLegacy.addField("format",TFormat.CF_BYTE, 1);
View Full Code Here


  /**
   * Constructs and registers the tagged structure description.
   */
  private static void createTaggedStructure()
  {
    myStructDsc = new TStructDescription("AQS");
    myStructDsc.beginDefinition();
    myStructDsc.addField("fecName",TFormat.CF_TEXT, 16); // was 32!
    myStructDsc.addField("reserved",TFormat.CF_BYTE, 4);
    myStructDsc.addField("localtime", TFormat.CF_LONG, 1);
    myStructDsc.addField("starttime", TFormat.CF_LONG, 1);
View Full Code Here

        return newMock(FieldValidatorSource.class);
    }

    protected final Field mockFieldWithLabel(String label)
    {
        Field field = mockField();

        train_getLabel(field, label);

        return field;
    }
View Full Code Here

    @Test(dataProvider = "parse_client_failure_data")
    public void parse_client_failure(Class type, String input, String expectedMessage)
    {
        Translator t = source.getByType(type);
        Field field = mockField();

        replay();

        try
        {
View Full Code Here

    public FieldTranslator createDefaultTranslator(ComponentResources resources, String parameterName)
    {
        assert resources != null;
        assert InternalUtils.isNonBlank(parameterName);
        Field field = (Field) resources.getComponent();
        Class propertyType = resources.getBoundType(parameterName);

        return createDefaultTranslator(field, resources.getId(), resources.getContainerMessages(),
                null, propertyType, resources.getAnnotationProvider(parameterName));
    }
View Full Code Here

    public FieldTranslator createTranslator(ComponentResources resources, String translatorName)
    {
        assert resources != null;
        assert InternalUtils.isNonBlank(translatorName);
        Field field = (Field) resources.getComponent();

        Translator translator = translatorSource.get(translatorName);

        return createTranslator(field, resources.getId(), resources.getContainerMessages(), null, translator);
    }
View Full Code Here

public class FieldTranslatorSourceImplTest extends InternalBaseTestCase
{
    @Test
    public void create_default_property_type_null()
    {
        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;

        replay();
View Full Code Here

    }

    @Test
    public void create_default_translator_not_found_for_type()
    {
        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;
        Class propertyType = Map.class;
        TranslatorSource ts = mockTranslatorSource();
        AnnotationProvider ap = mockAnnotationProvider(null);
View Full Code Here

    }

    @Test
    public void create_default_translator_with_name_and_null_key()
    {
        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;
        Class propertyType = Map.class;
        TranslatorSource ts = mockTranslatorSource();
        FormSupport fs = mockFormSupport();
View Full Code Here

    }

    @Test
    public void create_default_translator_with_name()
    {
        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;
        Class propertyType = Map.class;
        TranslatorSource ts = mockTranslatorSource();
        FormSupport fs = mockFormSupport();
View Full Code Here

TOP

Related Classes of de.desy.tine.structUtils.TStructDescription$Field

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.