Step 3 - Adding The Device Specific Code - AMX CAFE DUET V1.8 Instruction Manual

Integrated development environment for netlinx duet (version 1.8)
Table of Contents

Advertisement

Creating a Sample Module
6.
Just under the declaration of the class, you can create your global variable (in this
example: dvActual) like this:
public class AmxSwitcher extends Switcher implements
IDataListener {
...then in the constructor:
public AmxSwitcher(BundleContext bctxt, NetLinxDevice nd,
Properties props) {
Now dvActual has the handle for the specific interface your device is connected
to.
The code is generated in the following order (step 7 then step 8).
7.
You need to make the Duet module inform the NetLinx Master that it would like to
receive incoming strings (from the controlled device).
In the method
protected void doAddNetLinxDeviceListeners() {
}
8.
Finally, to also ensure that your device will function alongside the NetLinx
Interpreter, also add the following text:
If you want the NetLinxDevice initialized, in the method
doNetLinxDeviceInitialization( )
protected boolean doNetLinxDeviceInitialization()
{
}
//to receive INFO log messages
this.setDebugState(INFO);

Step 3 - Adding the Device Specific Code

In the case of the Switcher component, the most central method to its operation is the
switchInputToOutput( )
code that takes the parameters which will be passed into it, and then convert it to a
message compatible with the actual switcher.
58
NetLinxDevice dvActual;
dvActual = nd;
doAddNetLinxDeviceListeners( )
dvActual.addDataListener(this);
return true;
method. Inside this method is where you need to write the
, add the following line:
, add the following line:
Café Duet v1.8 - User's Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cafe duet

Table of Contents