question

Upvotes
Accepted
185 6 12 25

Blank DataBuffer

Hello we are using RFA 8.1 C++ api to consume market data.

Can you tell me the effect of following call if Data buffer is blank i.e. DataBuffer::isBlank() == true;

double price = dataBuffer.getDouble();

int size = static_cast<int>(dataBuffer.getReal().getValue());


What would be value of "price" and "size" in this case? Is it a valid code?



#technologyrfa-apic++
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
Upvote
Accepted
78.6k 248 52 74

@mktdata

Thanks for reaching out to us.

The application must not access the value in the DataBuffer when the DataBuffer is blank because it can cause unexpected behaviors, such as getting invalid values.

In conclusion, the application must check isBlank() before accessing its value. If the data is blank, the application must not call the get method to retrieve the data.

I hope that this information is of help.

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.