Difference between revisions of "TCP/IP client"

From SmartSDR Wiki
Jump to: navigation, search
Line 24: Line 24:
 
Response Example:
 
Response Example:
 
<pre>R44|0||OK</pre>
 
<pre>R44|0||OK</pre>
 +
 +
=== GUI ===
 +
Registers your program as the sole GUI to the radio.  This means that all displays (panadapter, waterfall, etc.) will be sent to this client.
 +
<pre>
 +
C[D]<seq_number>|client gui
 +
</pre>
 +
Example:
 +
<pre>C42|client gui</pre>
 +
 +
See [[SmartSDR TCP/IP API#Response Format|Response Format]] for details on the format of the response messages from the radio
 +
 +
{| class="wikitable" style="text-align:center"
 +
|+Responses
 +
|-
 +
! Hex Response !! Message !! Debug Output / Meaning
 +
|-
 +
! 00000000
 +
| &nbsp; || align="left" | OK
 +
|-
 +
|-
 +
|}
 +
 +
Response Example:
 +
<pre>R42|0||OK</pre>
  
 
=== PROGRAM ===
 
=== PROGRAM ===

Revision as of 08:11, 2 December 2016

DISCONNECT

Disconnects a client that is currently connected to the radio

C[D]<seq_number>|client disconnect <handle>

<handle>       =  an optional client handle (32-bit hex value sent to client on connection)

Example:

C44|client disconnect

Issuing the disconnect without a handle will disconnect all GUI clients currently connected to the radio. If a handle is specified, only the client with that handle is disconnected. When specifying a handle, either a GUI or non-GUI client may be disconnected.

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 OK

Response Example:

R44|0||OK

GUI

Registers your program as the sole GUI to the radio. This means that all displays (panadapter, waterfall, etc.) will be sent to this client.

C[D]<seq_number>|client gui

Example:

C42|client gui

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000   OK

Response Example:

R42|0||OK

PROGRAM

Registers the name of the client program connected to the radio. Not yet implemented; do not use.

C[D]<seq_number>|client program <name>

<name>         = An alpha-numeric name for your program (no spaces)

Example:

C42|client program MyProgram

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000   OK
10000002   unknown client program
F3000001   Too many clients connected to the radio

The "unknown client program" response is not an error -- it simply means that SmartSDR has not heard of this client. In general, we ask that clients identify with their program name so that when we are debugging issues, we can see other programs connected and what is issuing commands as this can help with debugging. All messages starting with a "1" are strictly informational.

Response Example:

R42|0||OK

START_PERSISTENCE

Loads data for this client from the persistence database. This restores the client to the last state prior to the previous shutdown

C[D]<seq_number>|client start_persistence <value>

<value>       =  a 1 or 0 to indicate if we persistence should be started

Example:

C44|client start_persistence 1

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 OK

Response Example:

R44|0||OK

UDPPORT

Provides the radio with the UDP port that should be used on the client to receive streaming VITA-49 UDP data

C[D]<seq_number>|client udpport <port>

<port>  =  The 16-bit UDP/IP port number on the client computer

Example:

C43|client udpport 4993

Note: this port must be free, meaning not in use by any other running application.

See Response Format for details on the format of the response messages from the radio

Responses
Hex Response Message Debug Output / Meaning
00000000 OK Successfully registered port number

Response Example:

R43|0||OK