SourceForge has been redesigned. Learn more.
Close

OPENGTS & Tramigo T22 GPS

Help
jackyfox
2013-03-27
2013-06-12
  • jackyfox

    jackyfox - 2013-03-27

    Hi

    does anyone experience with tramigo t22 GPS?

    i found that the packet should be wait until end of "EOF" string (because sometime separate to 2 packet)

    is it need to set packetLenEndOfStream to true at dcservers.xml???

    and this part write like this??

    public int getActualPacketLength(byte packet, int packetLen)
        {
    if ((packetLen > 0) ) {
    return ServerSocketThread.PACKET_LEN_END_OF_STREAM;
    } else {
    return ServerSocketThread.PACKET_LEN_LINE_TERMINATOR;
    }
    }

    but how to set/assign ASCII_LINE_TERMINATOR with "EOF"
    after i compile
      /usr/local/OpenGTS_2.4.7/src/org/opengts/servers/tramigo/Constants.java:69: incompatible types
         found   : java.lang.String
         required: int
             public static final int     ASCII_LINE_TERMINATOR = new int{'\r','\n','#',"EOF"};
                                                                                                                                             ^
         1 error

    any suggestion???

    Thanks!!!!

     
  • tea4two

    tea4two - 2013-03-27

    I don't know the T22 GPS, but the first thing is to understand if the protocol use ASCII format or BINARY.

    The EOF string not seems to me an ASCII char, so the reason of compile error could be this.
    BTW,  in the code you use double quote instead the single, like used in the other array elements.

    Regards,
    - Pierluigi

     

Log in to post a comment.