MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / callback

Function callback

tests/FACE/CallbackAndReceive/Subscriber/Subscriber.cpp:18–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16bool callback_unregistered = false;
17
18void callback(FACE::TRANSACTION_ID_TYPE,
19 Messenger::Message& msg,
20 FACE::MESSAGE_TYPE_GUID message_type_id,
21 FACE::MESSAGE_SIZE_TYPE message_size,
22 const FACE::WAITSET_TYPE,
23 FACE::RETURN_CODE_TYPE& return_code)
24{
25 ++callback_count;
26 expected = msg.count + 1;
27 ACE_DEBUG((LM_INFO, "In callback() (the %d time): %C\t%d\t"
28 "message_type_id: %Ld\tmessage_size: %d\n",
29 callback_count, msg.text.in(), msg.count,
30 message_type_id, message_size));
31 callbackHappened = true;
32 if (callback_count % 2 == 0) {
33 ACE_DEBUG((LM_INFO, "Subscriber: about to Unregister_Callback()\n"));
34 FACE::TS::Unregister_Callback(connId, return_code);
35 if (return_code != FACE::RC_NO_ERROR) return;
36 callback_unregistered = true;
37 }
38 return_code = FACE::RC_NO_ERROR;
39}
40
41int ACE_TMAIN(int, ACE_TCHAR*[])
42{

Callers

nothing calls this directly

Calls 2

Unregister_CallbackFunction · 0.85
inMethod · 0.45

Tested by

no test coverage detected