question

Upvotes
Accepted
1 0 0 0

为什么收到的数据payloadDataType==128

产品为real time API,在订阅LIBOR= 的数据时,payloadDataType==128被过滤了,什么情况下payloadDataType会==128,如何解决?

#technologyema-api
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 @235601 ,

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 next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

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

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
79.3k 253 52 74

@235601

Thank you for reaching out to us.

The payload data type 128 could be NoDataEnum.

NoDataEnum = 128,        /*!< No Omm data value is present. */

It could happen when the message doesn't have any payload, such as status messages.

void AppClient::onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& ) 
{
    if ( statusMsg.hasName() )
        cout << endl << "Item Name: " << statusMsg.getName();
    
    if ( statusMsg.hasServiceName() )
        cout << endl << "Service Name: " << statusMsg.getServiceName();


    if ( statusMsg.hasState() )
        cout << endl << "Item State: " << statusMsg.getState().toString();
    
    if (DataType::NoDataEnum == statusMsg.getPayload().getDataType()) {
        cout << endl << "No Data";
    }


    cout << endl;
}
Item Name: IBMxx.N
Service Name: ELEKTRON_DD
Item State: Closed / Suspect / Not found / '***The record could not be found'
No Data

You may need to enable tracing in the API to verify the retrieved data.

Please refer to the EMA configuration guide regarding how to enable XML trace.



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.