source: pacpussensors/trunk/StdDbtPlayerComponents/DbtPlyVtgManager.cpp@ 123

Last change on this file since 123 was 109, checked in by nguyenhu, 9 years ago

I/O for DbtPlyVtgManager, add classes to compile, fixed DbtPlyCPT by adding type Pose3D from previous version

File size: 2.7 KB
Line 
1/*********************************************************************
2// created: 2007/04/12 - 16:30
3
4//
5// author: Elie Al Alam & Gerald Dherbomez
6//
7// version: $Id: DbtPlyVtgManager.cpp 676 2008-06-26 10:33:57Z gdherbom $
8//
9// purpose: Dbite Player GGA Manager implementation
10*********************************************************************/
11
12#include "DbtPlyVtgManager.h"
13
14#include <cmath>
15#include <qapplication.h>
16
17#include "Pacpus/kernel/ComponentManager.h"
18
19namespace pacpus {
20
21//////////////////////////////////////////////////////////////////////////
22// Construction de la fabrique de composant DbtPlyVtgManager
23//////////////////////////////////////////////////////////////////////////
24static ComponentFactory<DbtPlyVtgManager> sFactory("DbtPlyVtgManager");
25
26// double dist1[2];
27// double dist2[2];
28
29//////////////////////////////////////////////////////////////////////////
30// Constructor
31//////////////////////////////////////////////////////////////////////////
32DbtPlyVtgManager::DbtPlyVtgManager(QString name)
33 : DbtPlyFileManager (name)
34{
35
36}
37
38//////////////////////////////////////////////////////////////////////////
39// Destructor
40DbtPlyVtgManager::~DbtPlyVtgManager()
41{
42
43}
44
45//////////////////////////////////////////////////////////////////////////
46// Processes data
47void DbtPlyVtgManager::processData(road_time_t t, road_timerange_t tr , void * buf)
48{
49 val = (trame_vtg*)(buf);
50
51 // make local copy of VTG frame
52 memcpy(&mVtg.frame, val, sizeof(trame_vtg));
53 mVtg.time = t;
54 mVtg.timerange = tr;
55
56 // send VTG data to output
57 checkedSend(outVtg, mVtg);
58
59}
60
61ComponentBase::COMPONENT_CONFIGURATION DbtPlyVtgManager::configureComponent(XmlComponentConfig config)
62{
63 DbtPlyFileManager::configureComponent(config);
64
65 return ComponentBase::CONFIGURED_OK;
66}
67
68void DbtPlyVtgManager::startActivity()
69{
70 DbtPlyFileManager::startActivity();
71 outVtg = getTypedOutput<TimestampedVtgFrame, DbtPlyVtgManager>("vtg");
72 // user interface
73}
74
75void DbtPlyVtgManager::stopActivity()
76{
77 DbtPlyFileManager::stopActivity();
78}
79
80
81/************************************************************************
82 * Called by the framework at initialization
83 ************************************************************************/
84void DbtPlyVtgManager::addInputs()
85{
86 // uncomment to add an input
87}
88
89
90/************************************************************************
91 * Called by the framework at initialization
92 ************************************************************************/
93void DbtPlyVtgManager::addOutputs()
94{
95 // empty: no output
96 addOutput<TimestampedVtgFrame, DbtPlyVtgManager>("vtg");
97}
98} // namespace pacpus
Note: See TracBrowser for help on using the repository browser.