11.07.2015 Views

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

System Introspection for System Analysis on Mobile Devices

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

data and <strong>on</strong>ly <str<strong>on</strong>g>for</str<strong>on</strong>g>ward the extracted data. The result is <str<strong>on</strong>g>for</str<strong>on</strong>g>warded as messageto the client via the communicati<strong>on</strong> interface. Each comp<strong>on</strong>ent threadis holding a list of all clients that have currently requested the comp<strong>on</strong>entthread. If no client is c<strong>on</strong>nected, the comp<strong>on</strong>ent thread is inactivated. Thecomp<strong>on</strong>ent thread needs to listen to the communicati<strong>on</strong> interface <str<strong>on</strong>g>for</str<strong>on</strong>g> directcommands from clients. To achieve this, every comp<strong>on</strong>ent thread is observingthe communicati<strong>on</strong> interface and checks every message <str<strong>on</strong>g>for</str<strong>on</strong>g> its TAG. Messagec<strong>on</strong>taining the TAG are processed by the comp<strong>on</strong>ent thread. Each comp<strong>on</strong>entthread can acquire a special state. Possible states are SLEEPING, RUNNINGor ERROR. Inactive threads in SLEEPING state have no clients c<strong>on</strong>nectedand do not collect data from the comp<strong>on</strong>ent holder. Active threads in RUN-NING state read data and <str<strong>on</strong>g>for</str<strong>on</strong>g>ward it to c<strong>on</strong>nected clients. Whenever an erroroccurs the state is changed to ERROR. Examples can be a robot comp<strong>on</strong>entnot reachable due to system failure. To c<strong>on</strong>trol the update rate of each comp<strong>on</strong>entthread the delay between two reading cycles can be c<strong>on</strong>figured in thec<strong>on</strong>figurati<strong>on</strong> file.Figure 5.8: Comp<strong>on</strong>ent Thread collecting and publishing data - Aftercreating and initializing the list of c<strong>on</strong>nected clients ischecked. If no client is c<strong>on</strong>nected the Comp<strong>on</strong>ent Threadbecomes inactive until the Comp<strong>on</strong>ent Dispatcher activatesit. If clients are c<strong>on</strong>nected the Comp<strong>on</strong>ent Threadreads the comp<strong>on</strong>ents of the robot via the Comp<strong>on</strong>entHolder and <str<strong>on</strong>g>for</str<strong>on</strong>g>wards the data to the c<strong>on</strong>nected clients.Logging DispatcherThe logging dispatcher c<strong>on</strong>trols logging cycles requested by clients. To m<strong>on</strong>itorall created cycles the logging dispatcher holds a local list c<strong>on</strong>taining clientsand their logging cycle. The logging dispatcher observes the communicati<strong>on</strong>interface <str<strong>on</strong>g>for</str<strong>on</strong>g> new requests and holds a reference to the list of c<strong>on</strong>nected clients.28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!