question

Upvotes
Accepted
5 0 1 5

EMA decode fid 3754

Here is my code to decode EMA fid 3754

switch(fe.getFieldId())

{

case 3754:

fxsnapshot.Enlarge = atof(fe.getRmtes().toString());

......

......

}


the cout of RefreshMsg is

FieldEntry fid="3754" name="SCALING" dataType="Rmtes" value="1"


As I decode it as string,I can not get the right value.

May someone tell how to decode the Rmtes dataType,thanks.

#technologyema-apic++decoder
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
24.8k 64 15 21

How about this in EMA -

if(fieldEntry.fieldId() == 3754)
  double scalingF = Double.parseDouble(fieldEntry.rmtes().toString());
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for your help
Upvote
86.2k 292 53 79

@shenping22975

I tested the code and it can convert a string to a number properly.

const FieldEntry& fe = fl.getEntry();
if (fe.getFieldId() == 3754) {
    float x  = atof(fe.getRmtes().toString());
    printf("\n 3754: %f\n", x);
}

1668057616774.png

Please explain more about the problem.


1668057616774.png (2.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for your help.


Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.