24 #include <blackboard/shmem/lister.h> 25 #include <utils/ipc/shm.h> 26 #include <utils/system/console_colors.h> 42 BlackBoardSharedMemoryLister::BlackBoardSharedMemoryLister()
48 BlackBoardSharedMemoryLister::~BlackBoardSharedMemoryLister()
57 BlackBoardSharedMemoryLister::print_header()
60 << cblue <<
"Fawkes BlackBoard Shared Memory Segments" << cnormal << endl
61 <<
"========================================================================" << endl
64 "%-3s %-10s %-11s %-16s %-12s %s\n",
"#",
"ShmID",
"Semaphore",
"Bytes",
"# attached",
"State");
65 cout << cnormal <<
"------------------------------------------------------------------------" 75 BlackBoardSharedMemoryLister::print_footer()
77 cout <<
"========================================================================" << endl;
84 BlackBoardSharedMemoryLister::print_no_segments()
86 cout <<
"No Fawkes BlackBoard shared memory segments found" << endl;
94 BlackBoardSharedMemoryLister::print_no_orphaned_segments()
96 cout <<
"No " << cdarkgray <<
"orphaned" << cnormal
97 <<
" Fawkes BlackBoard shared memory segments found" << endl;
114 unsigned int mem_size,
117 unsigned int nattch = SharedMemory::num_attached(shm_id);
118 bool swapable = SharedMemory::is_swapable(shm_id);
119 bool destroyed = SharedMemory::is_destroyed(shm_id);
121 printf(
"%-3u %-10d 0x%08x %-16u %-12u %s%s%s%s%s\n",
127 ((nattch > 1) ?
"active" :
"orphaned"),
128 ((swapable || destroyed) ?
" (" :
""),
129 (swapable ?
"S" :
""),
130 (destroyed ?
"D" :
""),
131 ((swapable || destroyed) ?
")" :
""));
Fawkes library namespace.