Skip to content

Commit

Permalink
Update license to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
gianpiero committed Oct 19, 2018
1 parent 0d58814 commit 5546b5f
Show file tree
Hide file tree
Showing 17 changed files with 143 additions and 122 deletions.
19 changes: 8 additions & 11 deletions examples/nodejs/ShapeExample.xml
@@ -1,21 +1,18 @@
<?xml version="1.0"?>
<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. 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.
(c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved.
No duplications, whole or partial, manual or electronic, may be made
without express written permission. Any such copies, or revisions thereof,
must display this notice unaltered.
This code contains trade secrets of Real-Time Innovations, Inc.
-->

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/5.1.0/rti_dds_profiles.xsd" version="5.1.0">

<!-- Qos Library -->
<qos_library name="QosLibrary">
<qos_profile name="DefaultProfile"
<qos_profile name="DefaultProfile"
base_name="BuiltinQosLibExp::Generic.StrictReliable"
is_default_qos="true">
<participant_qos>
Expand All @@ -39,8 +36,8 @@
</property>
End Monitoring -->
</participant_qos>


</qos_profile>
</qos_library>

Expand Down
12 changes: 7 additions & 5 deletions examples/nodejs/simple/reader.js
@@ -1,8 +1,10 @@
/*
* Copyright (c) 2005-2015 Real-Time Innovations, Inc. All rights reserved.
* Permission to modify and use for internal purposes granted.
* This software is provided "as is", without warranty, express or implied.
*/
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var sleep = require('sleep');
var rti = require('rticonnextdds-connector');
Expand Down
12 changes: 7 additions & 5 deletions examples/nodejs/simple/reader_event.js
@@ -1,8 +1,10 @@
/*
* Copyright (c) 2005-2015 Real-Time Innovations, Inc. All rights reserved.
* Permission to modify and use for internal purposes granted.
* This software is provided "as is", without warranty, express or implied.
*/
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var sleep = require('sleep');
var rti = require('rticonnextdds-connector');
Expand Down
12 changes: 7 additions & 5 deletions examples/nodejs/simple/writer.js
@@ -1,8 +1,10 @@
/*
* Copyright (c) 2005-2015 Real-Time Innovations, Inc. All rights reserved.
* Permission to modify and use for internal purposes granted.
* This software is provided "as is", without warranty, express or implied.
*/
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var sleep = require('sleep');
var rti = require('rticonnextdds-connector');
Expand Down
12 changes: 7 additions & 5 deletions examples/nodejs/transform/transform.js
@@ -1,8 +1,10 @@
/*
* Copyright (c) 2005-2016 Real-Time Innovations, Inc. All rights reserved.
* Permission to modify and use for internal purposes granted.
* This software is provided "as is", without warranty, express or implied.
*/
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var sleep = require('sleep');
var rti = require('rticonnextdds-connector');
Expand Down
12 changes: 7 additions & 5 deletions examples/nodejs/web_http/reader_web.js
@@ -1,8 +1,10 @@
/*
* Copyright (c) 2005-2015 Real-Time Innovations, Inc. All rights reserved.
* Permission to modify and use for internal purposes granted.
* This software is provided "as is", without warranty, express or implied.
*/
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var sleep = require('sleep');
var http = require('http');
Expand Down
12 changes: 7 additions & 5 deletions examples/nodejs/web_http/reader_web_event.js
@@ -1,8 +1,10 @@
/*
* Copyright (c) 2005-2015 Real-Time Innovations, Inc. All rights reserved.
* Permission to modify and use for internal purposes granted.
* This software is provided "as is", without warranty, express or implied.
*/
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

/* DDS Connector
*/
Expand Down
13 changes: 5 additions & 8 deletions examples/nodejs/web_socket/indexChart.html
Expand Up @@ -2,14 +2,11 @@
<html lang="en">

<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. 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.
(c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved.
No duplications, whole or partial, manual or electronic, may be made
without express written permission. Any such copies, or revisions thereof,
must display this notice unaltered.
This code contains trade secrets of Real-Time Innovations, Inc.
-->

<style>
Expand Down
13 changes: 5 additions & 8 deletions examples/nodejs/web_socket/indexEarth.html
@@ -1,14 +1,11 @@
<html>

<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. 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.
(c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved.
No duplications, whole or partial, manual or electronic, may be made
without express written permission. Any such copies, or revisions thereof,
must display this notice unaltered.
This code contains trade secrets of Real-Time Innovations, Inc.
-->

<head>
Expand Down
13 changes: 5 additions & 8 deletions examples/nodejs/web_socket/indexShape.html
Expand Up @@ -2,14 +2,11 @@
<html lang="en">

<!--
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for use with RTI products. 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.
(c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved.
No duplications, whole or partial, manual or electronic, may be made
without express written permission. Any such copies, or revisions thereof,
must display this notice unaltered.
This code contains trade secrets of Real-Time Innovations, Inc.
-->

<head>
Expand Down
21 changes: 8 additions & 13 deletions examples/nodejs/web_socket/reader_websocket.js
@@ -1,14 +1,9 @@
/*****************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations, All rights reserved. *
* *
* RTI grants Licensee a license to use, modify, compile, and create *
* derivative works of the Software. Licensee has the right to distribute *
* object form only for use with RTI products. 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. *
* *
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var http = require('http');
Expand Down Expand Up @@ -50,8 +45,8 @@ connector.on('on_data_available',
input.take();
console.log(input.samples.getLength());
for (i=1; i <= input.samples.getLength(); i++) {
if (input.infos.isValid(i)) {
console.log('is valid');
if (input.infos.isValid(i)) {
console.log('is valid');
var jsonObj = input.samples.getJSON(i);
console.log(JSON.stringify(jsonObj));
io.sockets.emit('shape', jsonObj);
Expand Down
24 changes: 16 additions & 8 deletions test/nodejs/test_rticonnextdds_connector.js
@@ -1,3 +1,11 @@
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var expect=require('chai').expect
var rti= require(__dirname + '/../../rticonnextdds-connector')
var sinon = require('sinon')
Expand All @@ -13,7 +21,7 @@ describe('Connector Tests',function() {
})

it('Connector should throw an error for invalid participant profile', function(){
var invalid_participant_profile = "InvalidParticipantProfile"
var invalid_participant_profile = "InvalidParticipantProfile"
var xml_path = __dirname+ "/../xml/ShapeExample.xml"
expect(function(){
new rti.Connector(invalid_participant_profile,xml_path)
Expand All @@ -27,14 +35,14 @@ describe('Connector Tests',function() {
new rti.Connector(participant_profile,invalid_xml)
}).to.throw(Error)
})

it('Connector should get instantiated for valid' +
'xml and participant profile', function(){
var participant_profile = "MyParticipantLibrary::Zero"
var xml_profile = __dirname + "/../xml/ShapeExample.xml"
var connector = new rti.Connector(participant_profile,xml_profile)
expect(connector).to.exist
expect(connector).to.be.instanceOf(rti.Connector)
expect(connector).to.be.instanceOf(rti.Connector)
})

it('Multiple Connector objects can be instantiated', function(){
Expand All @@ -44,9 +52,9 @@ describe('Connector Tests',function() {
for(var i=0; i< 5; i++)
connectors.push(new rti.Connector(participant_profile,xml_profile))
connectors.forEach(function(connector){
expect(connector).to.exist
expect(connector).to.exist
expect(connector).to.be.instanceOf(rti.Connector)
})
})
})

describe('Connector callback test', function () {
Expand All @@ -68,7 +76,7 @@ describe('Connector Tests',function() {
it('on_data_available callback gets called when data is available',
function (done){
//spies are used for testing callbacks
var spy = sinon.spy()
var spy = sinon.spy()
setTimeout(function(){
expect(spy.calledOnce).to.be.true
done() //Pattern for async testing: next test won't execute until done gets called.
Expand All @@ -77,7 +85,7 @@ describe('Connector Tests',function() {
output = connector.getOutput("MyPublisher::MySquareWriter")
testMsg='{"x":1,"y":1,"z":true,"color":"BLUE","shapesize":5}'
output.write(JSON.parse(testMsg))
})
})

})
})
18 changes: 13 additions & 5 deletions test/nodejs/test_rticonnextdds_dataflow.js
@@ -1,9 +1,17 @@
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var expect=require('chai').expect
var rti= require(__dirname + '/../../rticonnextdds-connector')
var sleep=require('sleep')

// Test Parameterization- describe block will execute once for each param
var params=["read","take"]
var params=["read","take"]

params.forEach(function(retrieval_method) {

Expand All @@ -17,8 +25,8 @@ params.forEach(function(retrieval_method) {
connector = new rti.Connector(participant_profile,xml_profile)
input = connector.getInput("MySubscriber::MySquareReader")
output = connector.getOutput("MyPublisher::MySquareWriter")
})
})

//Clean-up after all tests execute
after(function() {
this.timeout(0)
Expand Down Expand Up @@ -54,7 +62,7 @@ params.forEach(function(retrieval_method) {
var validity=input.infos.isValid(1)
expect(validity).to.equal(1)
})

it('received JSON representation of data should be the same as '+
'the JSON object sent',function(){
var received_JSON=input.samples.getJSON(1)
Expand All @@ -76,7 +84,7 @@ params.forEach(function(retrieval_method) {
expect(shapesize).to.equal(testMsg['shapesize'])
expect(color).to.equal(testMsg['color'])
})

//Unimplemented tests
it('Behavior of getBoolean on String or Number fields should be considered')
it('Behavior of getString on Number or Boolean fields should be considered')
Expand Down
20 changes: 14 additions & 6 deletions test/nodejs/test_rticonnextdds_input.js
@@ -1,15 +1,23 @@
/******************************************************************************
* (c) 2005-2015 Copyright, Real-Time Innovations. All rights reserved. *
* No duplications, whole or partial, manual or electronic, may be made *
* without express written permission. Any such copies, or revisions thereof, *
* must display this notice unaltered. *
* This code contains trade secrets of Real-Time Innovations, Inc. *
******************************************************************************/

var expect=require('chai').expect
var rti= require(__dirname+ '/../../rticonnextdds-connector')

describe('Input Tests',function() {
var connector=null
//Initialization before all tests are executed
var connector=null
//Initialization before all tests are executed
before(function(){
var participant_profile = "MyParticipantLibrary::Zero"
var xml_profile = __dirname + "/../xml/ShapeExample.xml"
connector = new rti.Connector(participant_profile,xml_profile)
})

//cleanup after all tests have executed
after(function() {
this.timeout(0)
Expand All @@ -21,13 +29,13 @@ describe('Input Tests',function() {
expect(function(){
connector.getInput(invalid_DR)
}).to.throw(Error)
})
})

it('Input object should get instantiated for valid ' +
'Subscription::DataReader name',function (){
var valid_DR = "MySubscriber::MySquareReader"
var valid_DR = "MySubscriber::MySquareReader"
var input = connector.getInput(valid_DR)
expect(input).to.exist
expect(input).to.exist
expect(input.name).to.equal(valid_DR)
expect(input.connector).to.equal(connector)
})
Expand Down

0 comments on commit 5546b5f

Please sign in to comment.