Home AMX User Forum NetLinx Studio

Suggestions for future revisions of Studio

16781012

Comments

  • chillchill Posts: 186
    It would indeed be great to have regex parsing; I'd use the hell out of that in find_strings.

    I'd also like to see a few things fixed, that used to work in NS2. All that come to mind right now are
    . broken syntax highlighting, as previously mentioned
    . 'device mapping' now offers me nothing but 'custom'

    I'd also like the 'IR data' tab to a) work as soon as I've added an IR file, instead of only after restarting NS; b) allow me to copy/paste - or export to text some other way - the actual channel numbers. 'Insert IR constants' doesn't cut it.
    .
  • Eclipse IDE...

    There has been suggestion for using a major IDE such as VS, netbeans, xcode and eclipse; well why not completely move to an eclipse based environment, this would be a great leap forward and its partially there already with the duet stuff.

    This would open the doors to easily make addon modules, use repositories, use our own version control mechinisms, etc.
  • When working with array

    When I want to print an arrays values (whether debuging or in production), If i want to see the contents of an array, currently I have to have something like a for loop to print each element; I would like to see the ability to just use the array name, and like in java it prints the entire array within brackets.

    IE.

    instead of
    VOLATILE INTEGER nOutput[MAX_PANELS]
    // ... something filling nOutputs
    INTEGER xi
    
    for( xi = 0; xi < LENGTH_ARRAY(nOutput); xi++)
    			SEND_STRING 0, "'nOutput = ', nOutput[xi]"
    
    // results
    /*
    nOutput = 53
    nOutput = 36
    nOutput = 78
    nOutput = 987
    nOutput = 33
    nOutput = 12
    
    */
    

    this:
    SEND_STRING 0, "'nOutput = ', nOutput'"
    
    // results
    /*
    nOutput = [53,36,78,987,33,12]
    */
    

    simple and clean..currently if I want to see the contents, the above code returns nothing
  • jjamesjjames Posts: 2,908
    currently if I want to see the contents, the above code returns nothing
    You can always use the debugger to see the contents.
  • jjames wrote: »
    You can always use the debugger to see the contents.

    Still learning these tools, thanks jjames, Ill check it out!
  • Joe HebertJoe Hebert Posts: 2,159
    When I want to print an arrays values (whether debuging or in production), If i want to see the contents of an array, currently I have to have something like a for loop to print each element; I would like to see the ability to just use the array name, and like in java it prints the entire array within brackets.

    IE.

    instead of
    VOLATILE INTEGER nOutput[MAX_PANELS]
    // ... something filling nOutputs
    INTEGER xi
    
    for( xi = 0; xi < LENGTH_ARRAY(nOutput); xi++)
    			SEND_STRING 0, "'nOutput = ', nOutput[xi]"
    
    // results
    /*
    nOutput = 53
    nOutput = 36
    nOutput = 78
    nOutput = 987
    nOutput = 33
    nOutput = 12
    
    */
    

    this:
    SEND_STRING 0, "'nOutput = ', nOutput'"
    
    // results
    /*
    nOutput = [53,36,78,987,33,12]
    */
    

    simple and clean..currently if I want to see the contents, the above code returns nothing

    You can print it out.
    DEFINE_DEVICE
    
    dvTP = 10001:1:0
    
    vdvDebug = 33001:1:0
    
    DEFINE_VARIABLE _
    
    VOLATILE INTEGER nOutput[] = {53,36,78,987,33,12}
    
    DEFINE_EVENT
    
    BUTTON_EVENT[dvTP,1] {
    
       PUSH: {
          
          SEND_STRING 0,"'Output = [',nOutput,']'"
          SEND_STRING vdvDebug,"'Output = [',nOutput,']'"
          
       }
    
    }
    
    The output in the Diagnostics window:
    Line      1 (10:35:28)::  Output = [5$N$DB!$0C]
    
    And the output in the Notifications window:
    Line      2 (10:25:28):: String To [33001:1:11]-[Output = [5$N$DB!$0C]]
    

    You can change the preferences for the Diagnostics and Notifications windows to display as all hex values or all decimal values. The default is to print the ASCII characters and print the unprintable characters as hex with a leading $ sign.

    If I want to watch/inspect variables I use the debugger most of the time but that does have some caveats especially when trying to do that with modules that have multiple instances.

    HTH
  • Cool! Thanks Joe!
  • AMXJeffAMXJeff Posts: 450
    Helper Methods

    Here is a link to a tech note that may help you too... It contains info and a debug.axi that includes some debugging helper functions, also some functions that you could use everyday...

    http://www.amx.com/techsupport/techNote.asp?id=461
  • mpullinmpullin Posts: 949
    Just throwin this out there

    What are the chances that anything in the NetLinx language (not the studio, the language itself) will ever be changed?
  • jjamesjjames Posts: 2,908
    Changed how? Syntax? If I had to guess, very unlikely. They'd probably come out with a new language rather than improve upon the existing.

    For example: Axcess to NetLinx.
  • mpullinmpullin Posts: 949
    jjames wrote: »
    Changed how? Syntax? If I had to guess, very unlikely. They'd probably come out with a new language rather than improve upon the existing.

    For example: Axcess to NetLinx.
    I meant like, to incorporate modern code structures such as foreach loops and try-catch blocks that users (e.g. the guy above) might request. I'm just wondering if there is any point to requesting things like these.
  • mpullin wrote: »
    I meant like, to incorporate modern code structures such as foreach loops and try-catch blocks that users (e.g. the guy above) might request. I'm just wondering if there is any point to requesting things like these.

    I would love to know the likelihood as well.. hell, lets tthrow generics on that list too, and direct dynamic memory allocation, amoung others.

    My vote would be completely move to Java and then license that (to keep it still hard to break into). so many doors would open. I know amx hoped duet would take off, well it could be forced to take off. Being that marketing is who makes these decisions, and not engineering where it should be... this is a very logical and smart decision business wise.

    There are ways to keep it exclusive to AMX, and i'm sure they could figure those out.


    Thanks AMXJeff for the technote as well.
  • jjamesjjames Posts: 2,908
    My vote would be completely move to Java and then license that (to keep it still hard to break into). so many doors would open. I know amx hoped duet would take off, well it could be forced to take off. Being that marketing is who makes these decisions, and not engineering where it should be... this is a very logical and smart decision business wise.
    My guess is you've not been in the AMX world very long. From what I understand, the reason why Duet hasn't taken off is because there has been resistance and the cost of a license. If AMX forced everyone to move to Java, they'd probably upset more than please. Then you'd have people who'd argue moving towards .Net (this is what makes C-tron appealing) would be better than Java.

    There's nothing stopping you from writing systems in Duet. Plop down the money and program in Java. ;)
  • jjames wrote: »
    My guess is you've not been in the AMX world very long. From what I understand, the reason why Duet hasn't taken off is because there has been resistance and the cost of a license. If AMX forced everyone to move to Java, they'd probably upset more than please. Then you'd have people who'd argue moving towards .Net (this is what makes C-tron appealing) would be better than Java.

    There's nothing stopping you from writing systems in Duet. Plop down the money and program in Java. ;)

    I do understand this resistence, and I havent even tried duet because of the license, however if it was required, my job would happily pay for it. My reason for saying keep the license, is because netlinx is a hard to learn language (mainly from lack of available public information), but this keeps it an exclusive language. By jumping to a common language that would disrupt many peoples livelihoods, however you keep that licensing cost and maybe other proprietary items, that can keep its exclusiviness, but still open the doors to many new possibilities and keep a more progressive trend. Plus my reason for java is it will be constantly developed, it does have a stable history (and unless oracle does something stupid) a stable future as well.

    I have no compliants if it did go say .net or other directions. Anything that has more resourses and keeps the language moving forward and allows for many more options. I also say java because, they ported it for duet... they are halfway there, now just drop snapi and communciate directly with the hardware in both directions. Think of what doors with open in regards to communicating with davnik java os used in android, serialization would come to a whole new level, and I think could push AMX farther and quicker. No body here could complain that the resources are readily avaialble to learn java or other either; let alone other forums full of support.


    you are correct jjames, I am new to it.. I have only been dealing with netlinx programming for roughly a year. and in the last 6 months close to head over heals into it.
  • jjamesjjames Posts: 2,908
    No body here could complain that the resources are readily avaialble to learn java or other either; let alone other forums full of support.
    I hear what you saying, but that is exactly what training is for. There is plenty of documentation available. A/V programmers are completely different breed, some with years of training and to make a system really whistle, you need quite a bit of experience. The language is just a toolbox, and any programmer (in general) should be able to adapt to whatever toolbox they have.

    My preferred toolbox is .Net, if I was forced to use the Java toolbox, so be it. But again, you'd find a lot of dealers a bit peeved who have spent years, and probably thousands of dollars coming up with a solution in Netlinx and have an AMX programmer and are then faced with having to rewrite their software, and hire either an additional programmer or let go of the one they've had for may years.
  • jjames wrote: »
    I hear what you saying, but that is exactly what training is for. There is plenty of documentation available. A/V programmers are completely different breed, some with years of training and to make a system really whistle, you need quite a bit of experience. The language is just a toolbox, and any programmer (in general) should be able to adapt to whatever toolbox they have.

    My preferred toolbox is .Net, if I was forced to use the Java toolbox, so be it. But again, you'd find a lot of dealers a bit peeved who have spent years, and probably thousands of dollars coming up with a solution in Netlinx and have an AMX programmer and are then faced with having to rewrite their software, and hire either an additional programmer or let go of the one they've had for may years.

    I hear you, all very valid points, but as before with axcess, and making the leap to netlinx there were changes; its an evolution, and at some point i could see them making a change. Memory is already a problem, im not sure if that is OS related or related to netlinx in anyway, but as i mentioned before AMX engineers arent making any of these decisions, marketing is (its no longer a company owned by one guy with his button), so whatever sells is probably where it will go, I figured java, because they pushed duet be it that it never really took off, it is still a feasible direction that is ported for AMX already so it seems logical.

    I would always hate to see someone let go, however being technology experts, we should be staying on top of these enhancements, and obviously there will be netlinx ni masters around for years, I know installs we built and maintain will continue to use the ni masters for years to come.
  • PhreaKPhreaK Posts: 966
    jjames wrote: »
    I hear what you saying, but that is exactly what training is for. There is plenty of documentation available.
    I'd beg to differ. Although java documentation is abundant getting your head around the Duet SDK is not the most pleasant experience. I've just sat the Duet course for a second time (after spending a year or so poking and prodding after round 1) and am only now reaching a point where I feel confident in my understanding of its structure and behavior. Don't get me wrong, the actual training AMX provides is awesome, however when this is a 2 day event that happens every 2 years (at least in Australia) it definitely makes passing that initial barrier somewhat of a challenge.

    In regards to the language evolution I highly doubt that there will too much changing to the semantics and core structure in the foreseeable future. Additions to core libraries yes, but major structural changes no.

    For those who've held off from Duet purely due to the licence cost you get a licence after you sit the course. I'm not sure if this is policy everywhere but it's definitely an appreciated bonus here.

    @rrdbstudios if you're searching for some more functionality from the language pull down a copy of the NetLinx Common Libraries as well. It's a set of portable open source libraries a few of us have worked on to provide some additional functionality (string manipulation, math, array utilities etc) that is common to more mainstream languages.
  • jjamesjjames Posts: 2,908
    PhreaK wrote: »
    Although java documentation is abundant getting your head around the Duet SDK is not the most pleasant experience.
    Agreed on the Duet SDK - the documentation on that is very scarce; I meant the documentation on NetLinx.
  • PhreaK wrote: »
    For those who've held off from Duet purely due to the licence cost you get a licence after you sit the course. I'm not sure if this is policy everywhere but it's definitely an appreciated bonus here.

    I guess I'm going to have to start keeping an eye on the tampa course schedule and head down there next time that course comes to town. Thanks for the heads up on that :)

    -Ryan
  • Ok, so I asked some questions to AMX on this and heres both a quote and a paraphrased response:

    No known updates are coming to netlinx, however lots of ideas have been talked about.

    "It is possible to use an almost 100% Java only solution, with only enough NetLinx code needed to load the Java module."

    You must have Café Duet (to get the device SDK) and create a “utility” module (which does not require SNAPI). Inside that module, you can basically lay the framework and create your entire system solution. Look also at the JavaDocs delivered with Café Duet to see what helper classes AMX has already done (i.e. I know there is a Timer class and a Timeline class that extends Timer so thread management is performed for the timers)..

    AMX has done entire solutions for customers which were complete Java solutions (again with the exception of a NetLinx stub to load the module(s))."

    I guess this is our REAL answer on this... for now atleast.
  • the8thstthe8thst Posts: 470
    Ternary Operation

    How about adding some Ternary Operator (?) short hand to let us save time with some basic if/else type statements?

    Example:
    Tradition Netlinx, C, Java, Javascript:
    if (a > b) {
        result = x;
    }
    else {
        result = y;
    }
    
    Ternary Shorthand:
    result = a > b ? x : y;
    
    result = [comparison] ? [value if true] : [value if false];
    
  • jjamesjjames Posts: 2,908
    1+
    And some more . . .
  • jimmywjimmyw Posts: 112
    the8thst wrote: »
    How about adding some Ternary Operator (?) short hand

    Amen!
    while(!Ternary){
     +1
    }
    
  • jimmyw wrote: »
    Amen!
    while(!Ternary){
     +1
    }
    

    Great job. You just crashed the forums.
  • annuelloannuello Posts: 294
    Great job. You just crashed the forums.

    Here is a temporary fix:
    define_variable
    volatile slong ternaryVotes
    volatile char  bHaveTernary
    volatile char  bMaxVotesReached
    
    define_program
    while(!bHaveTernary && !bMaxVotesReached){
     if((ternaryVotes + 1) < ternaryVotes){  //check for potential roll-around.
      bMaxVotesReached = true
      send_string 0,'Reached maximum votes for the ternary operator'
     }
     else{
      ternaryVotes = ternaryVotes + 1
     }
    }
    
  • IC-STL-JBIC-STL-JB Posts: 21
    I would like to see the ability to control a device & do send_commands to IP devices. Other software can do this; I can't see any reason why Netlinx Studio cannot.
  • Thomas HayesThomas Hayes Posts: 1,164
    Im running into more and more times that I can only load code to a master after hours. I'd like to be able to leave studio open and program a timer to load the code to the selected rooms.
  • Im running into more and more times that I can only load code to a master after hours. I'd like to be able to leave studio open and program a timer to load the code to the selected rooms.

    I don't see that happening soon. But if it's a must, you can use TPCon.exe in a batch file in conjunction with the Task Scheduler (or whatever it is called in W7)
  • IC-STL-JB wrote: »
    I would like to see the ability to control a device & do send_commands to IP devices.
    What do you mean "control a device"? And what SEND_COMMANDS do you want to send?
  • But if it's a must, you can use TPCon.exe in a batch file in conjunction with the Task Scheduler (or whatever it is called in W7)

    Did you mean FTCon.exe? If so, I was gonna suggest the same thing. Check out the help file for FileTransfer 2, or just run FTCon with no parameters to see the console help. I've tried it out in the past and, though it certainly does take a little prep, it's definitely a great way to handle loading a system on your terms. Be careful though, you can't run more than one instance of FileTransfer at a time.

    Actually, you can't run FileTransfer with ANY other window open called "FileTransfer 2". So you can't have the help file for FileTrasfer 2 open while you're trying to run FTCon. Certainly makes referencing the help file rather difficult...

    In any case, be careful with starting too many transfers at once. It will queue up multiple transfers, but it likes to crash/freeze at the drop of a hat.
Sign In or Register to comment.