GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tests/tools/dummy-sot-external-interface.cc Lines: 12 24 50.0 %
Date: 2023-03-13 12:09:37 Branches: 12 24 50.0 %

Line Branch Exec Source
1
/*
2
 * Copyright 2011,
3
 * Olivier Stasse,
4
 *
5
 * CNRS
6
 *
7
 */
8
/* -------------------------------------------------------------------------- */
9
/* --- INCLUDES ------------------------------------------------------------- */
10
/* -------------------------------------------------------------------------- */
11
12
#include "dummy-sot-external-interface.hh"
13
14
#include <iostream>
15
#include <sot/core/debug.hh>
16
17
using namespace std;
18
using namespace dynamicgraph::sot;
19
20
void DummySotExternalInterface::setupSetSensors(
21
    std::map<std::string, dynamicgraph::sot::SensorValues> &sensorsIn) {
22
  nominalSetSensors(sensorsIn);
23
  return;
24
}
25
26
1
void DummySotExternalInterface::nominalSetSensors(
27
    std::map<std::string, dynamicgraph::sot::SensorValues> & /*sensorsIn*/) {
28
1
  return;
29
}
30
31
void DummySotExternalInterface::cleanupSetSensors(
32
    std::map<std::string, dynamicgraph::sot::SensorValues> &sensorsIn) {
33
  nominalSetSensors(sensorsIn);
34
  return;
35
}
36
37
1
void DummySotExternalInterface::getControl(
38
    std::map<std::string, dynamicgraph::sot::ControlValues> &controlOut) {
39

1
  controlOut["ctrl_map_name"] = dynamicgraph::sot::ControlValues();
40


1
  controlOut["ctrl_map_name"].setName("ctrl_value_name");
41


1
  controlOut["ctrl_map_name"].setValues(std::vector<double>(5, 3.1415));
42
1
  return;
43
}
44
45
void DummySotExternalInterface::setSecondOrderIntegration(void) {
46
  second_integration_ = true;
47
  return;
48
}
49
50
void DummySotExternalInterface::setNoIntegration(void) {
51
  second_integration_ = false;
52
  return;
53
}
54
55
extern "C" {
56
10
dynamicgraph::sot::AbstractSotExternalInterface *createSotExternalInterface() {
57
10
  return new DummySotExternalInterface();
58
}
59
}
60
61
extern "C" {
62
10
void destroySotExternalInterface(
63
    dynamicgraph::sot::AbstractSotExternalInterface *p) {
64
10
  delete p;
65
10
}
66
}