发布订阅系统中数据记录与回放服务

 2023-03-19 10:03

论文总字数:21264字

摘 要

发布/订阅系统向用户提供在节点、企业设备、嵌入式系统间发布即时数据的通信服务。为了实现系统运行后对数据进行后期分析和过程回演的需求,本文采用在发布/订阅系统中添加模块的设计思想,在发布/订阅系统基础之上提供记录与回放模块,使发布/订阅系统具有历史数据记录与回放的功能。

本文设计与实现了发布/订阅系统中数据的记录与回放服务。基于发布/订阅系统松耦合、Qt的信号与槽机制,简化设计思路、精简代码,同时增强该模块的功能性与可重用性。Qt的跨平台特性,为该模块搭载到其他领域的类似工程应用提供了可能。记录与回放服务主要由数据记录、数据回放、以及人机交互界面三个部分组成。本文实现的数据记录与回放服务能够记录数据监控信息,根据回放指令,回放出记录的数据,符合预期效果。同时系统拥有人机交互界面,能够给用户带来良好的人机交互体验。

关键词:发布订阅;记录回放;人机交互;监控

Data Recording and Playback Service in Publish/Subscribe System

Abstract

Publish/subscribe system provide communication services which can release real-time data between nodes, enterprise equipment, embedded system for customers. In order to meeting the demand that system can have Post analysis and the process of playing back on data after the operation. This paper use the design idea that add module in the publish/subscribe system. Providing the recording and playback module on the base of publish/subscribe system. Making the publish/subscribe system has the function of recording and playback of historical data.

This paper designed and completed the service of recording and playback of data in the publish/subscribe system. Based on the publish/subscribe system of loose coupling, Qt" s signals and slots mechanism, simple design idea, concise code, it can enhance the functionality and reusability of module at the same time. The feature of Qt cross-platform provides the possibility for the module which can carry to other fields of similar projects. Recording and playback service is mainly composed of data recording, data playback, and man-machine interface. The data recording and playback service that have realized in this paper can record the message of data monitoring. According to the playback commands, it can replay the recorded data and attain the results expected. At the same time, system with human-computer interaction interface can bring users with good man-machine interaction experience.

Key words:Publish/Subscribe;Recording and Playback;Human-computer interaction;monitoring

目录

摘 要 I

Abstract II

第一章 绪 论 1

1.1 引言 1

1.2 选题背景 1

1.3 论文的主要工作 1

第二章 相关技术介绍 3

2.1 中间件 3

2.2 ZRDDS 3

2.3 DCPS模式设计 3

2.4 域和DomainParticipant的基础概念 4

2.5 DomainParticipant 5

第三章 系统总体架构概述 6

3.1 系统整体流程 6

3.2 数据记录模块 6

3.2.1 模块功能 6

3.2.2 结构设计 7

3.2.3 模块流程图 8

3.3 数据回放模块 9

3.3.1 模块功能 9

3.3.2 结构设计 9

3.3.3 模块流程图 10

3.4 人机交互模块 12

3.4.1 模块功能 12

3.4.2 模块流程图 12

第四章 系统实现 13

4.1 记录模块实现 13

4.1.1 Subscriber 13

4.1.2 创建Subscriber 14

4.1.3 删除Subscriber 14

4.1.4 DataReader 15

4.1.5 创建DataReader 15

4.1.6 删除DataReader 16

4.1.7 设置DataReaderListener 16

4.2 回放模块实现 18

4.2.1 Publisher 18

4.2.2 创建 Publisher 19

4.2.3 删除 Publisher 19

4.2.4 DataWriter 19

4.2.5 创建 DataWriter 20

4.2.6 删除DataWriter 21

4.2.7 使用特定类型DataWriter(FooDataWriter) 21

4.2.8 写出数据 21

4.3 人机交互模块实现 22

第五章 系统测试 23

第六章 总结和展望 26

6.1 总结 26

6.2 展望 26

致谢 27

参考文献 28

  1. 绪 论

引言

“发布/订阅”(Publish/Subscribe,简称pub/sub或P/S)通信泛型由于具有时间与空间的松耦合、异步通信的特点,可以较好地满足分布式系统松散通信的需求,同时还具有匿名通信和一对多通信等特性,近年来得到了工业界和学术界的普遍关注,已经成为研究的热点。

发布/订阅系统简化了应用程序的开发、调度、维护,并且能够在多种传输网络环境中对即时数据进行快速、可预测的分发。可以实现一对多和多对多网络通信,应用程序在OMG standard API,DDS标准下,发布、接收数据。自定义应用程序操作,满足各种实时性,可靠性,服务质量的目标。提供应用透明,容错和应用鲁棒性。

选题背景

发布/订阅系统是一种使分布式系统中的各个参与者能以发布/订阅的方式进行交互的中间件系统。在发布/订阅系统中,信息的生产者(发布者或publisher)和消费者(订阅者或subscriber)之间所交互的信息被称为事件(event)。在发布/订阅系统的典型交互中,系统主要由发布者、订阅者、事件代理组成。订阅者首先通过subscribe原语先向消息通知服务(发布/订阅系统)提交自己的兴趣,发布者有事件产生时,将产生的事件发送给通知服务。通知服务对事件与订阅者的兴趣进行匹配,如果订阅者的兴趣与事件匹配成功,则将事件发送给匹配的订阅者。

剩余内容已隐藏,请支付后下载全文,论文总字数:21264字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;