Duet Rookie. First Method. Please advise
nickm
Posts: 152
Putting together a Duet module for the Polycom EF2280 mixer. The following code is the first method I have created. Please let me know if I'm going about this the correct way. Any help is greatly appreciated.
BTW-It's not shown, but I did follow the User Guide for preparing the Duet module for 2 way communication with the device (addDataListener) and implementing the dvACTUAL NetLinxDevice field to tie with 'nd'
BTW-It's not shown, but I did follow the User Guide for preparing the Duet module for 2 way communication with the device (addDataListener) and implementing the dvACTUAL NetLinxDevice field to tie with 'nd'
public class PolycomEf2280 extends AudioMixer implements IDataListener { NetLinxDevice dvACTUAL; //---Creates a new NetLinx Device of nd int id = 0; public void setAudioMixerCrosspoint(int input, int output, int value) { super.setAudioMixerCrosspoint(input, output, value); String ch_in; String ch_out; switch(input){ case 9 : ch_in="A"; break; case 10 : ch_in="B"; break; case 11 : ch_in="C"; break; case 12 : ch_in="D"; break; default : ch_in=Integer.toString(input); break; } switch(output) { case 9 : ch_out="A"; break; case 10 : ch_out="B"; break; case 11 : ch_out="C"; break; case 12 : ch_out="D"; break; default : ch_out=Integer.toString(output); break; } dvACTUAL.sendString("F0"+id+"MATRIX"+ch_in+ch_out+value+13); } }
0
Comments
Just wondering why the need to use the duet module, since the old netlinx one works so well.
HOwever if you get one done in duet I would love to see it.
I have done a to of pf2280, and always use the amx module and then just pass any commands in that aren't included.
Use this for almost every possible piece of control the 2280 allows.
I spent several months when Duet first came out reviewing my ancient, unused Java skills in my spare time. Then my boss decided the licensing was too expensive, and standard NetLinx did everything we needed it to do, and that re-writing working code in a new format was just not worth it. So, the limit of my Duet experience has been plugging in pre-made modules. I get the suspicion that I am not the only one in that position.
Sorry if the title doesn't translate to your local culture;^)
Is there anyone on this forum who has used Duet to do something interesting and creative and they would like to tell us about it?
OK, so is there anyone out there who has done anything boring and ordinary with Duet?
I'm beginning to wonder if anyone is using it!
No-one is using Duet.
Can anyone tell me *why* they aren't using Duet?
Just wrote 2 modules for our own products and the todo list is growing faster I can write them :-(
I think : If you want to write a driver that is usable within visual architect, you have to write duet drivers. If you don't use VA, stay writing netlinx drivers. You are quicker writing them.
(hopefully my boss did not read this :-) )
But DUET modules have theire positive side. You have a standard api to control a module, which is lacking on the classic netlinx modules.
But DUET will be the future.
Greetings
Juergen
I know that for me, it's simply because I haven't purchased Cafe Duet yet. If I had bothered to convince my boss to let me order it already, I'd be writing (at least some) stuff with it. At least I think I would, but this thread has made start to question that statement.
I'm starting to come across HVAC systems that can be controlled through an XML/SOAP interface which seems a lot easier then having to deal with BacNet. If I can do all the XML processing in Java with all the tools already built, instead of having to recreate them in Netlinx that's very cool.
Also the ability to use Vectors and the like instead of fixed arrays would be nice.
If you're trying to create a new NetLinxDevice, try:
NetLinxDevice dvACTUAL = new NetLinxDevice();
I have a feeling you'll need to pass some parameters to the constructor, but I have no idea what those are. I'll be fairly surprised (won't be the first time, though) if AMX doesn't have example code somewhere to look at...
Jeremy
Thanks for the help....I did eliminate my constructor statements from the code I posted to save space. I have already created the NetLinxDevice dvACTUAL. As far as functionality, I haven't actually tested this module yet, I was just looking for some feedback on the general direction of the method I was building.
The main problem is, that not all prebuild classes are useable in DUET. They must met the requierments of the DUET. There are some other threads here in this forum about this. And I remember someone wrote that he managed to use some classes and some not.
I think XML works, but JDBC not... you have to install the database drivers which does not work I guess.
The best thing would be to give it a try and see if it work :-)
Since DUET will be the future, at least for modules, it would be good to have some more of them....
Greetings
Juergen