DOC-USR-0272-01
FSDI-1XA User’s Guide
77
(7)
APPENDIX C: Example Camera Controller Application
If you do not have camera control software it is quite straight-forward to write your own. Below is a simple
example application on how to send VISCA commands from a Windows PC to the FSDI-1XA.
The following example code connects to the TCP socket of the unit and is capable of sending several VISCA
commands to the unit. The interface looks like the following:
The example application code is as follows:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <fcntl.h>
#include <time.h>
#include <sys/types.h>
#include<winsock2.h>
#include <conio.h>
#define FALSE 0
#define TRUE 1
int status;
void usage()
{
printf("Usage: z3visca cameraip port\n");
}
void help()
{
printf("The Following key combinations are supported:\n");
printf("\tI:\t Zoom In\n\tO:\t Zoom Out\n\tSpace:\t Stop Zoom\n\tV:\t Prints version inquiry\n\tF:\t Sets picture to
fliped\n\tN:\t Sets picture to normal.\n\tH:\t Prints this message\n\tX:\t Exits\n");
}
void hex_dump(void *hex, int size)
{
int i;
char *hex_c = (char *)hex;
Figure 80 Running the Example Application