RVP10SRV socket protocol
The socket interface supports the commands in appendix RVP10 programming interface.
All messages going both ways consist at the lowest level of an 8-character decimal ASCII number, followed by a block of data. The decimal number indicates how many bytes follow. Generally, all data transfers are initiated by the host computer by sending a block of data, consisting of a command word followed by the | character, followed by optional data.
It responds to all commands with either an Ack|, indicating acknowledgment that the command was OK, or Nak|, indicating that there was an error. For Nak|, the reply always includes a string indicating what the error was. For Ack, there is optional data following.
On initial socket connection request
DspExport provides a response of either Nak|, indicating the
connection failed and why, or Ack|, followed by some connection information.
TheAck| string is in the form of name/value pairs, for example:
Ack|CanCompress=1,Model=RVP10,Version=10.0
Your program can evaluate, or ignore, these
keywords. CanCompress=1 indicates that the
DspExport computer supports compression. The host computer can then choose
to use compression. When you first connect, you are in the "info only" mode. This means that
the server only responds to INFO and OPEN commands.
DspExport supports the
following commands:
- Read command (READ)
- Write command (WRIT)
- Read Status command (STAT)
- Set Information command (INFO)
- Read data available command (RDAV)
- Open the connection for I/O (OPEN)
| Command | Example |
|---|---|
|
Read (READ) |
Example: READ|100| means: Read 100 bytes from the RVP10. Since the RVP10 interface is a 16-bit word interface, these read sizes should always be even. This command returns a Ack| followed by 100 bytes of binary data, or with a Nak|, meaning there can be no partial reads. |
|
Write (WRIT) |
Example: WRIT|<data>, where <data> is some binary data. This data is written to RVP10. The data size should be even. |
|
Read Status (STAT) |
Example: The command returns
This is equivalent to the |
|
Set Information (INFO) |
Example: INFO|ByteOrder=LittleEndian,WillCompress=1,Version=10.0. This command can be used to inform
RVP10SRV
|
|
Read Data Available (RDAV) |
Example: RDAV|100|2| means read up to 100 bytes of data from the RVP10SRV in individual DMA transfers of 2 bytes each. Before each read, the status is checked to see if there is more data available. If not, the read stops, and the number of bytes read is returned. This is merely a performance enhancing command, since the same feature is available by using the READand STAT commands. |
|
Open the Connection for I and O (OPEN) |
Example: OPEN means: Switch from "open to info only" mode to open for I/O. If the signal processor is in use by
another device, this command returns an error. Multiple clients are allowed to
connect for info only, but only one can do I/O. If you run
There is no reverse command to switch back to open for info only. There is also no such library call in the driver. |
|
Read Zcal Information (RCAL) |
Example: ZCAL means:
Read the This is the structure configured by Zauto and Zcal. The configuration is served to all clients using RVP10. |
|
Reset Kernel FIFOs (RKFF) |
Example: RKFF|2| means: Reset the kernel FIFOs on the RVP10. The argument specifies which direction FIFOs to reset. |
|
Read Setup Information (SETU) |
Example: SETU means:
Read the This is the structure configured in the RVP section of the Setup utility. The configuration is served to all clients using RVP10. |
|
Write Zcal Information (WCAL) |
Example: WCAL|... writes the dsp_refl_cal
structure to RVP10 for saving. |
