Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph-python
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
dynamic-graph-python
Commits
d48a3221
Commit
d48a3221
authored
5 years ago
by
Joseph Mirabel
Committed by
olivier stasse
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update to changes in dynamic-graph
parent
2981e7b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/dynamic_graph/entity-py.cc
+4
-4
4 additions, 4 deletions
src/dynamic_graph/entity-py.cc
src/dynamic_graph/entity.py
+7
-7
7 additions, 7 deletions
src/dynamic_graph/entity.py
unitTesting/custom_entity.cpp
+10
-12
10 additions, 12 deletions
unitTesting/custom_entity.cpp
with
21 additions
and
23 deletions
src/dynamic_graph/entity-py.cc
+
4
−
4
View file @
d48a3221
...
...
@@ -458,19 +458,19 @@ PyObject* setLoggerVerbosityLevel(
try
{
switch
(
verbosityLevel
)
{
case
0
:
case
8
:
entity
->
setLoggerVerbosityLevel
(
VERBOSITY_ALL
);
break
;
case
1
:
case
4
:
entity
->
setLoggerVerbosityLevel
(
VERBOSITY_INFO_WARNING_ERROR
);
break
;
case
2
:
entity
->
setLoggerVerbosityLevel
(
VERBOSITY_WARNING_ERROR
);
break
;
case
3
:
case
1
:
entity
->
setLoggerVerbosityLevel
(
VERBOSITY_ERROR
);
break
;
case
4
:
case
0
:
entity
->
setLoggerVerbosityLevel
(
VERBOSITY_NONE
);
break
;
default:
...
...
This diff is collapsed.
Click to expand it.
src/dynamic_graph/entity.py
+
7
−
7
View file @
d48a3221
...
...
@@ -73,11 +73,11 @@ class VerbosityLevel(Enum):
"""
Enum class for setVerbosityLevel
"""
VERBOSITY_ALL
=
0
VERBOSITY_INFO_WARNING_ERROR
=
1
VERBOSITY_ALL
=
8
VERBOSITY_INFO_WARNING_ERROR
=
4
VERBOSITY_WARNING_ERROR
=
2
VERBOSITY_ERROR
=
3
VERBOSITY_NONE
=
4
VERBOSITY_ERROR
=
1
VERBOSITY_NONE
=
0
class
Entity
(
object
):
...
...
@@ -271,13 +271,13 @@ class Entity(object):
Returns the entity
'
s verbosity level (as a dynamic_graph.entity.VerbosityLevel)
"""
r
=
wrap
.
entity_get_logger_verbosity
(
self
.
obj
)
if
r
==
0
:
if
r
==
8
:
return
VerbosityLevel
.
VERBOSITY_ALL
elif
r
==
1
:
elif
r
==
4
:
return
VerbosityLevel
.
VERBOSITY_INFO_WARNING_ERROR
elif
r
==
2
:
return
VerbosityLevel
.
VERBOSITY_WARNING_ERROR
elif
r
==
3
:
elif
r
==
1
:
return
VerbosityLevel
.
VERBOSITY_ERROR
return
VerbosityLevel
.
VERBOSITY_NONE
...
...
This diff is collapsed.
Click to expand it.
unitTesting/custom_entity.cpp
+
10
−
12
View file @
d48a3221
...
...
@@ -48,18 +48,16 @@ class CustomEntity : public Entity {
double
&
update
(
double
&
res
,
const
int
&
inTime
)
{
const
double
&
aDouble
=
m_sigdSIN
(
inTime
);
res
=
aDouble
;
std
::
ostringstream
oss
;
oss
<<
"start update "
<<
res
;
sendMsg
(
oss
.
str
().
c_str
(),
MSG_TYPE_ERROR
);
sendMsg
(
"This is a message of level MSG_TYPE_DEBUG"
,
MSG_TYPE_DEBUG
,
__FILE__
,
__LINE__
);
sendMsg
(
"This is a message of level MSG_TYPE_INFO"
,
MSG_TYPE_INFO
,
__FILE__
,
__LINE__
);
sendMsg
(
"This is a message of level MSG_TYPE_WARNING"
,
MSG_TYPE_WARNING
,
__FILE__
,
__LINE__
);
sendMsg
(
"This is a message of level MSG_TYPE_ERROR"
,
MSG_TYPE_ERROR
,
__FILE__
,
__LINE__
);
sendMsg
(
"This is a message of level MSG_TYPE_DEBUG_STREAM"
,
MSG_TYPE_DEBUG_STREAM
,
__FILE__
,
__LINE__
);
sendMsg
(
"This is a message of level MSG_TYPE_INFO_STREAM"
,
MSG_TYPE_INFO_STREAM
,
__FILE__
,
__LINE__
);
sendMsg
(
"This is a message of level MSG_TYPE_WARNING_STREAM"
,
MSG_TYPE_WARNING_STREAM
,
__FILE__
,
__LINE__
);
sendMsg
(
"This is a message of level MSG_TYPE_ERROR_STREAM"
,
MSG_TYPE_ERROR_STREAM
,
__FILE__
,
__LINE__
);
sendMsg
(
"end update"
,
MSG_TYPE_ERROR
,
__FILE__
,
__LINE__
);
logger
().
stream
(
MSG_TYPE_ERROR
)
<<
"start update "
<<
res
<<
'\n'
;
DYNAMIC_GRAPH_ENTITY_DEBUG
(
*
this
)
<<
"This is a message of level MSG_TYPE_DEBUG
\n
"
;
DYNAMIC_GRAPH_ENTITY_INFO
(
*
this
)
<<
"This is a message of level MSG_TYPE_INFO
\n
"
;
DYNAMIC_GRAPH_ENTITY_WARNING
(
*
this
)
<<
"This is a message of level MSG_TYPE_WARNING
\n
"
;
DYNAMIC_GRAPH_ENTITY_ERROR
(
*
this
)
<<
"This is a message of level MSG_TYPE_ERROR
\n
"
;
DYNAMIC_GRAPH_ENTITY_DEBUG_STREAM
(
*
this
)
<<
"This is a message of level MSG_TYPE_DEBUG_STREAM
\n
"
;
DYNAMIC_GRAPH_ENTITY_INFO_STREAM
(
*
this
)
<<
"This is a message of level MSG_TYPE_INFO_STREAM
\n
"
;
DYNAMIC_GRAPH_ENTITY_WARNING_STREAM
(
*
this
)
<<
"This is a message of level MSG_TYPE_WARNING_STREAM
\n
"
;
DYNAMIC_GRAPH_ENTITY_ERROR_STREAM
(
*
this
)
<<
"This is a message of level MSG_TYPE_ERROR_STREAM
\n
"
;
logger
().
stream
(
MSG_TYPE_ERROR
)
<<
"end update
\n
"
;
return
res
;
}
...
...
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