Results 1 to 6 of 6

Thread: Gip

  1. #1

    Default Gip

    I am converting my Girder 5 project.
    It's avaiable the GIP plugin?
    Where can I find the Girder 6 Manual?

    Thanks in advance

    Sandro

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    The GIP plugin was replaced by the transport plugin. You can find the documentation plus an example under "Scripting -> Transport"
    Ron
    No support through PM

  3. #3

    Default

    Could you help me on transform this Girder 5 process to Girder 6?

    c = gip.Open('127.0.0.1',222)
    c:Callback(2, '|', 1000, mycb2)
    c:Write('startup')

    Thanks in advance

    Sandro

  4. #4
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    Give this a try.

    Code:
    connection = transport.new( Promixis.Transport.Connection.Type.CON_TCP, '127.0.0.1', 222, function( event, reason ) 
    
      print("Connected")
      -- we are connected, send the command.
       
      local tx = connection:newTransaction( nil, nil, nil)
      tx:data("startup")
      connection:send(tx)      
      
    end)
    
    
    -- set the parser you might need to change this to match your actual partser.
    connection:parser( Promixis.Transport.IParser.Type.PARSER_TERMINATED, "|" )
    
    
    -- setup a persistent listener. You might consider taking the transaction approach instead of parsing
    -- all incoming data here.
    listen = connection:newTransaction( nil, function(data) 
        -- deal with incoming data here.
        print(data)
        return Promixis.Transport.ITransactionCallback.Results.TX_KEEP
    end, nil)
    listen:persistent(true)
    connection:send(listen)
    
    
    -- connect now...
    connection:connect()
    Ron
    No support through PM

  5. #5

    Default

    Work very well.
    Thank you so much.

    P.s. You agree that with GIP was more simple :-)

  6. #6
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    :-) Well gip has a different model of operation. The transport classes are designed for a transaction based approach. Doing that with GIP is more work. So it really depends on what you are trying to do. With a few convenience lua functions you can make it look like gip.
    Ron
    No support through PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •