Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
8e6442b3
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8e6442b3
编写于
10月 25, 2017
作者:
A
Aaron Xiao
提交者:
siyangy
10月 25, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dreamview: Reuse monitor::HardwareStatus in HMIStatus. (#851)
上级
951c2c95
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
13 deletion
+16
-13
modules/dreamview/backend/hmi/hmi_status_helper.cc
modules/dreamview/backend/hmi/hmi_status_helper.cc
+3
-2
modules/dreamview/backend/hmi/hmi_status_helper.h
modules/dreamview/backend/hmi/hmi_status_helper.h
+7
-5
modules/dreamview/proto/BUILD
modules/dreamview/proto/BUILD
+3
-0
modules/dreamview/proto/hmi_status.proto
modules/dreamview/proto/hmi_status.proto
+3
-6
未找到文件。
modules/dreamview/backend/hmi/hmi_status_helper.cc
浏览文件 @
8e6442b3
...
...
@@ -22,9 +22,10 @@ namespace apollo {
namespace
dreamview
{
void
HMIStatusHelper
::
ReportHardwareStatus
(
const
google
::
protobuf
::
Map
<
std
::
string
,
HardwareStatus
>
&
hw_status
)
{
const
std
::
string
&
hardware_name
,
const
monitor
::
HardwareStatus
&
hw_status
)
{
HMIStatus
hmi_status
;
*
hmi_status
.
mutable_hardware
()
=
hw_status
;
hmi_status
.
mutable_hardware
()
->
insert
({
hardware_name
,
hw_status
})
;
common
::
adapter
::
AdapterManager
::
PublishHMIStatus
(
hmi_status
);
}
...
...
modules/dreamview/backend/hmi/hmi_status_helper.h
浏览文件 @
8e6442b3
...
...
@@ -20,6 +20,7 @@
#include <string>
#include "modules/dreamview/proto/hmi_status.pb.h"
#include "modules/monitor/proto/hardware_status.pb.h"
/**
* @namespace apollo::dreamview
...
...
@@ -38,15 +39,16 @@ class HMIStatusHelper {
public:
/*
* @brief Report hardware status to HMI.
* @param hw_status the map of hardware name and hardware status entries.
* @param hardware_name the name of the hardware.
* @param hw_status the status of the hardware.
*/
static
void
ReportHardwareStatus
(
const
google
::
protobuf
::
Map
<
std
::
string
,
HardwareStatus
>
&
hw_status
);
static
void
ReportHardwareStatus
(
const
std
::
string
&
hardware_name
,
const
monitor
::
HardwareStatus
&
hw_status
);
/*
* @brief Report module status to HMI.
* @param module_
status the status of the module
* @param module_status the status of the module
* @param module_
name the name of the module.
* @param module_status the status of the module
.
*/
static
void
ReportModuleStatus
(
const
std
::
string
&
module_name
,
const
ModuleStatus
&
module_status
);
...
...
modules/dreamview/proto/BUILD
浏览文件 @
8e6442b3
...
...
@@ -38,4 +38,7 @@ cc_proto_library(
proto_library
(
name
=
"hmi_status_proto_lib"
,
srcs
=
[
"hmi_status.proto"
],
deps
=
[
"//modules/monitor/proto:hardware_status_proto_lib"
,
]
)
modules/dreamview/proto/hmi_status.proto
浏览文件 @
8e6442b3
...
...
@@ -2,6 +2,8 @@ syntax = "proto2";
package
apollo
.
dreamview
;
import
"modules/monitor/proto/hardware_status.proto"
;
message
ModuleStatus
{
enum
Status
{
UNINITIALIZED
=
0
;
...
...
@@ -13,14 +15,9 @@ message ModuleStatus {
optional
Status
status
=
1
[
default
=
UNINITIALIZED
];
}
message
HardwareStatus
{
// Defined in modules/monitor/common/interface/hw_status.h.
optional
int32
status
=
1
[
default
=
-
1
];
}
message
HMIStatus
{
optional
string
current_map
=
1
;
optional
string
current_vehicle
=
2
;
map
<
string
,
ModuleStatus
>
modules
=
3
;
map
<
string
,
HardwareStatus
>
hardware
=
4
;
map
<
string
,
apollo.monitor.
HardwareStatus
>
hardware
=
4
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录