-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'eclipse-zenoh:main' into main
- Loading branch information
Showing
24 changed files
with
276 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
{ | ||
mode: "router", | ||
mode: 'router', | ||
plugins_loading: { | ||
enabled: true, | ||
search_dirs: ["./target/debug", "~/.zenoh/lib"], | ||
}, | ||
enabled: true, | ||
search_dirs: ['./target/debug', '~/.zenoh/lib'] | ||
}, | ||
plugins: { | ||
remote_api: { | ||
"websocket_port": "10000", | ||
}, | ||
}, | ||
websocket_port: '10000', | ||
secure_websocket: { | ||
certificate_path: 'path/to/certificate_path', | ||
private_key_path: 'path/to/private_key_path' | ||
} | ||
} | ||
} | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,29 +12,29 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
import { ReplyError } from "@ZettaScaleLabs/zenoh-ts"; | ||
import { deserialize_string } from "@ZettaScaleLabs/zenoh-ts"; | ||
import { ReplyError } from "@eclipse-zenoh/zenoh-ts"; | ||
import { deserialize_string } from "@eclipse-zenoh/zenoh-ts"; | ||
import "./style.css"; | ||
import "./webpage.ts"; | ||
|
||
import { Config, Receiver, RecvErr, Reply, Sample, Session } from "@ZettaScaleLabs/zenoh-ts"; | ||
import { Config, Receiver, RecvErr, Reply, Sample, Session } from "@eclipse-zenoh/zenoh-ts"; | ||
|
||
export async function get() { | ||
const session = await Session.open(Config.new("ws/127.0.0.1:10000")); | ||
const session = await Session.open(new Config ("ws/127.0.0.1:10000")); | ||
|
||
// Callback get query | ||
const get_callback = async function (reply: Reply): Promise<void> { | ||
let resp = reply.result(); | ||
if (resp instanceof Sample) { | ||
let sample: Sample = resp; | ||
console.log(">> Received ('", sample.keyexpr(), ":", sample.payload().deserialize(deserialize_string),"')"); | ||
console.warn(">> Received ('", sample.keyexpr(), ":", sample.payload().deserialize(deserialize_string),"')"); | ||
} else { | ||
let reply_error: ReplyError = resp; | ||
console.log(">> Received (ERROR: '", reply_error.payload().deserialize(deserialize_string), "')"); | ||
console.warn(">> Received (ERROR: '", reply_error.payload().deserialize(deserialize_string), "')"); | ||
} | ||
}; | ||
|
||
console.log("Start z_get") | ||
console.warn("Start z_get") | ||
await session.get("demo/example/**", get_callback); | ||
|
||
// Poll receiever | ||
|
@@ -46,15 +46,15 @@ export async function get() { | |
let reply = await receiver.receive(); | ||
while (reply != RecvErr.Disconnected) { | ||
if (reply == RecvErr.MalformedReply) { | ||
console.log("MalformedReply"); | ||
console.warn("MalformedReply"); | ||
} else { | ||
let resp = reply.result(); | ||
if (resp instanceof Sample) { | ||
let sample: Sample = resp; | ||
console.log(">> Received ('", sample.keyexpr(), ":", sample.payload().deserialize(deserialize_string),"')"); | ||
console.warn(">> Received ('", sample.keyexpr(), ":", sample.payload().deserialize(deserialize_string),"')"); | ||
} else { | ||
let reply_error: ReplyError = resp; | ||
console.log(">> Received (ERROR: '{", reply_error.payload().deserialize(deserialize_string), "}')"); | ||
console.warn(">> Received (ERROR: '{", reply_error.payload().deserialize(deserialize_string), "}')"); | ||
} | ||
} | ||
reply = await receiver.receive(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,14 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
import { FifoChannel } from "@ZettaScaleLabs/zenoh-ts"; | ||
import { FifoChannel } from "@eclipse-zenoh/zenoh-ts"; | ||
import "./style.css"; | ||
import "./webpage.ts"; | ||
|
||
import { Encoding, CongestionControl, Config, Session } from "@ZettaScaleLabs/zenoh-ts"; | ||
import { Encoding, CongestionControl, Config, Session } from "@eclipse-zenoh/zenoh-ts"; | ||
|
||
export async function ping() { | ||
const session = await Session.open(Config.new("ws/127.0.0.1:10000")); | ||
const session = await Session.open(new Config ("ws/127.0.0.1:10000")); | ||
|
||
let sub = await session.declare_subscriber("test/pong", new FifoChannel(256)); | ||
let pub = session.declare_publisher( | ||
|
@@ -31,7 +31,7 @@ export async function ping() { | |
); | ||
|
||
// Warm up | ||
console.log("Warming up for 5 seconds..."); | ||
console.warn("Warming up for 5 seconds..."); | ||
|
||
let startTime = new Date(); | ||
let data = [122, 101, 110, 111, 104]; | ||
|
@@ -52,7 +52,7 @@ export async function ping() { | |
|
||
for (let i = 0; i < samples_out.length; i++) { | ||
let rtt = samples_out[i]; | ||
console.log( | ||
console.warn( | ||
data.length + | ||
"bytes: seq=" + | ||
i + | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.