< Previous | Next >

Lesson 10: Add a domain participant for your subscriber entity

In this lesson, you add a domain participant for your MySubscriber subscriber entity.
  1. In the SubscriberPkg package, create a domain participant and open the Features window for it:
    1. On the General tab, name the domain participant MySubscribingApplication. Notice that by default the same name has also been entered in the Directory field, and Executable has been selected in the Type area.
    2. On the Scope tab, make sure that the scope is set to SubscriberPkg. If other check boxes are selected, clear them. Click OK.
  2. Specify the configuration for the MySubscribingApplication domain participant:
    1. Open the Features window for the DefaultConfig configuration under MySubscribingApplication
    2. On the Initialization tab, expand SubscriberPkg and select MySubscriber
    3. On the Settings tab, select the MSVC9 or Linux environment, and then click OK
  3. Add a dependency from the MySubscribingApplication domain participant to the MyTopicStructLib domain participant.
  4. Open the Features window for the dependency, and on the General tab, in the Stereotype field, select Usage in PredefinedTypes. As well, on the General tab, make sure that the Usage field is set to Specification. Click OK.
  5. Add a constructor to the MySubscriber subscriber:
    1. Right-click the MySubscriber subscriber and select Add New > Constructor, and click OK
    2. Open the Features window for the constructor operation, and enter the following code on the Implementation tab:
      printf("ready to receive data\n");
    3. Click OK

Lesson checkpoint

In this lesson, you learned how to add a domain participant to your MySubscriber publisher entity.
In the next lesson, you will see how to listen to Data Distribution Service for Real-Time Systems events related to MyDataReader.
< Previous | Next >

Feedback