NOOP

From ICE Enterprises
Jump to navigation Jump to search

copies an input to an output (File,Socket,HTTP, UDP)

<IN>  - Input file or pipe name
<OUT> - Output file or pipe name

NOOP moves data from one Midas file/stream to another.  A stream may consist
of a file, Socket (STP), UDP packets, HTTP

NOOP can be used to improve efficiency by buffering data from a file into
a pipe that may have multiple readers, or writing to a file whose source
may have small natural transfer lengths.

The /RT or /THROTTLE= switch can be applied to simulate a throttled data source.
In FULL mode, the primitive runs as fast as it can.  In REALTIME mode the data
is throttled to be processed at the rate defined in the input file header.
In the BLOCK mode, no data is processed.  The timing source is the CPU.

The /PACKET=name switch will strip the packet headers from the input file
into the named file.  The output file will contain just the raw data.

The /GPW switch invokes a Graphical Progress Widget with RUN, PAUSE, and EXIT
buttons to control or abort a file-to-file transfer.

The /RATEWINDOW=T switch specifies the time window T (in seconds) over which
the rate control is applied.  The minimum value is 10 milliseconds and the
default is 1.0 seconds.  This switch is only meaningful when the /RT switch
has been specified, which activates the transfer throttling.  The throttle
rate will be the rate in the header unless another value was specified via the
/RATE switch.  Note that a very short rate window may result in an actual
transfer rate that is less than the specified rate.

NOOP can reformat data as follows:
  nM> waveform temp
  nM> noop temp tempsd{format=sd}
This converts the SF format file temp to the SD format file tempsd.

Examples:

  1. Make a local copy of a file
    nM> noop localfile localfilecopy

  2. Copy a file to a socket
    nM> noop filetocopy stp://localhost:9999

  3. Copy the socket stream above into a file
    nM> noop stp://localhost:9999 filecopy

  4. Copy a file using the named port to a remote UDP port
    nM> noop filetocopy udp://7001/remotehost:9001

  5. Copy data from the named UDP port into a file
    nM> noop udp://9001 localfile

  6. Copy a file from a webserver at a specified peak transfer rate
    nM> noop/rt/rate=1M http://computer:port/Files/Aux/file2xfer.tmp localfile

  7. Using RMIF as the transfer mechanism, copy a file from a remote server
    nM> noop mftp://computer:port/world.prm localworld
    NOTE: This will only work with RMIF running on <computer:port>

  8. Copy file from webserver using a proxy host and port.
    nM> noop http://webserver/file.prm{PROXYHOST=proxyhost,PROXYPORT=80} tempxxx

Messages:
  Receive:
    PROGRESS - Handle a progress message to change state with
               DATA=RESUME,PAUSE,EXIT
  Send: NONE

Switches:
  /GPW          - Show Graphical Progress Widget of transfer status (usually
                  used when downloading a file from a server) [DEF=not present]
  /PACKET=name  - Strip packet headers into the named file [DEF=not present]
  /RATE=N       - Throttle transfer to N bytes/sec [DEF=as fast as possible]
  /RATEWINDOW=T - Specifies the time window T (in seconds) over which
                  the rate control is applied (requires /RT switch) [DEF=1]
  /RT           - Use CPU clock to release data at the input file's rate.
                  [DEF=FALSE]
  /SIZE=n       - Size in logical elements of output file. [DEF=input size,
                  unless /WRAP]
  /START=off    - Start offset in logical elements of input file [DEF=0]
  /THROTTLE=<mode>  - Data Throttle Mode (RealTime|Full|Block). Overrides /RT.
  /TL           - Number of elements (not bytes) to transfer in each process loop
                  [DEF=number of elements in 32768 bytes, rounded down]
  /WRAP         - Automatic continuous reread at the end of input file