User Tools

Site Tools


jvs:fscan:manual:chapter2:connect

This is an old revision of the document!


\fScan Reference Manual, Chapter 2 (CmdLineOptions): connect

Connect -- Open a network or external communication port connection

usage:

-connect mode name [flag] hostport timeout
-connect READ name [flag] storevarb [maxchars timeout]
-connect WRITE name [flag] data [nchars]
-connect QUERY name querystr [flag] replydata [timeout maxchars]
-connect CLOSE name
-connect POLL name
-connect NOPOLL name

MODE:

  • SOCKET - network port (default mode)
  • SERVER - network connection for fScan image server/client
  • CLIENT - network connection for fScan image server/client
  • DBAX - network connection to DBAX database server
  • COM - serial port

FLAG:

  • Opening
    • 1 - open for reading
    • 2 - open for writing
    • 4 - listening port; wait for client to connect
  • Writing
    • 0 - default
    • 1,2 - write data variable DATA
  • Reading
  • 1 - expect single return value
  • 2 - expect table (list) to br read

Note: fScan server connects with flag=7; fScan client with flag=3.

If you attempt to WRITE or QUERY a connection, that has not yet been opened, CONNECT will look for the HOSTPORT specification in a user variable called “connect_CNXNNAME” (where CNXNNAME is the name of the connection). If found, CONNECT will attempt an auto-connection to that network location before attempting the WRITE/QUERY. This is equivalent to inserting the command:

   -connect name $connect_name

To use this feature the default HOSTPORT should be predefined, as in the CONFIG file.

See Also:
fScan Home, fScan Manual, CmdLineOptions, Manual Help

jvs/fscan/manual/chapter2/connect.1327078500.txt.gz · Last modified: 2014/08/04 16:03 (external edit)