source: flair-src/trunk/lib/FlairMeta/src/Ugv.cpp@ 402

Last change on this file since 402 was 377, checked in by Sanahuja Guillaume, 4 years ago

ugv update

  • Property svn:eol-style set to native
File size: 1.3 KB
RevLine 
[377]1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5// created: 2020/12/16
6// filename: Ugv.cpp
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Base class to construct sensors/actuators depending on Ugv type
14//
15//
16/*********************************************************************/
17
18#include "Ugv.h"
19#include <FrameworkManager.h>
20#include <UgvControls.h>
21
22
23using std::string;
24using namespace flair::core;
25using namespace flair::actuator;
26
27namespace {
28 flair::meta::Ugv *UgvSingleton = NULL;
29}
30
31namespace flair {
32namespace meta {
33
34Ugv *GetUgv(void) { return UgvSingleton; }
35
36Ugv::Ugv(string name)
37 : Object(getFrameworkManager(), name) {
38 if (UgvSingleton != NULL) {
39 Err("Ugv must be instanced only one time\n");
40 return;
41 }
42
43 UgvSingleton = this;
44 controls=NULL;
45
46}
47
48Ugv::~Ugv() {}
49
50
51void Ugv::SetUgvControls(const UgvControls *inControls) {
52 controls = (UgvControls *)inControls;
53}
54
55
56void Ugv::UseDefaultPlot(void) {
57 if(controls) controls->UseDefaultPlot();
58}
59
60
61UgvControls *Ugv::GetUgvControls(void) const { return controls; }
62
63} // end namespace meta
64} // end namespace flair
Note: See TracBrowser for help on using the repository browser.