typescript/javascript sdk for DSA protocol
const { DSLink, RootNode, ValueNode, ActionNode, Permission} = require("dslink-js");
class MyValueNode extends ValueNode {
constructor(path, provider) {
super(path, provider, 'myvalue', 'number', Permission.WRITE);
this._value = 123;
}
}
class MyRootNode extends RootNode {
initialize() {
this.createChild('a', MyValueNode);
}
}
async function main() {
let link = new DSLink('mydslink', {rootNode: new MyRootNode()});
await link.connect();
}
main();