question

Upvotes
Accepted
5 0 1 3

EMA Cons260 decode Data::BlankEnum

Hi

I am puzzled by the EMA example Cons260,here is the code


while ( fl.forth( searchList ) ) // search for a set of matching fids

{

const FieldEntry& fe = fl.getEntry();


cout << "Name: " << fe.getName() << " Value: ";


if ( fe.getCode() == Data::BlankEnum )

cout << " blank" << endl;

else

switch ( fe.getLoadType() )

{

case DataType::RealEnum:

cout << fe.getReal().getAsDouble() << endl;

break;

case DataType::DateEnum:

cout << (UInt64)fe.getDate().getDay() << " / " << (UInt64)fe.getDate().getMonth() << " / " << (UInt64)fe.getDate().getYear() << endl;

break;

case DataType::TimeEnum:

cout << (UInt64)fe.getTime().getHour() << ":" << (UInt64)fe.getTime().getMinute() << ":" << (UInt64)fe.getTime().getSecond() << ":" << (UInt64)fe.getTime().getMillisecond() << endl;

break;

case DataType::IntEnum:

cout << fe.getInt() << endl;

break;

.....

......


What is Data::BlankEnum? What is the purpose of this line? And what is the cout of RefreshMsg or UpdateMsg which contains the BlankEnum?Is there an example of this type,thanks.

if ( fe.getCode() == Data::BlankEnum )

ema-apidecoder
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.

1 Answer

· Write an Answer
Upvotes
Accepted
81.5k 267 53 77

@shenping22975

Thanks for reaching out to us.

This is the output of cout of a message that contains blank data.

1668154514903.png

All primitive datatype types can be blank. A blank value indicates that no value is currently present and any previously stored or displayed primitive value should be cleared.

Please feel free to reach out if you have any further questions.


1668154514903.png (35.0 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.

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.