首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于发布订阅的进程间通信设计与实现
引用本文:刘晨璐,乔磊,彭飞,徐建,曹海宁.基于发布订阅的进程间通信设计与实现[J].空间控制技术与应用,2020,46(3):49-54.
作者姓名:刘晨璐  乔磊  彭飞  徐建  曹海宁
作者单位:北京控制工程研究所,北京100090;北京控制工程研究所,北京100090;北京控制工程研究所,北京100090;北京控制工程研究所,北京100090;北京控制工程研究所,北京100090
基金项目:国家自然科学基金;中国科学院软件研究所计算机科学国家重点实验室开放基金
摘    要:航天器的每一种行为都需要多种信息的综合,这使得有效传递传感器数据成为关键问题.机器人操作系统(ROS)将基于主题的发布订阅作为内部的一种通信机制,解决消息的传递问题.由于ROS使用C++编写,无法直接应用在嵌入式平台中.本文利用C语言实现了ROS中基于发布订阅的通信机制,将信息的传递过程虚拟化成很多节点,每个节点可以选择自己感兴趣的话题成为发布端或者订阅端.发布端/订阅端并不需要知道其他节点的信息,实现功能解耦.目前,该方法在Windows平台上进行了单机和多机间的测试,通信效果良好,完成了进程间数据的传递.

关 键 词:多进程  进程间  发布订阅  socket通信  多机通信  

Implementation of Inter Process Communication
Abstract:Each behavior of spacecraft needs a variety of information synthesis to make a judgment. How to effectively transfer the data of multiple sensors has become a concern for many people. The robot operating system used a topic based method to solve this problem. However, ROS is written by C++ language and can’t be directly used in embedded platform. In this paper, we regard information transference as nodes, and use C language to implement the communication mechanism. Each node can choose the topic interest to become the publisher or subscriber. The publisher and subscriber do not know the information of other nodes to realize function decoupling. AT present, the method achieves perfect result between single and multi machine on windows platform.
Keywords:
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《空间控制技术与应用》浏览原始摘要信息
点击此处可从《空间控制技术与应用》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号