How to get description of enum values in RFA Java 8.2.1.L3

The infrastructure contain enumdef like this:

IMB_VA_IND 4342

! VALUE DISPLAY MEANING

! ----- ------- -------

0 " " Not Set

1 "1 " 1 to 1.99%

2 "2 " 2 to 2.99%

3 "3 " 3 to 3.99%


In my java code, the following will only return "1", for 1, "2" for 2. I don't see a method that will return the MEANING column, i.e., "1 to 1.99%", "2 to 2.99%":

if (IMB_VA_IND.equals(fieldName))

{

if (fieldData.getType() == OMMTypes.ENUM)

{

priceVariation = dictionary.expandedValueFor(fe.getFieldId(), ((OMMEnum)fieldData).getValue());

num_fields_found++;

}

}


Best Answer

  • Hi @chris.xiao

    The RTDS team have confirmed that the RTDS components do not currently provide the Meaning values even if Verbose is specified.


Answers

  • Hi @chris.xiao

    Are you requesting a 'Verbose' Dictionary in your code when making the dictionary request?

    If you refer to the RDM Usage Guide pdf file which is included with the RFA Java SDK, you will note that the MEANING column is only included in the Enumtype dictionary response when the OMMAttribInfo.Filter is set to RDMDictionary.Filter.VERBOSE=0xF (Provides all information(including comments)

    See Section 5.6 Enumerated Types Dictionary, table 39 for examples of the different levels of Verbosity.


  • Hi @umer.nalla,

    With attribInfo.setFilter(RDMDictionary.Filter.VERBOSE), the following code examines series's data, the output is for 617 enum entries, no MEANING

    Element entry name: FIDS type:15

    Element entry name: VALUE type:15

    Element entry name: DISPLAY type:15


    else if (dictionaryType == RDMDictionary.Type.ENUM_TABLES)

    {

    if (series.getDataType() == OMMTypes.ELEMENT_LIST)

    {

    Iterator<OMMEntry> its = series.iterator();

    int k = 0;

    while (its.hasNext())

    {

    System.out.println ("Enum Dict OMMEntry [" + k + "]");

    OMMEntry entry = its.next();

    OMMElementList eel = (OMMElementList)entry.getData();

    Iterator<OMMElementEntry> ee_it = (Iterator<OMMElementEntry>)eel.iterator();

    int q=0;

    while (ee_it.hasNext())

    {

    OMMElementEntry ee = ee_it.next();

    short type = ee.getDataType();

    OMMData dd = ee.getData();

    System.out.println ("Element entry name: " + ee.getName() + " type:" + type);

    q++;

    }

    System.out.println ("q=" + q);

    k++;

    }

    }



  • Hi @chris.xiao

    I would recommend you enable the low-level IPC Trace in your application to confirm if the server is actually sending the Meaning field down or not. This will help confirm if there is an issue with your code or the feed not providing the required data.

    Also, are you consuming data from an internal ADS or via an LPC connection to our cloud service?

    Note that by default RFA traceMsgDomains value of NORMAL does not include Dictionary, so you should use either ALL or DICTIONARY

  • Hi @chris.xiao

    I tried recreating this here myself and I do not see the Meaning entries in my RSSL trace file.

    I did also note that in the above RDM Usage guide table 39, it does state for the MEANING column, that:'Providers do not need to provide this array(even when verbosity is VERBOSE).'

    I have reached out internally to see if I can confirm if this is something that needs to be explicitly enabled on the ADS.


  • Hi
    @umer.nalla

    We consume data from internal ADS.

  • Thanks for confirming. I am still waiting for an answer from the RTDS experts.