Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
sot-core
Commits
f1b6da88
Commit
f1b6da88
authored
6 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rename entity Switch into Latch
parent
0f0bb642
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/CMakeLists.txt
+1
-1
1 addition, 1 deletion
include/CMakeLists.txt
include/sot/core/latch.hh
+20
-20
20 additions, 20 deletions
include/sot/core/latch.hh
src/CMakeLists.txt
+1
-1
1 addition, 1 deletion
src/CMakeLists.txt
src/tools/latch.cpp
+3
-3
3 additions, 3 deletions
src/tools/latch.cpp
with
25 additions
and
25 deletions
include/CMakeLists.txt
+
1
−
1
View file @
f1b6da88
...
...
@@ -31,7 +31,7 @@ SET(NEWHEADERS
sot/core/exception-tools.hh
sot/core/binary-op.hh
sot/core/derivator.hh
sot/core/
swi
tch.hh
sot/core/
la
tch.hh
sot/core/fir-filter.hh
sot/core/integrator-abstract.hh
sot/core/integrator-euler.hh
...
...
This diff is collapsed.
Click to expand it.
include/sot/core/
swi
tch.hh
→
include/sot/core/
la
tch.hh
+
20
−
20
View file @
f1b6da88
/*
* Copyright 2017-, Rohan Budhiraja, CNRS
* Copyright 2017-, Rohan Budhiraja,
Joseph Mirabel,
CNRS
*
* This file is part of sot-core.
* sot-core is free software: you can redistribute it and/or
...
...
@@ -14,8 +14,8 @@
* with sot-core. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SOT_
SWI
TCH_H__
#define __SOT_
SWI
TCH_H__
#ifndef __SOT_
LA
TCH_H__
#define __SOT_
LA
TCH_H__
/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
...
...
@@ -40,7 +40,7 @@ namespace dynamicgraph {
using
dynamicgraph
::
command
::
makeCommandVoid0
;
using
dynamicgraph
::
command
::
docCommandVoid0
;
class
Swi
tch
:
public
Entity
class
La
tch
:
public
Entity
{
public:
/* --- SIGNAL --- */
...
...
@@ -52,34 +52,34 @@ namespace dynamicgraph {
protected:
bool
signalOutput
;
void
turnOn
(){
signalOutput
=
true
;
}
bool
&
turnOn
Swi
tch
(
bool
&
res
,
int
){
res
=
signalOutput
=
true
;
return
res
;
}
bool
&
turnOn
La
tch
(
bool
&
res
,
int
){
res
=
signalOutput
=
true
;
return
res
;
}
void
turnOff
(){
signalOutput
=
false
;
}
bool
&
turnOff
Swi
tch
(
bool
&
res
,
int
){
res
=
signalOutput
=
false
;
return
res
;
}
bool
&
turnOff
La
tch
(
bool
&
res
,
int
){
res
=
signalOutput
=
false
;
return
res
;
}
bool
&
swi
tchOutput
(
bool
&
res
,
int
){
res
=
signalOutput
;
return
res
;
}
bool
&
la
tchOutput
(
bool
&
res
,
int
){
res
=
signalOutput
;
return
res
;
}
public
:
Swi
tch
(
const
std
::
string
&
name
)
La
tch
(
const
std
::
string
&
name
)
:
Entity
(
name
)
,
outSOUT
(
"
Swi
tch("
+
name
+
")::output(bool)::out"
)
,
turnOnSOUT
(
"
Swi
tch("
+
name
+
")::output(bool)::turnOnSout"
)
,
turnOffSOUT
(
"
Swi
tch("
+
name
+
")::output(bool)::turnOffSout"
)
,
outSOUT
(
"
La
tch("
+
name
+
")::output(bool)::out"
)
,
turnOnSOUT
(
"
La
tch("
+
name
+
")::output(bool)::turnOnSout"
)
,
turnOffSOUT
(
"
La
tch("
+
name
+
")::output(bool)::turnOffSout"
)
{
outSOUT
.
setFunction
(
boost
::
bind
(
&
Swi
tch
::
swi
tchOutput
,
this
,
_1
,
_2
));
turnOnSOUT
.
setFunction
(
boost
::
bind
(
&
Swi
tch
::
turnOn
Swi
tch
,
this
,
_1
,
_2
));
turnOffSOUT
.
setFunction
(
boost
::
bind
(
&
Swi
tch
::
turnOff
Swi
tch
,
this
,
_1
,
_2
));
outSOUT
.
setFunction
(
boost
::
bind
(
&
La
tch
::
la
tchOutput
,
this
,
_1
,
_2
));
turnOnSOUT
.
setFunction
(
boost
::
bind
(
&
La
tch
::
turnOn
La
tch
,
this
,
_1
,
_2
));
turnOffSOUT
.
setFunction
(
boost
::
bind
(
&
La
tch
::
turnOff
La
tch
,
this
,
_1
,
_2
));
signalOutput
=
false
;
signalRegistration
(
outSOUT
<<
turnOnSOUT
<<
turnOffSOUT
);
addCommand
(
"turnOn"
,
makeCommandVoid0
(
*
this
,
&
Swi
tch
::
turnOn
,
docCommandVoid0
(
"Turn on the
swi
tch"
)));
makeCommandVoid0
(
*
this
,
&
La
tch
::
turnOn
,
docCommandVoid0
(
"Turn on the
la
tch"
)));
addCommand
(
"turnOff"
,
makeCommandVoid0
(
*
this
,
&
Swi
tch
::
turnOff
,
docCommandVoid0
(
"Turn off the
swi
tch"
)));
makeCommandVoid0
(
*
this
,
&
La
tch
::
turnOff
,
docCommandVoid0
(
"Turn off the
la
tch"
)));
}
virtual
~
Swi
tch
(
void
)
{};
virtual
~
La
tch
(
void
)
{};
};
}
/* namespace sot */
...
...
@@ -87,4 +87,4 @@ namespace dynamicgraph {
#endif // #ifndef __SOT_
SWI
TCH_H__
#endif // #ifndef __SOT_
LA
TCH_H__
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
1
−
1
View file @
f1b6da88
...
...
@@ -91,7 +91,7 @@ SET(plugins
tools/binary-int-to-uint
tools/periodic-call-entity
tools/joint-trajectory-entity
tools/
swi
tch
tools/
la
tch
control/control-gr
control/control-pd
...
...
This diff is collapsed.
Click to expand it.
src/tools/
swi
tch.cpp
→
src/tools/
la
tch.cpp
+
3
−
3
View file @
f1b6da88
/*
* Copyright 2017-, Rohan Budhiraja, CNRS
* Copyright 2017-
2018
, Rohan Budhiraja,
Joseph Mirabel,
CNRS
*
* CNRS/AIST
*
...
...
@@ -16,11 +16,11 @@
* with sot-core. If not, see <http://www.gnu.org/licenses/>.
*/
#include
<sot/core/
swi
tch.hh>
#include
<sot/core/
la
tch.hh>
#include
<sot/core/factory.hh>
namespace
dynamicgraph
{
namespace
sot
{
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
(
Swi
tch
,
"
Swi
tch"
);
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
(
La
tch
,
"
La
tch"
);
}
// namespace sot
}
// namespace dynamicgraph
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment