Module defining Vortex DDS API for Node JS.
Classes
- Condition
- DDSError
- Entity
- GuardCondition
- Participant
- Publisher
- QoS
- QoSProvider
- QueryCondition
- ReadCondition
- Reader
- StatusCondition
- Subscriber
- Topic
- TypeSupport
- Waitset
- Writer
Members
(static, constant) DDSConstants
Miscellaneous DDS constants
Properties:
| Name | Type | Description |
|---|---|---|
DDS_LENGTH_UNLIMITED |
specified unlimited length in multiple QoS policies:
|
|
DDS_DOMAIN_DEFAULT |
specifies the default domain when creating a Participant. |
|
DDS_HANDLE_NIL |
DO NOT USE. |
|
DDS_INFINITY |
specifies an infinite duration in multiple QoS policies and some method calls. |
|
DDS_RETCODE_TIMEOUT |
DO NOT USE. Use DDSErrorCode.TIMEOUT |
(static, constant) DDSErrorCode :number
An enumeration of error codes understood by DDSError
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
OK |
number | Success |
ERROR |
number | Non specific error |
UNSUPPORTED |
number | Feature unsupported |
BAD_PARAMETER |
number | Bad parameter value |
PRECONDITION_NOT_MET |
number | Preconditon for operation not met |
OUT_OF_RESOURCES |
number | Operation failed because of a lack of resources |
NOT_ENABLED |
number | A configurable feature is not enabled |
IMMUTABLE_POLICY |
number | Attempt was made to modify an immutable policy |
INCONSISTENT_POLICY |
number | A policy was used with inconsistent values |
ALREADY_DELETED |
number | An attempt was made to delete something more than once |
TIMEOUT |
number | A timeout has occurred |
NO_DATA |
number | Expected data was not provided |
ILLEGAL_OPERATION |
number | A function was called when it should not have been |
(static, constant) DestinationOrderKind :number
The kinds of destinationOrder QoS policy
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
ByReceptionTimestamp |
number | Indicates that data is ordered based on the reception time at each Subscriber. Since each subscriber may receive the data at different times there is no guaranteed that the changes will be seen in the same order. Consequently, it is possible for each subscriber to end up with a different final value for the data. |
BySourceTimestamp |
number | Indicates that data is ordered based on a timestamp placed at the source (by the DDS Service or by the application). In any case this guarantees a consistent final value for the data in all subscribers. |
(static, constant) DurabilityKind :number
Specifies the type of durability policy.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
Volatile |
number | The Service does not need to keep any samples of data-instances on behalf of any DataReader that is not known by the DataWriter at the time the instance is written. In other words the Service will only attempt to provide the data to existing subscribers. This is the default kind. |
TransientLocal |
number | The Service will attempt to keep some samples so that they can be delivered to any potential late- joining DataReader. Which particular samples are kept depends on other QoS such as HISTORY and RESOURCE_LIMITS. For TRANSIENT_LOCAL, the service is only required to keep the data in the memory of the DataWriter that wrote the data and the data is not required to survive the DataWriter. |
Transient |
number | The Service will attempt to keep some samples so that they can be delivered to any potential late- joining DataReader. Which particular samples are kept depends on other QoS such as HISTORY and RESOURCE_LIMITS. For TRANSIENT, the service is only required to keep the data in memory and not in permanent storage; but the data is not tied to the lifecycle of the DataWriter and will, in general, survive it. |
Persistent |
number | Data is kept on permanent storage, so that they can outlive a system session. |
(static) getTopicTypeSupportsForIDL
An alias for {module:vortexdds.importIDL}.
- Deprecated:
(static, constant) HistoryKind :number
Constants specifying behaviours of the History Service.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
KeepLast |
number | On the publishing side, the Service will only attempt to keep the most recent “depth” samples of each instance of data (identified by its key) managed by the DataWriter. On the subscribing side, the DataReader will only attempt to keep the most recent “depth” samples received for each instance (identified by its key) until the application “takes” them via the DataReader’s take operation. KeepLast is the default kind. The default value of depth is 1. If a value other than 1 is specified, it should be consistent with the settings of the RESOURCE_LIMITS QoS policy. |
KeepAll |
number | On the publishing side, the Service will attempt to keep all samples (representing each value written) of each instance of data (identified by its key) managed by the DataWriter until they can be delivered to all subscribers. On the subscribing side, the Service will attempt to keep all samples of each instance of data (identified by its key) managed by the DataReader. These samples are kept until the application “takes” them from the Service via the take operation. The setting of depth has no effect. Its implied value is LENGTH_UNLIMITED. |
(static, constant) LivelinessKind :number
Defines the kinds of liveliness QoS policy.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
Automatic |
number | The infrastructure will automatically signal liveliness for the Writers at least as often as required by the LivelinessPolicy leaseDuration field. |
ManualByParticipant |
number | The user application takes responsibility to signal liveliness to the DDS Service using one of the mechanisms described in Section 7.1.3.11, “LIVELINESS,” on page 113 DDS 1.2 Specification. Liveliness must be asserted as often as required by the LivelinessPolicy leaseDuration field. Otherwise the DDS Service will assume the corresponding Entity is no longer “active/alive.” The DDS Service will assume that as long as at least one Entity within the Participant has asserted its liveliness the other Entities in that same Participant are also alive. |
ManualByTopic |
number | The user application takes responsibility to signal liveliness to the DDS Service using one of the mechanisms described in Section 7.1.3.11, “LIVELINESS,” on page 113 of the DDS 1.2 Specification}. Liveliness must be asserted as often as required by the LivelinessPolicy leaseDuration field. Otherwise the DDS Service will assume the corresponding Entity is no longer “active/alive.” The DDS Service will only assume liveliness of the Writer if the application has asserted liveliness of that Writer itself. |
(static, constant) OwnershipKind :number
Defines the kinds of ownership for the ownership policy.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
Shared |
number | Indicates shared ownership for each instance. Multiple writers are allowed to update the same instance and all the updates are made available to the readers. In other words there is no concept of an “owner” for the instances. This is the default behavior if the ownership QoS policy is not specified. |
Exclusive |
number | Indicates each instance can only be owned by one Writer, but the owner of an instance can change dynamically. The selection of the owner is controlled by the setting of the ownershipStrength QoS policy. The owner is always set to be the highest-strength Writer object among the ones currently “active” (as determined by the liveliness QoS). |
(static, constant) PresentationAccessScopeKind :number
Constants defining the kinds of presentation policy scopes.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
Instance |
number | No coherent change sets are expected |
Topic |
number | Samples written by a Writer within a 'coherent change' will not be interleaved by other samples when read by a Reader. Note: The NodeJS API does not support Topic kind. |
Group |
number | Samples written by multiple Writers within a 'coherent change' will not be interleaved by other samples written by other Writers when accessed from a coherent Subscriber.. Note: The NodeJS API does not support Group kind. |
(static, constant) QosPolicyID :number
Defines identifiers for each available QoS policy. Returned by DDS status objects.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
INVALID |
number | Invalid QoS policy |
USERDATA |
number | A QoS.userdata policy. |
DURABILITY |
number | A QoS.durability policy. |
PRESENTATION |
number | A QoS.presentation policy. |
DEADLINE |
number | A QoS.deadline policy. |
LATENCYBUDGET |
number | A QoS.latencyBudget policy. |
OWNERSHIP |
number | A QoS.ownership policy. |
OWNERSHIPSTRENGTH |
number | A QoS.ownershipStrength policy. |
LIVELINESS |
number | A QoS.liveliness policy. |
TIMEBASEDFILTER |
number | A QoS.timebasedFilter policy. |
PARTITION |
number | A QoS.partition policy. |
RELIABILITY |
number | A QoS.reliability policy. |
DESTINATIONORDER |
number | A QoS.destinationOrder policy. |
HISTORY |
number | A QoS.history policy. |
RESOURCELIMITS |
number | A QoS.resourceLimits policy. |
ENTITYFACTORY |
number | An entityFactory policy. Not supported by this API |
WRITERDATALIFECYCLE |
number | A QoS.writerDataLifecycle policy. |
READERDATALIFECYCLE |
number | A QoS.readerDataLifecycle policy. |
TOPICDATA |
number | A QoS.topicdata policy. |
GROUPDATA |
number | A QoS.groupdata policy. |
TRANSPORTPRIORITY |
number | A QoS.transportPriority policy. |
LIFESPAN |
number | A QoS.lifespan policy. |
DURABILITYSERVICE |
number | A QoS.durabilityService policy. |
(static, constant) ReliabilityKind :number
The kinds of reliability QoS policy.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
BestEffort |
number | Specifies the DDS Service will attempt to deliver all samples in its history. Missed samples may be retried. In steady-state (no modifications communicated via the Writer) the middleware guarantees that all samples in the Writer history will eventually be delivered to all the Reader a objects. Outside steady state the history and resourceLimits policies will determine how samples become part of the history and whether samples can be discarded from it. This is the default value for Writers. |
Reliable |
number | Indicates that it is acceptable to not retry propagation of any samples. Presumably new values for the samples are generated often enough that it is not necessary to re-send or acknowledge any samples. This is the default value for Readers and Topics. |
(static, constant) SampleRejectedStatusKind :number
Constants representing reasons for a sample being rejected.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
NOT_REJECTED |
number | The sample was not rejected |
BY_INSTANCES_LIMIT |
number | The limit imposed by the QoS resourceLimits policy maxInstances has been exceeded. |
BY_SAMPLES_LIMIT |
number | The limit imposed by the QoS resourceLimits policy maxSamples has been exceeded. |
BY_SAMPLES_PER_INSTANCE_LIMIT |
number | The limit imposed by the QoS resourceLimits policy maxSamplesPerInstance has been exceeded. |
(static, constant) StateMask
A collection of constants use for expressing DDS 'state masks'.
State masks are used to creating ReadConditions and QueryConditions. They are use returned as part of the SampleInfo object returned by operations such as by Reader.read() and Reader.take().
The state of a DDS sample is the union of three substates: sample, view and instance.
- Sample state indicates whether the sample has been previously been returned by the DDS Reader. The sample state may be either read or not_read.
- View state indicates whether the key values of the sample have previously been returned by the DDS Reader. The view state may be either new or not_new.
- Instance state indicates whether state of the instance represented by the key values of the sample. The instance state may be one of alive, not_alive_disposed or not_alive_no_writers.
A 'state mask' may be composed by indicate the sub-states that your are interested in accepting. For example, a mask that would accept disposed samples that had previously been seen by your data reader:
const dds = require('vortexdds');
const disposeMask = dds.StateMask.sample.any
| dds.StateMask.view.not_new
| dds.StateMask.instance.not_alive_disposed;
Properties:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sample |
object | Sample State Properties
|
|||||||||||||||
view |
object | View State Properties
|
|||||||||||||||
instance |
object | Instance State Properties
|
(static, constant) StatusMask :number
Constants representing DDS communication statuses.
Status masks are a combination of one or more of these constants, and are used to indicate to DDS which communication statuses are of interest to you status listeners.
Type:
- number
Properties:
| Name | Type | Description |
|---|---|---|
data_available |
number | New data available. Applies to Subscribers. |
data_on_readers |
number | New data available. Applies to a Readers. |
inconsistent_topic |
number | Another topic with the same name but different characteristics exists. Applies to Topics. |
liveliness_changed |
number | The liveliness QoS policy has been violated. Applies to Writers. |
liveliness_lost |
number | The liveliness QoS policy has been violated. Applies to Writers. |
offered_deadline_missed |
number | The deadline QoS policy has been violated. Applies to Writers. |
offered_incompatible_qos |
number | A QoS policy was incompatible with what was requested. Applies to Writers. |
publication_matched |
number | The number of matching Readers has changed. Applies to Writers. |
requested_deadline_missed |
number | The deadline that a Reader expected through a QoS policy was violated. Applies to Readers. |
requested_incompatible_qos |
number | A QoS policy was incompatible with what was offered. Applies to Readers. |
sample_lost |
number | A sample was never received. Applies to Readers. |
sample_rejected |
number | A sample was rejected. Applies to Readers. |
subscription_matched |
number | The number of matching Writers has changed. Applies to Readers. |
Methods
(static) importIDL(idlpath) → {external:Promise.<external:Map.<string, module:vortexdds.TypeSupport>>}
Given an absolute path to an idl file, processes the idl file using IDLPP and return module:vortexdds.TypeSupport information on the processed types.
This function executes asynchronously and returns a Promise to which you can attach callbacks in order to handle the returned IDL type information.
When the returned Promise resolves, its value is a Map whose key values are fully-qualified IDL type names, and whose entries are module:vortexdds.TypeSupport objects.
The function processes the IDL file as follows:
- attempt to find an xml file (a cached IDLPP result) beside the idl file to parse the cached data.
- if the xml file is not found, IDLPP is called to process the idl file.
- a TypeSupport object is created for each topic in the IDL file and is added to a Map.
- a Map entry is created with key being the full topic name, and the value being a TypeSupport object.
- once all IDL types are processed, the Promise is resolved with the generated Map.
IDLPP is unavailable on OpenSplice RTS builds. So if you are deploying your application onto that machine, you need to invoke the "compile-idl" script (provided by the Node.js DCPS API) from an environment where IDLPP is available. Please refer to the OpenSplice Node.js DCPS API Guide's "Compile IDL file into XML document" section for detailed information.
Parameters:
| Name | Type | Description |
|---|---|---|
idlpath |
string | absolute path to idl file |
Returns:
- Type
- external:Promise.<external:Map.<string, module:vortexdds.TypeSupport>>
Examples
// print all data types defined in an IDL file
const dds = require('vortexdds');
dds.importIDL('/home/adlink/myidl.idl')
.then(map => {
console.log('Declared IDL types');
for(const typename of map.keys()) {
console.log(' type: ', typename);
}
})
.catch(err => {
console.log('IDL parsing error', err);
});
// register a topic...
const dds = require('vortexdds');
const dp = dds.Participant();
dds.importIDL('/home/adlink/myidl.idl')
.then(map => {
console.log('Declared IDL types');
const topic = dp.createTopic('MyTopic',
map.get('mymod::MyType'));
// ... do other processing ...
})
.catch(err => {
console.log('IDL parsing error', err);
})
.then(_ => {
// cleanup, no matter what
dp.delete();
});
(static) SEC_TO_NANO(n) → {number}
Converts seconds to nanoseconds.
Parameters:
| Name | Type | Description |
|---|---|---|
n |
number | seconds |
Returns:
nanoseconds
- Type
- number
Example
// create the waitset
let waitset = new dcps.Waitset();
// skip code to setup waitset with conditions
let conds = await waitset.wait(SEC_TO_NANO(1));
Type Definitions
DataPolicy
A QoS policy that enables the programmer to specified data to be included as part of the QoS for Topic (TopicData), Subscriber (GroupData) and Reader (UserData) entities.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
value |
string | external:Buffer | A string value (which will be ISO-8859-1 encoded to a Buffer) or a Buffer (which will be ininterpreted) that is attached to the entity's QoS. |
DeadlinePolicy
Defines the fields of the deadline QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
deadline |
number | string | Reader expects a new sample updating the value of each instance at least once every deadline period. Writer indicates that the application commits to write a new value (using the Writer) for each instance managed by the Writer at least once every deadline period. It is inconsistent for a reader to have a deadline period less than its timebasedFilter's minimumSeparation. The default value of the deadline period is infinite. |
DestinationOrderPolicy
Defines the fields of the destinationOrder QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
kind |
module:vortexdds.DestinationOrderKind | the kind of ordering to use. |
DurabilityPolicy
Defines the fields of the durability QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
kind |
module:vortexdds.DurabilityKind | the kind of durability to employ. |
DurabilityServicePolicy
Defines the fields of the durabilityService QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
serviceCleanupDelay |
number | string | a time in nanoseconds after which the durability service can remove all information regarding a data-instance |
historyKind |
module:vortexdds.HistoryKind | controls the history QoS of the fictitious Reader that stores the data within the durability service. The default value is KeepLast. |
historyDepth |
number | controls the history QoS of the fictitious Reader that stores the data within the durability service. The default value is 1. |
maxSamples |
number | Controls the resourceLimits QoS of the durability server Reader. The default value is LENGTH_UNLIMITED. |
maxInstances |
number | Controls the resourceLimits QoS of the durability server Reader. The default value is LENGTH_UNLIMITED. |
maxSamplesPerInstance |
number | Controls the resourceLimits QoS of the durability server Reader. The default value is LENGTH_UNLIMITED. |
HistoryPolicy
Defines the fields of the history QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
kind |
module:vortexdds.HistoryKind | the kind of history to maintain. |
depth |
number | Applicable only if kind is KeepLast. |
InconsistentTopicStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative count of the Topics discovered whose name matches the Topic to which this status is attached and whose type is inconsistent with the Topic. |
totalCountChange |
number | The incremental number of inconsistent topics discovered since the last time the listener was called or the status was read. |
LatencyBudgetPolicy
Defines the fields of the latencyBudget QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
duration |
number | string | Specifies the maximum acceptable delay (in nanoseconds) from the time the data is written until the data is inserted in the receiver's application-cache and the receiving application is notified of the fact |
LifespanPolicy
Defines the fields of the lifespan QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
lifespan |
number | string | Expiration time (in nanoseconds) relative to source timestamp beyond which the sample shall be removed from the caches. |
LivelinessChangedStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
aliveCount |
number | The total number of currently active Writers that write the Topic read by the Reader. This count increases when a newly matched Writer asserts its liveliness for the first time or when a Writer previously considered to be not alive reasserts its liveliness. The count decreases when a Writer considered alive fails to assert its liveliness and becomes not alive, whether because it was deleted normally or for some other reason. |
notAliveCount |
number | The total count of currently Writers that write the Topic read by the Reader that are no longer asserting their liveliness. This count increases when a Writer considered alive fails to assert its liveliness and becomes not alive for some reason other than the normal deletion of that Writer. It decreases when a previously not alive Writer either reasserts its liveliness or is deleted normally. |
aliveCountChange |
number | The change in the aliveCount since the last time the listener was called or the status was read. |
notAliveCountChange |
number | The change in the notAliveCount since the last time the listener was called or the status was read. |
lastPublicationHandle |
number | string | Handle to the last Writer whose change in liveliness caused this status to change. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
LivelinessLostStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative number of times that a previously-alive Writer became not alive due to a failure to actively signal its liveliness within its offered liveliness period. This count does not change when an already not alive Writer simply remains not alive for another liveliness period. |
totalCountChange |
number | The change in totalCount since the last time the listener was called or the status was read. |
LivelinessPolicy
Defines the fields of the liveliness QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
kind |
module:vortexdds.LivelinessKind | the kind of livilness policy to implement. |
leaseDuration |
number | string | the duration (in nanoseconds) of the interval within which liveliness must be reported. |
OfferedDeadlineMissedStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative number of offered deadline periods elapsed during which a Writer failed to provide data. Missed deadlines accumulate; that is, each deadline period the totalCount will be incremented by one. |
totalCountChange |
number | The change in totalCount since the last time the listener was called or the status was read. |
lastInstanceHandle |
number | string | Handle to the last instance in the Writer for which an offered deadline was missed. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
OfferedIncompatibleQosStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative number of times the concerned Writer discovered a Reader for the same Topic with a requested QoS that is incompatible with that offered by the Writer. |
totalCountChange |
number | The change in totalCount since the last time the listener was called or the status was read. |
lastPolicyId |
module:vortexdds.QosPolicyID | The id of one of the policies that was found to be incompatible the last time an incompatibility was detected. |
onDataAvailable(reader)
Signature of ReaderListener onDataAvailable callback.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
module:vortexdds.Reader | the reader upon which the callback was trigger |
onInconsistentTopic(topic, status)
Signature of TopicListener onInconsistentTopic callback.
Parameters:
| Name | Type | Description |
|---|---|---|
topic |
module:vortexdds.Topic | the topic upon which the callback was trigger |
status |
module:vortexdds~InconsistentTopicStatus | the associated status information. |
onLivelinessChanged(reader, status)
Signature of ReaderListener onLivelinessChanged callback.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
module:vortexdds.Reader | the reader upon which the callback was trigger |
status |
module:vortexdds~LivelinessChangedStatus | the associated status information. |
onLivelinessLost(writer, status)
Signature of WriterListener onLivelinessLost callback.
Parameters:
| Name | Type | Description |
|---|---|---|
writer |
module:vortexdds.Writer | the writer upon which the callback was trigger |
status |
module:vortexdds~LivelinessLostStatus | the associated status information. |
onOfferedDeadlineMissed(writer, status)
Signature of WriterListener onOfferedDeadlineMissed callback.
Parameters:
| Name | Type | Description |
|---|---|---|
writer |
module:vortexdds.Writer | the writer upon which the callback was trigger |
status |
module:vortexdds~OfferedDeadlineMissedStatus | the associated status information. |
onOfferedIncompatibleQos(writer, status)
Signature of WriterListener onOfferedIncompatibleQos callback.
Parameters:
| Name | Type | Description |
|---|---|---|
writer |
module:vortexdds.Writer | the writer upon which the callback was trigger |
status |
module:vortexdds~OfferedIncompatibleQosStatus | the associated status information. |
onPublicationMatched(writer, status)
Signature of WriterListener onPublicationMatched callback.
Parameters:
| Name | Type | Description |
|---|---|---|
writer |
module:vortexdds.Writer | the writer upon which the callback was trigger |
status |
module:vortexdds~PublicationMatchedStatus | the associated status information. |
onRequestedDeadlineMissed(reader, status)
Signature of ReaderListener onRequestedDeadlineMissed callback.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
module:vortexdds.Reader | the reader upon which the callback was trigger |
status |
module:vortexdds~RequestedDeadlineMissedStatus | the associated status information |
onRequestedIncompatibleQos(reader, status)
Signature of ReaderListener onRequestedIncompatibleQos callback.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
module:vortexdds.Reader | the reader upon which the callback was trigger |
status |
module:vortexdds~RequestedIncompatibleQosStatus | the associated status information |
onSampleLost(reader, status)
Signature of ReaderListener onSampleLost callback.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
module:vortexdds.Reader | the reader upon which the callback was trigger |
status |
module:vortexdds~SampleLostStatus | the associated status information. |
onSampleRejected(reader, status)
Signature of ReaderListener onSampleRejected callback.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
module:vortexdds.Reader | the reader upon which the callback was trigger. |
status |
module:vortexdds~SampleRejectedStatus | the associated status information. |
onSubscriptionMatched(reader, status)
Signature of ReaderListener onSubscriptionMatched callback.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
module:vortexdds.Reader | the reader upon which the callback was trigger |
status |
module:vortexdds~SubscriptionMatchedStatus | the associated status information. |
OwnershipPolicy
Defines the fields of the ownership QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
kind |
module:vortexdds.OwnershipKind | selects the kind of ownership to be implemented. |
OwnershipStrengthPolicy
Defines the fields for the ownershipStrength QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
value |
number | Specifies the value of the “strength” used to arbitrate among multiple DataWriter objects that attempt to modify the same instance of a data-object (identified by Topic + key). This policy only applies if the ownership QoS policy is of kind Exclusive. The default value of the ownership_strength is zero. |
PartitionPolicy
Defines the fields of the partition QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
names |
string | Array.<string> | A partiton name or an array of partition names |
PresentationPolicy
Defines the fields of the presentation QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
accessScope |
module:vortexdds.PresentationAccessScopeKind | the presentation access scope. Note that only Instance is supported by this API. |
coherentAccess |
boolean | Specifies support coherent access. That is, the ability to group a set of changes as a unit on the publishing end such that they are received as a unit at the subscribing end. |
orderedAccess |
boolean | Specifies support for ordered access to the samples received at the subscription end. That is, the ability of the Subscriber to see changes in the same order as they occurred on the publishing end. |
PublicationMatchedStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative count the concerned Writer discovered a “match” with a Reader. That is, it found a Reader for the same Topic with a requested QoS that is compatible with that offered by the Writer. |
totalCountChange |
number | The change in totalCount since the last time the listener was called or the status was read. |
lastSubscriptionHandle |
number | string | Handle to the last Reader that matched the Writer causing the status to change. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
current_count |
number | The number of Readers currently matched to the concerned Writer. |
current_count_change |
number | The change in currentCount since the last time the listener was called or the status was read. |
QosPolicies
Defines the availabe policies for a QoS object.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
userdata |
module:vortexdds~DataPolicy |
<optional> |
an object for defining userdata QoS policy |
topicdata |
module:vortexdds~DataPolicy |
<optional> |
an object for defining topicdata QoS policy |
groupdata |
module:vortexdds~DataPolicy |
<optional> |
an object for defining groupdata QoS policy |
durability |
module:vortexdds~DurabilityPolicy |
<optional> |
an object for defining durability QoS policy |
history |
module:vortexdds~HistoryPolicy |
<optional> |
an object for defining history QoS policy |
resourceLimits |
module:vortexdds~ResourceLimitsPolicy |
<optional> |
an object for defining resource limits QoS policy |
presentation |
module:vortexdds~PresentationPolicy |
<optional> |
an object for defining presentation QoS policy |
lifespan |
module:vortexdds~LifespanPolicy |
<optional> |
an object for defining lifespan QoS policy |
deadline |
module:vortexdds~DeadlinePolicy |
<optional> |
an object for defining deadline QoS policy |
latencyBudget |
module:vortexdds~LatencyBudgetPolicy |
<optional> |
an object for defining latency budget QoS policy |
ownership |
module:vortexdds~OwnershipPolicy |
<optional> |
an object for defining ownership QoS policy |
ownershipStrength |
module:vortexdds~OwnershipStrengthPolicy |
<optional> |
an object for defining ownership strength QoS policy |
liveliness |
module:vortexdds~LivelinessPolicy |
<optional> |
an object for defining liveliness QoS policy |
timebasedFilter |
module:vortexdds~TimebasedFilterPolicy |
<optional> |
an object for defining time based filter QoS policy |
partition |
module:vortexdds~PartitionPolicy |
<optional> |
an object for defining partition QoS policy |
reliability |
module:vortexdds~ReliabilityPolicy |
<optional> |
an object for defining reliability QoS policy |
transportPriority |
module:vortexdds~TransportPriorityPolicy |
<optional> |
an object for defining transport priority QoS policy |
destinationOrder |
module:vortexdds~DestinationOrderPolicy |
<optional> |
an object for defining destination order QoS policy |
writerDataLifecycle |
module:vortexdds~WriterDataLifecyclePolicy |
<optional> |
an object for defining writer data lifecycle QoS policy |
readerDataLifecycle |
module:vortexdds~ReaderDataLifecyclePolicy |
<optional> |
an object for defining reader data lifecycle QoS policy |
durabilityService |
module:vortexdds~DurabilityServicePolicy |
<optional> |
an object for defining durability service QoS policy |
ReaderDataLifecyclePolicy
Defines the fields of the readerDataLifecycle QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
autopurgeNoWriterSamples |
number | Indicates the duration (in nanoseconds) the Reader must retain information regarding instances that have the instance state not_alive_no_writers. The default value is infinite. |
autopurgeDisposedSamplesDelay |
number | string | Indicates the duration (in nanoseconds) the Reader must retain information regarding instances that have the instance state instance state not_alive_disposed. The default value is infinite. |
ReaderListener
Defines the availabe callbacks for a Reader listener.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
onRequestedDeadlineMissed |
module:vortexdds~onRequestedDeadlineMissed |
<optional> |
callback to receive notice of missed deadlines by the reader. |
onRequestedIncompatibleQos |
module:vortexdds~onRequestedIncompatibleQos |
<optional> |
callback to receive notice of changes in the number writers with QoS incompatible with the reader. |
onSampleRejected |
module:vortexdds~onSampleRejected |
<optional> |
callback to receive notice of samples rejected by the reader. |
onLivelinessChanged |
module:vortexdds~onLivelinessChanged |
<optional> |
callback to receive notice of changes in liveliness of connected writers. |
onSubscriptionMatched |
module:vortexdds~onSubscriptionMatched |
<optional> |
callback to receive notice of changes in matched writers. |
onSampleLost |
module:vortexdds~onSampleLost |
<optional> |
callback to receive notice of changes on lost samples. |
onDataAvailable |
module:vortexdds~onDataAvailable |
<optional> |
callback to receive notice of data available. |
ReliabilityPolicy
Defines the fields on the reliability QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
kind |
module:vortexdds.ReliabilityKind | the reliability policy kind. |
maxBlockingTime |
number | string | the maximum time the operation Writer write operation is allowed to block if the Writer does not have space to store the value written. The default is 100ms (100,000,000ns). |
RequestedDeadlineMissedStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | total cumulative number of missed deadlines detected for any instance read by the Reader. Missed deadlines accumulate; that is, each deadline period the totalCount will be incremented by one for each instance for which data was not received. |
totalCountChange |
number | the incremental number of deadlines detected since the last time the listener was called or the status was read. |
lastInstanceHandle |
number | string | Handle to the last instance in the Reader for which a deadline was detected. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
RequestedIncompatibleQosStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative number of times the concerned Reader discovered a Writer for the same Topic with an offered QoS that was incompatible with that requested by the Reader. |
totalCountChange |
number | The change in total_count since the last time the listener was called or the status was read. |
lastPolicyId |
module:vortexdds.QosPolicyID | the identifier of the last policy that was deemed incompatible |
ResourceLimitsPolicy
Defines the fields of the resourceLimits QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
maxSamples |
number | specifies the maximum number of data-samples the Writer (or Reader) can manage across all the instances associated with it. Represents the maximum samples the middleware can store for any one Writer (or Reader). It is inconsistent for this value to be less than maxSamplesPerInstance. By default, LENGTH_UNLIMITED. |
maxInstances |
number | Represents the maximum number of instances a Writer (or Reader) can manage. By default, LENGTH_UNLIMITED. |
maxSamplesPerInstance |
number | Represents the maximum number of samples of any one instance a Writer (or Reader) can manage. It is inconsistent for this value to be greater than maxSamples. By default, LENGTH_UNLIMITED. |
SampleData
Defines the information returned about a data sample returned by a Reader.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
sample |
Object | the sample. A full sample if info.valid_data is true, otherwise contains key fields only. |
info |
module:vortexdds~SampleInfo | properties of the sample |
SampleInfo
Provides information on a sample read from a Reader.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
sample_state |
module:vortexdds.StateMask | whether the sample is currently 'alive' or 'not alive' |
instance_state |
module:vortexdds.StateMask | whether this key values of the sample have been previously read or not by the Reader. |
view_state |
module:vortexdds.StateMask | whether this particular sample has been previously read or not by the Reader. |
valid_data |
boolean | if true, the sample returned contains all fields defined by the topic type, otherwise, only the key fields defined in the topic type have values. |
source_timestamp |
number | string | Timestamp provided by the Writer at the time the sample was produced. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
instance_handle |
number | string | Instance handle of the sample. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
publication_handle |
number | string | Publication handle of the sample. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
disposed_generation_count |
number | Number of times the instance has become alive after it was disposed explicitly by a Writer |
no_writers_generation_count |
number | Number of times the instance has become alive after it was disposed because there were to alive Writers at the time the sample was received |
sample_rank |
number | Number of samples that follow this one, in the array returned by read,take,readCond or takeCond |
generation_rank |
number | The generation difference between the time this sample was received, and the time the latest sample in the array returned by read,take,readCond and takeCond was received |
absolute_generation_rank |
number | The generation difference between the time this sample was received, and the time the latest sample that the Reader has received related to this instance |
reception_timestamp |
number | string | The time when the Reader has received this sample. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
SampleLostStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative count of all samples lost across of instances of data published under the Topic. |
totalCountChange |
number | The incremental number of samples lost since the last time the listener was called or the status was read. |
SampleRejectedStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative count of samples rejected by the Reader. |
totalCountChange |
number | The incremental number of samples rejected since the last time the listener was called or the status was read. |
lastReason |
module:vortexdds.SampleRejectedStatusKind | Reason for rejecting the last sample rejected. If no samples have been rejected, the reason is the special value not_rejected. |
lastInstanceHandle |
number | string | Handle to the last instance in the Reader for which a deadline was detected. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
SubscriptionMatchedStatus
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalCount |
number | Total cumulative count the concerned Reader discovered a “match” with a Writer. That is, it found a Writer for the same Topic with a requested QoS that is compatible with that offered by the Reader. |
totalCountChange |
number | The change in totalCount since the last time the listener was called or the status was read. |
lastPublicationHandle |
number | string | Handle to the last Writer that matched the DataReader causing the status to change. Represents a 64-bit value. May be a string if the JavaScript numeric representation would result in a loss of precision. |
currentCount |
number | The number of Writers currently matched to the concerned Reader. |
currentCountChange |
number | The change in currentCount since the last time the listener was called or the status was read. |
TimebasedFilterPolicy
Defines the fields of the timebasedFilter QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
minimumSeparation |
number | string | the minimum amount of time (in nanoseconds) by which the Reader wants samples it receives to be separated, regardsless of how fast the changes occur. It is inconsistent for a Reader to have a minimumSeparation longer than its deadline policy period. By default minimumSeparation is zero, indicating Reader is potentially interested in all values. |
TopicListener
Defines the availabe callbacks for a Topic listener.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
onInconsistentTopic |
module:vortexdds~onInconsistentTopic |
<optional> |
callback to receive notice of inconsistent topic registrations. Note that this callback is triggered only in hybrid DDS domains in which Vortex DDS and another DDS implementation co-exist. |
TransportPriorityPolicy
Defines the fields of the transportPriority QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
value |
number | a hint to the infrastructure as to how to set the priority of the underlying transport used to send the data. The default value is zero. |
WriterDataLifecyclePolicy
Defines the fields of the writerDataLifecyle QoS policy.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
autodisposeUnregisteredInstances |
boolean | Controls whether a Writer will automatically dispose instances each time they are unregistered. A value of true indicates that unregistered instances will also be considered disposed. The default value is true. |
WriterListener
Defines the availabe callbacks for a Writer listener.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
onOfferedDeadlineMissed |
module:vortexdds~onOfferedDeadlineMissed |
<optional> |
callback to receive notice of missed offered deadlines by the writer. |
onOfferedIncompatibleQos |
module:vortexdds~onOfferedIncompatibleQos |
<optional> |
callback to receive notice of Readers that are incompatible with the writer's QoS. |
onLivelinessLost |
module:vortexdds~onLivelinessLost |
<optional> |
callback to receive notice of that the writer has not adhered to its liveliness QoS. |
onPublicationMatched |
module:vortexdds~onPublicationMatched |
<optional> |
callback to receive notice of changes in matched readers. |