Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Functions
_
a
b
c
d
f
g
i
j
l
m
o
p
q
r
s
t
u
v
Variables
_
a
b
c
d
e
f
g
i
j
l
m
n
p
r
s
u
v
w
Typedefs
c
e
f
i
m
q
r
s
v
Enumerations
Enumerator
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
b
d
e
f
k
l
m
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
g
i
j
k
m
n
o
p
r
s
t
u
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
Functions
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
Variables
Typedefs
c
d
e
f
k
r
s
t
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
v
src
tools
binary-int-to-uint.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2010,
3
* François Bleibel,
4
* Olivier Stasse,
5
*
6
* CNRS/AIST
7
*
8
*/
9
10
/* --- SOT --- */
11
#include <
sot/core/binary-int-to-uint.hh
>
12
#include <
sot/core/debug.hh
>
13
#include <
sot/core/exception-feature.hh
>
14
#include <
sot/core/pool.hh
>
15
using namespace
std;
16
17
#include <dynamic-graph/factory.h>
18
19
using namespace
dynamicgraph::sot
;
20
using namespace
dynamicgraph
;
21
22
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
(
BinaryIntToUint
,
"BinaryIntToUint"
);
23
24
/* --------------------------------------------------------------------- */
25
/* --- CLASS ----------------------------------------------------------- */
26
/* --------------------------------------------------------------------- */
27
28
BinaryIntToUint::BinaryIntToUint(
const
string
&fname)
29
:
Entity
(fname),
30
binaryIntSIN(NULL,
"BinaryIntToUint("
+
name
+
")::input(int)::sin"
),
31
binaryUintSOUT(
32
boost
::bind(&
BinaryIntToUint
::computeOutput, this, _1, _2),
33
binaryIntSIN,
34
"BinaryIntToUint("
+
name
+
")::output(unsigned int)::sout"
) {
35
signalRegistration
(
binaryIntSIN
<<
binaryUintSOUT
);
36
}
37
38
/* --------------------------------------------------------------------- */
39
/* --------------------------------------------------------------------- */
40
/* --------------------------------------------------------------------- */
41
42
unsigned
&
BinaryIntToUint::computeOutput
(
unsigned
&res,
sigtime_t
time) {
43
sotDEBUGIN
(15);
44
45
int
in =
binaryIntSIN
.
access
(time);
46
if
(in < 0) {
47
res
= 0;
48
}
else
{
49
res
= 1;
50
}
51
52
sotDEBUGOUT
(15);
53
return
res
;
54
}
55
56
void
BinaryIntToUint::display
(std::ostream &os)
const
{
57
os <<
"BinaryIntToUint <"
<<
name
<<
"> TODO..."
<< endl;
58
}
dynamicgraph
dynamicgraph::Entity
boost
dynamicgraph::Entity::name
std::string name
debug.hh
res
res
dynamicgraph::SignalPtr::access
virtual const T & access(const Time &t)
sotDEBUGOUT
#define sotDEBUGOUT(level)
Definition:
debug.hh:215
dynamicgraph::sot::BinaryIntToUint::display
virtual void display(std::ostream &os) const
Definition:
binary-int-to-uint.cpp:56
dynamicgraph::sigtime_t
int64_t sigtime_t
sotDEBUGIN
#define sotDEBUGIN(level)
Definition:
debug.hh:214
dynamicgraph::sot::BinaryIntToUint::binaryUintSOUT
dynamicgraph::SignalTimeDependent< unsigned, sigtime_t > binaryUintSOUT
Definition:
binary-int-to-uint.hh:48
exception-feature.hh
pool.hh
dynamicgraph::sot
binary-int-to-uint.hh
dynamicgraph::sot::BinaryIntToUint::binaryIntSIN
dynamicgraph::SignalPtr< int, sigtime_t > binaryIntSIN
Definition:
binary-int-to-uint.hh:47
dynamicgraph::sot::BinaryIntToUint::computeOutput
virtual unsigned int & computeOutput(unsigned int &res, sigtime_t time)
Definition:
binary-int-to-uint.cpp:42
dynamicgraph::sot::BinaryIntToUint
Definition:
binary-int-to-uint.hh:40
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(BinaryIntToUint, "BinaryIntToUint")
dynamicgraph::Entity::signalRegistration
void signalRegistration(const SignalArray< sigtime_t > &signals)
compile.name
name
Definition:
compile.py:23
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31