Hi Timo, We understood the different logging levels in sensord.
Infact we enabled debug level. We hard coded in ../sensord/loggin.cpp "SensordLogLevel SensordLogger::outputLevel = SensordLogDebug;" We are getting following messages for ALS in sensoradopter test ***************************************************************************************************************************************** [r...@localhost bin]# ./sensoradaptors-test ********* Start testing of AdaptorTest ********* Config: Using QTest library 4.7.0, Qt 4.7.0 PASS : AdaptorTest::initTestCase() *DEBUG* 2000-01-01 00:06:49 [Sensord] [../../../adaptors/alsadaptor/alsadaptor.cpp:51:ALSAdaptor::ALSAdaptor(const QString&)] ALSAdaptor::ALSAdaptorBH1780 *DEBUG* 2000-01-01 00:06:49 [Sensord] [../../../adaptors/alsadaptor/alsadaptor.cpp:73:virtual bool ALSAdaptor::startSensor(const QString&)] ALSAdaptor::startSensor *DEBUG* 2000-01-01 00:06:49 [Sensord] [../../../adaptors/alsadaptor/alsadaptor.cpp:98:virtual void ALSAdaptor::stopSensor(const QString&)] ALSAdaptor::stopSensor PASS : AdaptorTest::testALSAdaptor() ****************************************************************************************************************************************** As you said,if sensord test are not intended for overall functionality testing then qt mobility examples are only alternative. Let us do some more testing before identifying if there is a problem. By the way,are there any test cases at sensor level(\meego-middleware-sensorfw\sensors\alssensor\)? Thanks & Regards, Preetham -----Original Message----- From: Rongas Timo [mailto:[email protected]] Sent: Wednesday, December 01, 2010 2:26 PM To: Preetham-rao K Cc: [email protected] Subject: RE: [MeeGo-dev] Sensor Framework: Show_als application not working on QT mobility level >-----Original Message----- >From: Preetham-rao K [mailto:[email protected]] >Sent: Wednesday, December 01, 2010 10:18 AM >To: Rongas Timo; [email protected] >Subject: RE: [MeeGo-dev] Sensor Framework: Show_als >application not working on QT mobility level > >We are just wondering about the messages. >We have written just a adopter plug-in (as attached in previous mail) >and we have debug messages in als adopter but none seems to be coming.. There are 4 different logging levels in sensord: test, debug, warning, critical. Which level your log message goes to depends on X in sensordLogX() (X=[T,D,W,C] respectively). You are (correcty) using T and D. By default only criticals and warnings are written to syslog. Have a look at --log-target and --log-level parameters for sensord. Or for debugging purposes just make your output go to level 'Warning'. >Is there a way to test it in client API test(like alsadopter >and alssensor are working properly)? There is no automatic test that would verify that you are actually getting some data. These are tricky to create, as you often need the hardware to experience some change in order to get samples. Sensord tests basically only poke different functions, verify that settings get changed correctly, test dataflow with generated data etc. If you confirm that your adaptor is propagating data to the framework, but nothing is shown with show_als, please file a bug :) // Timo > >By default code is this one... > >void ClientApiTest::testALSSensor() >{ > QString sensorName("alssensor"); > SensorManagerInterface& sm = SensorManagerInterface::instance(); > QVERIFY( sm.isValid() ); > > // Attempt to get another control session > ALSSensorChannelInterface* failIfc = >ALSSensorChannelInterface::controlInterface(sensorName); > QVERIFY2(!failIfc, "Got another control session"); >} > > >This is what we understand for MeeGO > >Qt mobility: > >Application-->(Qsensor. QAmbientLightReading)-->(sensor >backend/our case it may falling to mameo6) > >Sensor Framework:(Sensor backend) > >Plug-in interface-->(alssensor and alsadopter) > > > >-----Original Message----- >From: Rongas Timo [mailto:[email protected]] >Sent: Wednesday, December 01, 2010 1:26 PM >To: Preetham-rao K; [email protected] >Subject: RE: [MeeGo-dev] Sensor Framework: Show_als >application not working on QT mobility level > >>-----Original Message----- >>From: [email protected] >>[mailto:[email protected]] On Behalf Of Preetham-rao K >>Sent: Tuesday, November 30, 2010 12:42 PM >>To: [email protected] >>Subject: [MeeGo-dev] Sensor Framework: Show_als application >>not working on QT mobility level >> >>Hi Timo & Markus, >> >> >> >>We want to test qt mobility test application given for sensors >>like show_als >> >>We have written adopter for BH1780 ALS using sysfs adopter >>class in meego sensor framework(0.6.19) >> >>Please see the code attached (based on BH1780 driver in linux kernel) >> >> >> >>But when we run the test we are getting following log. >> >>Have we done something wrong? >> >> >> >>"[r...@localhost bin]# ./show_als >> >>loaded the Generic plugin >> >>loaded the grue plugin >> >>Loaded the Maemo 6 sensor plugin >> >>Request for control interface not granted... >> >>New listen sensor "alssensor" interface created with session id 3 ... >> >>Data rate in don't care mode (interval 0 ms) for "alssensor"" > >The log seems to be fine. It just shows that sensord did not >grant you "control session" for ALS, and as a fallback you got >a "listen session". There is no practical difference between >control/listen anymore, and the whole concept could get deprecated. > >You might want to define a default interval for your adaptor >with setDefaultInterval(), as it runs in busypoll mode. You >will still see '0' as the value via QtMobility to notify 'I >don't care', but the adaptor behaves reasonably. If there's no >default, it defaults to zero, which means it will keep reading >as fast as the system allows it to. > >setDefaultInterval() is available from sensord-0.6.28. If you >need things to run nicely with 0.6.19, you need to handle the >interval setting directly with the interval property. > >Do you have trouble seeing ALS values, or were you just >wondering about the messages? > >// Timo > _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
