SlideShare a Scribd company logo
1 of 32
Download to read offline
ISO C++ DDS PSM


   Angelo Corsaro                  Rick Warren
  OMG DDS Co-Chair                       RTI
        PrismTech                 rick.warren@rti.com

angelo.corsaro@prismtech.com




   POC: Angelo Corsaro <angelo.corsaro@prismtech.com>1
Agenda
- Status Update
- Submission Scope
- API Overview
- Resource Management
- Code Example
- Type Mapping Example
- Next Steps
                  Copyright 2010, PrismTech / RTI
Status Update


- Tuesday 20th Sept. 2010, after a “conclave”
 of 4+ hours PrismTech and RTI have
 resolved all open issues and points of
 divergence!
- This presentation provides a unified view of
 what the joint final submission will be.



                  Copyright 2010, PrismTech / RTI
Agenda

- Status Update
- Submission Scope
- API Overview
- Resource Management
- Code Example
- Type Mapping Example
- Next Steps
                  Copyright 2010, PrismTech / RTI
Submission Scope


The ISO C++ DDS PSM has the following
scope:
- Full API for DCPS v1.2 PIM
- Full API for Extensible Topics
- ISO C++ mapping of DDS Type System (as
 defined in xtypes)


                   Copyright 2010, PrismTech / RTI
Agenda

- Status Update
- Submission Scope
- API Overview
- Resource Management
- Code Example
- Type Mapping Example
- Next Steps
                  Copyright 2010, PrismTech / RTI
Key Highlights
- Simple, safe, efficient, extensible and
 portable C++ API
- Well defined and safe resource management
- Use of C++ templates to ensure type safety
 and improve compile time error detection
- Consistent use of Standard C++ types and
 idioms, such as, std::string, std::vector,
 iterators, RAII Pattern, etc., throughout the
 API
                   Copyright 2010, PrismTech / RTI
API Organization
    DDS type constructors.
                                             Vendor Implementation for
                                             the DELEGATE layer


                   DELEGATE

               tdds                                     idds




                                             Standard API instantiated
                                             from the parametrized API
               dds                           and the vendor
                                             implementation of the
                                             DELEGATE layer.
        ANSI/ISO C++ PSM



                      Copyright 2010, PrismTech / RTI
Agenda

- Status Update
- Submission Scope
- API Overview
- Resource Management
- Code Example
- Type Mapping Example
- Next Steps
                  Copyright 2010, PrismTech / RTI
Resource Management
- Principles
   Safety: Never access uninitialized, freed, or
    undefined state
   Determinism: Applications control when local and
    remote resources are allocated and released
   Expressiveness: Maintain capabilities from PIM




                     Copyright 2010, PrismTech / RTI
Resource Management

- Expression of principles differ for
 different kinds of types
   Reference types: Identity based on reference
     • DDS Entities
     • Wait sets and conditions
   Value types: Identity based on state
     • Entity QoS and QoS policies
     • Status
     • Time and duration


                      Copyright 2010, PrismTech / RTI
Reference Type Usage
- Access is through smart pointers, allocated by
 factory methods. These:
   Provide null initialization
   Throw exception on access to “closed” object
   May automatically manage resources
- Examples:
   Null pointer:
      • Publisher pub;
      • if (pub == dds::core::null) { … }
   Initialization:
      • pub = dp.create_publisher();
   Copying reference:
      • Publisher pub2 = pub1; —or— Publisher pub2(pub1);
        // 2 references to same object
   Polymorphism & Down-Casting:
      • Entity e = pub; // Publisher pub
      • Publisher pub =
        dds::core::polymorphic_cast<Publisher>(e);

                         Copyright 2010, PrismTech / RTI
Reference Type Mgmt

- Reference types have close() method
   Disposes object and its contained objects

- Service may automatically close objects no longer
 in use
   “May” gives vendors flexibility to balance determinism,
    convenience for their users
   Similar to resource management practice in JMS
   Common-sense rules:
      • If I keep a reference to it, I intend to call it: still in use
      • If I set a listener, I want it to call me: still in use
      • If I call retain(): still in use

- Summary:
   Deterministic way to halt communication, reclaim resources
   Deterministic way to continue communication, maintain resources
   Flexibility for vendors

                                Copyright 2010, PrismTech / RTI
Agenda

- Status Update
- Submission Scope
- API Overview
- Resource Management
- Type Mapping Example
- Code Example
- Next Steps
                  Copyright 2010, PrismTech / RTI
DDS Types Mapping

- The ISO C++ API is independent from the
 specific mapping used for DDS Topic Types,
 as far as generated types have value
 semantics
      The ISO C++ API can be used with the existing
      IDL2C++ type mapping, or
     It can be used with the ISO C++ mapping for
      DDS Types as defined in the DDS-XTypes
      specification

                      Copyright 2010, PrismTech / RTI
ISO C++ Mapping


- Main Characteristics
     Use of ISO C++ / StdLib types
     Full Attribute Encapsulation via accessors
     Container Safe

- Example... see next slide


                       Copyright 2010, PrismTech / RTI
DDS Type Mapping
   DDS Topic Type                                    ISO C++ Mapping
                                  class TelephoneNumber {

                                  public:
                                    TelephoneNumber();

struct TelephoneNumber {               explicit TelephoneNumber(
   string prefix;                        const std::string& prefix,
   string number;                         const std::string& number);
};
                                    virtual ~TelephoneNumber()
                                  public:
                                    const std::string& prefix() const;
                                    void prefix(const std::string& s);

                                       const std::string& number() const;
                                       void number(const std::string& s);

                                  // State representation
                                  // is implementation dependent
                                  };
                           Copyright 2010, PrismTech / RTI
DDS Type Mapping
       DDS Topic Type

enum MarrialStatus {
  SINGLE, MARRIED, DIVORCED };

struct Person {
   long age; //@id(1)
   wstring name;
   MarrialStatus married;
   sequence<TelephoneNumber> tel;
   sequence<TelefoneNumber, 2> fax;
   double height; //@optional
   double weight; //@optional
   sequence<byte> photo; //@shared
};




                           Copyright 2010, PrismTech / RTI
DDS Type Mapping
       DDS Topic Type                                ISO C++ Mapping

enum MarrialStatus {
  SINGLE, MARRIED, DIVORCED };
                                                      class Person {
struct Person {                                       public:
   long age; //@id(1)                                  int32_t age() const;
   wstring name;                                       void age(int32_t i);
   MarrialStatus married;                             };
   sequence<TelephoneNumber> tel;
   sequence<TelefoneNumber, 2> fax;
   double height; //@optional
   double weight; //@optional
   sequence<byte> photo; //@shared
};




                           Copyright 2010, PrismTech / RTI
DDS Type Mapping
       DDS Topic Type                                ISO C++ Mapping

enum MarrialStatus {
  SINGLE, MARRIED, DIVORCED };
                                                class Person {
struct Person {                                 public:
   long age; //@id(1)                            std::wstring name() const;
   wstring name;                                 void name(const std::wstring s);
   MarrialStatus married;                       };
   sequence<TelephoneNumber> tel;
   sequence<TelefoneNumber, 2> fax;
   double height; //@optional
   double weight; //@optional
   sequence<byte> photo; //@shared
};




                           Copyright 2010, PrismTech / RTI
DDS Type Mapping
       DDS Topic Type                                 ISO C++ Mapping

enum MarrialStatus {
  SINGLE, MARRIED, DIVORCED };

struct Person {
   long age; //@id(1)
   wstring name;
   MarrialStatus married;
   sequence<TelephoneNumber> tel;
   sequence<TelefoneNumber, 2> fax;
   double height; //@optional
   double weight; //@optional
   sequence<byte> photo; //@shared
};
                    class Person {
                    public:
                     const std::vector<TelephoneNumber>& tel() const;
                     void tel(const std::vector<TelephoneNumber>& s);
                    };
                            Copyright 2010, PrismTech / RTI
DDS Type Mapping
       DDS Topic Type                  ISO C++ Mapping

enum MarrialStatus {
  SINGLE, MARRIED, DIVORCED };

struct Person {
   long age; //@id(1)
   wstring name;
   MarrialStatus married;
   sequence<TelephoneNumber> tel;
   sequence<TelefoneNumber, 2> fax;
   double height; //@optional
   double weight; //@optional
   sequence<byte> photo; //@shared
};
                 class Person {
                 public:
                  const dds::core::optional<double>& height() const;
                  void height(double d);
                  void height(const dds::core::optional<double>& o);
                 };         Copyright 2010, PrismTech / RTI
DDS Type Mapping
       DDS Topic Type                                 ISO C++ Mapping

enum MarrialStatus {
  SINGLE, MARRIED, DIVORCED };

struct Person {
   long age; //@id(1)
   wstring name;
   MarrialStatus married;
   sequence<TelephoneNumber> tel;
   sequence<TelefoneNumber, 2> fax;
   double height; //@optional
   double weight; //@optional
   sequence<byte> photo; //@shared
};
                    class Person {
                    public:
                     std::vector<uint8_t>* photo() const;
                     void photo(std::vector<uint8_t>* v);
                    };
                            Copyright 2010, PrismTech / RTI
Agenda

- Status Update
- Submission Scope
- API Overview
- Resource Management
- Type Mapping Example
- Code Example
- Next Steps
                  Copyright 2010, PrismTech / RTI
Code Example

 DDS Topic Type
 struct RadarTrack {
    string id;
    long x;
    long y;
 };




                       Copyright 2010, PrismTech / RTI
Data Writer

- Create DataWriter
 using dds::core; using dds::domain;
 using dds::pub; using dds::topic;

 DomainId id = 0;

 DomainParticipant dp =
    theParticipantFactory().create_participant(id);

 Publisher pub = dp.create_publisher();

 Topic<RadarTrack> topic = dp.create_topic("RadarTrackTopic");
 DataWriter<RadarTrack> dw = pub.create_datawriter();
 RadarTrack t("T101", 100, 200);
 dw.write(t);



                          Copyright 2010, PrismTech / RTI
Data Reader


 using dds::core; using dds::domain;
 using dds::pub; using dds::topic;

 DomainId id = 0;
 DomainParticipant dp(id);

 DomainParticipant dp =
    theParticipantFactory().create_participant();

 Publisher sub = dp.create_publisher();

 Topic<RadarTrack> topic = dp.create_topic("RadarTrackTopic");
 DataReader<RadarTrack> reader = sub.create_datareader();




                        Copyright 2010, PrismTech / RTI
Data Reader
                                                          std::vector<RadarTrack> t;
                                                          std::vector<SampleInfo> i;

                                                          RadarTrack at[MSIZE];
                                                          SampleInfo ai[MSIZE];

- User Provided Container
   dr.take(t.begin(), i.begin(), maxsize);



   dr.take(at, ai, MSIZE);




                        Copyright 2010, PrismTech / RTI
Data Reader


- Loaned Data
   LoanedSamples<RadarTrack> dt = dr.take();
    for (LoanedSamples<RadarTrack>::Iterator it = dt.begin();
          it != dt.end();
          ++it) {
      const Sample<RadarTrack>& sample = *it;
      if (sample.is_valid_data()) {
        const RadarTrack& data = sample.data();
        // …
      }
    }

                        Copyright 2010, PrismTech / RTI
Agenda

- Status Update
- Submission Scope
- API Overview
- Resource Management
- Type Mapping Example
- Code Example
- Next Steps
                  Copyright 2010, PrismTech / RTI
Next Steps


- XTopics API
     Add support for the XTopics API
     Complete the Type Mapping to include the full
      DDS-XTypes Type System

- Vote for Adoption
     December Meeting



                      Copyright 2010, PrismTech / RTI
THANKS

  `

More Related Content

Viewers also liked

Microsoft
MicrosoftMicrosoft
MicrosoftVirus91
 
CBI Presentation March 2011
CBI Presentation March 2011CBI Presentation March 2011
CBI Presentation March 2011thess1121
 
BONES FESTES
BONES FESTESBONES FESTES
BONES FESTESmariasun
 
Real-Time Marketing With Twitter
Real-Time Marketing With TwitterReal-Time Marketing With Twitter
Real-Time Marketing With TwitterAsfaq Tapia
 
Electric energy scientific development, main source and consumers
Electric energy scientific development, main source and consumersElectric energy scientific development, main source and consumers
Electric energy scientific development, main source and consumersP K Agarwal
 
Designing the Mobile Experience
Designing the Mobile ExperienceDesigning the Mobile Experience
Designing the Mobile ExperienceKaKi Law
 
How to Play Well with Others (A Program on Dealing with Difficult People)
How to Play Well with Others (A Program on Dealing with Difficult People)How to Play Well with Others (A Program on Dealing with Difficult People)
How to Play Well with Others (A Program on Dealing with Difficult People)Marian Madonia, CSP
 
Crosscurrents, 2011. It's All about Thinking
Crosscurrents, 2011. It's All about ThinkingCrosscurrents, 2011. It's All about Thinking
Crosscurrents, 2011. It's All about ThinkingFaye Brownlie
 
Visita parque ciencias 2º ciclo
Visita parque ciencias 2º cicloVisita parque ciencias 2º ciclo
Visita parque ciencias 2º cicloXXX XXX
 
Building Distributed Systems in Scala with OpenSplice DDS
Building Distributed Systems in Scala with OpenSplice DDSBuilding Distributed Systems in Scala with OpenSplice DDS
Building Distributed Systems in Scala with OpenSplice DDSAngelo Corsaro
 
Varney Family Photos
Varney Family PhotosVarney Family Photos
Varney Family PhotosRhonda Osburn
 
The big pig
The big pigThe big pig
The big pigC FM
 

Viewers also liked (20)

Presentation 12.19
Presentation 12.19Presentation 12.19
Presentation 12.19
 
ikd312-08-fd
ikd312-08-fdikd312-08-fd
ikd312-08-fd
 
ikd312-03-design
ikd312-03-designikd312-03-design
ikd312-03-design
 
Microsoft
MicrosoftMicrosoft
Microsoft
 
CBI Presentation March 2011
CBI Presentation March 2011CBI Presentation March 2011
CBI Presentation March 2011
 
BONES FESTES
BONES FESTESBONES FESTES
BONES FESTES
 
Real-Time Marketing With Twitter
Real-Time Marketing With TwitterReal-Time Marketing With Twitter
Real-Time Marketing With Twitter
 
Electric energy scientific development, main source and consumers
Electric energy scientific development, main source and consumersElectric energy scientific development, main source and consumers
Electric energy scientific development, main source and consumers
 
Designing the Mobile Experience
Designing the Mobile ExperienceDesigning the Mobile Experience
Designing the Mobile Experience
 
How to Play Well with Others (A Program on Dealing with Difficult People)
How to Play Well with Others (A Program on Dealing with Difficult People)How to Play Well with Others (A Program on Dealing with Difficult People)
How to Play Well with Others (A Program on Dealing with Difficult People)
 
Crosscurrents, 2011. It's All about Thinking
Crosscurrents, 2011. It's All about ThinkingCrosscurrents, 2011. It's All about Thinking
Crosscurrents, 2011. It's All about Thinking
 
Lxb Attest
Lxb AttestLxb Attest
Lxb Attest
 
ikh331-05-transaction
ikh331-05-transactionikh331-05-transaction
ikh331-05-transaction
 
Visita parque ciencias 2º ciclo
Visita parque ciencias 2º cicloVisita parque ciencias 2º ciclo
Visita parque ciencias 2º ciclo
 
Building Distributed Systems in Scala with OpenSplice DDS
Building Distributed Systems in Scala with OpenSplice DDSBuilding Distributed Systems in Scala with OpenSplice DDS
Building Distributed Systems in Scala with OpenSplice DDS
 
Varney Family Photos
Varney Family PhotosVarney Family Photos
Varney Family Photos
 
Sph 107 Ch 15
Sph 107 Ch 15Sph 107 Ch 15
Sph 107 Ch 15
 
Ralph Who
Ralph WhoRalph Who
Ralph Who
 
The big pig
The big pigThe big pig
The big pig
 
My Portfolio
My PortfolioMy Portfolio
My Portfolio
 

Similar to DDS ISO C++ PSM

Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDSOverloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDSSumant Tambe
 
Vortex Tutorial -- Part I
Vortex Tutorial -- Part IVortex Tutorial -- Part I
Vortex Tutorial -- Part IAngelo Corsaro
 
DDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxDDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxAngelo Corsaro
 
Building IoT Applications with Vortex and the Intel Edison Starter Kit
Building IoT Applications with Vortex and the Intel Edison Starter KitBuilding IoT Applications with Vortex and the Intel Edison Starter Kit
Building IoT Applications with Vortex and the Intel Edison Starter KitAngelo Corsaro
 
7 DDS Innovations to Improve your Next Distributed System
7 DDS Innovations to Improve your Next Distributed System7 DDS Innovations to Improve your Next Distributed System
7 DDS Innovations to Improve your Next Distributed SystemReal-Time Innovations (RTI)
 
Distributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applicationsDistributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applicationsJaime Martin Losa
 
Reactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and RxReactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and RxSumant Tambe
 
The DDS Tutorial - Part I
The DDS Tutorial - Part IThe DDS Tutorial - Part I
The DDS Tutorial - Part IAngelo Corsaro
 
Reactive Data Centric Architectures with DDS
Reactive Data Centric Architectures with DDSReactive Data Centric Architectures with DDS
Reactive Data Centric Architectures with DDSAngelo Corsaro
 
mm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Typemm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data TypeMarko Rodriguez
 
Fast RTPS Workshop at FIWARE Summit 2018
Fast RTPS Workshop at FIWARE Summit 2018Fast RTPS Workshop at FIWARE Summit 2018
Fast RTPS Workshop at FIWARE Summit 2018Jaime Martin Losa
 
eProsima RPC over DDS - Connext Conf London October 2015
eProsima RPC over DDS - Connext Conf London October 2015 eProsima RPC over DDS - Connext Conf London October 2015
eProsima RPC over DDS - Connext Conf London October 2015 Jaime Martin Losa
 
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...IncQuery Labs
 
Getting Started with OpenSplice and Esper
Getting Started with OpenSplice and EsperGetting Started with OpenSplice and Esper
Getting Started with OpenSplice and EsperAngelo Corsaro
 
IoT Protocols Integration with Vortex Gateway
IoT Protocols Integration with Vortex GatewayIoT Protocols Integration with Vortex Gateway
IoT Protocols Integration with Vortex GatewayAngelo Corsaro
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingJaime Martin Losa
 
Real Time Java DDS
Real Time Java DDSReal Time Java DDS
Real Time Java DDSkerush
 

Similar to DDS ISO C++ PSM (20)

Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDSOverloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
 
PrismTech Vortex Tutorial Part 1
PrismTech Vortex Tutorial Part 1PrismTech Vortex Tutorial Part 1
PrismTech Vortex Tutorial Part 1
 
Vortex Tutorial -- Part I
Vortex Tutorial -- Part IVortex Tutorial -- Part I
Vortex Tutorial -- Part I
 
DDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxDDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxx
 
Building IoT Applications with Vortex and the Intel Edison Starter Kit
Building IoT Applications with Vortex and the Intel Edison Starter KitBuilding IoT Applications with Vortex and the Intel Edison Starter Kit
Building IoT Applications with Vortex and the Intel Edison Starter Kit
 
7 DDS Innovations to Improve your Next Distributed System
7 DDS Innovations to Improve your Next Distributed System7 DDS Innovations to Improve your Next Distributed System
7 DDS Innovations to Improve your Next Distributed System
 
Distributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applicationsDistributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applications
 
Reactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and RxReactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and Rx
 
The DDS Tutorial - Part I
The DDS Tutorial - Part IThe DDS Tutorial - Part I
The DDS Tutorial - Part I
 
Reactive Data Centric Architectures with DDS
Reactive Data Centric Architectures with DDSReactive Data Centric Architectures with DDS
Reactive Data Centric Architectures with DDS
 
mm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Typemm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Type
 
Java Persistence API
Java Persistence APIJava Persistence API
Java Persistence API
 
Fast RTPS Workshop at FIWARE Summit 2018
Fast RTPS Workshop at FIWARE Summit 2018Fast RTPS Workshop at FIWARE Summit 2018
Fast RTPS Workshop at FIWARE Summit 2018
 
eProsima RPC over DDS - Connext Conf London October 2015
eProsima RPC over DDS - Connext Conf London October 2015 eProsima RPC over DDS - Connext Conf London October 2015
eProsima RPC over DDS - Connext Conf London October 2015
 
Overview of the DDS-XRCE specification
Overview of the DDS-XRCE specificationOverview of the DDS-XRCE specification
Overview of the DDS-XRCE specification
 
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
Introducing the New MagicDraw Plug-In for RTI Connext DDS: Industrial IoT Mee...
 
Getting Started with OpenSplice and Esper
Getting Started with OpenSplice and EsperGetting Started with OpenSplice and Esper
Getting Started with OpenSplice and Esper
 
IoT Protocols Integration with Vortex Gateway
IoT Protocols Integration with Vortex GatewayIoT Protocols Integration with Vortex Gateway
IoT Protocols Integration with Vortex Gateway
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
 
Real Time Java DDS
Real Time Java DDSReal Time Java DDS
Real Time Java DDS
 

More from Angelo Corsaro

zenoh: The Edge Data Fabric
zenoh: The Edge Data Fabriczenoh: The Edge Data Fabric
zenoh: The Edge Data FabricAngelo Corsaro
 
Data Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair MonetisationData Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair MonetisationAngelo Corsaro
 
zenoh: zero overhead pub/sub store/query compute
zenoh: zero overhead pub/sub store/query computezenoh: zero overhead pub/sub store/query compute
zenoh: zero overhead pub/sub store/query computeAngelo Corsaro
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolAngelo Corsaro
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolAngelo Corsaro
 
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog ComputingBreaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog ComputingAngelo Corsaro
 
fog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructurefog05: The Fog Computing Infrastructure
fog05: The Fog Computing InfrastructureAngelo Corsaro
 
Cyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT AgeCyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT AgeAngelo Corsaro
 
fog05: The Fog Computing Platform
fog05: The Fog Computing Platformfog05: The Fog Computing Platform
fog05: The Fog Computing PlatformAngelo Corsaro
 
Programming in Scala - Lecture Four
Programming in Scala - Lecture FourProgramming in Scala - Lecture Four
Programming in Scala - Lecture FourAngelo Corsaro
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture ThreeAngelo Corsaro
 
Programming in Scala - Lecture Two
Programming in Scala - Lecture TwoProgramming in Scala - Lecture Two
Programming in Scala - Lecture TwoAngelo Corsaro
 
Programming in Scala - Lecture One
Programming in Scala - Lecture OneProgramming in Scala - Lecture One
Programming in Scala - Lecture OneAngelo Corsaro
 
Data Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained EnvionrmentsData Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained EnvionrmentsAngelo Corsaro
 
The DDS Security Standard
The DDS Security StandardThe DDS Security Standard
The DDS Security StandardAngelo Corsaro
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution ServiceAngelo Corsaro
 

More from Angelo Corsaro (20)

Zenoh: The Genesis
Zenoh: The GenesisZenoh: The Genesis
Zenoh: The Genesis
 
zenoh: The Edge Data Fabric
zenoh: The Edge Data Fabriczenoh: The Edge Data Fabric
zenoh: The Edge Data Fabric
 
Zenoh Tutorial
Zenoh TutorialZenoh Tutorial
Zenoh Tutorial
 
Data Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair MonetisationData Decentralisation: Efficiency, Privacy and Fair Monetisation
Data Decentralisation: Efficiency, Privacy and Fair Monetisation
 
zenoh: zero overhead pub/sub store/query compute
zenoh: zero overhead pub/sub store/query computezenoh: zero overhead pub/sub store/query compute
zenoh: zero overhead pub/sub store/query compute
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocol
 
zenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocolzenoh -- the ZEro Network OverHead protocol
zenoh -- the ZEro Network OverHead protocol
 
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog ComputingBreaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
Breaking the Edge -- A Journey Through Cloud, Edge and Fog Computing
 
Eastern Sicily
Eastern SicilyEastern Sicily
Eastern Sicily
 
fog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructurefog05: The Fog Computing Infrastructure
fog05: The Fog Computing Infrastructure
 
Cyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT AgeCyclone DDS: Sharing Data in the IoT Age
Cyclone DDS: Sharing Data in the IoT Age
 
fog05: The Fog Computing Platform
fog05: The Fog Computing Platformfog05: The Fog Computing Platform
fog05: The Fog Computing Platform
 
Programming in Scala - Lecture Four
Programming in Scala - Lecture FourProgramming in Scala - Lecture Four
Programming in Scala - Lecture Four
 
Programming in Scala - Lecture Three
Programming in Scala - Lecture ThreeProgramming in Scala - Lecture Three
Programming in Scala - Lecture Three
 
Programming in Scala - Lecture Two
Programming in Scala - Lecture TwoProgramming in Scala - Lecture Two
Programming in Scala - Lecture Two
 
Programming in Scala - Lecture One
Programming in Scala - Lecture OneProgramming in Scala - Lecture One
Programming in Scala - Lecture One
 
Data Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained EnvionrmentsData Sharing in Extremely Resource Constrained Envionrments
Data Sharing in Extremely Resource Constrained Envionrments
 
The DDS Security Standard
The DDS Security StandardThe DDS Security Standard
The DDS Security Standard
 
The Data Distribution Service
The Data Distribution ServiceThe Data Distribution Service
The Data Distribution Service
 
Fog Computing Defined
Fog Computing DefinedFog Computing Defined
Fog Computing Defined
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

DDS ISO C++ PSM

  • 1. ISO C++ DDS PSM Angelo Corsaro Rick Warren OMG DDS Co-Chair RTI PrismTech rick.warren@rti.com angelo.corsaro@prismtech.com POC: Angelo Corsaro <angelo.corsaro@prismtech.com>1
  • 2. Agenda - Status Update - Submission Scope - API Overview - Resource Management - Code Example - Type Mapping Example - Next Steps Copyright 2010, PrismTech / RTI
  • 3. Status Update - Tuesday 20th Sept. 2010, after a “conclave” of 4+ hours PrismTech and RTI have resolved all open issues and points of divergence! - This presentation provides a unified view of what the joint final submission will be. Copyright 2010, PrismTech / RTI
  • 4. Agenda - Status Update - Submission Scope - API Overview - Resource Management - Code Example - Type Mapping Example - Next Steps Copyright 2010, PrismTech / RTI
  • 5. Submission Scope The ISO C++ DDS PSM has the following scope: - Full API for DCPS v1.2 PIM - Full API for Extensible Topics - ISO C++ mapping of DDS Type System (as defined in xtypes) Copyright 2010, PrismTech / RTI
  • 6. Agenda - Status Update - Submission Scope - API Overview - Resource Management - Code Example - Type Mapping Example - Next Steps Copyright 2010, PrismTech / RTI
  • 7. Key Highlights - Simple, safe, efficient, extensible and portable C++ API - Well defined and safe resource management - Use of C++ templates to ensure type safety and improve compile time error detection - Consistent use of Standard C++ types and idioms, such as, std::string, std::vector, iterators, RAII Pattern, etc., throughout the API Copyright 2010, PrismTech / RTI
  • 8. API Organization DDS type constructors. Vendor Implementation for the DELEGATE layer DELEGATE tdds idds Standard API instantiated from the parametrized API dds and the vendor implementation of the DELEGATE layer. ANSI/ISO C++ PSM Copyright 2010, PrismTech / RTI
  • 9. Agenda - Status Update - Submission Scope - API Overview - Resource Management - Code Example - Type Mapping Example - Next Steps Copyright 2010, PrismTech / RTI
  • 10. Resource Management - Principles  Safety: Never access uninitialized, freed, or undefined state  Determinism: Applications control when local and remote resources are allocated and released  Expressiveness: Maintain capabilities from PIM Copyright 2010, PrismTech / RTI
  • 11. Resource Management - Expression of principles differ for different kinds of types  Reference types: Identity based on reference • DDS Entities • Wait sets and conditions  Value types: Identity based on state • Entity QoS and QoS policies • Status • Time and duration Copyright 2010, PrismTech / RTI
  • 12. Reference Type Usage - Access is through smart pointers, allocated by factory methods. These:  Provide null initialization  Throw exception on access to “closed” object  May automatically manage resources - Examples:  Null pointer: • Publisher pub; • if (pub == dds::core::null) { … }  Initialization: • pub = dp.create_publisher();  Copying reference: • Publisher pub2 = pub1; —or— Publisher pub2(pub1); // 2 references to same object  Polymorphism & Down-Casting: • Entity e = pub; // Publisher pub • Publisher pub = dds::core::polymorphic_cast<Publisher>(e); Copyright 2010, PrismTech / RTI
  • 13. Reference Type Mgmt - Reference types have close() method  Disposes object and its contained objects - Service may automatically close objects no longer in use  “May” gives vendors flexibility to balance determinism, convenience for their users  Similar to resource management practice in JMS  Common-sense rules: • If I keep a reference to it, I intend to call it: still in use • If I set a listener, I want it to call me: still in use • If I call retain(): still in use - Summary:  Deterministic way to halt communication, reclaim resources  Deterministic way to continue communication, maintain resources  Flexibility for vendors Copyright 2010, PrismTech / RTI
  • 14. Agenda - Status Update - Submission Scope - API Overview - Resource Management - Type Mapping Example - Code Example - Next Steps Copyright 2010, PrismTech / RTI
  • 15. DDS Types Mapping - The ISO C++ API is independent from the specific mapping used for DDS Topic Types, as far as generated types have value semantics  The ISO C++ API can be used with the existing IDL2C++ type mapping, or  It can be used with the ISO C++ mapping for DDS Types as defined in the DDS-XTypes specification Copyright 2010, PrismTech / RTI
  • 16. ISO C++ Mapping - Main Characteristics  Use of ISO C++ / StdLib types  Full Attribute Encapsulation via accessors  Container Safe - Example... see next slide Copyright 2010, PrismTech / RTI
  • 17. DDS Type Mapping DDS Topic Type ISO C++ Mapping class TelephoneNumber { public: TelephoneNumber(); struct TelephoneNumber { explicit TelephoneNumber( string prefix; const std::string& prefix, string number; const std::string& number); }; virtual ~TelephoneNumber() public: const std::string& prefix() const; void prefix(const std::string& s); const std::string& number() const; void number(const std::string& s); // State representation // is implementation dependent }; Copyright 2010, PrismTech / RTI
  • 18. DDS Type Mapping DDS Topic Type enum MarrialStatus { SINGLE, MARRIED, DIVORCED }; struct Person { long age; //@id(1) wstring name; MarrialStatus married; sequence<TelephoneNumber> tel; sequence<TelefoneNumber, 2> fax; double height; //@optional double weight; //@optional sequence<byte> photo; //@shared }; Copyright 2010, PrismTech / RTI
  • 19. DDS Type Mapping DDS Topic Type ISO C++ Mapping enum MarrialStatus { SINGLE, MARRIED, DIVORCED }; class Person { struct Person { public: long age; //@id(1) int32_t age() const; wstring name; void age(int32_t i); MarrialStatus married; }; sequence<TelephoneNumber> tel; sequence<TelefoneNumber, 2> fax; double height; //@optional double weight; //@optional sequence<byte> photo; //@shared }; Copyright 2010, PrismTech / RTI
  • 20. DDS Type Mapping DDS Topic Type ISO C++ Mapping enum MarrialStatus { SINGLE, MARRIED, DIVORCED }; class Person { struct Person { public: long age; //@id(1) std::wstring name() const; wstring name; void name(const std::wstring s); MarrialStatus married; }; sequence<TelephoneNumber> tel; sequence<TelefoneNumber, 2> fax; double height; //@optional double weight; //@optional sequence<byte> photo; //@shared }; Copyright 2010, PrismTech / RTI
  • 21. DDS Type Mapping DDS Topic Type ISO C++ Mapping enum MarrialStatus { SINGLE, MARRIED, DIVORCED }; struct Person { long age; //@id(1) wstring name; MarrialStatus married; sequence<TelephoneNumber> tel; sequence<TelefoneNumber, 2> fax; double height; //@optional double weight; //@optional sequence<byte> photo; //@shared }; class Person { public: const std::vector<TelephoneNumber>& tel() const; void tel(const std::vector<TelephoneNumber>& s); }; Copyright 2010, PrismTech / RTI
  • 22. DDS Type Mapping DDS Topic Type ISO C++ Mapping enum MarrialStatus { SINGLE, MARRIED, DIVORCED }; struct Person { long age; //@id(1) wstring name; MarrialStatus married; sequence<TelephoneNumber> tel; sequence<TelefoneNumber, 2> fax; double height; //@optional double weight; //@optional sequence<byte> photo; //@shared }; class Person { public: const dds::core::optional<double>& height() const; void height(double d); void height(const dds::core::optional<double>& o); }; Copyright 2010, PrismTech / RTI
  • 23. DDS Type Mapping DDS Topic Type ISO C++ Mapping enum MarrialStatus { SINGLE, MARRIED, DIVORCED }; struct Person { long age; //@id(1) wstring name; MarrialStatus married; sequence<TelephoneNumber> tel; sequence<TelefoneNumber, 2> fax; double height; //@optional double weight; //@optional sequence<byte> photo; //@shared }; class Person { public: std::vector<uint8_t>* photo() const; void photo(std::vector<uint8_t>* v); }; Copyright 2010, PrismTech / RTI
  • 24. Agenda - Status Update - Submission Scope - API Overview - Resource Management - Type Mapping Example - Code Example - Next Steps Copyright 2010, PrismTech / RTI
  • 25. Code Example DDS Topic Type struct RadarTrack { string id; long x; long y; }; Copyright 2010, PrismTech / RTI
  • 26. Data Writer - Create DataWriter using dds::core; using dds::domain; using dds::pub; using dds::topic; DomainId id = 0; DomainParticipant dp = theParticipantFactory().create_participant(id); Publisher pub = dp.create_publisher(); Topic<RadarTrack> topic = dp.create_topic("RadarTrackTopic"); DataWriter<RadarTrack> dw = pub.create_datawriter(); RadarTrack t("T101", 100, 200); dw.write(t); Copyright 2010, PrismTech / RTI
  • 27. Data Reader using dds::core; using dds::domain; using dds::pub; using dds::topic; DomainId id = 0; DomainParticipant dp(id); DomainParticipant dp = theParticipantFactory().create_participant(); Publisher sub = dp.create_publisher(); Topic<RadarTrack> topic = dp.create_topic("RadarTrackTopic"); DataReader<RadarTrack> reader = sub.create_datareader(); Copyright 2010, PrismTech / RTI
  • 28. Data Reader std::vector<RadarTrack> t; std::vector<SampleInfo> i; RadarTrack at[MSIZE]; SampleInfo ai[MSIZE]; - User Provided Container dr.take(t.begin(), i.begin(), maxsize); dr.take(at, ai, MSIZE); Copyright 2010, PrismTech / RTI
  • 29. Data Reader - Loaned Data LoanedSamples<RadarTrack> dt = dr.take(); for (LoanedSamples<RadarTrack>::Iterator it = dt.begin(); it != dt.end(); ++it) { const Sample<RadarTrack>& sample = *it; if (sample.is_valid_data()) { const RadarTrack& data = sample.data(); // … } } Copyright 2010, PrismTech / RTI
  • 30. Agenda - Status Update - Submission Scope - API Overview - Resource Management - Type Mapping Example - Code Example - Next Steps Copyright 2010, PrismTech / RTI
  • 31. Next Steps - XTopics API  Add support for the XTopics API  Complete the Type Mapping to include the full DDS-XTypes Type System - Vote for Adoption  December Meeting Copyright 2010, PrismTech / RTI