source: pacpussensors/trunk/StdDbtPlayerComponents/DbtPlyGstManager.cpp

Last change on this file was 150, checked in by lifranck, 7 years ago

Changes to GstManager, sending the message now

File size: 1.9 KB
Line 
1/*********************************************************************
2// created: 2007/04/12 - 16:30
3
4//
5// author: Elie Al Alam & Gerald Dherbomez
6//
7// version: $Id: DbtPlyGstManager.cpp 1203 2012-08-02 11:58:15Z morasjul $
8//
9// purpose: Dbite Player Gst Manager implementation
10*********************************************************************/
11
12#include "DbtPlyGstManager.h"
13
14#include <qapplication.h>
15
16//#include "kernel/ComponentManager.h"
17
18namespace pacpus {
19
20// Construction de la fabrique de composant DbtPlyTrigger
21static ComponentFactory<DbtPlyGstManager> sFactory("DbtPlyGstManager");
22
23DbtPlyGstManager::DbtPlyGstManager(QString name)
24 : DbtPlyFileManager (name)
25{
26
27}
28
29DbtPlyGstManager::~DbtPlyGstManager()
30{
31
32}
33
34void DbtPlyGstManager::processData(road_time_t t, road_timerange_t tr , void * buf)
35{
36 // no data available
37 if (!buf) {
38 LOG_DEBUG("no data available: NULL buffer");
39 return;
40 }
41 // make local copy of GGA frame
42 memcpy(&mGst.frame, buf, sizeof(trame_gst));
43 mGst.time = t;
44 mGst.timerange = tr;
45
46 // send GGA data to output
47 checkedSend(outGst, mGst);
48
49 //old val = (trame_gst*)(buf);
50
51}
52
53ComponentBase::COMPONENT_CONFIGURATION DbtPlyGstManager::configureComponent(XmlComponentConfig config)
54{
55 DbtPlyFileManager::configureComponent(config);
56
57 return ComponentBase::CONFIGURED_OK;
58}
59
60
61void DbtPlyGstManager::startActivity()
62{
63 DbtPlyFileManager::startActivity();
64
65 outGst = getTypedOutput<TimestampedGstFrame, DbtPlyGstManager>("gst");
66
67 // user interface
68 if (hasGui())
69 displayUI();
70
71}
72
73
74void DbtPlyGstManager::stopActivity()
75{
76 DbtPlyFileManager::stopActivity();
77}
78
79void DbtPlyGstManager::addOutputs()
80{
81 // empty: no output
82 addOutput<TimestampedGstFrame, DbtPlyGstManager>("gst");
83}
84
85void DbtPlyGstManager::displayUI()
86{
87 // TODO
88 LOG_WARN("GUI not implemented");
89}
90
91} // namespace pacpus
Note: See TracBrowser for help on using the repository browser.