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-f fps\n");
90 std::string currentAddress =
"10.66.171.21";
98 while(-1 != (c =
getopt(argc, argvPP,
"a:f:")))
100 case 'a': currentAddress = std::string(
optarg);
break;
101 case 'f': fps = atof(
optarg);
break;
102 default:
usage(*argvPP);
break;
109 if (NULL == channelP) {
110 std::cerr <<
"Failed to establish communications with \"" << currentAddress <<
"\"" << std::endl;
126 std::cout <<
"API build date : " << v.
apiBuildDate <<
"\n";
127 std::cout <<
"API version : 0x" << std::hex << std::setw(4) << std::setfill(
'0') << v.
apiVersion <<
"\n";
129 std::cout <<
"Firmware version : 0x" << std::hex << std::setw(4) << std::setfill(
'0') << v.
sensorFirmwareVersion <<
"\n";
132 std::cout <<
"FPGA DNA : 0x" << std::hex << v.
sensorFpgaDna <<
"\n";
133 std::cout << std::dec;
static const char * statusString(Status status)
uint64_t sensorHardwareMagic
static Channel * Create(const std::string &sensorAddress)
std::string sensorFirmwareBuildDate
virtual Status getVersionInfo(system::VersionInfo &v)=0
int main(int argc, char **argvPP)
int getopt(int argc, char **argv, char *opts)
static CRL_CONSTEXPR Status Status_Ok
virtual Status setImageConfig(const image::Config &c)=0
VersionType sensorFirmwareVersion
static void Destroy(Channel *instanceP)
uint64_t sensorHardwareVersion
virtual Status getImageConfig(image::Config &c)=0