dbus-sdk
Version:
A Node.js SDK for interacting with DBus, enabling seamless service calling and exposure with TypeScript support
17 lines (16 loc) • 992 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const SetupLocalService_spec_1 = require("./examples/SetupLocalService.spec");
const InvokeDBusService_spec_1 = require("./examples/InvokeDBusService.spec");
/**
* Executes test specifications for DBus service setup and invocation.
* This script sets up a local DBus service and then invokes it using a client,
* demonstrating both server and client interactions over a TCP connection.
* The operations are scheduled to run immediately in the next event loop cycle.
*/
setImmediate(async () => {
// Set up a local DBus service with the specified name and TCP bus address
await (0, SetupLocalService_spec_1.SetupLocalServiceSpec)('org.dbus.node.test', 'tcp:host=192.168.1.127,port=44444');
// Invoke the DBus service as a client to test interactions with the local service
await (0, InvokeDBusService_spec_1.InvokeDBusServiceSpec)('org.dbus.node.test', 'tcp:host=192.168.1.127,port=44444');
});