Home AMX User Forum NetLinx Studio

IPort Programming

I downloaded a IPort Program from www.iportmusic.com for controling the Iport FS-4.
But it can't compile, could anybody know what happen and how to resolve this problem?

Comments

  • It compiles fine for me.

    I extracted al of the zipped files into a fresh folder, launched NetLinx Studio 2.5.0.163, opened the .APW file and clicked on [Build Active System].
  • KimsonKimson Posts: 33
    thanks for your testing.
    I had followed your step to do it again, but it still can't work.

    the error as below:

    Starting NetLinx Compile - Version[2.3.0.0] [03-20-2007 10:27:34]
    C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\iPort_UI.axs
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3528): C10515: Cannot find function definition for [_WC_ENCODE_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3528): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3733): C10515: Cannot find function definition for [_WC_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3733): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3733): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3771): C10515: Cannot find function definition for [_WC_TO_CH_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3771): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3798): C10515: Cannot find function definition for [_CH_TO_WC_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3798): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3798): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3819): C10515: Cannot find function definition for [_WC_FIND_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3819): C10512: Cannot convert type [UNKNOWN UDT] to [INTEGER]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3819): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3865): C10515: Cannot find function definition for [_WC_LEFT_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3865): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3865): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3920): C10515: Cannot find function definition for [_WC_LOWER_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3920): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3920): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3977): C10515: Cannot find function definition for [_WC_MID_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3977): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(3977): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4029): C10515: Cannot find function definition for [_WC_REMOVE_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4029): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4029): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4090): C10515: Cannot find function definition for [_WC_RIGHT_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4090): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4090): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4149): C10515: Cannot find function definition for [_WC_UPPER_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4149): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4149): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4188): C10515: Cannot find function definition for [_WC_COMPARE_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4188): C10512: Cannot convert type [UNKNOWN UDT] to [SINTEGER]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4188): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4235): C10515: Cannot find function definition for [_WC_GET_BUFFER_CHAR_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4235): C10512: Cannot convert type [UNKNOWN UDT] to [WIDECHAR]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4235): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4276): C10515: Cannot find function definition for [_WC_GET_BUFFER_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4276): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4276): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4343): C10515: Cannot find function definition for [_WC_CONCAT_STRING_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4343): C10585: Dimension mismatch: [1] vs. [0]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4343): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4474): C10515: Cannot find function definition for [_WC_FILE_OPEN_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4474): C10512: Cannot convert type [UNKNOWN UDT] to [SLONG]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4474): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4552): C10515: Cannot find function definition for [_WC_FILE_CLOSE_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4552): C10512: Cannot convert type [UNKNOWN UDT] to [SLONG]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4552): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4578): C10515: Cannot find function definition for [_WC_FILE_READ_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4578): C10512: Cannot convert type [UNKNOWN UDT] to [SLONG]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4578): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4717): C10515: Cannot find function definition for [_WC_FILE_READ_LINE_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4717): C10512: Cannot convert type [UNKNOWN UDT] to [SLONG]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4717): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4768): C10515: Cannot find function definition for [_WC_FILE_WRITE_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4768): C10512: Cannot convert type [UNKNOWN UDT] to [SLONG]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4768): C10542: Illegal return statement
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4790): C10515: Cannot find function definition for [_WC_FILE_WRITE_LINE_INT], check case sensitivity
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4790): C10512: Cannot convert type [UNKNOWN UDT] to [SLONG]
    ERROR: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\UnicodeLib.axi(4790): C10542: Illegal return statement
    C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\iPort_UI.axs - 61 error(s), 0 warning(s)
    NetLinx Compile Complete [03-20-2007 10:27:36]

    Starting NetLinx Compile - Version[2.3.0.0] [03-20-2007 10:27:36]
    C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\iPort_Main.axs
    C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\iPort_Main.axs - 0 error(s), 0 warning(s)
    Compiled Code takes 134938 bytes of memory

    Compressing Source Code Files...
    Created SRC file: C:\Documents and Settings\Kimson Yeh\My Documents\AMX\Coding\Iport\iPort_Main.src
    NetLinx Compile Complete [03-20-2007 10:27:37]

    >>>>--- NetLinx Compiles: 2 Files 61 Total Error(s) 0 Total Warnings(s) ---<<<<
  • KimsonKimson Posts: 33
    Here is the tree of workspace
  • UnicodeLib relies on the availability of a bunch of routines called _WC_* which are to be found in the library include NetLinx.axi. My copy is in

    C:\Program Files\Common Files\AMXShare\AXIs

    and that location is set in NS2 in Settings/Preferences/NetLinx
  • KimsonKimson Posts: 33
    UnicodeLib relies on the availability of a bunch of routines called _WC_* which are to be found in the library include NetLinx.axi. My copy is in

    C:\Program Files\Common Files\AMXShare\AXIs

    and that location is set in NS2 in Settings/Preferences/NetLinx

    thanks for your reply!~

    i had checked the UnicodeLib is here. The path of this file is same as your's one.
    but also can't compile.
  • You need NetLinx.axi as well as the UniCode library.
  • KimsonKimson Posts: 33
    You need NetLinx.axi as well as the UniCode library.

    NetLinx.axi also is here.
    Thanks.
  • vincenvincen Posts: 526
    Just a quick note about control of iPort from AMX: use the NetLinx module not the Duet one. The NetLinx module works great with a nice layout and manages well international characters and stuffs like that ;)

    Vince
  • alexanboalexanbo Posts: 282
    I'd second that. I had some problems with the Duet module but the Netlinx one worked a lot better.

    Anyone seen the new RS-232 board for the iPort that lets you control the video side as well as audio?
  • Try looking in NetLinx.axi to see if the _WC_* routines are there.
  • KimsonKimson Posts: 33
    Try looking in NetLinx.axi to see if the _WC_* routines are there.
    Thanks!
    After enable the _WC_* routines in NetLinx.axi, i can compile the program.
  • KimsonKimson Posts: 33
    To All:
    Thanks for your help!
    Now i got another question about the RS-232 command for iPort.
    I don't how is the command and how to make a checksum code.
    Could anyone can give me some advice?
  • Almost all AMX modules offer a PASSTHRU option so if you have the module installed and send it the command string it will add the CRC for you:

    send_command vIportComms, "'PASSTHRU-',commandstring"

    Alternatively, if you read the manual it says

    "2's complement of the sum of all bytes excluding the start character and the checksum"

    here is the relevant code, untested. To be honest I'm not sure about the 2's complement calculation and others may have a neater implementation.
    define_function char iPortChecksum(
      char sArgText[])
    {               
    stack_var integer nMyChecksum
    stack_var char    nMyChar
    stack_var integer nMyPointer
    
    nMyChecksum = 0 (* Habit *)
    
    (* Add all characters excluding the first one *)
    for (nMyPointer = 2; nMyPointer <= length_string(sArgText); nMyPointer++)
      {
      nMyChecksum = nMyChecksum + sArgText[nMyPointer]
      }         
    
    (* Just the low order byte *)
    nMyChar = type_cast(nMyChecksum BAND $FF)
    
    (* Two's complement *)
    nMyChar = type_cast(256 - nMyChar + 1)    
    
    return nMyChar;
    }
    
  • viningvining Posts: 4,368
    vincen wrote:
    Just a quick note about control of iPort from AMX: use the NetLinx module not the Duet one.
    Probably a year ago I talked with someone from tech support you said the Duet Module was buggy and really shouldn't be used and to use the Netlinxs version instead.

    One would think that it would have been fixed by now but then again with all the module they write with bugs in them this one would be of a low priority. But that makes you wonder why they don't just pull it until it's fixed leaving the Netilinxs module as the only choice. Are they sadistic and want us to suffer and waste are time and resources? Hmmm.. makes you wonder!
  • Looking in inConcert I could only find the Duet module with no source code, no documentation of the protocol and no NetLinx module. Is it hidden somewhere?
  • vincenvincen Posts: 526
    Unhappy it's not avalaible through website. Only way is to ask tech support in Dallas. You'll find attached most recent version I have that works pretty nice ;)

    Hope it helps you

    Vince
  • Joe HebertJoe Hebert Posts: 2,159
    Protocol
    no documentation of the protocol and no NetLinx module. Is it hidden somewhere?
    Here?s the published protocol posted at iportmusic.com. It?s a pretty cool device to integrate with. I believe future revs will allow us to grab cover art.

    Have fun! :) I sure did?still am.
  • iPort Support

    With the install of the most recent version of Visual Architect v1.2 came a new Netlinx.axi file. The WC options have been commented out in this version. I have attached the new Netlinx.axi file that has the WC options commented in if needed.

    Version 2.01 of the Netlinx module is on the Inconcert section of the AMX website. I am working to get the readme file before the end of April plus a new version that will support the newer Video supported version of the iPort SW5 and FS5. I have a beta of this version if you need it - it works but we need to improve it before posting it.

    The Duet version will be updated after the API for these type of devices is improved (MAX, Fireball, Request, etc.).

    Here is the Checksum from the iPort COMM file:
    DEFINE_FUNCTION INTEGER Calc_Chksum (char cmd[]) // Calculate Checksum
    {
       stack_var integer i
       stack_Var integer checksum
       
       checksum = 0
       
       // Sum up all the elements of the command
       for (i = 1; i <= length_array(cmd); i++)
       {
           checksum = checksum + cmd[i]
       }
     
       // Subtract 1 from the sum
       checksum--
    
        // Calculate the checksum
       checksum = $FF - checksum 
      
       return checksum
    }
    

    It will be interesting to see the cover art functionality over 232. From what I understand it will only show cover art for the current playing song like the iPod does.
Sign In or Register to comment.