rticonnextdds-connector 1.2.2 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE.pdf CHANGED
Binary file
package/README.md CHANGED
@@ -26,31 +26,22 @@ The `examples/nodejs` directory provides several examples:
26
26
  ## Dependencies
27
27
 
28
28
  RTI Connector for JavaScript has the following dependencies, which are also listed in `package.json`:
29
- * [ref-napi](https://www.npmjs.com/package/ref-napi): turns Buffer instances into "pointers"
30
- * [ref-struct-napi](https://www.npmjs.com/package/ref-struct-napi): create ABI-compilant "Struct" instances on top of Buffers
31
- * [ffi-napi](https://www.npmjs.com/package/ffi-napi): used for loading and calling dynamic libraries using pure JavaScript
29
+ * [koffi](https://koffi.dev/): used for loading and calling dynamic libraries using pure JavaScript
32
30
  * [events](https://www.npmjs.com/package/events): used for the 'EventEmitter' (legacy implementation of RTI Connector)
33
31
 
34
32
  Additionally to run the `web_socket` example, [socket.io](https://github.com/Automattic/socket.io) and [OpenLayers](https://openlayers.org) are required.
35
33
 
36
34
  Additional dependencies are required to run the unit tests and some of the examples. Please see the README files in the appropriate directory.
37
35
 
38
- ### Python dependency
39
-
40
- Some of the dependencies are shipped as source code and use [node-gyp](https://github.com/nodejs/node-gyp) to be compiled locally. `node-gyp` requires Python 2.7 and does not work with Python 3. The requirements for `node-gyp` can be found at:
41
- * [unix](https://github.com/nodejs/node-gyp#on-unix)
42
- * [darwin](https://github.com/nodejs/node-gyp#on-macos)
43
- * [windows](https://github.com/nodejs/node-gyp#on-windows)
44
-
45
36
  ### C/C++ compiler dependency
46
37
 
47
38
  The dependency [ref](https://www.npmjs.com/package/ref) is shipped as source code and requires a C++11 compiler.
48
39
 
49
40
  ## License
50
41
 
51
- RTI Connector for JavaScript and RTI Connector for Python are part of the Connext
52
- DDS Professional Package. If you have a valid license for the RTI Connext DDS
53
- Professional Package, such license shall govern your use of RTI Connector for
54
- Python and RTI Connector for JavaScript. All other use of this software shall
42
+ RTI Connector for JavaScript is part of the Connext
43
+ Professional Package. If you have a valid license for the RTI Connext
44
+ Professional Package, such license shall govern your use of
45
+ RTI Connector for JavaScript. All other use of this software shall
55
46
  be governed solely by the terms of RTI’s Software License for Non-Commercial
56
- Use #4040, included at the top level of the `Connector for Python repository
47
+ Use #4040.
package/README.rst CHANGED
@@ -34,11 +34,7 @@ Dependencies
34
34
 
35
35
  RTI Connector for JavaScript has the following dependencies, which are
36
36
  also listed in ``package.json``: \*
37
- `ref-napi <https://www.npmjs.com/package/ref-napi>`__: turns Buffer
38
- instances into "pointers" \*
39
- `ref-struct-napi <https://www.npmjs.com/package/ref-struct-napi>`__:
40
- create ABI-compilant "Struct" instances on top of Buffers \*
41
- `ffi-napi <https://www.npmjs.com/package/ffi-napi>`__: used for loading
37
+ `koffi <https://koffi.dev/>`__: used for loading
42
38
  and calling dynamic libraries using pure JavaScript \*
43
39
  `events <https://www.npmjs.com/package/events>`__: used for the
44
40
  'EventEmitter' (legacy implementation of RTI Connector)
@@ -50,17 +46,6 @@ Additionally to run the ``web_socket`` example,
50
46
  Additional dependencies are required to run the unit tests and some of
51
47
  the examples. Please see the README files in the appropriate directory.
52
48
 
53
- Python dependency
54
- ~~~~~~~~~~~~~~~~~
55
-
56
- Some of the dependencies are shipped as source code and use
57
- `node-gyp <https://github.com/nodejs/node-gyp>`__ to be compiled
58
- locally. ``node-gyp`` requires Python 2.7 and does not work with Python
59
- 3. The requirements for ``node-gyp`` can be found at: \*
60
- `unix <https://github.com/nodejs/node-gyp#on-unix>`__ \*
61
- `darwin <https://github.com/nodejs/node-gyp#on-macos>`__ \*
62
- `windows <https://github.com/nodejs/node-gyp#on-windows>`__
63
-
64
49
  C/C++ compiler dependency
65
50
  ~~~~~~~~~~~~~~~~~~~~~~~~~
66
51
 
@@ -70,10 +55,9 @@ source code and requires a C++11 compiler.
70
55
  License
71
56
  -------
72
57
 
73
- RTI Connector for JavaScript and RTI Connector for Python are part of
74
- the Connext DDS Professional Package. If you have a valid license for
75
- the RTI Connext DDS Professional Package, such license shall govern your
76
- use of RTI Connector for Python and RTI Connector for JavaScript. All
58
+ RTI Connector for JavaScript is part of
59
+ the Connext Professional Package. If you have a valid license for
60
+ the RTI Connext Professional Package, such license shall govern your
61
+ use of RTI Connector for JavaScript. All
77
62
  other use of this software shall be governed solely by the terms of
78
- RTI’s Software License for Non-Commercial Use #4040, included at the top
79
- level of the \`Connector for Python repository
63
+ RTI’s Software License for Non-Commercial Use #4040.
@@ -6,7 +6,7 @@
6
6
  * This code contains trade secrets of Real-Time Innovations, Inc. *
7
7
  ******************************************************************************/
8
8
 
9
- const sleep = require('sleep')
9
+ const msleep = require('util').promisify(setTimeout)
10
10
  const path = require('path')
11
11
  const rti = require('rticonnextdds-connector')
12
12
  const configFile = path.join(__dirname, '/../ShapeExample.xml')
@@ -26,7 +26,7 @@ const run = async () => {
26
26
  output.instance.setString('color', 'BLUE')
27
27
  output.write()
28
28
 
29
- sleep.msleep(500)
29
+ await msleep(500)
30
30
  }
31
31
 
32
32
  console.log('Exiting...')
@@ -13,7 +13,7 @@
13
13
  <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
14
14
  <script src="/socket.io/socket.io.js"></script>
15
15
  <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
16
- <script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v6.0.1/build/ol.js"></script>
16
+ <script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/main/dist/en/v6.0.1/build/ol.js"></script>
17
17
  <style>
18
18
  .map {
19
19
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rticonnextdds-connector",
3
- "version": "1.2.2",
3
+ "version": "1.3.1",
4
4
  "description": "RTI Connector for JavaScript",
5
5
  "main": "rticonnextdds-connector.js",
6
6
  "files": [
@@ -14,18 +14,12 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "events": "^3.2.0",
17
- "ref-napi": "^3.0.1",
18
- "ref-struct-napi": "^1.1.1",
19
- "ffi-napi": "^3.1.0",
20
- "sleep": "^6.3.0"
17
+ "koffi": "^2.8.9"
21
18
  },
22
19
  "scripts": {
23
20
  "test": "mocha ./test/nodejs/",
24
- "test-ci": "mocha ./test/nodejs/ --reporter mocha-junit-reporter",
25
- "coverage": "nyc --reporter=clover --reporter=lcov --reporter=text-summary --check-coverage npm run test",
26
- "coverage-ci": "nyc --reporter=clover --reporter=lcov --reporter=text-summary --check-coverage npm run test-ci",
27
- "lint": "eslint rticonnextdds-connector.js test/nodejs/ --ext .js",
28
- "lint-fix": "eslint --fix rticonnextdds-connector.js test/nodejs/ --ext .js"
21
+ "test-junit": "mocha ./test/nodejs/ --reporter mocha-junit-reporter",
22
+ "test-json": "mocha ./test/nodejs/ --reporter json --reporter-option output=test-results.json"
29
23
  },
30
24
  "keywords": [
31
25
  "rti",
@@ -43,15 +37,10 @@
43
37
  },
44
38
  "homepage": "https://github.com/rticommunity/rticonnextdds-connector-js",
45
39
  "devDependencies": {
46
- "babel-eslint": "^10.1.0",
47
40
  "chai": "^4.3.4",
48
41
  "chai-as-promised": "^7.1.1",
49
- "eslint": "^7.29.0",
50
- "eslint-config-standard": "^16.0.3",
51
- "eslint-plugin-import": "^2.23.4",
52
- "eslint-plugin-node": "^11.1.0",
53
- "eslint-plugin-promise": "^5.1.0",
54
- "nyc": "^15.1.0",
42
+ "mocha": "^10.2.0",
43
+ "mocha-junit-reporter": "^2.2.0",
55
44
  "sinon": "^10.0.0"
56
45
  }
57
46
  }
@@ -7,25 +7,16 @@
7
7
  ******************************************************************************/
8
8
 
9
9
  const os = require('os')
10
- const ref = require('ref-napi')
11
- const ffi = require('ffi-napi')
12
10
  const path = require('path')
13
- const StructType = require('ref-struct-napi')
11
+ const koffi = require('koffi');
14
12
  const EventEmitter = require('events').EventEmitter
15
13
 
16
- /**
17
- * The Node.js representation of the RTI_Connector_Options structure within
18
- * the core.
19
- *
20
- * We define it here using the module ref-struct (require above). This allows
21
- * us to pass it by value into the Core when creating a :class:`Connector` object.
22
- *
23
- * @private
24
- */
25
- const _ConnectorOptions = StructType({
26
- enable_on_data_event: ref.types.int,
27
- one_based_sequence_indexing: ref.types.int
28
- })
14
+ const _ConnectorOptions = koffi.struct('RTI_Connector_Options', {
15
+ enable_on_data_event: 'int',
16
+ one_based_sequence_indexing: 'int'
17
+ });
18
+
19
+ const RTI_HANDLE = koffi.pointer('RTI_HANDLE', koffi.opaque());
29
20
 
30
21
  // We ignore the loading of the libraries in code coverage since it is
31
22
  // not easily testable
@@ -70,7 +61,6 @@ class _ConnectorBinding {
70
61
  case 'win32':
71
62
  libDir = 'win-x64'
72
63
  libName = 'rtiddsconnector.dll'
73
- additionalLib = 'vcruntime140.dll'
74
64
  isWindows = true
75
65
  break
76
66
  default:
@@ -85,96 +75,66 @@ class _ConnectorBinding {
85
75
  console.log('Warning: 32-bit ' + os.platform() + ' is not supported')
86
76
  }
87
77
 
88
- if (additionalLib !== null) {
89
- try {
90
- ffi.Library(path.join(__dirname, '/rticonnextdds-connector/lib/', libDir, '/', additionalLib))
91
- } catch (_) {
92
- // ignore this error and try to run without explicitly loading the VC++ runtime
93
- }
94
- }
78
+ this.library = path.join(__dirname, '/rticonnextdds-connector/lib/', libDir, '/', libName)
95
79
 
96
- // On Windows we need to explicitly load the dependent libraries
97
- if (isWindows) {
98
- ffi.Library(path.join(__dirname, '/rticonnextdds-connector/lib/', libDir, '/', 'nddscore.dll'))
99
- ffi.Library(path.join(__dirname, '/rticonnextdds-connector/lib/', libDir, '/', 'nddsc.dll'))
100
- }
80
+ this.api = koffi.load(this.library);
101
81
 
102
- this.library = path.join(__dirname, '/rticonnextdds-connector/lib/', libDir, '/', libName)
103
82
  // Obtain FFI'd methods for all of the APIs which we require from the binding,
104
83
  // specifying the argument types and return types. If any of the types are
105
84
  // not builtin Node types then we have to use the ref module to represent them.
106
- this.api = ffi.Library(this.library, {
107
- RTI_Connector_new: ['pointer', ['string', 'string', ref.refType(_ConnectorOptions)]],
108
- RTI_Connector_delete: ['void', ['pointer']],
109
- RTI_Connector_get_datawriter: ['pointer', ['pointer', 'string']],
110
- RTI_Connector_get_datareader: ['pointer', ['pointer', 'string']],
111
- RTI_Connector_get_native_sample: ['pointer', ['pointer', 'string', 'int']],
112
- RTI_Connector_set_number_into_samples: ['int', ['pointer', 'string', 'string', 'double']],
113
- RTI_Connector_set_boolean_into_samples: ['int', ['pointer', 'string', 'string', 'int']],
114
- RTI_Connector_set_string_into_samples: ['int', ['pointer', 'string', 'string', 'string']],
115
- RTI_Connector_clear_member: ['int', ['pointer', 'string', 'string']],
116
- RTI_Connector_write: ['int', ['pointer', 'string', 'string']],
117
- RTI_Connector_wait_for_acknowledgments: ['int', ['pointer', 'int']],
118
- RTI_Connector_read: ['int', ['pointer', 'string']],
119
- RTI_Connector_take: ['int', ['pointer', 'string']],
120
- RTI_Connector_wait_for_data: ['int', ['pointer', 'int']],
121
- RTI_Connector_wait_for_data_on_reader: ['int', ['pointer', 'int']],
122
- RTI_Connector_wait_for_matched_publication: ['int', ['pointer', 'int', 'pointer']],
123
- RTI_Connector_wait_for_matched_subscription: ['int', ['pointer', 'int', 'pointer']],
124
- RTI_Connector_get_matched_subscriptions: ['int', ['pointer', ref.refType('char *')]],
125
- RTI_Connector_get_matched_publications: ['int', ['pointer', ref.refType('char *')]],
126
- RTI_Connector_clear: ['int', ['pointer', 'string']],
127
- RTI_Connector_get_boolean_from_infos: ['int', ['pointer', ref.refType('int'), 'string', 'int', 'string']],
128
- RTI_Connector_get_json_from_infos: ['int', ['pointer', 'string', 'int', 'string', ref.refType('char *')]],
129
- RTI_Connector_get_sample_count: ['int', ['pointer', 'string', ref.refType('double')]],
130
- RTI_Connector_get_number_from_sample: ['int', ['pointer', ref.refType('double'), 'string', 'int', 'string']],
131
- RTI_Connector_get_boolean_from_sample: ['int', ['pointer', ref.refType('int'), 'string', 'int', 'string']],
132
- RTI_Connector_get_string_from_sample: ['int', ['pointer', ref.refType('char *'), 'string', 'int', 'string']],
133
- RTI_Connector_get_any_from_sample: ['int', ['pointer', ref.refType('double'), ref.refType('int'), ref.refType('char *'), ref.refType('int'), 'string', 'int', 'string']],
134
- RTI_Connector_get_any_from_info: ['int', ['pointer', ref.refType('double'), ref.refType('int'), ref.refType('char *'), ref.refType('int'), 'string', 'int', 'string']],
135
- RTI_Connector_get_json_sample: ['int', ['pointer', 'string', 'int', ref.refType('char *')]],
136
- RTI_Connector_get_json_member: ['int', ['pointer', 'string', 'int', 'string', ref.refType('char *')]],
137
- RTI_Connector_set_json_instance: ['int', ['pointer', 'string', 'string']],
138
- RTI_Connector_get_last_error_message: ['char *', []],
139
- RTI_Connector_get_native_instance: ['int', ['pointer', 'string', ref.refType('pointer')]],
140
- RTI_Connector_free_string: ['void', ['char *']],
141
- RTI_Connector_set_max_objects_per_thread: ['int', ['int']],
142
- RTIDDSConnector_getJSONInstance:['char *', ['pointer', 'string']],
85
+
86
+ const RTI_Connector_free_string = this.api.func('RTI_Connector_free_string', 'void', ['char *']);
87
+ const AllocatedString = koffi.disposable('AllocatedString', 'string', RTI_Connector_free_string);
88
+
89
+ this.RTI_Connector_new = this.api.func('RTI_Connector_new', RTI_HANDLE, ['string', 'string', koffi.pointer(_ConnectorOptions)]);
90
+ this.RTI_Connector_delete = this.api.func('RTI_Connector_delete', 'void', ['RTI_HANDLE']);
91
+ this.RTI_Connector_get_datawriter = this.api.func('RTI_Connector_get_datawriter', 'RTI_HANDLE', ['RTI_HANDLE', 'string']);
92
+ this.RTI_Connector_get_datareader = this.api.func('RTI_Connector_get_datareader', 'RTI_HANDLE', ['RTI_HANDLE', 'string']);
93
+ this.RTI_Connector_get_native_sample = this.api.func('RTI_Connector_get_native_sample', 'RTI_HANDLE', ['RTI_HANDLE', 'string', 'int']);
94
+ this.RTI_Connector_set_number_into_samples = this.api.func('RTI_Connector_set_number_into_samples', 'int', ['RTI_HANDLE', 'string', 'string', 'double']);
95
+ this.RTI_Connector_set_boolean_into_samples = this.api.func('RTI_Connector_set_boolean_into_samples', 'int', ['RTI_HANDLE', 'string', 'string', 'bool']);
96
+ this.RTI_Connector_set_string_into_samples = this.api.func('RTI_Connector_set_string_into_samples', 'int', ['RTI_HANDLE', 'string', 'string', 'string']);
97
+ this.RTI_Connector_clear_member = this.api.func('RTI_Connector_clear_member', 'int', ['RTI_HANDLE', 'string', 'string']);
98
+ this.RTI_Connector_write = this.api.func('RTI_Connector_write', 'int', ['RTI_HANDLE', 'string', 'string']);
99
+ this.RTI_Connector_wait_for_acknowledgments = this.api.func('RTI_Connector_wait_for_acknowledgments', 'int', ['RTI_HANDLE', 'int']);
100
+ this.RTI_Connector_read = this.api.func('RTI_Connector_read', 'int', ['RTI_HANDLE', 'string']);
101
+ this.RTI_Connector_take = this.api.func('RTI_Connector_take', 'int', ['RTI_HANDLE', 'string']);
102
+ this.RTI_Connector_wait_for_data = this.api.func('RTI_Connector_wait_for_data', 'int', ['RTI_HANDLE', 'int']);
103
+ this.RTI_Connector_wait_for_data_on_reader = this.api.func('RTI_Connector_wait_for_data_on_reader', 'int', ['RTI_HANDLE', 'int']);
104
+ this.RTI_Connector_wait_for_matched_publication = this.api.func('RTI_Connector_wait_for_matched_publication', 'int', ['RTI_HANDLE', 'int', koffi.out(koffi.pointer('int'))]);
105
+ this.RTI_Connector_wait_for_matched_subscription = this.api.func('RTI_Connector_wait_for_matched_subscription', 'int', ['RTI_HANDLE', 'int', koffi.out(koffi.pointer('int'))]);
106
+ this.RTI_Connector_get_matched_subscriptions = this.api.func('RTI_Connector_get_matched_subscriptions', 'int', ['RTI_HANDLE', koffi.out(koffi.pointer(AllocatedString))]);
107
+ this.RTI_Connector_get_matched_publications = this.api.func('RTI_Connector_get_matched_publications', 'int', ['RTI_HANDLE', koffi.out(koffi.pointer(AllocatedString))]);
108
+ this.RTI_Connector_clear = this.api.func('RTI_Connector_clear', 'int', ['RTI_HANDLE', 'string']);
109
+ this.RTI_Connector_get_boolean_from_infos = this.api.func('RTI_Connector_get_boolean_from_infos', 'int', ['RTI_HANDLE', koffi.out(koffi.pointer('bool')), 'string', 'int', 'string']);
110
+ this.RTI_Connector_get_json_from_infos = this.api.func('RTI_Connector_get_json_from_infos', 'int', ['RTI_HANDLE', 'string', 'int', 'string', koffi.out(koffi.pointer(AllocatedString))]);
111
+ this.RTI_Connector_get_sample_count = this.api.func('RTI_Connector_get_sample_count', 'int', ['RTI_HANDLE', 'string', koffi.out(koffi.pointer('double'))]);
112
+ this.RTI_Connector_get_number_from_sample = this.api.func('RTI_Connector_get_number_from_sample', 'int', ['RTI_HANDLE', koffi.out(koffi.pointer('double')), 'string', 'int', 'string']);
113
+ this.RTI_Connector_get_boolean_from_sample = this.api.func('RTI_Connector_get_boolean_from_sample', 'int', ['RTI_HANDLE', koffi.out(koffi.pointer('int')), 'string', 'int', 'string']);
114
+ this.RTI_Connector_get_string_from_sample = this.api.func('RTI_Connector_get_string_from_sample', 'int', ['RTI_HANDLE', koffi.out(koffi.pointer(AllocatedString)), 'string', 'int', 'string']);
115
+ this.RTI_Connector_get_any_from_sample = this.api.func('RTI_Connector_get_any_from_sample', 'int', ['RTI_HANDLE',koffi.out(koffi.pointer('double')), koffi.out(koffi.pointer('int')), koffi.out(koffi.pointer(AllocatedString)), koffi.out(koffi.pointer('int')), 'string', 'int', 'string']);
116
+ this.RTI_Connector_get_any_from_info = this.api.func('RTI_Connector_get_any_from_info', 'int', ['RTI_HANDLE', koffi.out(koffi.pointer('double')), koffi.out(koffi.pointer('int')), koffi.out(koffi.pointer(AllocatedString)), koffi.out(koffi.pointer('int')), 'string', 'int', 'string']);
117
+ this.RTI_Connector_get_json_sample = this.api.func('RTI_Connector_get_json_sample', 'int', ['RTI_HANDLE', 'string', 'int', koffi.out(koffi.pointer(AllocatedString))]);
118
+ this.RTI_Connector_get_json_member = this.api.func('RTI_Connector_get_json_member', 'int', ['RTI_HANDLE', 'string', 'int', 'string', koffi.out(koffi.pointer(AllocatedString))]);
119
+ this.RTI_Connector_set_json_instance = this.api.func('RTI_Connector_set_json_instance', 'int', ['RTI_HANDLE', 'string', 'string']);
120
+ this.RTI_Connector_get_last_error_message = this.api.func('RTI_Connector_get_last_error_message', AllocatedString, []);
121
+ this.RTI_Connector_get_native_instance = this.api.func('RTI_Connector_get_native_instance', 'int', ['RTI_HANDLE', 'string', koffi.out(koffi.pointer(RTI_HANDLE))]);
122
+ this.RTIDDSConnector_getJSONInstance = this.api.func('RTIDDSConnector_getJSONInstance', AllocatedString, ['RTI_HANDLE', 'string']);
143
123
  // This API is only used in the unit tests
144
- RTI_Connector_create_test_scenario: ['int', ['pointer', 'int', 'pointer']],
145
- RTI_Connector_get_build_versions: ['int', [ref.refType('char *'), ref.refType('char *')]]
146
- })
124
+ this.RTI_Connector_create_test_scenario = this.api.func('RTI_Connector_create_test_scenario', 'int', ['RTI_HANDLE', 'int', 'RTI_HANDLE']);
125
+ this.RTI_Connector_get_build_versions = this.api.func('RTI_Connector_get_build_versions', 'int', [koffi.out(koffi.pointer('string')), koffi.out(koffi.pointer('string'))]);
147
126
  }
148
127
  }
149
128
 
150
129
  // Create an instance of the connectorBinding class, allowing us to call the FFI'd methods
151
130
  const connectorBinding = new _ConnectorBinding()
152
131
 
153
- /**
154
- * Copies a natively allocated string into a Node.js string and frees the
155
- * native memory.
156
- *
157
- * @param {Buffer} cstring - The string returned by the core
158
- *
159
- * @private
160
- */
161
- function _moveCString (cstring) {
162
- const ret = ref.readCString(cstring)
163
- connectorBinding.api.RTI_Connector_free_string(cstring)
164
- return ret
165
- }
166
-
167
132
  /**
168
133
  * Obtains the last error message from the *RTI Connext DDS* Core
169
134
  * @private
170
135
  */
171
136
  function _getLastDdsErrorMessage () {
172
- const cStr = connectorBinding.api.RTI_Connector_get_last_error_message()
173
- if (cStr !== null) {
174
- return _moveCString(cStr)
175
- } else {
176
- return ''
177
- }
137
+ return connectorBinding.RTI_Connector_get_last_error_message()
178
138
  }
179
139
 
180
140
  /**
@@ -298,10 +258,10 @@ function _isNumber (value) {
298
258
  * @private
299
259
  */
300
260
  function _getAnyValue (getter, connector, inputName, index, fieldName) {
301
- const numberVal = ref.alloc('double')
302
- const boolVal = ref.alloc('int')
303
- const stringVal = ref.alloc('char *')
304
- let selection = ref.alloc('int')
261
+ let numberVal = [null]
262
+ let boolVal = [null]
263
+ let stringVal = [null]
264
+ let selection = [null]
305
265
  const retcode = getter(
306
266
  connector,
307
267
  numberVal,
@@ -315,13 +275,13 @@ function _getAnyValue (getter, connector, inputName, index, fieldName) {
315
275
  if (retcode === _ReturnCodes.noData) {
316
276
  return null
317
277
  }
318
- selection = selection.deref()
278
+ selection = selection[0]
319
279
  if (selection === _AnyValueKind.connector_number) {
320
- return numberVal.deref()
280
+ return numberVal[0]
321
281
  } else if (selection === _AnyValueKind.connector_boolean) {
322
- return !!boolVal.deref()
282
+ return !!boolVal[0]
323
283
  } else if (selection === _AnyValueKind.connector_string) {
324
- const nodeStr = _moveCString(stringVal.deref())
284
+ const nodeStr = stringVal[0]
325
285
  // If this is NOT a numeric string, try to convert the returned string to a
326
286
  // JSON object. We can now return one of two things:
327
287
  // - An actual string (if the JSON.parse call fails)
@@ -359,13 +319,13 @@ class Infos {
359
319
  * @private
360
320
  */
361
321
  getLength () {
362
- const length = ref.alloc('double')
363
- const retcode = connectorBinding.api.RTI_Connector_get_sample_count(
322
+ let length = [null];
323
+ const retcode = connectorBinding.RTI_Connector_get_sample_count(
364
324
  this.input.connector.native,
365
325
  this.input.name,
366
326
  length)
367
327
  _checkRetcode(retcode)
368
- return length.deref()
328
+ return length[0]
369
329
  }
370
330
 
371
331
  /**
@@ -382,8 +342,8 @@ class Infos {
382
342
  } else {
383
343
  // Increment index since Lua arrays are 1-indexed
384
344
  index += 1
385
- const value = ref.alloc('int')
386
- const retcode = connectorBinding.api.RTI_Connector_get_boolean_from_infos(
345
+ let value = [null]
346
+ const retcode = connectorBinding.RTI_Connector_get_boolean_from_infos(
387
347
  this.input.connector.native,
388
348
  value,
389
349
  this.input.name,
@@ -393,7 +353,7 @@ class Infos {
393
353
  if (retcode === _ReturnCodes.noData) {
394
354
  return null
395
355
  }
396
- return value.deref()
356
+ return value[0]
397
357
  }
398
358
  }
399
359
  }
@@ -428,7 +388,7 @@ class SampleIterator {
428
388
  * contains valid data.
429
389
  * @property {SampleInfo} infos - The meta-data associated with the
430
390
  * current sample.
431
- * @property {pointer} native - A native handle that allows accessing
391
+ * @property {RTI_HANDLE} native - A native handle that allows accessing
432
392
  * additional *Connext DDS* APIs in C.
433
393
  */
434
394
  constructor (input, index) {
@@ -554,9 +514,9 @@ class SampleIterator {
554
514
  }
555
515
 
556
516
  /**
557
- * The native pointer to the DynamicData sample.
517
+ * The native RTI_HANDLE to the DynamicData sample.
558
518
  *
559
- * @type {pointer}
519
+ * @type {RTI_HANDLE}
560
520
  * @private
561
521
  */
562
522
  get native () {
@@ -775,8 +735,8 @@ class Samples {
775
735
  * @private
776
736
  */
777
737
  getLength () {
778
- const length = ref.alloc('double')
779
- const retcode = connectorBinding.api.RTI_Connector_get_sample_count(
738
+ let length = [null]
739
+ const retcode = connectorBinding.RTI_Connector_get_sample_count(
780
740
  this.input.connector.native,
781
741
  this.input.name,
782
742
  length)
@@ -784,7 +744,7 @@ class Samples {
784
744
  // We use ~~ to convert from double -> int. This is required to allow:
785
745
  // for (var i =0; i < input.samples.getLength(); ++i)
786
746
  // It works since we are doing a bitwise complement (double not).
787
- return ~~length.deref()
747
+ return ~~length[0]
788
748
  }
789
749
 
790
750
  /**
@@ -804,8 +764,8 @@ class Samples {
804
764
  } else {
805
765
  // Increment index since C API is based on Lua with 1-based indexes
806
766
  index += 1
807
- const value = ref.alloc('double')
808
- const retcode = connectorBinding.api.RTI_Connector_get_number_from_sample(
767
+ let value = [null]
768
+ const retcode = connectorBinding.RTI_Connector_get_number_from_sample(
809
769
  this.input.connector.native,
810
770
  value,
811
771
  this.input.name,
@@ -816,7 +776,7 @@ class Samples {
816
776
  if (retcode === _ReturnCodes.noData) {
817
777
  return null
818
778
  } else {
819
- return value.deref()
779
+ return value[0]
820
780
  }
821
781
  }
822
782
  }
@@ -838,8 +798,8 @@ class Samples {
838
798
  } else {
839
799
  // Increment index since C API is based on Lua with 1-based indexes
840
800
  index += 1
841
- const value = ref.alloc('int')
842
- const retcode = connectorBinding.api.RTI_Connector_get_boolean_from_sample(
801
+ let value = [null]
802
+ const retcode = connectorBinding.RTI_Connector_get_boolean_from_sample(
843
803
  this.input.connector.native,
844
804
  value,
845
805
  this.input.name,
@@ -850,7 +810,7 @@ class Samples {
850
810
  if (retcode === _ReturnCodes.noData) {
851
811
  return null
852
812
  } else {
853
- return value.deref()
813
+ return value[0]
854
814
  }
855
815
  }
856
816
  }
@@ -872,8 +832,8 @@ class Samples {
872
832
  } else {
873
833
  // Increment index since C API is based on Lua with 1-based indexes
874
834
  index += 1
875
- const value = ref.alloc('char *')
876
- const retcode = connectorBinding.api.RTI_Connector_get_string_from_sample(
835
+ let value = [null]
836
+ const retcode = connectorBinding.RTI_Connector_get_string_from_sample(
877
837
  this.input.connector.native,
878
838
  value,
879
839
  this.input.name,
@@ -883,7 +843,7 @@ class Samples {
883
843
  if (retcode === _ReturnCodes.noData) {
884
844
  return null
885
845
  } else {
886
- return _moveCString(value.deref())
846
+ return value[0]
887
847
  }
888
848
  }
889
849
  }
@@ -906,7 +866,7 @@ class Samples {
906
866
  throw new TypeError('fieldName must be a string')
907
867
  } else {
908
868
  return _getAnyValue(
909
- connectorBinding.api.RTI_Connector_get_any_from_sample,
869
+ connectorBinding.RTI_Connector_get_any_from_sample,
910
870
  this.input.connector.native,
911
871
  this.input.name,
912
872
  index,
@@ -931,7 +891,7 @@ class Samples {
931
891
  } else {
932
892
  // Increment index since Lua arrays are 1-indexed
933
893
  index += 1
934
- const cStr = ref.alloc('char *')
894
+ let str = [null]
935
895
  let retcode = _ReturnCodes.noData
936
896
  // memberName is "optional" - if supplied we will get the JSON object for
937
897
  // a specific complex member in the sample
@@ -939,25 +899,25 @@ class Samples {
939
899
  if (!_isString(memberName)) {
940
900
  throw new TypeError('memberName must be a string')
941
901
  } else {
942
- retcode = connectorBinding.api.RTI_Connector_get_json_member(
902
+ retcode = connectorBinding.RTI_Connector_get_json_member(
943
903
  this.input.connector.native,
944
904
  this.input.name,
945
905
  index,
946
906
  memberName,
947
- cStr)
907
+ str)
948
908
  }
949
909
  } else {
950
- retcode = connectorBinding.api.RTI_Connector_get_json_sample(
910
+ retcode = connectorBinding.RTI_Connector_get_json_sample(
951
911
  this.input.connector.native,
952
912
  this.input.name,
953
913
  index,
954
- cStr)
914
+ str)
955
915
  }
956
916
  _checkRetcode(retcode)
957
917
  if (retcode === _ReturnCodes.noData) {
958
918
  return null
959
919
  }
960
- return JSON.parse(_moveCString(cStr.deref()))
920
+ return JSON.parse(str[0])
961
921
  }
962
922
  }
963
923
 
@@ -966,8 +926,8 @@ class Samples {
966
926
  * additional *Connext DDS* APIs in C.
967
927
  *
968
928
  * @param {number} index The index of the sample for which to obtain
969
- * the native pointer.
970
- * @returns {pointer} A native pointer to the sample.
929
+ * the native RTI_HANDLE.
930
+ * @returns {RTI_HANDLE} A native RTI_HANDLE to the sample.
971
931
  */
972
932
  getNative (index) {
973
933
  if (!_isValidIndex(index)) {
@@ -975,7 +935,7 @@ class Samples {
975
935
  } else {
976
936
  // Increment index since Lua arrays are 1-indexed
977
937
  index += 1
978
- return connectorBinding.api.RTI_Connector_get_native_sample(
938
+ return connectorBinding.RTI_Connector_get_native_sample(
979
939
  this.input.connector.native,
980
940
  this.input.name,
981
941
  index)
@@ -1036,7 +996,7 @@ class SampleInfo {
1036
996
  throw new TypeError('fieldName must be a string')
1037
997
  } else {
1038
998
  return _getAnyValue(
1039
- connectorBinding.api.RTI_Connector_get_any_from_info,
999
+ connectorBinding.RTI_Connector_get_any_from_info,
1040
1000
  this.input.connector.native,
1041
1001
  this.input.name,
1042
1002
  this.index,
@@ -1058,7 +1018,7 @@ class Input {
1058
1018
  * * connector (:class:`Connector`) - The Connector creates this Input.
1059
1019
  * * name (string) - The name of the Input (the name used in
1060
1020
  * :meth:`Connector.getInput`).
1061
- * * native (pointer) - A native handle that allows accessing additional
1021
+ * * native (RTI_HANDLE) - A native handle that allows accessing additional
1062
1022
  * *Connext DDS* APIs in C.
1063
1023
  * * matchedPublications (JSON) - A JSON object containing information
1064
1024
  * about all the publications currently matched with this Input.
@@ -1066,10 +1026,10 @@ class Input {
1066
1026
  constructor (connector, name) {
1067
1027
  this.connector = connector
1068
1028
  this.name = name
1069
- this.native = connectorBinding.api.RTI_Connector_get_datareader(
1029
+ this.native = connectorBinding.RTI_Connector_get_datareader(
1070
1030
  this.connector.native,
1071
1031
  this.name)
1072
- if (this.native.isNull()) {
1032
+ if (this.native == null) {
1073
1033
  throw new Error('Invalid Subscription::DataReader name')
1074
1034
  }
1075
1035
  // We use the '_' since samples is the name of the property and we want
@@ -1093,7 +1053,7 @@ class Input {
1093
1053
  * operation has been called.
1094
1054
  */
1095
1055
  read () {
1096
- _checkRetcode(connectorBinding.api.RTI_Connector_read(
1056
+ _checkRetcode(connectorBinding.RTI_Connector_read(
1097
1057
  this.connector.native,
1098
1058
  this.name))
1099
1059
  }
@@ -1105,7 +1065,7 @@ class Input {
1105
1065
  * :meth:`Input.samples`.
1106
1066
  */
1107
1067
  take () {
1108
- _checkRetcode(connectorBinding.api.RTI_Connector_take(
1068
+ _checkRetcode(connectorBinding.RTI_Connector_take(
1109
1069
  this.connector.native,
1110
1070
  this.name))
1111
1071
  }
@@ -1153,8 +1113,8 @@ class Input {
1153
1113
  throw new Error('Can not concurrently wait on the same Input')
1154
1114
  } else {
1155
1115
  this.waitSetBusy = true
1156
- const currentChangeCount = ref.alloc('int')
1157
- connectorBinding.api.RTI_Connector_wait_for_matched_publication.async(
1116
+ let currentChangeCount = [null]
1117
+ connectorBinding.RTI_Connector_wait_for_matched_publication.async(
1158
1118
  this.native,
1159
1119
  timeout,
1160
1120
  currentChangeCount,
@@ -1163,7 +1123,7 @@ class Input {
1163
1123
  if (err) {
1164
1124
  return reject(err)
1165
1125
  } else if (res === _ReturnCodes.ok) {
1166
- return resolve(currentChangeCount.deref())
1126
+ return resolve(currentChangeCount[0])
1167
1127
  } else if (res === _ReturnCodes.timeout) {
1168
1128
  return reject(new TimeoutError('Timeout error'))
1169
1129
  } else {
@@ -1192,12 +1152,12 @@ class Input {
1192
1152
  * @type {JSON}
1193
1153
  */
1194
1154
  get matchedPublications () {
1195
- const cStr = ref.alloc('char *')
1196
- const retcode = connectorBinding.api.RTI_Connector_get_matched_publications(
1155
+ let str = [null]
1156
+ const retcode = connectorBinding.RTI_Connector_get_matched_publications(
1197
1157
  this.native,
1198
- cStr)
1158
+ str)
1199
1159
  _checkRetcode(retcode)
1200
- return JSON.parse(_moveCString(cStr.deref()))
1160
+ return JSON.parse(str[0])
1201
1161
  }
1202
1162
 
1203
1163
  /**
@@ -1225,7 +1185,7 @@ class Input {
1225
1185
  throw new Error('Can not concurrently wait on the same Input')
1226
1186
  } else {
1227
1187
  this.waitSetBusy = true
1228
- connectorBinding.api.RTI_Connector_wait_for_data_on_reader.async(
1188
+ connectorBinding.RTI_Connector_wait_for_data_on_reader.async(
1229
1189
  this.native,
1230
1190
  timeout,
1231
1191
  (err, res) => {
@@ -1259,7 +1219,7 @@ class Instance {
1259
1219
  * Attributes:
1260
1220
  * * ``output`` (:class:`Output`) - The :class:`Output` that owns
1261
1221
  * this Instance.
1262
- * * ``native`` (pointer) - Native handle to this Instance that allows
1222
+ * * ``native`` (RTI_HANDLE) - Native handle to this Instance that allows
1263
1223
  * for additional *Connext DDS Pro* C APIs to be called.
1264
1224
  */
1265
1225
  constructor (output) {
@@ -1278,7 +1238,7 @@ class Instance {
1278
1238
  if (!_isString(fieldName)) {
1279
1239
  throw new TypeError('fieldName must be a string')
1280
1240
  } else {
1281
- const retcode = connectorBinding.api.RTI_Connector_clear_member(
1241
+ const retcode = connectorBinding.RTI_Connector_clear_member(
1282
1242
  this.output.connector.native,
1283
1243
  this.output.name,
1284
1244
  fieldName)
@@ -1308,7 +1268,7 @@ class Instance {
1308
1268
  throw new TypeError('value must be a number')
1309
1269
  }
1310
1270
  } else {
1311
- _checkRetcode(connectorBinding.api.RTI_Connector_set_number_into_samples(
1271
+ _checkRetcode(connectorBinding.RTI_Connector_set_number_into_samples(
1312
1272
  this.output.connector.native,
1313
1273
  this.output.name,
1314
1274
  fieldName,
@@ -1333,7 +1293,7 @@ class Instance {
1333
1293
  throw new TypeError('value must be a boolean')
1334
1294
  }
1335
1295
  } else {
1336
- const retcode = connectorBinding.api.RTI_Connector_set_boolean_into_samples(
1296
+ const retcode = connectorBinding.RTI_Connector_set_boolean_into_samples(
1337
1297
  this.output.connector.native,
1338
1298
  this.output.name,
1339
1299
  fieldName,
@@ -1359,7 +1319,7 @@ class Instance {
1359
1319
  throw new TypeError('value must be a boolean')
1360
1320
  }
1361
1321
  } else {
1362
- const retcode = connectorBinding.api.RTI_Connector_set_string_into_samples(
1322
+ const retcode = connectorBinding.RTI_Connector_set_string_into_samples(
1363
1323
  this.output.connector.native,
1364
1324
  this.output.name,
1365
1325
  fieldName,
@@ -1388,7 +1348,7 @@ class Instance {
1388
1348
  * (field names) and values (values for the fields).
1389
1349
  */
1390
1350
  setFromJson (jsonObj) {
1391
- _checkRetcode(connectorBinding.api.RTI_Connector_set_json_instance(
1351
+ _checkRetcode(connectorBinding.RTI_Connector_set_json_instance(
1392
1352
  this.output.connector.native,
1393
1353
  this.output.name,
1394
1354
  JSON.stringify(jsonObj)))
@@ -1443,14 +1403,13 @@ class Instance {
1443
1403
  * @returns {JSON} The value of this instance as a JSON object.
1444
1404
  */
1445
1405
  getJson () {
1446
- const nativeStr = connectorBinding.api.RTIDDSConnector_getJSONInstance(
1406
+ const result = connectorBinding.RTIDDSConnector_getJSONInstance(
1447
1407
  this.output.connector.native,
1448
1408
  this.output.name)
1449
- // Now move the native string
1450
- if (nativeStr === null) {
1409
+ if (result === null) {
1451
1410
  throw new Error('Failed to create JSON object of instance')
1452
1411
  } else {
1453
- return JSON.parse(_moveCString(nativeStr))
1412
+ return JSON.parse(result)
1454
1413
  }
1455
1414
  }
1456
1415
 
@@ -1468,16 +1427,16 @@ class Instance {
1468
1427
  * The native C object.
1469
1428
  *
1470
1429
  * This property allows accessing additional *Connext DDS* APIs in C.
1471
- * @type {pointer}
1430
+ * @type {RTI_HANDLE}
1472
1431
  */
1473
1432
  get native () {
1474
- const nativePointer = ref.alloc('pointer')
1475
- const retcode = connectorBinding.api.RTI_Connector_get_native_instance(
1433
+ let nativePointer = [null]
1434
+ const retcode = connectorBinding.RTI_Connector_get_native_instance(
1476
1435
  this.output.connector.native,
1477
1436
  this.output.name,
1478
1437
  nativePointer)
1479
1438
  _checkRetcode(retcode)
1480
- return nativePointer.deref()
1439
+ return nativePointer[0]
1481
1440
  }
1482
1441
  }
1483
1442
 
@@ -1487,6 +1446,7 @@ class Instance {
1487
1446
  class Output {
1488
1447
  /**
1489
1448
  * This class is used to publish data for a DDS Topic.
1449
+ *
1490
1450
  * To get an Output object, use :meth:`Connector.getOutput`.
1491
1451
  *
1492
1452
  * Attributes:
@@ -1496,7 +1456,7 @@ class Output {
1496
1456
  * that created this object.
1497
1457
  * * ``name`` (str) - The name of this Output (the name used in
1498
1458
  * :meth:`Connector.getOutput`).
1499
- * * ``native`` (pointer) - The native handle that allows accessing
1459
+ * * ``native`` (RTI_HANDLE) - The native handle that allows accessing
1500
1460
  * additional *Connext DDS* APIs in C.
1501
1461
  * * ``matchedSubscriptions`` (JSON) - Information about matched
1502
1462
  * subscriptions (see below).
@@ -1505,10 +1465,10 @@ class Output {
1505
1465
  constructor (connector, name) {
1506
1466
  this.connector = connector
1507
1467
  this.name = name
1508
- this.native = connectorBinding.api.RTI_Connector_get_datawriter(
1468
+ this.native = connectorBinding.RTI_Connector_get_datawriter(
1509
1469
  this.connector.native,
1510
1470
  this.name)
1511
- if (this.native.isNull()) {
1471
+ if (this.native == null) {
1512
1472
  throw new Error('Invalid Publisher::DataWriter name')
1513
1473
  }
1514
1474
  this.instance = new Instance(this)
@@ -1551,16 +1511,16 @@ class Output {
1551
1511
  * throws :class:`TimeoutError`.
1552
1512
  */
1553
1513
  write (params) {
1554
- let cStr
1514
+ let str
1555
1515
  if (params === undefined) {
1556
- cStr = null
1516
+ str = null
1557
1517
  } else {
1558
- cStr = JSON.stringify(params)
1518
+ str = JSON.stringify(params)
1559
1519
  }
1560
- _checkRetcode(connectorBinding.api.RTI_Connector_write(
1520
+ _checkRetcode(connectorBinding.RTI_Connector_write(
1561
1521
  this.connector.native,
1562
1522
  this.name,
1563
- cStr))
1523
+ str))
1564
1524
  }
1565
1525
 
1566
1526
  /**
@@ -1577,7 +1537,7 @@ class Output {
1577
1537
  * y = 0
1578
1538
  */
1579
1539
  clearMembers () {
1580
- _checkRetcode(connectorBinding.api.RTI_Connector_clear(
1540
+ _checkRetcode(connectorBinding.RTI_Connector_clear(
1581
1541
  this.connector.native,
1582
1542
  this.name))
1583
1543
  }
@@ -1607,7 +1567,7 @@ class Output {
1607
1567
  } else if (!_isNumber(timeout)) {
1608
1568
  throw new TypeError('timeout must be a number')
1609
1569
  }
1610
- connectorBinding.api.RTI_Connector_wait_for_acknowledgments.async(
1570
+ connectorBinding.RTI_Connector_wait_for_acknowledgments.async(
1611
1571
  this.native,
1612
1572
  timeout,
1613
1573
  (err, res) => {
@@ -1655,9 +1615,9 @@ class Output {
1655
1615
  if (this.waitsetBusy) {
1656
1616
  throw new Error('Can not concurrently wait on the same Output')
1657
1617
  } else {
1658
- const currentChangeCount = ref.alloc('int')
1618
+ let currentChangeCount = [null]
1659
1619
  this.waitsetBusy = true
1660
- connectorBinding.api.RTI_Connector_wait_for_matched_subscription.async(
1620
+ connectorBinding.RTI_Connector_wait_for_matched_subscription.async(
1661
1621
  this.native,
1662
1622
  timeout,
1663
1623
  currentChangeCount,
@@ -1666,7 +1626,7 @@ class Output {
1666
1626
  if (err) {
1667
1627
  return reject(err)
1668
1628
  } else if (res === _ReturnCodes.ok) {
1669
- return resolve(currentChangeCount.deref())
1629
+ return resolve(currentChangeCount[0])
1670
1630
  } else if (res === _ReturnCodes.timeout) {
1671
1631
  return reject(new TimeoutError('Timeout error'))
1672
1632
  } else {
@@ -1694,12 +1654,12 @@ class Output {
1694
1654
  * @type {JSON}
1695
1655
  */
1696
1656
  get matchedSubscriptions () {
1697
- const cStr = ref.alloc('char *')
1698
- const retcode = connectorBinding.api.RTI_Connector_get_matched_subscriptions(
1657
+ let str = [null]
1658
+ const retcode = connectorBinding.RTI_Connector_get_matched_subscriptions(
1699
1659
  this.native,
1700
- cStr)
1660
+ str)
1701
1661
  _checkRetcode(retcode)
1702
- return JSON.parse(_moveCString(cStr.deref()))
1662
+ return JSON.parse(str[0])
1703
1663
  }
1704
1664
 
1705
1665
  /* istanbul ignore next */
@@ -1753,14 +1713,15 @@ class Connector extends EventEmitter {
1753
1713
  */
1754
1714
  constructor (configName, url) {
1755
1715
  super()
1756
- const options = new _ConnectorOptions()
1757
- options.one_based_sequence_indexing = 0
1758
- options.enable_on_data_event = 1
1759
- this.native = connectorBinding.api.RTI_Connector_new(
1716
+ const options = {
1717
+ one_based_sequence_indexing: 0,
1718
+ enable_on_data_event: 1
1719
+ };
1720
+ this.native = connectorBinding.RTI_Connector_new(
1760
1721
  configName,
1761
1722
  url,
1762
- options.ref())
1763
- if (this.native.isNull()) {
1723
+ options)
1724
+ if (this.native == null) {
1764
1725
  throw new Error('Invalid participant profile, xml path or xml profile')
1765
1726
  }
1766
1727
  this.on('newListener', this.newListenerCallBack)
@@ -1798,7 +1759,7 @@ class Connector extends EventEmitter {
1798
1759
  // is also used by the waitForCallbackFinalization API, and in that case we
1799
1760
  // should not delete anything
1800
1761
  if (cleanup) {
1801
- connectorBinding.api.RTI_Connector_delete(this.native)
1762
+ connectorBinding.RTI_Connector_delete(this.native)
1802
1763
  this.native = null
1803
1764
  }
1804
1765
  // Call the resolve() callback of the passed promise
@@ -1965,7 +1926,7 @@ class Connector extends EventEmitter {
1965
1926
  throw new Error('Can not concurrently wait on the same Connector object')
1966
1927
  } else {
1967
1928
  this.waitSetBusy = true
1968
- connectorBinding.api.RTI_Connector_wait_for_data.async(
1929
+ connectorBinding.RTI_Connector_wait_for_data.async(
1969
1930
  this.native,
1970
1931
  timeout,
1971
1932
  (err, res) => {
@@ -2074,26 +2035,15 @@ class Connector extends EventEmitter {
2074
2035
  }
2075
2036
 
2076
2037
  /**
2077
- * Allows you to increase the number of :class:`Connector` instances that
2078
- * can be created.
2038
+ * This method is deprecated since the max_objects_per_thread now grows
2039
+ * dynamically.
2079
2040
  *
2080
- * The default value is 2048 (which allows for approximately 15 instances
2081
- * of :class:`Connector` to be created in a single application). If you need
2082
- * to create more than 8 instances of :class:`Connector`, you can increase
2083
- * the value from the default.
2041
+ * Note this method is deprecated in the Ironside release. This static method
2042
+ * only exists to not break user's applications which are already using it.
2084
2043
  *
2085
- * .. note::
2086
- * This is a static method. It can only be called before creating a
2087
- * :class:`Connector` instance.
2088
- *
2089
- * See `SYSTEM_RESOURCE_LIMITS QoS Policy
2090
- * <https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_professional/users_manual/index.htm#users_manual/SYSTEM_RESOURCE_LIMITS_QoS.htm>`__
2091
- * in the *RTI Connext DDS Core Libraries User's Manual* for more information.
2092
- *
2093
- * @param {number} value The value for ``max_objects_per_thread``
2044
+ * @private
2094
2045
  */
2095
2046
  static setMaxObjectsPerThread (value) {
2096
- _checkRetcode(connectorBinding.api.RTI_Connector_set_max_objects_per_thread(value))
2097
2047
  }
2098
2048
 
2099
2049
  /**
@@ -2114,17 +2064,17 @@ class Connector extends EventEmitter {
2114
2064
  // Parse numbers out of string
2115
2065
  const versionNumbers = versionString.split('.')
2116
2066
  // Now get the build IDs of the native libraries
2117
- const nativeConnectorVersion = ref.alloc('char *')
2118
- const nativeCoreCVersion = ref.alloc('char *')
2119
- _checkRetcode(connectorBinding.api.RTI_Connector_get_build_versions(
2067
+ let nativeConnectorVersion = [null]
2068
+ let nativeCoreCVersion = [null]
2069
+ _checkRetcode(connectorBinding.RTI_Connector_get_build_versions(
2120
2070
  nativeCoreCVersion,
2121
2071
  nativeConnectorVersion))
2122
2072
 
2123
2073
  // Now create the string containing all of the above information
2124
2074
  let versionStr = 'RTI Connector for JavaScript, version ' +
2125
2075
  versionNumbers[0] + '.' + versionNumbers[1] + '.' + versionNumbers[2] + '\n'
2126
- versionStr += ref.readCString(nativeCoreCVersion.deref()) + '\n'
2127
- versionStr += ref.readCString(nativeConnectorVersion.deref())
2076
+ versionStr += nativeCoreCVersion[0] + '\n'
2077
+ versionStr += nativeConnectorVersion[0]
2128
2078
  return versionStr
2129
2079
  }
2130
2080
  }
Binary file
@@ -1,43 +0,0 @@
1
- rticonnextdds-connector
2
- =======
3
-
4
- *(This repository hosts the common Connector native library and shouldn't be cloned.
5
- See the **[Python](https://github.com/rticommunity/rticonnextdds-connector-py)** or
6
- **[JavaScript](https://github.com/rticommunity/rticonnextdds-connector-js)** bindings.)*
7
-
8
- ### RTI Connector for Connext DDS 6.1.0 - Getting Started
9
- RTI Connext DDS is a software connectivity framework for real-time distributed applications.
10
- It uses the publish-subscribe communications model to make data distribution efficient and robust.
11
- At its core is the world’s leading ultra-high performance, distributed networking databus.
12
-
13
- RTI Connector is a family of simplified APIs for publishing and subscribing to
14
- the Connext DDS Databus in programming languages such as Python and JavaScript.
15
-
16
- *Connector* was created to quickly and easily develop demos
17
- and proofs of concept. It can be useful for anybody who needs
18
- a quick way to script tests and interact with Connext DDS using different scripting languages.
19
-
20
- *Connector* can be used to quickly create tests for your distributed system and, thanks
21
- to the binding with scripting languages and the use of XML, to easily integrate
22
- with many other available technologies.
23
-
24
- The *Connector* library is provided in binary form for selected architectures.
25
- Scripting language bindings and examples are provided in source format.
26
-
27
- ### Language Support
28
-
29
- * **[Python](https://github.com/rticommunity/rticonnextdds-connector-py)** (Fully supported)
30
- * **[JavaScript](https://github.com/rticommunity/rticonnextdds-connector-js)** (Fully supported)
31
- * **[C#](https://github.com/rticommunity/rticonnextdds-connector-cs)** (Experimental support only)
32
- * **[Go](https://github.com/rticommunity/rticonnextdds-connector-go)** (Experimental support only)
33
- * **[Lua (through RTI Prototyper)](https://community.rti.com/downloads/experimental/rti-prototyper-with-lua)** (Experimental support only)
34
- * **[C](https://github.com/rticommunity/rticonnextdds-connector/tree/master/examples/lua_c_integration)** (Experimental support only)
35
-
36
- ### Support
37
- If you have questions, use the [RTI Community Forum](https://community.rti.com/forums/technical-questions).
38
-
39
- ### License
40
-
41
- (For Python and JavaScript, a different license in their respective repositories applies.)
42
-
43
- This software is an experimental ("pre-production") product. The Software is provided "as is," with no warranty of any type, including any warranty for fitness for any purpose. RTI is under no obligation to maintain or support the software. RTI shall not be liable for any incidental or consequential damages arising out of the use or inability to use the software.