Home AMX User Forum Duet/Cafe Duet

Control IP device

How I write module for IP device with duet , server or clilent?
Have I to use java.net packages or Duet already have packeges
for IP NetLinx programming?
Thank you.


  • You don't really need Duet to control devices over IP, you may do it using standart Netlinx. It is in manuals - as usual.
  • Chip MoodyChip Moody Posts: 727
    Ditto. Unless there's some benefit you'd get from writing the code in Java, just do it from NetLinx...

    - Chip
  • SlavikSlavik Posts: 18
    It is only for learning.
  • SlavikSlavik Posts: 18
    No answer for this question
  • DHawthorneDHawthorne Posts: 4,584
    I don't think many are using Duet just yet. I can fight my way out of a wet paper bag in java, and I am sure I can learn what is needed to make Duet work for me, but I haven't had a compelling reason to switch over. The NetLinx language is sufficient for what I am doing, and I have a fair number of templates, modules and libraries I am in no great rush to convert over. So my Duet knowledge remains marginal, and will continue to remain that way until there is a clear and strong incentive for me to make the switch.
  • maxifoxmaxifox Posts: 209

    Foundation profile (both JSRs) has .net package. Version 1.1 (JSR 219) has even Secure Sockets support. As to specific AMX network packages you better ask AMX support. In any case may I ask you to post us with your findings - the issue sounds interesting?
  • SlavikSlavik Posts: 18
    AMX have their own class SocketConnection.class. They used it in AMX MAX duet module. They not included this class in any package. Also they not give example, how to program IP device, IP events.
  • SlavikSlavik Posts: 18
    IP control

    Hello All,
    I tried to write classes for IP device control and it works. Please find this classes in the attachment below.
    During of programming I encountered with couple of problems.
    1. The method getDPS of class netlinx device not working at all.This method is needed for binding local device of NetLinx with specific socket and event on socket.
    2. The package sun.io not working either . This package help to convert char to byte and visa . I handle data stream as chars, sometime I need to handle data as bytes.
    3. I handle data in fixed array and I wish to handle data with dynamic array size.
    Who have suggestions for improving or changing this classes ,please advice.
  • maxifoxmaxifox Posts: 209

    I doubt they included sun.io, can you try java.io instead?
  • SlavikSlavik Posts: 18
    Anyone using Duet?
    if (true)
Sign In or Register to comment.