humoto
bridges
qpmad
interface
qpmad
solution.h
Go to the documentation of this file.
1
/**
2
@file
3
@author Alexander Sherikov
4
5
@brief
6
*/
7
8
9
#pragma once
10
11
12
namespace
humoto
13
{
14
namespace
qpmad
15
{
16
/**
17
* @brief Solution of a QP.
18
*/
19
class
HUMOTO_LOCAL
Solution
:
public
humoto::Solution
20
{
21
public
:
22
/// The return value of qpmad.
23
::qpmad::Solver::ReturnStatus
qpmad_return_value_
;
24
25
26
public
:
27
/**
28
* @brief Status description
29
*
30
* @return description of the status if available
31
*/
32
std::string
getStatusDescription
()
const
33
{
34
switch
(qpmad_return_value_)
35
{
36
case ::qpmad::Solver::OK:
37
return
(
"qpmad: Ok."
);
38
default
:
39
return
(
"qpmad: Some error."
);
40
}
41
}
42
43
44
/**
45
* @brief Log a QP problem
46
*
47
* @param[in,out] logger logger
48
* @param[in] parent parent
49
* @param[in] name name
50
*/
51
void
log
(
humoto::Logger
&logger
HUMOTO_GLOBAL_LOGGER_IF_DEFINED
,
52
const
LogEntryName
&parent =
LogEntryName
(),
53
const
std::string &name =
"solution"
)
const
54
{
55
LogEntryName
subname = parent; subname.
add
(name);
56
57
humoto::Solution::log
(logger, subname,
""
);
58
59
logger.log(
LogEntryName
(subname).add(
"qpmad_return_value"
), qpmad_return_value_);
60
}
61
};
62
}
63
}
HUMOTO_LOCAL
#define HUMOTO_LOCAL
Definition:
export_import.h:26
HUMOTO_GLOBAL_LOGGER_IF_DEFINED
#define HUMOTO_GLOBAL_LOGGER_IF_DEFINED
Definition:
logger.h:997
humoto::qpmad::Solution
Solution of a QP.
Definition:
solution.h:19
humoto::Solution
Container of the solution.
Definition:
solution.h:176
humoto::LogEntryName
Represents log entry name.
Definition:
logger.h:169
humoto::qpmad::Solution::log
void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="solution") const
Log a QP problem.
Definition:
solution.h:51
humoto::Logger
Threaded logger: any data sent to this logger is wrapped in a message and pushed to a queue...
Definition:
logger.h:555
humoto::Solution::log
virtual void log(humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="solution") const
Log a QP problem.
Definition:
solution.h:351
humoto
The root namespace of HuMoTo.
Definition:
config.h:12
humoto::qpmad::Solution::getStatusDescription
std::string getStatusDescription() const
Status description.
Definition:
solution.h:32
humoto::LogEntryName::add
LogEntryName & add(const char *name)
extends entry name with a subname
Definition:
logger.h:232
humoto::qpmad::Solution::qpmad_return_value_
::qpmad::Solver::ReturnStatus qpmad_return_value_
The return value of qpmad.
Definition:
solution.h:23
Generated on Fri Sep 29 2017 16:44:40 for humoto by
1.8.13