source: pacpussensors/trunk/Dualshock/dualshock.cpp@ 21

Last change on this file since 21 was 21, checked in by phudelai, 11 years ago

New component for the wifibot and the dualshock 3

File size: 910 bytes
Line 
1#include "dualshock.h"
2
3#include "kernel/cstdint.h"
4#include "kernel/ComponentFactory.h"
5#include "kernel/ComponentManager.h"
6#include "kernel/DbiteFileTypes.h"
7#include "kernel/Log.h"
8
9using namespace pacpus;
10using std::string;
11
12DECLARE_STATIC_LOGGER("pacpus.base.dualshock");
13
14static ComponentFactory<Dualshock> sFactory("Dualshock");
15
16Dualshock::Dualshock(QString name)
17 : ComponentBase(name)
18{
19}
20
21Dualshock::~Dualshock()
22{
23}
24
25void Dualshock::startActivity()
26{
27 try {
28 d = new(DualshockAPI);
29 d->start();
30 }
31 catch(char const* str) {
32 std::cerr << "ERROR: " << str << std::endl;
33 }
34 std::cerr << "Thread dualshock started\n";
35}
36
37void Dualshock::stopActivity()
38{
39 d->stop();
40 std::cerr << "Thread dualshock stopped\n";
41}
42
43ComponentBase::COMPONENT_CONFIGURATION Dualshock::configureComponent(XmlComponentConfig config)
44{
45 return ComponentBase::CONFIGURED_OK;
46}
Note: See TracBrowser for help on using the repository browser.