EMA Example: opening item stream with a list of field IDs gets error with code -4048

Hi the following code (taken from the EMA Example series consumer/series300/ex360_MP_View:

ReqMsg reqMsg = EmaFactory.createReqMsg()
.name("/IBN.N")
.serviceName("ELEKTRON_DD")
.domainType(6);

ElementList view = EmaFactory.createElementList();
OmmArray array = EmaFactory.createOmmArray();

array.fixedWidth(5);//Subscribe to 5 fields
array.add(EmaFactory.createOmmArrayEntry().intValue(19));
array.add(EmaFactory.createOmmArrayEntry().intValue(22));

array.add(EmaFactory.createOmmArrayEntry().intValue(134));
array.add(EmaFactory.createOmmArrayEntry().intValue(15));
array.add(EmaFactory.createOmmArrayEntry().intValue(25));

view.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));


//!!!!!THIS LIVE THROWS AN EXCEPTION
view.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, array));

And teh exception is:

Exception Type='OmmInvalidUsageException', Text='Unsupported fixedWidth encoding in encoding entry of Int type. Fixed width='5'. ', Error Code='-4048'

If I try with 4 fields it work correctly!


Thank you


Best Answer

Answers