At the moment only low-level clients are available. This results in waiting for a specific service in the MachineTalkBrowser, connecting with the client that fits the specific service and subscribing to a particular topic. This makes the examples somewhat large. That can be simplified.
A client that incorporates waiting for a specific machine in the browser, wait for the required services to come up and create the appropriate clients fro those services in the same machine.
Rudimentary proposal:
// Define what machine we are interested in and which services we want to use.
var machine = new MachineClient(['status.motion','command']);
machine.status.on('motion', function(motionStatus) {
...
});
machine.on('connect', function() {
// The machine with ID was discovered and connected.
machine.command.emcAxisHome(0);
});
var browser = new MachineTalkBrowser();
machine.discoverConnect(browser, 'ID');
browser.start();
// or
machine.connect({
status: 'tcp://debian.local:1234',
command: 'tcp://debian.local:1235'
});
At the moment only low-level clients are available. This results in waiting for a specific service in the MachineTalkBrowser, connecting with the client that fits the specific service and subscribing to a particular topic. This makes the examples somewhat large. That can be simplified.
A client that incorporates waiting for a specific machine in the browser, wait for the required services to come up and create the appropriate clients fro those services in the same machine.
Rudimentary proposal: