Home AMX User Forum Duet/Cafe Duet

Duet FAQs

I am the product manager on Duet and have been "lurking" the forums for quite some time. As someone suggested on another thread, we haven't been able to join in or respond until Duet patents had been filed and the product was announced. I'm putting together a FAQ list, so let's use this forum to get all of your questions on the table. Here's one question that I've already seen:

1) How will Java affect execution speed and memory usage? J2ME was designed specifically for embedded devices and has been highly optimized by Sun. The java code will execute faster than NetLinx code and will use less memory. Benchmarks are still preliminary, but we expect around an order of magnitude improvement.
«1

Comments

  • Question: What NetLinx masters will support Duet?

    Answer: Due to the memory and flash requirements of the JVM and other components, Duet will only be available on the NI-700, NI-2000, NI-3000, NI-4000 and the NXC-ME260/64. The ME260/64 is an ME260 with 64MBytes of RAM, and started shipping in August. You will be able to download Duet as a master firmware upgrade for these platforms in December 2004.
  • Spire_JeffSpire_Jeff Posts: 1,917
    Will having java allow for any sort of web browser to be incorporated in the panel? I don't expect to display Flash enabled sites, but basic html with graphics would be nice.
  • With the DUET Master Firmware not being compatible across the existing Netlinx product line will there:
    A) be parallel Master firmware development for non-DUET Masters?
    B) be an upgrade path for exisiting systems besides installing a new Master at full cost?

    Thanks
    Ian
  • I think java was brought to the table fore a more easy dealer part in finding programmers and to unlock the doors to even more stuff that was already made.

    ?Will having java allow for any sort of web browser to be incorporated in the panel??

    This was my first tooth too, but I guess you cane use the large java library to implement something like a browser (get info from web, parsing then display in text var buttons) plus drive crazy your imagination.


    I hard at CEDA stories like DMS keypads to work faster with java. Was tested by AMX.
  • And I forgot guys NO POINTER IN JAVA but a lot of stuff.
  • jeffacojeffaco Posts: 121
    I'm sort of curious how the object oriented JAVA interface will work with "language" elements of NetLinx.

    For example, we have concepts like PUSH, TO, etc, for device I/R. We have event handlers. Event handlers (depending on type) have PUSH, RELEASE, HOLD (for buttons), STRING, COMMAND, ONLINE, OFFLINE, ERROR (for data events), etc. Java has no notion of an event handler.

    Given the language does have an object interface, I'm sort of guessing that you'll have some sort of object for each device, and you can define subroutines within that object to handle that sort of stuff. Perhaps that, or perhaps have some sort of declaration that executes a subroutine on a particular event.

    I'd like to see the FAQ clearly describe how the current NetLinx-specific language elements translate into JAVA, including things like event handling, device declarations, etc.

    Also, I too am curious if AMX has some sort of upgrade plan planned to upgrade existing ME-260's to the newer ME-260/64's without buying a complete new master.
  • Marji,

    "The ME260/64 is an ME260 with 64MBytes of RAM"

    I see the SD-RAM has been increased from 16MB to 64MB. Is there any way to upgrade existing ME260?
  • jeffacojeffaco Posts: 121
    "The ME260/64 is an ME260 with 64MBytes of RAM"

    Is this an ME260 with a 64MB Compact Flash upgrade?

    It doesn't sound it. RAM != Compact Flash. One is essentially the "disk", the other is what is randomly accessed and changed (main memory).

    Currently, the ME260 has 16MB of RAM (last I checked, anyway). At least that's how it looked to me when booting a ME-260 with a minimal program.
  • More Q&A:

    1) Will having Java allow for any sort of web browser to be incorporated in the panel?

    Duet only implements Java in the NetLinx master firmware - it does not address Java in the touch panel firmware. As the rollout completes on Duet master firmware, we will begin looking at other uses for Java technology.

    2) With the Duet master firmware not being compatible across the existing NetLinx product line, will there be parallel master firmware development for non-Duet masters?

    NetLinx master firmware will be maintained in parallel with Duet master firmware.

    3) Will there be an upgrade path for existing systems besides installing a new Master at full cost?

    There is a PCB-level difference between the ME260 and ME260/64, so they cannot be upgraded.

    4) I heard at Cedia stories like DMS keypads to work faster with Java.

    The DMS and ViewStat NetLinx modules have been re-written as native Duet device modules. When the devices are plugged in, they show up in the online tree and the Duet module is automatically loaded for you. And yes, the modules do execute faster and use less memory.
  • Even more Q&A (you guys are keeping me busy!):

    1) I'm sort of curious how the object-oriented Java interface will work with "language" elements of NetLinx.

    This topic is a whole white paper in itself (which we are working on), but here's the basics: Duet provides multiple APIs to implement Java interfaces to the devices (DVD, CD, HVAC, etc.), ports (serial, IR, Relay, etc), NetLinx language elements (PUSH, PULSE, SEND_COMMAND, etc.) and a Standard NetLinx API (aka SNAPI), which provides the communication mechanism between NetLinx and Java code. The device APIs have been further broken down into components to provide a migration path for composite devices which might have pieces of multiple devices (for example a DSS with built-in TiVo and DVD player/recorder). All of the APIs will be implemented in the Duet SDK (software development kit) distributed with Cafe Duet.
  • Just a JAVA thought:

    Would it now be possible to run JAVA apps on Panels? Such as a JAVA based HTML web page app? Or only on the master?

    Exciting stuff BTW
  • There isn't a JVM on the Modero touch panels, so you can't run Java apps on them. The JVM will reside in Duet firmware on the NetLinx master.
  • Any potentail for JVM's on touchpanels for the future???
  • maxifoxmaxifox Posts: 209
    Could you please provide usage scenarios on integration or communication with mobile phones, PDAs, whatever also run J2ME (if it can be ever done at this stage)?
  • sonnysonny Posts: 208
    Couple of Java questions...

    1...will there be server-side scripting, a la JSP/Servlets, etc., to support read/write of program variables/classes from a client web browser?

    2...will RMI be supported?

    3...will there be a message queue?

    can't wait to inherit!!!!

    Thanks....
  • Sorry I've been absent awhile - getting ready for the dealer seminar tour. Hoping to see you all there. Now back to the Q&A's:

    1) Only AMX-developed modules can be servlets in the first release of Duet. In the future, full servlet capability will be available on a license basis.

    2) RMI is an optional package not currently included in the CDC/Foundation Library from Sun Microsystems that is supported by Duet. AMX is evaluating whether to add this capability to Duet in the future.

    3) J2ME does not natively provide a message queue similar to that available in an RTOS. However, one can be easily implemented using native-Java classes such as vectors or linked lists. Is this something that AMX should provide as a native Duet utility?
  • Regarding the many questions on J2ME:

    Duet uses a Sun-certified J2ME CDC/Foundation profile (CDC = Connected Device Configuration). Due to memory limitations, cell phones use the J2ME CLDC/MIDP profile (CLDC = Connected Limited Device Configuration). To conserve memory, many Java libary classes that are available in CDC are not available in CLDC. CDC is more appropriate for larger embedded devices such as settop boxes, while CLDC is necessary for very small footprint devices such as cell phones. Because of this, Duet is more closely related to a desktop Java than the cell phone Java described in most J2ME books. If you are looking for reference materials to read, AMX recommends that you look for books on J2SE or desktop Java, keeping in mind that not all classes will be available.
  • sonnysonny Posts: 208
    Thanks for the reply...

    This is probably just as much a marketing topic as it is a technical topic, but I think web user interface is a big issue. I guess it wouldn't be difficult in Java to write a mini-web server with cgi-like functionality. Personally, I don't like taking over a panel via the Web Control interface, so I create virtual panels via TP3, but that is still a little hokey since there aren't native form tools. So..the quicker the servlet interface the better.

    3) J2ME does not natively provide a message queue similar to that available in an RTOS. However, one can be easily implemented using native-Java classes such as vectors or linked lists. Is this something that AMX should provide as a native Duet utility?

    As you've stated, building basic queue functionality is pretty straightforward. The nice thing about a message service is multiple subscribers to a queue. For example, I might have 10 modules in a NetLinx program that are "interested" in the state of the alarm system.
  • Well it's not really a message queue, we have implemented "listener" methods in all of the device modules. If you have multiple subsystems that are interested in the alarm status, they each register a function callback using the addSecurityListener method. When the security system changes state, each listener will be called back and they can handle the event in their own way. For example when the fire alarm is triggered, the HVAC system can turn off, the lights can go on and the distributed A/V system can turn off.

    Is that what you were looking for?
  • sonnysonny Posts: 208
    Well it's not really a message queue, we have implemented "listener" methods in all of the device modules. If you have multiple subsystems that are interested in the alarm status, they each register a function callback using the addSecurityListener method. When the security system changes state, each listener will be called back and they can handle the event in their own way. For example when the fire alarm is triggered, the HVAC system can turn off, the lights can go on and the distributed A/V system can turn off.

    Is that what you were looking for?

    Yes...sounds good.
  • And now for the motherload of information...

    Attached is an FAQ with answers to your most burning questions. Of course it will probably spawn more questions, but then that's my life lately...

    BTW, the PDF file had to be zipped so I could upload it to AMX Forums, so just unzip and enjoy!
  • Joe HebertJoe Hebert Posts: 2,159
    Originally posted by Marji Smith
    And now for the motherload of information...

    Attached is an FAQ with answers to your most burning questions. Of course it will probably spawn more questions, but then that's my life lately...

    I've got one. As Clara Peller used to say, "Where's the beef?" :D
  • Let's try this again...
  • Spire_JeffSpire_Jeff Posts: 1,917
    I was under the impression that I could take advantage of modules written in java without having to purchase the Cafe Duet software. I just downloaded the Duet module for the ademco panels and I got a few errors when I tried to compile the included project. I then saw that there is no TKO in the project. My question is: Am I mistaken or do I just need to get a compiled TKO from someone with C.D.?

    Thanks,

    Jeff
  • Using Duet modules from NetLinx

    Hi Jeff,

    You do not have to purchase Cafe Duet to be able to use the Java modules from NetLinx code. There should be a TKO distributed with the Duet module that just contains a 'module stub', filling in the property string array that gets passed to the Duet module. From NetLinx, you just call the DEFINE_MODULE using the module stub. Which Duet module are you trying to use, so I can give you more specifics on how to instaniate it?

    Marji
  • Spire_JeffSpire_Jeff Posts: 1,917
    Hi Jeff,

    Which Duet module are you trying to use, so I can give you more specifics on how to instaniate it?

    Marji

    I am/was trying to use the Ademco VISTA series module. I did get the old netlinx module to work, but I am very interested in try the duet module.

    Thanks,
    Jeff
  • Hi Jeff,

    I forgot that the TKO module stub is actually embedded within the JAR file and not distributed separately. NetLinx Studio extracts the TKO file from the Ademco_Vista_Comm.jar file at compile time. Did you add the Ademco_Vista_Comm.jar file to your NetLinx Studio project under Modules? What compile errors are you getting?

    Marji
  • Spire_JeffSpire_Jeff Posts: 1,917
    Hi Jeff,

    I forgot that the TKO module stub is actually embedded within the JAR file and not distributed separately. NetLinx Studio extracts the TKO file from the Ademco_Vista_Comm.jar file at compile time. Did you add the Ademco_Vista_Comm.jar file to your NetLinx Studio project under Modules? What compile errors are you getting?

    Marji

    I was simply trying to compile the project that was provided. here is the info I am given:
    ---------- Starting NetLinx Compile - Version[2.2.0.112] [10-25-2005 14:38:50] ----------  
    C:\AMX Modules\Ademco\Ademco_Vista_UI.axs  
    ERROR: C:\AMX Modules\Ademco\Ademco_Vista_UI.axs(33)NetLinx Pre-Processor Error: Could not find the include file SNAPI.AXI  
    C:\AMX Modules\Ademco\Ademco_Vista_UI.axs - 1 error(s), 0 warning(s)  
    NetLinx Compile Complete [10-25-2005 14:38:54]  
       
    ----------- Starting NetLinx Compile - Version[2.2.0.112] [10-25-2005 14:38:54] -------------  
    C:\AMX Modules\Ademco\Ademco_Vista_Main.axs  
    ERROR: (0): L20219: File not found: [devicesdkrt.jar] version [1.4.0]  
    ERROR: C:\AMX Modules\Ademco\Ademco_Vista_Main.tko(106): L20206: File [Ademco_Vista_UI.tko] could not be found  
    C:\AMX Modules\Ademco\Ademco_Vista_Main.axs - 2 error(s), 0 warning(s)  
    NetLinx Compile Complete [10-25-2005 14:38:56]  
       
    >>>>--- NetLinx Compiles:  2 Files  3 Total Error(s)  0 Total Warnings(s) ---<<<<  
    

    I am still running v2.3 of studio, could this be causing the problem?

    Jeff
  • Jeff,
    You probably need to update the Cafe Duet runtime - you can do this by running WebUpdate, or installing the just-released NetLinx Studio 2.4.

    If you're using Duet Modules, it's a good idea to check for updates to the runtime periodically with WebUpdate.
  • Jeff,

    You need NetLinxStudio version 2.4 to use Duet modules in NetLinx. Let me know if this works or if you still have problems.

    Marji
Sign In or Register to comment.