--------------------------------------------------------------------------------
                                  WRC client
--------------------------------------------------------------------------------

Reference client implementation to control WiRC devices, written in C.

Building instructions:
======================

The application can be compiled for UNIX/Linux systems with GCC compiler, 
using the standard software development tools: GNU make and gcc.

To show the camera image SDL (Simple DirectMedia Layer) library is required
with development files:
    * libsdl1.2
    * libsdl1.2-image
If you do not have installed SDL library please comment-out the SDL related 
lines in the Makfile, to compile the wrc_client without SDL library.

To compile WRC client run:
    make 

The compiled command line application can be started by:
    ./wrc_client

Usage:
======

wrc_client is a command line application, after starting it has command prompt ('>').

Command line arguments: 
wrc_client [IP_address [log_file]]
    both arguments are optional
    IP_address: in dot separated format (ie: 192.168.1.2)
        connect to the specified address directly (without discovery)
    log_file: path of a file where the periodic messages are logged
        PCD and PSD messages are logged to this file

Available commands can be listed by help commmand.

Example usage scenario:

./wrc_client 
WRC client, version: 0.1
       0     0.00003 >>> BCSD [0x00] [0.1]
       1     0.00005 >>> AA BB 01 03 00 00 01 21 AC
       2     0.00418 <<< AA BB 02 4B 01 04 01 03 44 65 6E 73 69 6F 6E 20 57 69 52 43 00 44 45 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 50 FD 9F BD 02 00 00 00 09 00 00 75 6E 6B 6E 6F 77 6E F5 2E
       3     0.00419 <<< BCSA [1.4] [1.3] [Dension WiRC] [unknown]
INF main.c:1465 WRC: Dension WiRC - 192.168.1.1
> describe
describe [WRC_index]
[Idx]	WRC Name  -  Serial
---------------------------
[0]	Dension WiRC - unknown
> describe 0
WRC Dension WiRC:
IP: 192.168.1.1
Serial: unknown
HW: 1.4
SW: 1.3
> connect 0
INF main.c:602 start of PSD receiver thread
INF main.c:530 start of tcp receiver thread
       4     8.91196 >>> TL [0x00] [0.1] [0x00] [wrc_client (PC)] [54720]
       5     8.91199 >>> AA BB 11 46 00 00 01 00 77 72 63 5F 63 6C 69 65 6E 74 20 28 50 43 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D5 C0 66 B9
       6     8.91202 >>> CCFG [1770] [1770] [1770] [1770] [1770] [1770] [1770] [1770] [1770] [1770] [1770] [1770]
       7     8.91203 >>> AA BB 13 18 17 70 17 70 17 70 17 70 17 70 17 70 17 70 17 70 17 70 17 70 17 70 17 70 DA C3
       8     8.91204 >>> FCFG [05DC] [05DC] [05DC] [05DC] [05DC] [05DC] [05DC] [05DC] [05DC] [05DC] [05DC] [05DC]
       9     8.91205 >>> AA BB 14 18 05 DC 05 DC 05 DC 05 DC 05 DC 05 DC 05 DC 05 DC 05 DC 05 DC 05 DC 05 DC B7 7D
      10     8.94510 <<< AA BB 1A 04 02 01 D7 CD 4B 89
      11     8.94511 <<< WST [2] [1] [55245]
      12     8.94864 <<< AA BB 36 43 02 00 77 72 63 5F 63 6C 69 65 6E 74 20 28 50 43 29 00 BF BD E4 79 0A 40 70 62 0B 40 00 00 00 00 00 00 00 00 70 62 0B 40 20 F9 BF BD 18 2B 02 00 00 60 0B 40 00 00 00 00 44 45 4B 89 E4 79 0A 40 02 00 00 96 D3
      13     8.94865 <<< AGR [2] [0x00] [wrc_client (PC)] [0x00]
INF main.c:642 start of PCD transmitter thread
> camera 0 start
INF main.c:2148 start of Camera receiver thread
      14    17.99972 >>> STST [0] [58996]
      15    17.99973 >>> AA BB 41 03 00 E6 74 A4 E2
> ERR cam_camera.c:168 frame number error: 3 expected: 0

> channel 1 1200
> quit

Information:
============

For more information about the WiRC product visit the official web site:
    http://wirc.dension.com

Email:
    wirc@dension.com

