Howto use more than one "Duet-Device"

a.theofilua.theofilu Junior MemberPosts: 15
Hallo,

I'm writing a Duet module for a MMS-5 (Mirage media player). This player supports up to 5 zones, where every zone needs a separate network connection. While this is not a problem, I want to have up to 5 "Duet-Device" to send and receive messages separate for each zone.

To initialize this I've written the following code:
DPS dps1 = new DPS(props.getProperty("Duet-Device"));
DPS dps2 = new DPS(dps1.getDevice(), dps1.getPort()+1, dps1.getSystem());
DPS dps3 = new DPS(dps1.getDevice(), dps1.getPort()+2, dps1.getSystem());
DPS dps4 = new DPS(dps1.getDevice(), dps1.getPort()+3, dps1.getSystem());
DPS dps5 = new DPS(dps1.getDevice(), dps1.getPort()+4, dps1.getSystem());
// Assign the virtual Duet device
vdvMedia1 = new NetLinxDevice(dps1, true);
vdvMedia2 = new NetLinxDevice(dps2, true);
vdvMedia3 = new NetLinxDevice(dps3, true);
vdvMedia4 = new NetLinxDevice(dps4, true);
vdvMedia5 = new NetLinxDevice(dps5, true);

And in the functions:
protected void doAddNetLinxDeviceListeners()
{
	vdvMedia1.addDataListener(this);
	vdvMedia2.addDataListener(this);
	vdvMedia3.addDataListener(this);
	vdvMedia4.addDataListener(this);
	vdvMedia5.addDataListener(this);
}

protected boolean doNetLinxDeviceInitialization()
{
	vdvMedia1.initialize();
	vdvMedia1.notifyOnline();
	vdvMedia2.initialize();
	vdvMedia2.notifyOnline();
	vdvMedia3.initialize();
	vdvMedia3.notifyOnline();
	vdvMedia4.initialize();
	vdvMedia4.notifyOnline();
	vdvMedia5.initialize();
	vdvMedia5.notifyOnline();
}

This works in the way that I can send out from the Duet-module any messages to the UI-module written in NetLinx. But messages from the UI-module to the Duet-module don't arrive, except for the first device (vdvMedia1).

What must I do to get the messages also from vdvMedia2 to vdvMedia5?

--
A.T.

Comments

  • JasonSJasonS If I had known it was going to be that kind of party... Posts: 228
    Have you tried a SET_VIRTUAL_PORT_COUNT on vdvMedia1? Not sure how, or if you would do it in Duet, but whenever you use anything above port 1 on a virtual device in Netlinx you need to set the virtual port count.
  • HARMAN_icraigieHARMAN_icraigie Technical Trainer II, Harman Professional University Posts: 454
    At minimum think you'll need to edit the Comnponents Interfaces file (components.xml) file to enable all the ports.
  • a.theofilua.theofilu Junior Member Posts: 15
    Howto use more than one "Duet-Device"
    At minimum think you'll need to edit the Comnponents Interfaces file (components.xml) file to enable all the ports.

    Thanks for that hint. That's it. Now it works.
    --
    A.T.
  • AntAnt Junior Member Posts: 52
    A.T.

    Do you have a comm module for the MSS-5A that allows you to define only one module as opposed to one for every TP?

    If so, any chance you could send it on?
Sign In or Register to comment.