MCPcopy Create free account
hub / github.com/davisking/dlib / notify_control_node

Method notify_control_node

dlib/bsp/bsp.cpp:420–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418// ----------------------------------------------------------------------------------------
419
420 void bsp_context::
421 notify_control_node (
422 char val
423 )
424 {
425 if (node_id() == 0)
426 {
427 using namespace impl2;
428 switch(val)
429 {
430 case SENT_MESSAGE: {
431 ++outstanding_messages;
432 } break;
433
434 case GOT_MESSAGE: {
435 --outstanding_messages;
436 } break;
437
438 case IN_WAITING_STATE: {
439 // nothing to do in this case
440 } break;
441
442 default:
443 DLIB_CASSERT(false,"This should never happen");
444 }
445 }
446 else
447 {
448 serialize(val, _cons[0]->stream);
449 _cons[0]->stream.flush();
450 }
451 }
452
453// ----------------------------------------------------------------------------------------
454

Callers

nothing calls this directly

Calls 2

serializeFunction · 0.70
flushMethod · 0.45

Tested by

no test coverage detected