实例介绍
【实例截图】
【核心代码】
Table of Contents
Preface ................................................................................................vii
1 Overview ..........................................................................................1
1.1 Introduction ...............................................................................................1
1.2 Purpose .....................................................................................................1
2 Data-CentricPublish-Subscribe (DCPS) ...........................................3
2.1 Summary ...................................................................................................3
2.2 Platform Independent Model (PIM) ...........................................................3
2.2.1 Overview and Design Rationale .................................................................3
2.2.1.1 Format and Conventions ......................................................................... 3
2.2.1.2 Conceptual Outline .................................................................................. 5
2.2.1.2.1 Overview .................................................................................................. 5
2.2.1.2.2 Overall Conceptual Model ........................................................................ 7
2.2.2 PIM Description ..........................................................................................9
2.2.2.1 Infrastructure Module ............................................................................ 11
2.2.2.1.1 Entity Class ............................................................................................ 11
2.2.2.1.1.1 set_qos (abstract) .......................................................................................12
2.2.2.1.1.2 get_qos (abstract) .......................................................................................13
2.2.2.1.1.3 set_listener (abstract) ..................................................................................13
2.2.2.1.1.4 get_listener (abstract) .................................................................................13
2.2.2.1.1.5 get_statuscondition .....................................................................................13
2.2.2.1.1.6 get_status_changes ....................................................................................13
2.2.2.1.1.7 enable .........................................................................................................14
2.2.2.1.1.8 get_instance_handle ...................................................................................14
2.2.2.1.2 DomainEntity Class ................................................................................ 14
2.2.2.1.3 QosPolicy Class ..................................................................................... 15
2.2.2.1.4 Listener Interface ................................................................................... 15
2.2.2.1.5 Status Class ........................................................................................... 16
2.2.2.1.6 WaitSet Class ........................................................................................ 16
2.2.2.1.6.1 attach_condition ..........................................................................................16
2.2.2.1.6.2 detach_condition .........................................................................................17
2.2.2.1.6.3 wait ..............................................................................................................17
2.2.2.1.6.4 get_conditions .............................................................................................17
2.2.2.1.7 Condition Class ...................................................................................... 17
2.2.2.1.7.1 get_trigger_value ........................................................................................17
2.2.2.1.8 GuardCondition Class ............................................................................ 18
2.2.2.1.8.1 set_trigger_value .........................................................................................18
2.2.2.1.9 StatusCondition Class ............................................................................ 18
2.2.2.1.9.1 set_enabled_statuses .................................................................................18
2.2.2.1.9.2 get_enabled_statuses .................................................................................19
2.2.2.1.9.3 get_entity .....................................................................................................19
2.2.2.2 Domain Module ..................................................................................... 20
2.2.2.2.1 DomainParticipant Class ........................................................................ 20
ii Data Distribution Service (DDS), V1.4
2.2.2.2.1.1 create_publisher ..........................................................................................23
2.2.2.2.1.2 delete_publisher ..........................................................................................24
2.2.2.2.1.3 create_subscriber ........................................................................................24
2.2.2.2.1.4 delete_subscriber ........................................................................................24
2.2.2.2.1.5 create_topic .................................................................................................24
2.2.2.2.1.6 delete_topic .................................................................................................25
2.2.2.2.1.7 create_contentfilteredtopic ..........................................................................25
2.2.2.2.1.8 delete_ contentfilteredtopic .........................................................................25
2.2.2.2.1.9 create_multitopic .........................................................................................25
2.2.2.2.1.10 delete_multitopic .......................................................................................26
2.2.2.2.1.11 find_topic ...................................................................................................26
2.2.2.2.1.12 lookup_topicdescription .............................................................................26
2.2.2.2.1.13 get_builtin_subscriber ...............................................................................27
2.2.2.2.1.14 ignore_participant ......................................................................................27
2.2.2.2.1.15 ignore_topic ...............................................................................................27
2.2.2.2.1.16 ignore_publication .....................................................................................28
2.2.2.2.1.17 ignore_subscription ...................................................................................28
2.2.2.2.1.18 delete_contained_entities ..........................................................................28
2.2.2.2.1.19 assert_liveliness ........................................................................................28
2.2.2.2.1.20 set_default_publisher_qos ........................................................................29
2.2.2.2.1.21 get_default_publisher_qos ........................................................................29
2.2.2.2.1.22 set_default_subscriber_qos ......................................................................29
2.2.2.2.1.23 get_default_subscriber_qos ......................................................................29
2.2.2.2.1.24 set_default_topic_qos ...............................................................................29
2.2.2.2.1.25 get_default_topic_qos ...............................................................................30
2.2.2.2.1.26 get_domain_id ...........................................................................................30
2.2.2.2.1.27 get_discovered_participants ......................................................................30
2.2.2.2.1.28 get_discovered_participant_data ..............................................................30
2.2.2.2.1.29 get_discovered_topics ...............................................................................30
2.2.2.2.1.30 get_discovered_topic_data .......................................................................30
2.2.2.2.1.31 contains_entity ..........................................................................................31
2.2.2.2.1.32 get_current_time .......................................................................................31
2.2.2.2.2 DomainParticipantFactory Class ............................................................ 31
2.2.2.2.2.1 create_participant ........................................................................................32
2.2.2.2.2.2 delete_participant ........................................................................................32
2.2.2.2.2.3 get_instance ................................................................................................32
2.2.2.2.2.4 lookup_participant .......................................................................................32
2.2.2.2.2.5 set_default_participant_qos ........................................................................32
2.2.2.2.2.6 get_default_participant_qos ........................................................................33
2.2.2.2.2.7 set_qos ........................................................................................................33
2.2.2.2.2.8 get_qos ........................................................................................................33
2.2.2.2.3 DomainParticipantListener Interface ...................................................... 33
2.2.2.3 Topic-Definition Module .........................................................................35
2.2.2.3.1 TopicDescription Class .......................................................................... 35
2.2.2.3.1.1 get_participant .............................................................................................36
2.2.2.3.1.2 type_name ...................................................................................................36
2.2.2.3.1.3 name ...........................................................................................................36
2.2.2.3.2 Topic Class ............................................................................................ 36
2.2.2.3.2.1 get_inconsistent_topic_status .....................................................................37
2.2.2.3.3 ContentFilteredTopic Class .................................................................... 37
2.2.2.3.3.1 get_related_topic .........................................................................................38
2.2.2.3.3.2 filter_expression ..........................................................................................38
2.2.2.3.3.3 get_expression_parameters ........................................................................38
2.2.2.3.3.4 set_expression_parameters ........................................................................38
2.2.2.3.4 MultiTopic Class [optional] ..................................................................... 38
Data Distribution Service (DDS), v1.4 iii
2.2.2.3.4.1 subscription_expression ..............................................................................39
2.2.2.3.4.2 get_expression_parameters ........................................................................39
2.2.2.3.4.3 set_expression_parameters ........................................................................39
2.2.2.3.5 TopicListener Interface .......................................................................... 40
2.2.2.3.6 TypeSupport Interface ........................................................................... 40
2.2.2.3.6.1 register_type ...............................................................................................40
2.2.2.3.6.2 get_type_name ...........................................................................................41
2.2.2.3.7 Derived Classes for Each Application Class .......................................... 41
2.2.2.4 Publication Module ................................................................................ 42
2.2.2.4.1 Publisher Class ...................................................................................... 43
2.2.2.4.1.1 set_listener (from Entity) .............................................................................44
2.2.2.4.1.2 get_listener (from Entity) .............................................................................44
2.2.2.4.1.3 set_qos (from Entity) ...................................................................................44
2.2.2.4.1.4 get_qos (from Entity) ...................................................................................44
2.2.2.4.1.5 create_ datawriter .......................................................................................44
2.2.2.4.1.6 delete_datawriter .........................................................................................45
2.2.2.4.1.7 lookup_datawriter ........................................................................................45
2.2.2.4.1.8 suspend_publications ..................................................................................45
2.2.2.4.1.9 resume_publications ...................................................................................45
2.2.2.4.1.10 begin_coherent_changes ..........................................................................46
2.2.2.4.1.11 end_coherent_changes .............................................................................46
2.2.2.4.1.12 wait_for_acknowledgments .......................................................................46
2.2.2.4.1.13 get_participant ...........................................................................................46
2.2.2.4.1.14 delete_contained_entities .........................................................................46
2.2.2.4.1.15 set_default_datawriter_qos .......................................................................47
2.2.2.4.1.16 get_default_datawriter_qos .......................................................................47
2.2.2.4.1.17 copy_from_topic_qos ................................................................................47
2.2.2.4.2 DataWriter Class .................................................................................... 47
2.2.2.4.2.1 set_listener (from Entity) .............................................................................50
2.2.2.4.2.2 get_listener (from Entity) .............................................................................50
2.2.2.4.2.3 set_qos (from Entity) ...................................................................................50
2.2.2.4.2.4 get_qos (from Entity) ...................................................................................50
2.2.2.4.2.5 register_instance .........................................................................................50
2.2.2.4.2.6 register_instance_w_timestamp ..................................................................51
2.2.2.4.2.7 unregister_instance .....................................................................................51
2.2.2.4.2.8 unregister_instance_w_timestamp ..............................................................52
2.2.2.4.2.9 get_key_value .............................................................................................52
2.2.2.4.2.10 lookup_instance ........................................................................................52
2.2.2.4.2.11 write ...........................................................................................................52
2.2.2.4.2.12 write_w_timestamp ...................................................................................53
2.2.2.4.2.13 dispose ......................................................................................................54
2.2.2.4.2.14 dispose_w_timestamp ...............................................................................54
2.2.2.4.2.15 wait_for_acknowledgments .......................................................................55
2.2.2.4.2.16 get_liveliness_lost_status .........................................................................55
2.2.2.4.2.17 get_offered_deadline_missed_status .......................................................55
2.2.2.4.2.18 get_offered_incompatible_qos_status ......................................................55
2.2.2.4.2.19 get_publication_matched_status ...............................................................55
2.2.2.4.2.20 get_topic ....................................................................................................55
2.2.2.4.2.21 get_publisher .............................................................................................55
2.2.2.4.2.22 assert_liveliness ........................................................................................55
2.2.2.4.2.23 get_matched_subscription_data ...............................................................56
2.2.2.4.2.24 get_matched_subscriptions ......................................................................56
2.2.2.4.3 PublisherListener Interface .................................................................... 56
2.2.2.4.4 DataWriterListener Interface .................................................................. 57
iv Data Distribution Service (DDS), V1.4
2.2.2.4.5 Concurrency Behavior ............................................................................ 57
2.2.2.5 Subscription Module ..............................................................................58
2.2.2.5.1 Access to the data .................................................................................. 59
2.2.2.5.1.1 Interpretation of the SampleInfo ..................................................................59
2.2.2.5.1.2 Interpretation of the SampleInfo sample_state ...........................................60
2.2.2.5.1.3 Interpretation of the SampleInfo instance_state .........................................60
2.2.2.5.1.4 Interpretation of the SampleInfo valid_data................................................ 61
2.2.2.5.1.5 Interpretation of the SampleInfo disposed_generation_count and
no_writers_generation_count .........................................................................................61
2.2.2.5.1.6 Interpretation of the SampleInfo sample_rank, generation_rank, and
absolute_generation_rank ..............................................................................................61
2.2.2.5.1.7 Interpretation of the SampleInfo counters and ranks .................................62
2.2.2.5.1.8 Interpretation of the SampleInfo view_state ...............................................62
2.2.2.5.1.9 Data access patterns ...................................................................................63
2.2.2.5.2 Subscriber Class .................................................................................... 65
2.2.2.5.2.1 set_listener (from Entity) .............................................................................66
2.2.2.5.2.2 get_listener (from Entity) .............................................................................66
2.2.2.5.2.3 set_qos (from Entity) ...................................................................................66
2.2.2.5.2.4 get_qos (from Entity) ...................................................................................66
2.2.2.5.2.5 create_datareader .......................................................................................66
2.2.2.5.2.6 delete_datareader .......................................................................................67
2.2.2.5.2.7 lookup_datareader ......................................................................................68
2.2.2.5.2.8 begin_access ..............................................................................................68
2.2.2.5.2.9 end_access .................................................................................................68
2.2.2.5.2.10 get_datareaders ........................................................................................68
2.2.2.5.2.11 notify_datareaders .....................................................................................69
2.2.2.5.2.12 get_sample_lost_status .............................................................................69
2.2.2.5.2.13 get_participant ...........................................................................................69
2.2.2.5.2.14 delete_contained_entities.......................................................................... 69
2.2.2.5.2.15 set_default_datareader_qos ......................................................................69
2.2.2.5.2.16 get_default_datareader_qos .....................................................................70
2.2.2.5.2.17 copy_from_topic_qos ................................................................................70
2.2.2.5.3 DataReader Class .................................................................................. 70
2.2.2.5.3.1 set_listener (from Entity) .............................................................................76
2.2.2.5.3.2 get_listener (from Entity) .............................................................................76
2.2.2.5.3.3 set_qos (from Entity) ...................................................................................76
2.2.2.5.3.4 get_qos (from Entity) ...................................................................................76
2.2.2.5.3.5 create_readcondition ...................................................................................76
2.2.2.5.3.6 create_querycondition .................................................................................76
2.2.2.5.3.7 delete_readcondition ...................................................................................77
2.2.2.5.3.8 read .............................................................................................................77
2.2.2.5.3.9 take ..............................................................................................................79
2.2.2.5.3.10 read_w_condition ......................................................................................79
2.2.2.5.3.11 take_w_condition .......................................................................................79
2.2.2.5.3.12 read_next_sample .....................................................................................80
2.2.2.5.3.13 take_next_sample .....................................................................................80
2.2.2.5.3.14 read_instance ............................................................................................80
2.2.2.5.3.15 take_instance ............................................................................................81
2.2.2.5.3.16 read_next_instance ...................................................................................81
2.2.2.5.3.17 take_next_instance ...................................................................................82
2.2.2.5.3.18 read_next_instance_w_condition ..............................................................82
2.2.2.5.3.19 take_next_instance_w_condition ..............................................................83
2.2.2.5.3.20 return_loan ................................................................................................83
2.2.2.5.3.21 get_liveliness_changed_status .................................................................84
2.2.2.5.3.22 get_requested_deadline_missed_status ...................................................84
Data Distribution Service (DDS), v1.4 v
2.2.2.5.3.23 get_requested_incompatible_qos_status ..................................................84
2.2.2.5.3.24 get_sample_lost_status ............................................................................84
2.2.2.5.3.25 get_sample_rejected_status .....................................................................84
2.2.2.5.3.26 get_subscription_matched_status .............................................................84
2.2.2.5.3.27 get_topicdescription ..................................................................................84
2.2.2.5.3.28 get_subscriber ...........................................................................................84
2.2.2.5.3.29 get_key_value ...........................................................................................84
2.2.2.5.3.30 lookup_instance ........................................................................................84
2.2.2.5.3.31 delete_contained_entities .........................................................................85
2.2.2.5.3.32 wait_for_historical_data ............................................................................85
2.2.2.5.3.33 get_matched_publication_data .................................................................85
2.2.2.5.3.34 get_matched_publications ........................................................................85
2.2.2.5.4 DataSample Class ................................................................................. 86
2.2.2.5.5 SampleInfo Class ................................................................................... 86
2.2.2.5.6 SubscriberListener Interface.................................................................. 87
2.2.2.5.7 DataReaderListener Interface ................................................................ 88
2.2.2.5.8 ReadCondition Class ............................................................................. 88
2.2.2.5.8.1 get_datareader ............................................................................................89
2.2.2.5.8.2 get_sample_state_mask .............................................................................89
2.2.2.5.8.3 get_view_state_mask ..................................................................................89
2.2.2.5.8.4 get_instance_state_mask ...........................................................................89
2.2.2.5.9 QueryCondition Class ............................................................................ 89
2.2.2.5.9.1 get_query_expression .................................................................................90
2.2.2.5.9.2 get_query_parameters ................................................................................90
2.2.2.5.9.3 set_query_parameters ................................................................................90
2.2.3 Supported QoS .........................................................................................90
2.2.3.1 USER_DATA ....................................................................................... 101
2.2.3.2 TOPIC_DATA ...................................................................................... 102
2.2.3.3 GROUP_DATA .................................................................................... 102
2.2.3.4 DURABILITY ....................................................................................... 102
2.2.3.5 DURABILITY_SERVICE ..................................................................... 103
2.2.3.6 PRESENTATION ................................................................................ 103
2.2.3.7 DEADLINE .......................................................................................... 104
2.2.3.8 LATENCY_BUDGET ........................................................................... 104
2.2.3.9 OWNERSHIP ...................................................................................... 105
2.2.3.9.1 SHARED kind ...................................................................................... 105
2.2.3.9.2 EXCLUSIVE kind ................................................................................. 105
2.2.3.10 OWNERSHIP_STRENGTH .............................................................. 106
2.2.3.11 LIVELINESS ...................................................................................... 106
2.2.3.12 TIME_BASED_FILTER ..................................................................... 107
2.2.3.13 PARTITION ....................................................................................... 107
2.2.3.14 RELIABILITY ..................................................................................... 108
2.2.3.15 TRANSPORT_PRIORITY ................................................................. 108
2.2.3.16 LIFESPAN ......................................................................................... 108
2.2.3.17 DESTINATION_ORDER ................................................................... 109
2.2.3.18 HISTORY .......................................................................................... 109
2.2.3.19 RESOURCE_LIMITS ........................................................................ 109
2.2.3.20 ENTITY_FACTORY .......................................................................... 110
2.2.3.21 WRITER_DATA_LIFECYCLE ........................................................... 110
2.2.3.22 READER_DATA_LIFECYCLE .......................................................... 111
vi Data Distribution Service (DDS), V1.4
2.2.3.23 Relationship between registration, LIVELINESS, and OWNERSHIP 111
2.2.3.23.1 Ownership resolution on redundant systems ..................................... 111
2.2.3.23.1.1 Case where the data is periodically updated ...........................................112
2.2.3.23.1.2 Case where data is not periodically updated ...........................................112
2.2.3.23.2 Detection of loss in topological connectivity ....................................... 113
2.2.3.23.3 Semantic difference between unregister_instance and dispose ........ 113
2.2.4 Listeners, Conditions, and Wait-sets ......................................................113
2.2.4.1 Communication Status ........................................................................114
2.2.4.2 Changes in Status ...............................................................................118
2.2.4.2.1 Changes in Plain Communication Status ............................................. 119
2.2.4.2.2 Changes in Read Communication Statuses ........................................ 120
2.2.4.3 Access through Listeners ....................................................................121
2.2.4.3.1 Listener Access to Plain Communication Status .................................. 122
2.2.4.3.2 Listener access to Read Communication Status ................................. 123
2.2.4.4 Conditions and Wait-sets ....................................................................124
2.2.4.4.1 Trigger State of the StatusCondition .................................................... 127
2.2.4.5 Trigger State of the ReadCondition .....................................................127
2.2.4.5.1 Trigger State of the GuardCondition .................................................... 127
2.2.4.6 Combination ........................................................................................127
2.2.5 Built-in Topics .........................................................................................128
2.2.6 Interaction Model ....................................................................................131
2.2.6.1 Publication View ..................................................................................132
2.2.6.2 Subscription View ................................................................................133
2.2.6.2.1 Notification via Listeners ...................................................................... 133
2.2.6.2.2 Notifications via Conditions and Wait-Sets .......................................... 135
2.3 OMG IDL Platform Specific Model (PSM) .............................................137
2.3.1 Introduction .............................................................................................137
2.3.2 PIM to PSM Mapping Rules ....................................................................137
2.3.3 DCPS PSM : IDL ....................................................................................138
Annex A - Compliance Points ...........................................................163
Annex B - Syntax for Queries and Filters .........................................165
标签: DDS
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论