Constructor
new QoSProvider(qospath, profile)
Create a qos provider.
Note that a QoSProvider consumes DDS memory that is not automatically reclaimed by NodeJS. Once you are finished with a QoSProvider object, you must call QoSProvider.delete() to reclaim this memory.
Parameters:
| Name | Type | Description |
|---|---|---|
qospath |
string | the absolute path to the qos file |
profile |
string | matches the name attribute of a qos_profile element within the QoS provider file |
Throws:
-
if the file cannot be opened, or if the named profile cannot be found in the file.
Methods
delete()
Release the DDS allocated memory associated with this QoSProvider object.
Once delete() is called, the QoSProvider object is no longer usable in your program.
Example
const dds = require('vortexdds');
const qp = new dds.QoSProfile(somePath,someProfile);
// ... retrieve QoS entities from the profile to
// ... create your DDS entities.
// all done with the QoSProfile, release its DDS memory
qp.delete();
// ... continue executing your program, using the DDS
// ... entities you created above.
getParticipantQos(nameopt) → {module:vortexdds.QoS}
Retrieves a Participant QoS
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string |
<optional> |
null | matches the option name attribute of the a domainparticipant_qos element within the profile. If omitted, then the domainparticipant_qos without a name attribute is selected. |
Throws:
-
if the specified QoS object cannot be retrieved.
Returns:
QoS object that contains values of the policies for a Participant
- Type
- module:vortexdds.QoS
Example
const dds = require('vortexdds');
const qp = somePreviouslyCreatedQoSProfile;
// retrieve the anonymous participant qos in the profile
const qos = qp.getParticipantQos();
const dp = new dds.Participant(qos);
// ... continue program, using the Participant 'dp'
getPublisherQos(nameopt) → {module:vortexdds.QoS}
Retrieves the Publisher QoS
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string |
<optional> |
null | matches the option name attribute of the a publisher_qos element within the profile. If omitted, then the publisher_qos without a name attribute is selected. |
Throws:
-
if the specified QoS object cannot be retrieved.
Returns:
QoS object that contains values of the policies for a Publisher
- Type
- module:vortexdds.QoS
Example
const dds = require('vortexdds');
const qp = somePreviouslyCreatedQoSProfile;
const dp = somePreviouslyCreatedParticipant;
// retrieve the anonymous publisher qos in the profile
const qos = qp.getPublisherQos();
const pub = dp.createPublisher(qos);
// ... continue program, using the Publisher 'pub'
getReaderQos(nameopt) → {module:vortexdds.QoS}
Retrieves the Reader QoS
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string |
<optional> |
null | matches the option name attribute of the a datareader_qos element within the profile. If omitted, then the datareader_qos without a name attribute is selected. |
Throws:
-
if the specified QoS object cannot be retrieved.
Returns:
QoS object that contains values of the policies for a Reader
- Type
- module:vortexdds.QoS
Example
const dds = require('vortexdds');
const qp = somePreviouslyCreatedQoSProfile;
const dp = somePreviouslyCreatedParticipant;
const topic = somePreviouslyCreatedTopic;
// retrieve the anonymous reader qos in the profile
const qos = qp.getReaderQos();
const rd = dp.createReader(topic, qos);
// ... continue program, using the Reader 'rd'
getSubscriberQos(nameopt) → {module:vortexdds.QoS}
Retrieves the Subscriber qos
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string |
<optional> |
null | matches the option name attribute of the a subscriber_qos element within the profile. If omitted, then the subscriber_qos without a name attribute is selected. |
Throws:
-
if the specified QoS object cannot be retrieved.
Returns:
QoS object that contains values of the policies for a Subscriber
- Type
- module:vortexdds.QoS
Example
const dds = require('vortexdds');
const qp = somePreviouslyCreatedQoSProfile;
const dp = somePreviouslyCreatedParticipant;
// retrieve the anonymous subscriber qos in the profile
const qos = qp.getSubscriberQos();
const sub = dp.createSubscriber(qos);
// ... continue program, using the Subscriber 'sub'
getTopicQos(nameopt) → {module:vortexdds.QoS}
Retrieves a Topic QoS
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string |
<optional> |
null | matches the option name attribute of the a topic_qos element within the profile. If omitted, then the topic_qos without a name attribute is selected. |
Throws:
-
if the specified QoS object cannot be retrieved.
Returns:
QoS object that contains values of the policies for a Topic
- Type
- module:vortexdds.QoS
Example
const dds = require('vortexdds');
const qp = somePreviouslyCreatedQoSProfile;
const dp = somePreviouslyCreatedParticipant;
// retrieve the anonymous topic qos in the profile
const qos = qp.getTopicQos();
const name = 'SomeTopicName';
const ts = somePreviouslyRetrievedTypeSupport;
const topic = dp.createTopic(name, ts, qos);
// ... continue program, using the Topic 'topic'
getWriterQos(nameopt) → {module:vortexdds.QoS}
Retrieves the Writer QoS
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
string |
<optional> |
null | matches the option name attribute of the a datawriter_qos element within the profile. If omitted, then the datawriter_qos without a name attribute is selected. |
Throws:
-
if the specified QoS object cannot be retrieved.
Returns:
QoS object that contains values of the policies for a Writer
- Type
- module:vortexdds.QoS
Example
const dds = require('vortexdds');
const qp = somePreviouslyCreatedQoSProfile;
const dp = somePreviouslyCreatedParticipant;
const topic = somePreviouslyCreatedTopic;
// retrieve the anonymous writer qos in the profile
const qos = qp.getWriterQos();
const wr = dp.createWriter(topic, qos);
// ... continue program, using the Writer 'wr'