Go to the documentation of this file.
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>
62 #include <MultiSense/MultiSenseChannel.hh>
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 address : MultiSense IP Address (default=10.66.171.21)\n");
77 fprintf(stderr,
"\t-h height : Imager width, in px (default=544)\n");
78 fprintf(stderr,
"\t-w width : Imager height, in px (default=1024)\n");
90 std::string currentAddress =
"10.66.171.21";
92 uint32_t width = 1024;
99 while(-1 != (c =
getopt(argc, argvPP,
"a:h:w:")))
101 case 'a': currentAddress = std::string(
optarg);
break;
102 case 'h': height = atoi(
optarg);
break;
103 case 'w': width = atoi(
optarg);
break;
104 default:
usage(*argvPP);
break;
111 if (NULL == channelP) {
112 std::cerr <<
"Failed to establish communications with \"" << currentAddress <<
"\"" << std::endl;
128 std::cout <<
"API build date : " << v.
apiBuildDate <<
"\n";
129 std::cout <<
"API version : 0x" << std::hex << std::setw(4) << std::setfill(
'0') << v.
apiVersion <<
"\n";
131 std::cout <<
"Firmware version : 0x" << std::hex << std::setw(4) << std::setfill(
'0') << v.
sensorFirmwareVersion <<
"\n";
134 std::cout <<
"FPGA DNA : 0x" << std::hex << v.
sensorFpgaDna <<
"\n";
135 std::cout << std::dec;
std::string sensorFirmwareBuildDate
static CRL_CONSTEXPR Status Status_Ok
uint64_t sensorHardwareVersion
int main(int argc, char **argvPP)
int getopt(int argc, char **argv, char *opts)
static void Destroy(Channel *instanceP)
uint64_t sensorHardwareMagic
static const char * statusString(Status status)
static Channel * Create(const std::string &sensorAddress)
VersionType sensorFirmwareVersion
virtual Status getImageConfig(image::Config &c)=0
virtual Status getVersionInfo(system::VersionInfo &v)=0
void setResolution(uint32_t w, uint32_t h)
virtual Status setImageConfig(const image::Config &c)=0