37 #ifndef WIN32_LEAN_AND_MEAN 38 #define WIN32_LEAN_AND_MEAN 1 46 #include <sys/socket.h> 47 #include <netinet/in.h> 48 #include <arpa/inet.h> 72 void usage(
const char *programNameP)
74 fprintf(stderr,
"USAGE: %s [<options>]\n", programNameP);
75 fprintf(stderr,
"Where <options> are:\n");
76 fprintf(stderr,
"\t-a <current_address> : CURRENT IPV4 address (default=10.66.171.21)\n");
77 fprintf(stderr,
"\t-d transmit delay in ms\n");
89 std::string currentAddress =
"10.66.171.21";
97 while(-1 != (c =
getopt(argc, argvPP,
"a:d:")))
99 case 'a': currentAddress = std::string(
optarg);
break;
100 case 'd': delay = atoi(
optarg);
break;
101 default:
usage(*argvPP);
break;
108 if (NULL == channelP) {
109 std::cerr <<
"Failed to establish communications with \"" << currentAddress <<
"\"" << std::endl;
125 std::cout <<
"API build date : " << v.
apiBuildDate <<
"\n";
126 std::cout <<
"API version : 0x" << std::hex << std::setw(4) << std::setfill(
'0') << v.
apiVersion <<
"\n";
128 std::cout <<
"Firmware version : 0x" << std::hex << std::setw(4) << std::setfill(
'0') << v.
sensorFirmwareVersion <<
"\n";
131 std::cout <<
"FPGA DNA : 0x" << std::hex << v.
sensorFpgaDna <<
"\n";
132 std::cout << std::dec;
146 TransmitDelay.
delay = delay;
static const char * statusString(Status status)
uint64_t sensorHardwareMagic
static Channel * Create(const std::string &sensorAddress)
int main(int argc, char **argvPP)
std::string sensorFirmwareBuildDate
virtual Status getVersionInfo(system::VersionInfo &v)=0
int getopt(int argc, char **argv, char *opts)
virtual Status getTransmitDelay(image::TransmitDelay &c)=0
static CRL_CONSTEXPR Status Status_Ok
VersionType sensorFirmwareVersion
virtual Status setTransmitDelay(const image::TransmitDelay &c)=0
static void Destroy(Channel *instanceP)
uint64_t sensorHardwareVersion