Skip to content

Instantly share code, notes, and snippets.

@sandorkan
Created November 7, 2012 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandorkan/4030283 to your computer and use it in GitHub Desktop.
Save sandorkan/4030283 to your computer and use it in GitHub Desktop.
Creation of DataWriter for HelloPublisher
// Create the data writer using the default publisher
StringDataWriter dataWriter = (StringDataWriter)participant.create_datawriter(
helloWorldTopic, // Topic
Publisher.DATAWRITER_QOS_DEFAULT, // QoS
null, // listener
StatusKind.STATUS_MASK_NONE); // mask
if (dataWriter == null) {
System.err.println("Unable to create data writer\n");
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment