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.

LogThread - the Logging CycleA LogThread represents a single logging cycle <str<strong>on</strong>g>for</str<strong>on</strong>g> <strong>on</strong>e client. A LogThreadextends the Thread class to allow the executi<strong>on</strong> of multiple logging cyclesin parallel. Comp<strong>on</strong>ents to be logged are added as LogClass elements toa map by using the LogClassInterface. On initializati<strong>on</strong> the LogThreadcreates a new XML document. Every cycle a new element is created and attachedto the XML document c<strong>on</strong>taining the current timestamp of the probe.This element is called TimestampElement and used as c<strong>on</strong>tainer <str<strong>on</strong>g>for</str<strong>on</strong>g> the currentdata of the logged comp<strong>on</strong>ents. The LogThread iterates over the mapof LogClass elements and reads the data of each LogClass by calling thereadData() method. The result of the method is added as child to the currentTimestampElement.For backup reas<strong>on</strong> a LogThread saves the current XML document to a temporaryfile at a given frequency defined in the c<strong>on</strong>figurati<strong>on</strong> file. The temporaryfile is unique <str<strong>on</strong>g>for</str<strong>on</strong>g> each cycle and is used to backup the logged data in caseof an error occurring <strong>on</strong> runtime. When the LogThread is interrupt by theLogDispatcher, the XML document is saved to a final file <strong>on</strong> the file systemof the probe. Each file gets a unique name c<strong>on</strong>taining the creati<strong>on</strong> timestampand is saved in a separate folder unique <str<strong>on</strong>g>for</str<strong>on</strong>g> each client.LogClassInterface - How to Read the DataThe LogClassInterface is created <str<strong>on</strong>g>for</str<strong>on</strong>g> c<strong>on</strong>crete implementati<strong>on</strong>s of loggingclasses. It is used to read and collect data from the Comp<strong>on</strong>entHolder. Thecollected data is placed inside a new XML element and can be accessed by thereadData() method. The idea behind single logging classes is to support extensi<strong>on</strong>of logging cycles. To create new logging classes the LogClassInterfacemust be implemented and the class itself added to the XML c<strong>on</strong>figurati<strong>on</strong> file.Once added the comp<strong>on</strong>ent is automatically offered by the LogDispatcher <strong>on</strong>request by the client.6.3 Implemented Comp<strong>on</strong>ents of the RobotDue to the limited time <str<strong>on</strong>g>for</str<strong>on</strong>g> implementing the system <strong>on</strong>ly seven comp<strong>on</strong>entsof the used robot plat<str<strong>on</strong>g>for</str<strong>on</strong>g>m have been implemented as comp<strong>on</strong>ent thread. Implementedsensors are the laser sensor, SLAM sensor, pers<strong>on</strong> sensor, speechsensor and a camera sensor <str<strong>on</strong>g>for</str<strong>on</strong>g> an USB camera. Implemented actuators arec<strong>on</strong>trolling the navigati<strong>on</strong> and the speech comp<strong>on</strong>ent of the robot.41

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

Saved successfully!

Ooh no, something went wrong!