Skip to content
Snippets Groups Projects
Commit 074f9f7f authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fully working webservice

parent 234f7ebf
No related branches found
No related tags found
No related merge requests found
Pipeline #13092 passed
......@@ -21,7 +21,6 @@ function RGBDClient(peer, N, rate, dest) {
RGBDClient.prototype.push = function(uri, frame, ttime, chunk, rgb, depth) {
this.peer.send(uri, frame, ttime, chunk, rgb, depth);
console.log("Push frame: ", uri, frame, ttime, chunk);
this.txcount++;
}
......@@ -61,7 +60,7 @@ RGBDStream.prototype.addClient = function(peer, N, rate, dest) {
RGBDStream.prototype.subscribe = function() {
this.rxcount = 0;
this.rxmax = 10;
console.log("Subscribe to ", this.uri);
//console.log("Subscribe to ", this.uri);
this.peer.send("get_stream", this.uri, 10, 0, [Peer.uuid], this.uri);
}
......@@ -215,7 +214,6 @@ app.ws('/', (ws, req) => {
});
p.bind("set_pose", (uri, vec) => {
//console.log("SET POSE");
let peer = uri_data[uri].peer;
if (peer) {
uri_data[uri].pose = vec;
......
......@@ -81,7 +81,7 @@ Peer.uuid = my_uuid;
Peer.prototype._dispatchNotification = function(name, args) {
if (this.bindings.hasOwnProperty(name)) {
console.log("Notification for: ", name);
//console.log("Notification for: ", name);
this.bindings[name].apply(this, args);
} else {
console.log("Missing handler for: ", name);
......@@ -90,7 +90,7 @@ Peer.prototype._dispatchNotification = function(name, args) {
Peer.prototype._dispatchCall = function(name, id, args) {
if (this.bindings.hasOwnProperty(name)) {
console.log("Call for:", name, id);
//console.log("Call for:", name, id);
try {
let res = this.bindings[name].apply(this, args);
......@@ -100,7 +100,7 @@ Peer.prototype._dispatchCall = function(name, id, args) {
this.close();
}
} else if (this.proxies.hasOwnProperty(name)) {
console.log("Proxy for:", name, id);
//console.log("Proxy for:", name, id);
args.unshift((res) => {
try {
this.sock.send(encode([1,id,name,res]));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment