question

Upvotes
Accepted
5 0 0 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.

hi @shenping22975 ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

@shenping22975

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@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.