Coder Social home page Coder Social logo

dds_pro_labs_cpp11's Introduction

RTI Connext Professional Hands-On Exercises

(C++11 version)

This repo contains labs used in DDS QuickStart training, C++11 version. Before any given lab can be compiled and run, rtiddsgen should be run on the *.idl file in each directory. When performing this step, be sure to set the following:

  • Generation: Example Files = ""
  • Generation: Type files = "update"
  • Generation: Makefiles = "create"
  • Language = "Modern C++ (C++ 11)"

Lab 00 - "Out of the box", as-generated code

  • Create IDL, then generate code
$NDDSHOME/bin/rtiddsgen -language C++11 -create typefiles -create exampleFiles -create makefiles -platform x64Darwin17clang9.0 ./example.idl

Lab 01 - Minor changes to make things more interesting

  • In the publisher's loop, change the generated code so that only non-keyed members are incrementally updated
  • Give the sample members some values, just so we aren't writing empty data
  • Speed up the writes on the publisher side by reducing the sleep from 1s to 500ms
  • In the QoS XML:
    • update publication_name and subscription_name with meaningful values (your name, etc.)
    • replace the local schema URL with a remote one

Lab 02 - Loading a user-defined XML QoS profile

  • Rename USER_QOS_PROFILES.xml as MY_QOS_PROFILES.xml
    • Use Admin Console to confirm that the DDS entity names created in ex01 are no longer present-- that is becuase the newly-named file is not loaded by default like USER_QOS_PROFILES.xml was.
  • rename the library to "MyLibrary" and profile to "MyProfile"
  • remove is_default_qos="true" from MyProfile
  • change publisher and subscriber code to use custom qosProvider

Lab 03 - Replacing string literals in the source

  • We can declare const strings in the IDL so that string literals do not have to be manually entered in source. Let's do that for:
    • The Topic name
    • The QoS library and profile
  • The type support code now needs to be regenerated
    • Generation: Example Files = ""
    • Generation: Type files = "update"
    • Generation: Makefiles = ""
    • Language = "Modern C++ (C++ 11)"
  • Update example_publisher.cxx and example_subscriber.cxx to use these constants.

Lab 04 - Deadline Qos

  • Set deadline to 1.0 sec. on DataReader
  • Discuss why not working. (QoS mismatch)
  • Add Reader listener callback to note Qos Error
    • In C++98 documentation, search for DDS_QosPolicyId_t; here you can match "4" to "DDS_DEADLINE_QOS_POLICY_ID"
  • Fix Writer to offer Deadline of 500ms
  • Add an additional listener callback to handle missed deadlines

Lab 05 - Reliability

  • remove base_name="BuiltinQosLibExp::Generic.StrictReliable" from QoS
  • Explicitly set reliability to RELIABLE_RELIABILITY_QOS in DatReader and DataWriter QoS.
  • Slow down writer to 1HZ and confirm that data is received at this rate.
  • Now set writer to wait for reliable acknowledgements.
  • Discuss writer write speed-- why did the data transfer slow down?
  • Speed up HB frequency in writer protocol to correct.

Lab 06 - Late Joiner History

  • Set Writer and Reader Durability to TRANSIENT_LOCAL_DURABILITY_QOS.
  • Set History to KEEP_LAST_HISTORY_QOS, depth 10 on the DataReader.
  • Set History to KEEP_LAST_HISTORY_QOS, depth 15 on the DataWriter.
  • Start Writer first, let it run for 10s or so, then start the Reader app and discuss late joiner results.

Lab 07 - Content Filtered Topic

  • Modify subscriber code to add a cft
    • add code to create the parameters and Filter
    • set the filter name
    • change the reader instantiation to use ContentFilteredTopic instead of normal topic
  • open admin console to show that no new topic is shown, the filtering is logical but does not spawn a new entity

dds_pro_labs_cpp11's People

Contributors

dgochenour avatar

dds_pro_labs_cpp11's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.