怎么安装aptdaemon模块_dlt-daemon安装教程
获取dlt-daemon源码
git clone https://github.com/GENIVI/dlt-daemon.git
cd dlt-daemon
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
dlt-daemon 编译安装就完成了。
批注: linux下使用sudo apt install dlt-daemon是不是也可以??
dlt-viewer
现装依赖包 sudo apt-get install libqt5serialport5-dev libqt5serialport5
批注:也可以使用 sudo apt install dlt-viewer 完成安装。
git clone https://github.com/GENIVI/dlt-viewer.git
mkdir build
cd build
cmake ..
make
这时,build/bin目录下就生成了可执行文件dlt-viewer
生成测试程序
cd dlt-daemon/examples/example1/
mkdir build
cd build
cmake ..
make
dlt-example1的测试程序就生成好了。具体如何添加dlt_log就餐控example下的几个例子。
启动dlt-daemon
首先复制dlt.conf文件
cd dlt-daemon/src/daemon/
sudo cp dlt.conf /etc/
sudo gedit /etc/dlt.conf
修改dlt.conf:
LoggingMode = 2
OfflineTraceDirectory = /tmp
OfflineTraceFileSize = 1000000
OfflineTraceMaxSize = 4000000
OfflineTraceFileNameTimestampBased = 1
OfflineLogstorageDirPath = /opt
链接配置文件:
dlt-daemon -c /etc/dlt.conf
启动log接收端:
dlt-receive -o /tmp/log.dlt localhost
启动example1:
dlt-daemon/examples/example1/build$ sudo ./dlt-example1
这时,/tmp/log.dlt 文件就可以用dlt-viewer查看啦。
自定义样例
在home建立test文件夹,然后写入
example.c
#include
#include
DLT_DECLARE_CONTEXT(myContext1);
DLT_DECLARE_CONTEXT(myContext2);
DLT_DECLARE_CONTEXT(myContext3);
int main()
{
/* register application */
DLT_REGISTER_APP("MAPP","Test Application for Logging");
/* register all contexts */
DLT_REGISTER_CONTEXT(myContext1,"TES1","Test Context 1 for Logging");
DLT_REGISTER_CONTEXT(myContext2,"TES2","Test Context 2 for Logging");
DLT_REGISTER_CONTEXT(myContext3,"TES3","Test Context 3 for Logging");
/* Write your logs */
DLT_LOG(myContext1,DLT_LOG_ERROR,DLT_INT(5),DLT_STRING("This is a error"));
DLT_LOG(myContext2,DLT_LOG_INFO,DLT_INT(5),DLT_STRING("But this only information"));
DLT_LOG(myContext3,DLT_LOG_DEBUG,DLT_INT(5),DLT_STRING("But this only information"));
/* Sleep some time to avoid a flaw in dlt-daemon that would eat your messages
if you deregister while it still processes your registration */
sleep(3);
/* unregister your contexts */
DLT_UNREGISTER_CONTEXT(myContext1);
DLT_UNREGISTER_CONTEXT(myContext2);
DLT_UNREGISTER_CONTEXT(myContext3);
/* unregister your application */
DLT_UNREGISTER_APP();
return 0;
}
CMakeLists.txt
#######
# SPDX license identifier: MPL-2.0
#
# Copyright (C) 2011-2015, BMW AG
#
# This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
#
# This Source Code Form is subject to the terms of the
# Mozilla Public License (MPL), v. 2.0.
# If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# For further information see http://www.genivi.org/.
#######
#
# DLT example implementation
#
cmake_minimum_required( VERSION 2.6 )
project( automotive-dlt-example1 )
#
# find dependency packages
#
find_package(PkgConfig)
pkg_check_modules(DLT REQUIRED automotive-dlt)
#
# include directories
#
include_directories(
${DLT_INCLUDE_DIRS}
)
#
# build project,这里需要修改
#
set(dlt_example1_SRCS example.c)
add_executable(dlt-example1 ${dlt_example1_SRCS})
target_link_libraries(dlt-example1 ${DLT_LIBRARIES})
set_target_properties(dlt-example1 PROPERTIES LINKER_LANGUAGE C)
install(TARGETS dlt-example1
RUNTIME DESTINATION bin
COMPONENT base)
构建工程
cd test
mkdir build
cd build
cmake ..
make
dlt-receive -o /tmp/log.dlt localhost
sudo ./dlt-example1
此时就可以使用dltViewer查看 /tmp/log.dlt
怎么安装aptdaemon模块_dlt-daemon安装教程相关推荐
- python图形化方式模块安装_(怎么安装python模块,如何安装python模块,常用安装方式)python助手安装教程视频...
有没有比较好的python3的入门视频教程,网盘或网站都可以. 我这里有Python,开发,进阶,自动化,实战列视频教程,还有安装包,,代码等容,这里就不一一说了,全套内容一共300G左右,非常的详细 ...
- 怎么安装aptdaemon模块_安装Pulseaudio模块在Ubuntu中开启蓝牙APTX/LDAC支持
安装pulseaudio-bluetooth模块就能在Ubuntu 18.10/Ubuntu 18.04系统中实现蓝牙APTX/LDAC的支持,因为该模块整合了对于LDAC和APTX的支持,把它编译安 ...
- Tengine怎么去安装第三方模块、以及安装源码中的模块
Tengine怎么去安装第三方模块 检查配置文件nginx.conf的内容编辑后是否有错误 nginx -t 有以下错误,需要下载第三方模块 nginx: [emerg] unknown direct ...
- python psutil库安装_安装psutil模块报错安装python-devel
psutil/_psutil_linux.c:9:20: 错误:Python.h:没有那个文件或目录 In file included from psutil/_psutil_linux.c:19: ...
- python安装django模块_python中安装django模块的方法
网上搜一下对应的版本号,版本号相对应. 安装django有两种方式: 1.pip安装 pip install django 这个方法我用的时候已经报错.貌似访问被阻挡.我一般都用第二种 2.下载压缩包 ...
- python os库安装_Python模块/包/库安装(6种方法)
Python模块/包/库安装(6种方法) 冰颖机器人 2016-11-29 21:33:26 一.方法1: 单文件模块 直接把文件拷贝到 $python_dir/Lib 二.方法2: 多文件模块,带s ...
- 怎么安装aptdaemon模块_自己开发一个React Native 模块
大纲 为什么需要 React Native Module 如何创建一个 React Native的模块 编写 Android Toast 功能模块 如何调试 React Native 模块------ ...
- 怎么安装aptdaemon模块_模块化扩容,米特拉轻商用空气能热水震撼亮相
出水量太少? 制热效率太低? 安装场地受限? 无论是商品房.别墅.养生馆 还是公寓.民宿.酒店 轻商用场所选用空气能热水器 都会陷入这样尴尬的境地 没关系 专注轻商用定制热水的神器来了 米特拉热++水 ...
- python需要安装哪些模块_python 调用StringIO需要安装哪个模块?怎么安装?
展开全部 安装python时,一定勾选pip install选项. 1. 首先,安装python时,一定勾选pip install选项: 2.http://www.lfd.uci.edu/~gohlk ...
最新文章
- 10个比较艰难的Java面试题与答案!
- 数学建模学习笔记——相关性分析
- 中国海上风力发电行业战略调研与投资风险分析报告2022-2028年
- python爬取数据
- 解析stm32的时钟
- [密码学基础][每个信息安全博士生应该知道的52件事][Bristol Cryptography][第27篇]什么是对称密码加密的AEAD安全定义?
- Python加盐加密方法hashlib(md5,sha224,sha1,sha256)
- 程序员面试金典 - 面试题 04.10. 检查子树(双重递归)
- Kerberos Hbase Api 操作
- STM32F103:二.(2)串口控制LED
- js设置百分比保留两位小数
- Android 自定义标题栏(title栏)
- 【仿美团点餐App】—— 首页(二)
- 微信公众号打开网页自动登陆配置
- 获取access_token报错errcode: 40125,errmsg: invalid appsecret, view more at http://t.cn/RAEkdV
- 阿里云图片服务器OSS对象存储器使用方法(附详细步骤)
- Linux运维踩过的坑---Temporary failure in name resolution
- 数据结构与算法邓俊辉——(三)
- 2.4G SOC芯片CI2451/CI2454应用于遥控玩具汽车的应用方案
- (3)登录界面——登录
热门文章
- 互联网快讯:快手启动“新锐品牌计划;猿辅导、掌门教育布局素质教育
- Android打印机--TSC 标签打印
- 战斗系统之属性设计(一)
- 笔记本二合一计算机,笔记本界的“变形金刚”:盘点三款值得购买的二合一笔记本电脑 - 全文...
- 我的一些杭电计算机考研资料
- 无尽长廊(Gallery)
- matlab和通达信,matlab量化通达信
- php周签到功能思路,thinkphp签到功能实现方法
- python_selenium项目_批量获取企业信用代码
- CP-ABE方案形式化定义及安全模型总结