add flycapture
This commit is contained in:
180
Lib/FlyCapture2/src/SerialPortEx/PGRIcon.h
Normal file
180
Lib/FlyCapture2/src/SerialPortEx/PGRIcon.h
Normal file
@@ -0,0 +1,180 @@
|
||||
/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */
|
||||
|
||||
#ifdef __SUNPRO_C
|
||||
#pragma align 4 (PGRIcon)
|
||||
#endif
|
||||
#ifdef __GNUC__
|
||||
static const guint8 PGRIcon[] __attribute__ ((__aligned__ (4))) =
|
||||
#else
|
||||
static const guint8 PGRIcon[] =
|
||||
#endif
|
||||
{ ""
|
||||
/* Pixbuf magic (0x47646b50) */
|
||||
"GdkP"
|
||||
/* length: header (24) + pixel_data (3124) */
|
||||
"\0\0\14L"
|
||||
/* pixdata_type (0x2010002) */
|
||||
"\2\1\0\2"
|
||||
/* rowstride (128) */
|
||||
"\0\0\0\200"
|
||||
/* width (32) */
|
||||
"\0\0\0\40"
|
||||
/* height (32) */
|
||||
"\0\0\0\40"
|
||||
/* pixel_data: */
|
||||
"\214\375\276\17\377\10\374\275\17\377\372\275\20\377\377\312\10\377w"
|
||||
"oH\377w\220\300\377\377\377\377\377\373\374\375\377\376\377\377\377\214"
|
||||
"\377\377\377\377\213\375\276\17\377\12\374\276\17\377\372\275\20\377"
|
||||
"\377\307\7\377\213}I\377\10""4\212\377\10""0|\377\213\236\302\377\377"
|
||||
"\377\377\377\373\374\375\377\376\377\377\377\213\377\377\377\377\212"
|
||||
"\375\276\17\377\14\374\276\17\377\372\275\20\377\377\307\7\377\210{J"
|
||||
"\377\2""0\214\377\26;\203\377\26<\203\377\2+z\377\210\234\301\377\377"
|
||||
"\377\377\377\373\374\375\377\376\377\377\377\212\377\377\377\377\211"
|
||||
"\375\276\17\377\16\374\276\17\377\372\275\20\377\377\307\7\377\210|J"
|
||||
"\377\3""1\213\377\27;\202\377\25:\203\377\25;\203\377\27<\204\377\3,"
|
||||
"z\377\211\234\301\377\377\377\377\377\373\374\375\377\376\377\377\377"
|
||||
"\211\377\377\377\377\210\375\276\17\377\7\374\276\17\377\372\275\20\377"
|
||||
"\377\307\7\377\210|J\377\3""1\213\377\27;\202\377\25:\203\377\202\24"
|
||||
":\203\377\7\25;\203\377\27<\204\377\3,z\377\211\234\301\377\377\377\377"
|
||||
"\377\373\374\375\377\376\377\377\377\210\377\377\377\377\207\375\276"
|
||||
"\17\377\7\374\276\17\377\372\275\20\377\377\307\7\377\210|J\377\3""1"
|
||||
"\213\377\27;\202\377\25:\203\377\204\24:\203\377\7\25;\203\377\27<\204"
|
||||
"\377\3,z\377\211\234\301\377\377\377\377\377\373\374\375\377\376\377"
|
||||
"\377\377\207\377\377\377\377\206\375\276\17\377\11\374\276\17\377\372"
|
||||
"\275\20\377\377\307\7\377\210|J\377\3""1\213\377\27;\202\377\25:\203"
|
||||
"\377\24:\203\377\25;\203\377\202\26;\204\377\202\24:\203\377\7\25;\203"
|
||||
"\377\27<\204\377\3,z\377\211\234\301\377\377\377\377\377\373\374\375"
|
||||
"\377\376\377\377\377\206\377\377\377\377\205\375\276\17\377\12\374\276"
|
||||
"\17\377\372\275\20\377\377\307\7\377\210|J\377\3""1\213\377\27;\202\377"
|
||||
"\25:\203\377\24:\203\377\25;\204\377\24:\203\377\202\14""3\177\377\12"
|
||||
"\25;\204\377\25:\203\377\24:\203\377\25;\203\377\27<\204\377\3,z\377"
|
||||
"\211\234\301\377\377\377\377\377\373\374\375\377\376\377\377\377\205"
|
||||
"\377\377\377\377\204\375\276\17\377\30\374\276\17\377\372\275\20\377"
|
||||
"\377\307\7\377\210|J\377\3""1\213\377\27;\202\377\25:\203\377\24:\203"
|
||||
"\377\25;\204\377\25:\203\377\5-|\377\240\257\315\377\211\234\301\377"
|
||||
"\0*y\377\27<\204\377\25;\203\377\24:\203\377\25;\203\377\27<\204\377"
|
||||
"\3,z\377\211\234\301\377\377\377\377\377\373\374\375\377\376\377\377"
|
||||
"\377\204\377\377\377\377\203\375\276\17\377\14\374\276\17\377\372\275"
|
||||
"\20\377\377\307\7\377\210|J\377\3""1\213\377\27;\202\377\25:\203\377"
|
||||
"\24:\203\377\26;\204\377\24:\203\377\7/}\377\233\254\313\377\202\377"
|
||||
"\377\377\377\14\203\227\276\377\3+z\377\27<\204\377\25;\203\377\24:\203"
|
||||
"\377\25;\203\377\27<\204\377\3,z\377\211\234\301\377\377\377\377\377"
|
||||
"\373\374\375\377\376\377\377\377\203\377\377\377\377\202\375\276\17\377"
|
||||
"\34\374\276\17\377\372\275\20\377\377\307\7\377\210|J\377\3""1\213\377"
|
||||
"\27;\202\377\25:\203\377\24:\203\377\26;\204\377\24:\203\377\10""0}\377"
|
||||
"\236\256\314\377\377\377\377\377\372\373\375\377\373\374\375\377\377"
|
||||
"\377\377\377\206\231\277\377\3,z\377\27<\204\377\25;\203\377\24:\203"
|
||||
"\377\25;\203\377\27<\204\377\3,z\377\211\234\301\377\377\377\377\377"
|
||||
"\373\374\375\377\376\377\377\377\202\377\377\377\377\17\375\276\17\377"
|
||||
"\374\276\17\377\372\275\20\377\377\307\7\377\210|J\377\3""1\213\377\27"
|
||||
";\202\377\25:\203\377\24:\203\377\25;\204\377\21""8\202\377\10""0~\377"
|
||||
"\241\260\315\377\377\377\377\377\373\374\375\377\202\374\375\376\377"
|
||||
"&\374\374\375\377\377\377\377\377\211\234\300\377\3,z\377\24:\203\377"
|
||||
"\25;\203\377\24:\203\377\25;\203\377\27<\204\377\3,z\377\211\234\301"
|
||||
"\377\377\377\377\377\373\374\375\377\376\377\377\377\377\377\377\377"
|
||||
"\374\275\17\377\372\275\20\377\377\307\7\377\210|J\377\3""1\213\377\27"
|
||||
";\202\377\25:\203\377\24:\203\377\25:\203\377\24:\203\377\24:\204\377"
|
||||
"\242\261\316\377\377\377\377\377\373\374\375\377\375\375\376\377\377"
|
||||
"\377\377\377\376\377\377\377\374\375\376\377\374\374\375\377\377\377"
|
||||
"\377\377\212\235\301\377\17""6\201\377\25;\204\377\202\24:\203\377\15"
|
||||
"\25;\203\377\27<\204\377\3,z\377\211\234\301\377\377\377\377\377\373"
|
||||
"\374\375\377\376\377\377\377\372\275\20\377\377\307\7\377\210{J\377\3"
|
||||
"1\213\377\27;\202\377\25:\203\377\202\24:\203\377\12\27=\205\377\6/|"
|
||||
"\377i\201\260\377\377\377\377\377\371\372\374\377\373\374\375\377\377"
|
||||
"\377\377\377\260\275\325\377\277\311\335\377\377\377\377\377\202\372"
|
||||
"\373\375\377\4\377\377\377\377Ol\243\377\11""1}\377\27<\204\377\202\24"
|
||||
":\203\377\13\25;\203\377\27<\204\377\3,z\377\210\234\301\377\377\377"
|
||||
"\377\377\373\374\375\377\377\311\6\377\213}I\377\2""0\214\377\27;\202"
|
||||
"\377\25:\203\377\204\24:\203\377\3\25:\203\377\22""8\203\377\234\253"
|
||||
"\313\377\202\377\377\377\377\4\263\277\327\377\12""2\177\377\30=\206"
|
||||
"\377\310\321\342\377\202\377\377\377\377\3\204\230\276\377\16""5\200"
|
||||
"\377\25;\204\377\204\24:\203\377\11\25;\203\377\27<\204\377\2+z\377\213"
|
||||
"\236\302\377\377\377\377\377wqO\377\10""3\211\377\26;\202\377\25:\203"
|
||||
"\377\205\24:\203\377\14\25;\203\377\22""8\202\377\7/}\377\232\252\312"
|
||||
"\377\254\272\323\377\15""4\200\377\24:\203\377\20""7\201\377\27=\206"
|
||||
"\377\276\311\335\377\202\226\275\377\3,z\377\207\24:\203\377\10\25;\203"
|
||||
"\377\26<\204\377\10""0}\377w\216\270\377w\201\213\377\10""2\202\377\26"
|
||||
";\203\377\25;\203\377\206\24:\203\377\14\30>\205\377\0(x\377n\206\263"
|
||||
"\377\201\226\275\377\0(x\377\31\77\206\377\27=\205\377\2+z\377\225\246"
|
||||
"\307\377Wr\246\377\1*y\377\30>\205\377\206\24:\203\377\11\25;\203\377"
|
||||
"\26<\204\377\10""0}\377w\215\270\377\377\353\206\377\213\215\205\377"
|
||||
"\2-\203\377\27<\203\377\25;\203\377\204\24:\203\377\3\27<\204\377\5-"
|
||||
"{\377i\202\260\377\202\377\377\377\377\11\201\226\275\377\2+z\377\10"
|
||||
"0}\377\232\252\312\377\377\377\377\377\367\370\372\377Rn\244\377\6.|"
|
||||
"\377\27<\205\377\204\24:\203\377\13\25;\203\377\27<\204\377\2+z\377\213"
|
||||
"\236\302\377\377\377\377\377\373\334\207\377\377\351\207\377\210\213"
|
||||
"\205\377\3.\203\377\26<\203\377\25;\203\377\202\24:\203\377\13\27<\204"
|
||||
"\377\10""0}\377az\253\377\377\377\377\377\373\373\375\377\374\374\375"
|
||||
"\377\377\377\377\377~\222\273\377\222\244\306\377\377\377\377\377\372"
|
||||
"\373\375\377\202\375\375\376\377\3Hf\237\377\12""2~\377\26<\204\377\202"
|
||||
"\24:\203\3775\25;\203\377\27<\204\377\3,z\377\210\234\300\377\377\377"
|
||||
"\377\377\373\374\375\377\375\335\207\377\373\334\207\377\377\352\207"
|
||||
"\377\211\214\205\377\3.\203\377\26<\203\377\25;\203\377\24:\203\377\25"
|
||||
";\204\377\20""6\201\377.P\221\377\321\330\346\377\377\377\377\377\373"
|
||||
"\374\375\377\375\375\376\377\376\377\377\377\376\376\377\377\375\375"
|
||||
"\376\377\373\374\375\377\377\377\377\377\275\310\334\377\"E\213\377\22"
|
||||
"8\202\377\25;\203\377\24:\203\377\25;\203\377\27<\204\377\3,z\377\211"
|
||||
"\234\301\377\377\377\377\377\373\374\375\377\376\377\377\377\376\336"
|
||||
"\207\377\375\335\207\377\373\334\207\377\377\352\207\377\211\214\205"
|
||||
"\377\3.\203\377\26<\203\377\25;\203\377\24:\203\377\26<\204\377\11""1"
|
||||
"~\377\35B\210\377\316\326\345\377\377\377\377\377\373\373\375\377\202"
|
||||
"\375\375\376\377\17\373\373\375\377\377\377\377\377\271\305\332\377\20"
|
||||
"7\202\377\15""4\200\377\26<\204\377\24:\203\377\25;\203\377\27<\204\377"
|
||||
"\3,z\377\211\234\301\377\377\377\377\377\373\374\375\377\376\377\377"
|
||||
"\377\377\377\377\377\202\376\336\207\377\15\375\335\207\377\373\334\207"
|
||||
"\377\377\352\207\377\211\214\205\377\3.\203\377\26<\203\377\25;\203\377"
|
||||
"\23:\203\377\27=\205\377\15""4\200\377\34A\210\377\314\324\344\377\377"
|
||||
"\377\377\377\202\373\374\375\377\15\377\377\377\377\266\302\331\377\20"
|
||||
"6\202\377\21""7\201\377\27<\204\377\24:\203\377\25;\203\377\27<\204\377"
|
||||
"\3,z\377\211\234\301\377\377\377\377\377\373\374\375\377\376\377\377"
|
||||
"\377\202\377\377\377\377\203\376\336\207\377\14\375\335\207\377\373\334"
|
||||
"\207\377\377\352\207\377\211\214\205\377\3.\203\377\26<\203\377\25;\203"
|
||||
"\377\23:\203\377\27=\205\377\15""5\200\377\32\77\207\377\312\322\343"
|
||||
"\377\202\377\377\377\377\14\264\300\327\377\17""6\201\377\21""8\202\377"
|
||||
"\26<\204\377\24:\203\377\25;\203\377\26<\204\377\3,z\377\211\234\301"
|
||||
"\377\377\377\377\377\373\374\375\377\376\376\377\377\203\377\377\377"
|
||||
"\377\204\376\336\207\377\34\375\335\207\377\373\334\207\377\377\352\207"
|
||||
"\377\211\214\205\377\3.\203\377\26<\203\377\25;\203\377\23:\203\377\27"
|
||||
"=\205\377\16""5\200\377\27<\206\377\320\330\346\377\271\304\332\377\14"
|
||||
"3\200\377\22""8\202\377\26<\204\377\24:\203\377\25;\203\377\27<\204\377"
|
||||
"\2+z\377\210\234\300\377\377\377\377\377\373\374\375\377\375\375\376"
|
||||
"\377\376\376\376\377\377\377\377\377\376\376\377\377\376\376\376\377"
|
||||
"\205\376\336\207\377\25\375\335\207\377\373\334\207\377\377\352\207\377"
|
||||
"\211\214\205\377\3.\203\377\26<\203\377\25;\203\377\23:\203\377\27<\204"
|
||||
"\377\16""5\200\377\34A\210\377\30=\206\377\20""6\201\377\26<\204\377"
|
||||
"\24:\203\377\25;\203\377\27<\204\377\3,z\377\215\237\303\377\377\377"
|
||||
"\377\377\375\376\376\377\202\376\376\376\377\204\377\377\377\377\206"
|
||||
"\376\336\207\377\32\375\335\207\377\373\334\207\377\377\352\207\377\211"
|
||||
"\214\205\377\3.\203\377\26<\203\377\25;\203\377\24:\203\377\26<\204\377"
|
||||
"\22""8\202\377\23""9\203\377\25;\204\377\24:\203\377\25;\203\377\27<"
|
||||
"\204\377\1*y\377\224\245\307\377\231\251\311\377,N\221\3772S\224\377"
|
||||
"Uq\246\377\311\322\342\377\77^\232\3773T\224\377<\\\231\377\305\317\340"
|
||||
"\377\207\376\336\207\377\10\375\335\207\377\373\334\207\377\377\352\207"
|
||||
"\377\211\214\205\377\3.\203\377\26<\203\377\25;\203\377\24:\203\377\202"
|
||||
"\25;\203\377\17\24:\203\377\25;\203\377\27<\204\377\3,z\377\210\233\300"
|
||||
"\377\377\377\377\3775V\226\377\210\233\300\377\323\332\350\377\326\334"
|
||||
"\351\377h\201\260\377Hf\237\377\333\341\354\377#F\214\377\225\246\307"
|
||||
"\377\210\376\336\207\377\7\375\335\207\377\373\334\207\377\377\352\207"
|
||||
"\377\211\214\205\377\3.\203\377\26<\203\377\25;\203\377\202\24:\203\377"
|
||||
"\17\25;\203\377\27<\204\377\3,z\377\210\233\300\377\377\377\377\377\357"
|
||||
"\362\366\377%H\214\377Wr\247\377}\222\273\377\371\372\374\377If\237\377"
|
||||
"\226\247\310\377\377\377\377\377\344\351\360\377\364\366\370\377\211"
|
||||
"\376\336\207\377\13\375\335\207\377\373\334\207\377\377\352\207\377\211"
|
||||
"\214\205\377\3.\203\377\27<\203\377\25:\203\377\25;\203\377\27<\204\377"
|
||||
"\3,z\377\211\234\301\377\202\377\377\377\377\12\323\332\347\377#G\214"
|
||||
"\377x\216\270\377\203\226\276\377\353\356\364\3772S\224\377\312\322\343"
|
||||
"\377\377\377\377\377\325\333\350\377\375\375\376\377\212\376\336\207"
|
||||
"\377\16\375\335\207\377\373\334\207\377\377\352\207\377\210\214\205\377"
|
||||
"\2-\203\377\26<\203\377\26<\204\377\2+z\377\210\234\301\377\377\377\377"
|
||||
"\377\370\371\373\377\377\377\377\377\240\257\315\3771R\223\377\202\377"
|
||||
"\377\377\377\6\334\342\354\377\20""6\202\377\253\271\322\377y\217\270"
|
||||
"\377.N\221\377\377\377\377\377\213\376\336\207\377\25\375\335\207\377"
|
||||
"\373\334\207\377\377\351\207\377\213\216\205\377\10""2\203\377\10""0"
|
||||
"}\377\213\236\302\377\377\377\377\377\373\374\375\377\374\374\375\377"
|
||||
"\377\377\377\377\237\256\314\377\201\225\275\377\377\377\377\377\374"
|
||||
"\374\375\377\363\365\370\377c|\255\377=\\\231\377<[\231\377\262\277\326"
|
||||
"\377\377\377\377\377\214\376\336\207\377\10\375\335\207\377\373\334\207"
|
||||
"\377\377\354\210\377w~\200\377x\217\274\377\377\377\377\377\373\374\375"
|
||||
"\377\376\377\377\377\214\377\377\377\377"};
|
||||
|
||||
|
||||
21
Lib/FlyCapture2/src/SerialPortEx/Precompiled.cpp
Normal file
21
Lib/FlyCapture2/src/SerialPortEx/Precompiled.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
//=============================================================================
|
||||
// Copyright © 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
|
||||
//
|
||||
// This software is the confidential and proprietary information of FLIR
|
||||
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
|
||||
// shall not disclose such Confidential Information and shall use it only in
|
||||
// accordance with the terms of the license agreement you entered into
|
||||
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
|
||||
//
|
||||
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
// THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
// $Id: Precompiled.cpp,v 1.1 2009-03-25 22:38:50 soowei Exp $
|
||||
//=============================================================================
|
||||
|
||||
#include "Precompiled.h"
|
||||
39
Lib/FlyCapture2/src/SerialPortEx/Precompiled.h
Normal file
39
Lib/FlyCapture2/src/SerialPortEx/Precompiled.h
Normal file
@@ -0,0 +1,39 @@
|
||||
//=============================================================================
|
||||
// Copyright © 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
|
||||
//
|
||||
// This software is the confidential and proprietary information of FLIR
|
||||
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
|
||||
// shall not disclose such Confidential Information and shall use it only in
|
||||
// accordance with the terms of the license agreement you entered into
|
||||
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
|
||||
//
|
||||
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
// THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
// $Id: Precompiled.h,v 1.3 2009-07-20 19:03:20 soowei Exp $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef PRECOMPILED_H
|
||||
#define PRECOMPILED_H
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#pragma warning( push, 0 )
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <libglademm/xml.h>
|
||||
#include <giomm.h>
|
||||
#include <glibmm.h>
|
||||
#include "PGRIcon.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
570
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx.glade
Normal file
570
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx.glade
Normal file
@@ -0,0 +1,570 @@
|
||||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<!-- interface-requires gtk+ 2.16 -->
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<widget class="GtkWindow" id="window">
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkMenuBar" id="menubar">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="menuitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_File</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenu" id="menu1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="menu_quit">
|
||||
<property name="label">gtk-quit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="menuitem4">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenu" id="menu3">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="menu_about">
|
||||
<property name="label">gtk-about</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="bottom_padding">6</property>
|
||||
<property name="left_padding">6</property>
|
||||
<property name="right_padding">6</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label15">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes"><b>Camera Information</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment5">
|
||||
<property name="visible">True</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="bottom_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">12</property>
|
||||
<child>
|
||||
<widget class="GtkTable" id="table2">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">4</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelInterface">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">00000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelSensor">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">00000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelModel">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">00000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelSerialNumber">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">00000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label19">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Interface:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label18">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Sensor:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label17">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Model:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label16">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Serial number:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes"><b>Connection Parameters</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="bottom_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">12</property>
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">5</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelBufferSize">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelStopBits">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelCharacterLength">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelParity">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="labelBaudRate">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">000000</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Buffer size:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Stop bits:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Character length:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Parity:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Baud rate:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label12">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes"><b>Transmit data</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment3">
|
||||
<property name="visible">True</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="bottom_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">12</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label14">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Enter data to be transmitted:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEntry" id="entryTransmit">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox2">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="buttonTransmit">
|
||||
<property name="label" translatable="yes">Transmit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label13">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes"><b>Receive data</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment4">
|
||||
<property name="visible">True</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="bottom_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">12</property>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="height_request">300</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">automatic</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
<child>
|
||||
<widget class="GtkTextView" id="textviewReceiveData">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="pixels_above_lines">3</property>
|
||||
<property name="pixels_below_lines">3</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="wrap_mode">word</property>
|
||||
<property name="left_margin">3</property>
|
||||
<property name="right_margin">3</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="buttonQuit">
|
||||
<property name="label" translatable="yes">gtk-quit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
110
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx.rc
Normal file
110
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx.rc
Normal file
@@ -0,0 +1,110 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (United States) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON1 ICON "res\\FlyCap2.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,12,3,2
|
||||
PRODUCTVERSION 2,12,3,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "FLIR Integrated Imaging Solutions, Inc."
|
||||
VALUE "FileDescription", "Serial port example"
|
||||
VALUE "FileVersion", "2, 12, 3, 2"
|
||||
VALUE "InternalName", "SerialPo.exe"
|
||||
VALUE "LegalCopyright", "© FLIR Integrated Imaging Solutions, Inc. All Rights Reserved."
|
||||
VALUE "OriginalFilename", "SerialPo.exe"
|
||||
VALUE "ProductName", "FlyCapture2 SDK"
|
||||
VALUE "ProductVersion", "2, 12, 3, 2"
|
||||
VALUE "AssemblyInformationalVersion", "2, 12, 3, 201801090091"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
26
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx_2010.sln
Normal file
26
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx_2010.sln
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SerialPortEx", "SerialPortEx_2010.vcxproj", "{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Debug|x64.Build.0 = Debug|x64
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Release|Win32.Build.0 = Release|Win32
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Release|x64.ActiveCfg = Release|x64
|
||||
{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
232
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx_2010.vcxproj
Normal file
232
Lib/FlyCapture2/src/SerialPortEx/SerialPortEx_2010.vcxproj
Normal file
@@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{55D6964A-9E2B-4FAF-BF3D-BD1CFEBB9038}</ProjectGuid>
|
||||
<RootNamespace>SerialPortEx</RootNamespace>
|
||||
<ProjectName>SerialPortEx</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2.props" />
|
||||
<Import Project="..\vsprops\VS10\gtkmm-vc100-2_4.props" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2 GUI.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\vsprops\VS10\gtkmm-vc100-d-2_4.props" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2 GUI Debug.props" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2 Debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2 (x64).props" />
|
||||
<Import Project="..\vsprops\VS10\gtkmm-vc100-x64-2_4.props" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2 GUI (x64).props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\vsprops\VS10\gtkmm-vc100-x64-d-2_4.props" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2 GUI Debug (x64).props" />
|
||||
<Import Project="..\vsprops\VS10\FlyCapture2 Debug (x64).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)d</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)d</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)</TargetName>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Precompiled.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4250;4512;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>gthread-2.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "SerialPortEx.glade" "..\..\bin"
|
||||
copy /y "..\FlyCapture2GUI_GTKmm\FlyCapture2GUI_GTK.glade" ".\"
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Precompiled.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4250;4512;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>gthread-2.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "SerialPortEx.glade" "..\..\bin64"
|
||||
copy /y "..\FlyCapture2GUI_GTKmm\FlyCapture2GUI_GTK.glade" ".\"
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Precompiled.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4250;4512;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>gthread-2.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "SerialPortEx.glade" "..\..\bin"
|
||||
copy /y "..\FlyCapture2GUI_GTKmm\FlyCapture2GUI_GTK.glade" ".\"
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>Precompiled.h</PrecompiledHeaderFile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4250;4512;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>gthread-2.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy /y "SerialPortEx.glade" "..\..\bin64"
|
||||
copy /y "..\FlyCapture2GUI_GTKmm\FlyCapture2GUI_GTK.glade" ".\"
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="Precompiled.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SerialPortWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="PGRIcon.h" />
|
||||
<ClInclude Include="Precompiled.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="SerialPortWindow.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\FlyCap2.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="SerialPortEx.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
819
Lib/FlyCapture2/src/SerialPortEx/SerialPortWindow.cpp
Normal file
819
Lib/FlyCapture2/src/SerialPortEx/SerialPortWindow.cpp
Normal file
@@ -0,0 +1,819 @@
|
||||
//=============================================================================
|
||||
// Copyright © 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
|
||||
//
|
||||
// This software is the confidential and proprietary information of FLIR
|
||||
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
|
||||
// shall not disclose such Confidential Information and shall use it only in
|
||||
// accordance with the terms of the license agreement you entered into
|
||||
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
|
||||
//
|
||||
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
// THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
// $Id: SerialPortWindow.cpp,v 1.14 2011-06-01 12:46:20 antonr Exp $
|
||||
//=============================================================================
|
||||
|
||||
#include "Precompiled.h"
|
||||
#include "SerialPortWindow.h"
|
||||
#include <string.h>
|
||||
|
||||
SerialPortWindow::SerialPortWindow()
|
||||
{
|
||||
m_run = false;
|
||||
}
|
||||
|
||||
SerialPortWindow::~SerialPortWindow()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
SerialPortWindow::Initialize()
|
||||
{
|
||||
// Load Glade file
|
||||
|
||||
const char* k_flycap2Glade = "SerialPortEx.glade";
|
||||
|
||||
#ifdef GLIBMM_EXCEPTIONS_ENABLED
|
||||
try
|
||||
{
|
||||
m_refXml = Gnome::Glade::Xml::create(k_flycap2Glade);
|
||||
}
|
||||
catch(const Gnome::Glade::XmlError& ex)
|
||||
{
|
||||
char szSecondary[512];
|
||||
sprintf(
|
||||
szSecondary,
|
||||
"Error: %s. Make sure that the file is present.",
|
||||
ex.what().c_str() );
|
||||
|
||||
Gtk::MessageDialog dialog( "Error loading Glade file", false, Gtk::MESSAGE_ERROR );
|
||||
dialog.set_secondary_text( szSecondary );
|
||||
dialog.run();
|
||||
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
std::auto_ptr<Gnome::Glade::XmlError> error;
|
||||
m_refXml = Gnome::Glade::Xml::create(k_flycap2Glade, "", "", error);
|
||||
if(error.get())
|
||||
{
|
||||
char szSecondary[512];
|
||||
sprintf(
|
||||
szSecondary,
|
||||
"Error: %s. Make sure that the file is present.",
|
||||
ex.what().c_str() );
|
||||
|
||||
Gtk::MessageDialog dialog( "Error loading Glade file", false, Gtk::MESSAGE_ERROR );
|
||||
dialog.set_secondary_text( szSecondary );
|
||||
dialog.run();
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
m_refXml->get_widget( "window", m_pWindow );
|
||||
if ( m_pWindow == NULL )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
GetWidgets();
|
||||
AttachSignals();
|
||||
|
||||
LoadIcon();
|
||||
|
||||
m_pWindow->set_default_icon( m_iconPixBuf );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
SerialPortWindow::GetWidgets()
|
||||
{
|
||||
m_refXml->get_widget( "menu_quit", m_pMenuQuit );
|
||||
m_refXml->get_widget( "menu_about", m_pMenuAbout );
|
||||
|
||||
m_refXml->get_widget( "labelSerialNumber", m_pLabelSerialNumber );
|
||||
m_refXml->get_widget( "labelModel", m_pLabelModel );
|
||||
m_refXml->get_widget( "labelSensor", m_pLabelSensor );
|
||||
m_refXml->get_widget( "labelInterface", m_pLabelInterface );
|
||||
m_refXml->get_widget( "labelBaudRate", m_pLabelBaudRate );
|
||||
m_refXml->get_widget( "labelParity", m_pLabelParity );
|
||||
m_refXml->get_widget( "labelCharacterLength", m_pLabelCharacterLength );
|
||||
m_refXml->get_widget( "labelStopBits", m_pLabelStopBits );
|
||||
m_refXml->get_widget( "labelBufferSize", m_pLabelBufferSize );
|
||||
|
||||
m_refXml->get_widget( "entryTransmit", m_pEntryTransmit );
|
||||
m_refXml->get_widget( "buttonTransmit", m_pButtonTransmit );
|
||||
|
||||
m_refXml->get_widget( "textviewReceiveData", m_pTextViewReceiveData );
|
||||
m_pTextViewReceiveData->modify_font( Pango::FontDescription("monospace") );
|
||||
|
||||
m_refXml->get_widget( "buttonQuit", m_pButtonQuit );
|
||||
|
||||
m_refTextBuffer = Gtk::TextBuffer::create();
|
||||
}
|
||||
|
||||
void
|
||||
SerialPortWindow::AttachSignals()
|
||||
{
|
||||
m_pMenuQuit->signal_activate().connect(sigc::mem_fun( *this, &SerialPortWindow::OnMenuQuit ));
|
||||
m_pMenuAbout->signal_activate().connect(sigc::mem_fun( *this, &SerialPortWindow::OnMenuAbout ));
|
||||
|
||||
m_pWindow->signal_delete_event().connect(
|
||||
sigc::mem_fun( *this, &SerialPortWindow::OnDestroy ));
|
||||
|
||||
m_pButtonTransmit->signal_clicked().connect(
|
||||
sigc::mem_fun( *this, &SerialPortWindow::OnTransmit ));
|
||||
|
||||
m_pButtonQuit->signal_clicked().connect(
|
||||
sigc::mem_fun( *this, &SerialPortWindow::OnQuit ));
|
||||
|
||||
Glib::signal_timeout().connect(
|
||||
sigc::mem_fun(*this, &SerialPortWindow::OnTimer),
|
||||
sk_timeout );
|
||||
}
|
||||
|
||||
bool SerialPortWindow::Run( PGRGuid guid )
|
||||
{
|
||||
Error error;
|
||||
error = m_camera.Connect( &guid );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
// Error
|
||||
return false;
|
||||
}
|
||||
|
||||
PopulateCameraInfo();
|
||||
PopulateConnectionParameters();
|
||||
|
||||
LaunchReceiveLoop();
|
||||
|
||||
Gtk::Main* pKit = NULL;
|
||||
pKit = Gtk::Main::instance();
|
||||
pKit->run( *m_pWindow );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
SerialPortWindow::Cleanup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void SerialPortWindow::LoadIcon()
|
||||
{
|
||||
m_iconPixBuf = Gdk::Pixbuf::create_from_inline( sizeof(PGRIcon), PGRIcon, false );
|
||||
}
|
||||
|
||||
void SerialPortWindow::PopulateCameraInfo()
|
||||
{
|
||||
Error error;
|
||||
CameraInfo camInfo;
|
||||
error = m_camera.GetCameraInfo( &camInfo );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
// Error
|
||||
return;
|
||||
}
|
||||
|
||||
char serial[32];
|
||||
sprintf( serial, "%u", camInfo.serialNumber );
|
||||
m_pLabelSerialNumber->set_text( serial );
|
||||
|
||||
m_pLabelModel->set_text( camInfo.modelName );
|
||||
|
||||
m_pLabelSensor->set_text( camInfo.sensorInfo );
|
||||
|
||||
switch (camInfo.interfaceType)
|
||||
{
|
||||
case INTERFACE_IEEE1394:
|
||||
m_pLabelInterface->set_text( "IEEE-1394" );
|
||||
break;
|
||||
|
||||
case INTERFACE_USB2:
|
||||
m_pLabelInterface->set_text( "USB 2.0" );
|
||||
break;
|
||||
|
||||
case INTERFACE_GIGE:
|
||||
m_pLabelInterface->set_text( "GigE" );
|
||||
break;
|
||||
|
||||
case INTERFACE_USB3:
|
||||
m_pLabelInterface->set_text( "USB 3.0" );
|
||||
break;
|
||||
|
||||
default:
|
||||
m_pLabelInterface->set_text( "Unknown" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SerialPortWindow::PopulateConnectionParameters()
|
||||
{
|
||||
Error error;
|
||||
|
||||
// get base address for base registers
|
||||
|
||||
unsigned int uiSIOinq;
|
||||
m_camera.ReadRegister( 0x488, &uiSIOinq );
|
||||
|
||||
baseAddress = 4 * uiSIOinq;
|
||||
for ( int i = 0; i < 32; i+=4 )
|
||||
|
||||
// mask first 12 bits for inquiry registers
|
||||
|
||||
baseAddress &= 0x000FFFFF;
|
||||
|
||||
unsigned int serialModeRegVal = 0;
|
||||
error = m_camera.ReadRegister( baseAddress, &serialModeRegVal );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
// Error
|
||||
return;
|
||||
}
|
||||
|
||||
char caption[64];
|
||||
|
||||
sprintf( caption, "%ubps", GetBaudRate( serialModeRegVal ) );
|
||||
m_pLabelBaudRate->set_text( caption );
|
||||
|
||||
sprintf( caption, "%u", GetCharacterLength( serialModeRegVal ) );
|
||||
m_pLabelCharacterLength->set_text( caption );
|
||||
|
||||
switch ( GetParity( serialModeRegVal ) )
|
||||
{
|
||||
case 0: strcpy( caption, "None" ); break;
|
||||
case 1: strcpy( caption, "Odd" ); break;
|
||||
case 2: strcpy( caption, "Even" ); break;
|
||||
default: strcpy( caption, "Unknown" ); break;
|
||||
}
|
||||
m_pLabelParity->set_text( caption );
|
||||
|
||||
sprintf( caption, "%.1f", GetStopBit( serialModeRegVal ) );
|
||||
m_pLabelStopBits->set_text( caption );
|
||||
|
||||
sprintf( caption, "%u", GetBufferSize( serialModeRegVal ) );
|
||||
m_pLabelBufferSize->set_text( caption );
|
||||
}
|
||||
|
||||
void SerialPortWindow::LaunchReceiveLoop()
|
||||
{
|
||||
m_run = true;
|
||||
|
||||
m_pReceiveLoop = Glib::Thread::create(
|
||||
sigc::bind<SerialPortWindow*>(
|
||||
sigc::mem_fun(*this, &SerialPortWindow::ReceiveLoop), this ),
|
||||
true );
|
||||
}
|
||||
|
||||
void SerialPortWindow::ReceiveLoop( SerialPortWindow* pWindow )
|
||||
{
|
||||
if ( pWindow == NULL )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PushMessage( "Entering receive loop\n" );
|
||||
|
||||
while ( m_run )
|
||||
{
|
||||
Glib::usleep( 100000 );
|
||||
|
||||
//PushMessage( "Test\n" );
|
||||
|
||||
Error error;
|
||||
std::bitset<32> serialCtlBS;
|
||||
|
||||
// Verify that receive is enabled
|
||||
serialCtlBS = GetSerialControlBS();
|
||||
if ( serialCtlBS[31] != true )
|
||||
{
|
||||
serialCtlBS[31] = true;
|
||||
|
||||
if ( SetSerialControlBS( serialCtlBS ) != true )
|
||||
{
|
||||
PushMessage( "Error enabling receive\n" );
|
||||
continue;
|
||||
}
|
||||
|
||||
PushMessage( "Receive is enabled\n" );
|
||||
}
|
||||
|
||||
// Check for errors
|
||||
if ( serialCtlBS[19] == true )
|
||||
{
|
||||
// Buffer overrun error
|
||||
PushMessage( "Buffer overrun error\n" );
|
||||
}
|
||||
|
||||
if ( serialCtlBS[18] == true )
|
||||
{
|
||||
// Data framing error
|
||||
PushMessage( "Data framing error\n" );
|
||||
}
|
||||
|
||||
if ( serialCtlBS[17] == true )
|
||||
{
|
||||
// Data parity error
|
||||
PushMessage( "Data parity error\n" );
|
||||
}
|
||||
|
||||
// Clear the error bits
|
||||
serialCtlBS[17] = false;
|
||||
serialCtlBS[18] = false;
|
||||
serialCtlBS[19] = false;
|
||||
if ( SetSerialControlBS( serialCtlBS ) != true )
|
||||
{
|
||||
PushMessage( "Error clearing error bits\n" );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Verify that the receive buffer is ready to be read
|
||||
serialCtlBS = GetSerialControlBS();
|
||||
if ( serialCtlBS[23] != true )
|
||||
{
|
||||
// Buffer not ready to be read
|
||||
continue;
|
||||
}
|
||||
|
||||
// Determine amount of data to be read
|
||||
const unsigned int k_receiveBufferStatus = baseAddress + 0x8;
|
||||
unsigned int receiveBufferStatusVal = 0;
|
||||
error = m_camera.ReadRegister( k_receiveBufferStatus, &receiveBufferStatusVal );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
PushMessage( "Error reading receive buffer status\n" );
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned int bytesAvailable = receiveBufferStatusVal >> 24;
|
||||
|
||||
if ( bytesAvailable == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
char receiveStr[256];
|
||||
sprintf( receiveStr, "%u bytes available to read\n", bytesAvailable );
|
||||
//PushMessage( receiveStr );
|
||||
|
||||
// Send characters to register
|
||||
error = m_camera.WriteRegister(
|
||||
k_receiveBufferStatus,
|
||||
bytesAvailable << 16 );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
PushMessage( "Error writing receive buffer register\n" );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Make sure the value written to the camera matches what is
|
||||
// currently in the camera
|
||||
unsigned int newReceiveBufferStatusVal = 0;
|
||||
error = m_camera.ReadRegister( k_receiveBufferStatus, &newReceiveBufferStatusVal );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
PushMessage( "Error reading receive buffer status\n" );
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned int originalVal = (receiveBufferStatusVal >> 8) & 0x00FF0000;
|
||||
unsigned int newVal = newReceiveBufferStatusVal & 0x00FF0000;
|
||||
|
||||
if ( originalVal != newVal )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Read the data
|
||||
unsigned int bytesToRead = receiveBufferStatusVal >> 24;
|
||||
if ( bytesToRead <= 4 )
|
||||
{
|
||||
// Under 1 quadlet, perform regular register read
|
||||
|
||||
const unsigned int k_sioDataReg = baseAddress + 0x100;
|
||||
unsigned int sioDataVal = 0;
|
||||
error = m_camera.ReadRegister( k_sioDataReg, &sioDataVal );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
PushMessage( "Error reading SIO data\n" );
|
||||
continue;
|
||||
}
|
||||
|
||||
char szBuffer[64];
|
||||
sprintf(
|
||||
szBuffer,
|
||||
"Data (%u byte%s): %c%c%c%c\n",
|
||||
bytesToRead,
|
||||
bytesToRead == 1 ? "" : "s",
|
||||
static_cast<char>((sioDataVal >> 24) & 0xFF),
|
||||
bytesToRead > 1 ? static_cast<char>((sioDataVal >> 16) & 0xFF) : 32,
|
||||
bytesToRead > 2 ? static_cast<char>((sioDataVal >> 8) & 0xFF) : 32,
|
||||
bytesToRead > 3 ? static_cast<char>((sioDataVal >> 0) & 0xFF) : 32 );
|
||||
|
||||
PushMessage( szBuffer );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Above 1 quadlet, perform block read
|
||||
|
||||
const unsigned int k_sioDataBlockReg = baseAddress + 0xF0F00104;
|
||||
char szBlock[1024];
|
||||
error = m_camera.ReadRegisterBlock(
|
||||
0xFFFF,
|
||||
k_sioDataBlockReg,
|
||||
(unsigned int*)(&szBlock[0]),
|
||||
static_cast<unsigned int>(ceil(bytesToRead/4.0)) );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
PushMessage( "Error block reading SIO data\n" );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Put an string terminator in case some extra garbage was
|
||||
// read as a result of reading in multiples of 4.
|
||||
szBlock[bytesToRead]='\0';
|
||||
|
||||
char szBuffer[2048];
|
||||
sprintf( szBuffer, "Data block received: %s\n", szBlock );
|
||||
|
||||
PushMessage( szBuffer );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SerialPortWindow::OnTransmit()
|
||||
{
|
||||
Error error;
|
||||
|
||||
// Make sure serial transmission is enabled
|
||||
std::bitset<32> serialCtlBS = GetSerialControlBS();
|
||||
serialCtlBS[30] = true;
|
||||
SetSerialControlBS( serialCtlBS );
|
||||
|
||||
// Verify that transmit buffer is ready
|
||||
const int numChecks = 3;
|
||||
int checkCount = 0;
|
||||
do
|
||||
{
|
||||
if ( checkCount > 0 )
|
||||
{
|
||||
Glib::usleep( 100000 );
|
||||
}
|
||||
|
||||
serialCtlBS = GetSerialControlBS();
|
||||
checkCount++;
|
||||
|
||||
} while ( (serialCtlBS[23] != true) && (checkCount < numChecks) );
|
||||
|
||||
if ( serialCtlBS[23] != true )
|
||||
{
|
||||
ShowErrorMessageDialog(
|
||||
"Transmit buffer not ready",
|
||||
"The transmit buffer is not ready to accept data." );
|
||||
return;
|
||||
}
|
||||
|
||||
// Write the data
|
||||
Glib::ustring transmitStr = m_pEntryTransmit->get_text();
|
||||
unsigned int bytesToWrite = static_cast<unsigned int>(transmitStr.length());
|
||||
|
||||
if ( transmitStr.length() <= 4 )
|
||||
{
|
||||
// Under 1 quadlet, perform regular register write
|
||||
|
||||
const unsigned int k_sioDataReg = baseAddress + 0x100;
|
||||
unsigned int sioDataVal[2];
|
||||
char* sioDataBuf = (char*)(&sioDataVal[0]);
|
||||
Glib::ustring reversed = ReverseStrEndianness( transmitStr );
|
||||
sprintf( sioDataBuf, "%s", reversed.c_str() );
|
||||
|
||||
error = m_camera.WriteRegister(
|
||||
k_sioDataReg,
|
||||
sioDataVal[0] );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
ShowErrorMessageDialog( "Error writing SIO data register", error );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Above 1 quadlet, perform block write
|
||||
|
||||
const unsigned int k_sioDataBlockReg = baseAddress + 0xF0F00104;
|
||||
unsigned int sioDataVal[1024] = {0};
|
||||
char* sioDataBuf = (char*)(&sioDataVal[0]);
|
||||
|
||||
Glib::ustring reversed = ReverseStrEndianness( transmitStr );
|
||||
sprintf( sioDataBuf, "%s", reversed.c_str() );
|
||||
|
||||
unsigned int quadletsToWrite = static_cast<unsigned int>(ceil(bytesToWrite / 4.0));
|
||||
|
||||
error = m_camera.WriteRegisterBlock(
|
||||
0xFFFF,
|
||||
k_sioDataBlockReg,
|
||||
(unsigned int*)(&sioDataVal[0]),
|
||||
quadletsToWrite );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
ShowErrorMessageDialog( "Error writing SIO data register", error );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const unsigned int k_transmitBufferStatus = baseAddress + 0xC;
|
||||
unsigned int transmitBufferStatusVal = 0;
|
||||
error = m_camera.ReadRegister( k_transmitBufferStatus, &transmitBufferStatusVal );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
ShowErrorMessageDialog( "Error reading transmit buffer status register", error );
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify that the buffer is storing the data
|
||||
unsigned int numBytesStored = (transmitBufferStatusVal >> 16) & 0x00FF;
|
||||
if ( numBytesStored < bytesToWrite )
|
||||
{
|
||||
// Buffer isn't storing enough data
|
||||
}
|
||||
|
||||
// Send the data out
|
||||
error = m_camera.WriteRegister( k_transmitBufferStatus, transmitBufferStatusVal );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
ShowErrorMessageDialog( "Error writing transmit buffer status register", error );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void SerialPortWindow::OnQuit()
|
||||
{
|
||||
m_run = false;
|
||||
|
||||
m_pReceiveLoop->join();
|
||||
|
||||
m_pWindow->hide();
|
||||
}
|
||||
|
||||
bool SerialPortWindow::OnDestroy( GdkEventAny* /*event*/ )
|
||||
{
|
||||
OnQuit();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void SerialPortWindow::OnMenuQuit()
|
||||
{
|
||||
OnQuit();
|
||||
}
|
||||
|
||||
void SerialPortWindow::OnMenuAbout()
|
||||
{
|
||||
Gtk::AboutDialog aboutDlg;
|
||||
|
||||
char timeStamp[512];
|
||||
sprintf( timeStamp, "%s %s", __DATE__, __TIME__ );
|
||||
|
||||
Glib::ustring comments( "Serial port example for FlyCapture 2.\nBuilt: " );
|
||||
comments += timeStamp;
|
||||
|
||||
aboutDlg.set_program_name( "SerialPortEx" );
|
||||
aboutDlg.set_comments( comments );
|
||||
aboutDlg.set_copyright( "© FLIR Integrated Imaging Solutions, Inc. All Rights Reserved." );
|
||||
|
||||
FC2Version fc2Version;
|
||||
Utilities::GetLibraryVersion( &fc2Version );
|
||||
char version[128];
|
||||
sprintf( version, "%d.%d.%d.%d", fc2Version.major, fc2Version.minor, fc2Version.type, fc2Version.build );
|
||||
|
||||
aboutDlg.set_version( version );
|
||||
|
||||
Glib::ustring ustrLicense;
|
||||
ustrLicense.append(
|
||||
"The FlyCapture Software Development Kit (the \"Software\") is owned and copyrighted by FLIR Integrated Imaging Solutions, Inc. All rights are reserved.\n"
|
||||
"The Original Purchaser is granted a license to use the Software subject to the following restrictions and limitations.\n"
|
||||
"1. The license is to the Original Purchaser only, and is nontransferable unless you have received written permission of FLIR Integrated Imaging Solutions, Inc.\n"
|
||||
"2. The Original Purchaser may use the Software only with FLIR Integrated Imaging Solutions, Inc. cameras owned by the Original Purchaser, including but not limited to, Flea, Flea2, Firefly2, Firefly MV, Dragonfly, Dragonfly2, Dragonfly Express or Scorpion Camera Modules.\n"
|
||||
"3. The Original Purchaser may make back-up copies of the Software for his or her own use only, subject to the use limitations of this license.\n"
|
||||
"4. Subject to s.5 below, the Original Purchaser may not engage in, nor permit third parties to engage in, any of the following:\n"
|
||||
"a) Providing or disclosing the Software to third parties.\n"
|
||||
"b) Making alterations or copies of any kind of the Software (except as specifically permitted in s.3 above).\n"
|
||||
"c) Attempting to un-assemble, de-compile or reverse engineer the Software in any way.\n"
|
||||
"Granting sublicenses, leases or other rights in the Software to others.\n"
|
||||
"5. Original Purchasers who are Original Equipment Manufacturers may make Derivative Products with the Software. Derivative Products are new software products developed, in whole or in part, using the Software and other FLIR Integrated Imaging Solutions, Inc. products.\n"
|
||||
"FLIR Integrated Imaging Solutions, Inc. hereby grants a license to Original Equipment Manufacturers to incorporate and distribute the libraries found in the Software with the Derivative Products.\n"
|
||||
"The components of any Derivative Product that contain the Software libraries may only be used with FLIR Integrated Imaging Solutions, Inc. products, or images derived from such products.\n"
|
||||
"5.1 By the distribution of the Software libraries with Derivative Products, Original Purchasers agree to:\n"
|
||||
"a) not permit further redistribution of the Software libraries by end-user customers;\n"
|
||||
"b) include a valid copyright notice on any Derivative Product; and\n"
|
||||
"c) indemnify, hold harmless, and defend FLIR Integrated Imaging Solutions, Inc. from and against any claims or lawsuits, including attorney's fees, that arise or result from the use or distribution of any Derivative Product.\n"
|
||||
"6. FLIR Integrated Imaging Solutions, Inc. reserves the right to terminate this license if there are any violations of its terms or if there is a default committed by the Original Purchaser.\n"
|
||||
"Upon termination, for any reason, all copies of the Software must be immediately returned to FLIR Integrated Imaging Solutions, Inc. and the Original Purchaser shall be liable to FLIR Integrated Imaging Solutions, Inc. for any and all damages suffered as a result of the violation or default.");
|
||||
|
||||
aboutDlg.set_wrap_license( true );
|
||||
aboutDlg.set_license( ustrLicense );
|
||||
aboutDlg.set_logo( m_iconPixBuf );
|
||||
|
||||
aboutDlg.run();
|
||||
}
|
||||
|
||||
bool SerialPortWindow::OnTimer()
|
||||
{
|
||||
if ( m_run )
|
||||
{
|
||||
PopulateConnectionParameters();
|
||||
|
||||
Glib::ustring nextMessage = PopMessage();
|
||||
|
||||
if ( nextMessage == "" )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Glib::ustring currText = m_refTextBuffer->get_text();
|
||||
currText += nextMessage;
|
||||
|
||||
m_refTextBuffer->set_text( currText );
|
||||
|
||||
m_pTextViewReceiveData->set_buffer( m_refTextBuffer );
|
||||
|
||||
// Scroll to end of buffer
|
||||
Gtk::TextIter iter = m_refTextBuffer->end();
|
||||
m_pTextViewReceiveData->scroll_to(iter);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::bitset<32> SerialPortWindow::GetSerialControlBS()
|
||||
{
|
||||
Error error;
|
||||
const unsigned int k_serialCtl = baseAddress + 0x4;
|
||||
unsigned int serialCtlVal = 0;
|
||||
error = m_camera.ReadRegister( k_serialCtl, &serialCtlVal );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
std::bitset<32> serialCtlBS( 0 );
|
||||
return serialCtlBS;
|
||||
}
|
||||
|
||||
std::bitset<32> serialCtlBS((int) serialCtlVal );
|
||||
return serialCtlBS;
|
||||
}
|
||||
|
||||
bool SerialPortWindow::SetSerialControlBS( std::bitset<32> serialControlBS )
|
||||
{
|
||||
Error error;
|
||||
const unsigned int k_serialCtl = baseAddress + 0x4;
|
||||
error = m_camera.WriteRegister( k_serialCtl, serialControlBS.to_ulong() );
|
||||
if ( error != PGRERROR_OK )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SerialPortWindow::PushMessage( Glib::ustring message )
|
||||
{
|
||||
time_t rawtime;
|
||||
struct tm* timeinfo;
|
||||
time( &rawtime );
|
||||
timeinfo = localtime( &rawtime );
|
||||
|
||||
char currTimeStr[128];
|
||||
strftime( currTimeStr, 128, "%X", timeinfo );
|
||||
|
||||
char timeMsg[1024];
|
||||
sprintf(
|
||||
timeMsg,
|
||||
"[%s]: %s",
|
||||
currTimeStr,
|
||||
message.c_str() );
|
||||
|
||||
Glib::Mutex::Lock messageLock( m_messageMutex );
|
||||
|
||||
m_messageQueue.push( timeMsg );
|
||||
}
|
||||
|
||||
Glib::ustring SerialPortWindow::PopMessage()
|
||||
{
|
||||
Glib::Mutex::Lock messageLock( m_messageMutex );
|
||||
|
||||
if ( m_messageQueue.size() == 0 )
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
Glib::ustring message = m_messageQueue.front();
|
||||
m_messageQueue.pop();
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
Glib::ustring SerialPortWindow::ReverseStrEndianness( Glib::ustring original )
|
||||
{
|
||||
// Determine the number of quadlets to convert
|
||||
unsigned int iNumQuadlets = static_cast<unsigned int>(ceil(original.length()/ 4.0));
|
||||
|
||||
Glib::ustring buffer;
|
||||
|
||||
for (unsigned int i=0; i < iNumQuadlets; i++)
|
||||
{
|
||||
Glib::ustring current = original.substr( i*4, 4 );
|
||||
Glib::ustring reversed;
|
||||
|
||||
unsigned int currentLen = static_cast<unsigned int>(current.length());
|
||||
for ( unsigned int j=0; j < currentLen; j++ )
|
||||
{
|
||||
reversed += current.substr( currentLen-1-j, 1 );
|
||||
}
|
||||
|
||||
buffer += reversed;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
unsigned int SerialPortWindow::GetBaudRate( unsigned int serialRegVal )
|
||||
{
|
||||
switch ( serialRegVal >> 24 )
|
||||
{
|
||||
case 0: return 300;
|
||||
case 1: return 600;
|
||||
case 2: return 1200;
|
||||
case 3: return 2400;
|
||||
case 4: return 4800;
|
||||
case 5: return 9600;
|
||||
case 6: return 19200;
|
||||
case 7: return 38400;
|
||||
case 8: return 57600;
|
||||
case 9: return 115200;
|
||||
case 10: return 230400;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int SerialPortWindow::GetCharacterLength( unsigned int serialRegVal )
|
||||
{
|
||||
switch( (serialRegVal>>16) & 0xFF )
|
||||
{
|
||||
case 7: return 7;
|
||||
case 8: return 8;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int SerialPortWindow::GetParity( unsigned int serialRegVal )
|
||||
{
|
||||
switch( (serialRegVal>>14) & 0x3 )
|
||||
{
|
||||
case 0: return 0;
|
||||
case 1: return 1;
|
||||
case 2: return 2;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
float SerialPortWindow::GetStopBit( unsigned int serialRegVal )
|
||||
{
|
||||
switch( (serialRegVal>>12) & 0x3 )
|
||||
{
|
||||
case 0: return 1;
|
||||
case 1: return 1.5;
|
||||
case 2: return 2;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int SerialPortWindow::GetBufferSize( unsigned int serialRegVal )
|
||||
{
|
||||
return serialRegVal & 0xFF;
|
||||
}
|
||||
|
||||
int SerialPortWindow::ShowErrorMessageDialog( Glib::ustring mainTxt, Error error )
|
||||
{
|
||||
Gtk::MessageDialog dialog( mainTxt, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK );
|
||||
dialog.set_secondary_text( error.GetDescription() );
|
||||
|
||||
return dialog.run();
|
||||
}
|
||||
|
||||
int SerialPortWindow::ShowErrorMessageDialog( Glib::ustring mainTxt, Glib::ustring secondaryTxt )
|
||||
{
|
||||
Gtk::MessageDialog dialog( mainTxt, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK );
|
||||
dialog.set_secondary_text( secondaryTxt );
|
||||
|
||||
return dialog.run();
|
||||
}
|
||||
221
Lib/FlyCapture2/src/SerialPortEx/SerialPortWindow.h
Normal file
221
Lib/FlyCapture2/src/SerialPortEx/SerialPortWindow.h
Normal file
@@ -0,0 +1,221 @@
|
||||
//=============================================================================
|
||||
// Copyright © 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
|
||||
//
|
||||
// This software is the confidential and proprietary information of FLIR
|
||||
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
|
||||
// shall not disclose such Confidential Information and shall use it only in
|
||||
// accordance with the terms of the license agreement you entered into
|
||||
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
|
||||
//
|
||||
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
// THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
// $Id: SerialPortWindow.h,v 1.7 2009-08-20 22:47:14 soowei Exp $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef PGR_FC2_SERIALPORTWINDOW_H
|
||||
#define PGR_FC2_SERIALPORTWINDOW_H
|
||||
|
||||
#include <iostream>
|
||||
#include <bitset>
|
||||
#include <queue>
|
||||
|
||||
#include "FlyCapture2.h"
|
||||
#include "FlyCapture2GUI.h"
|
||||
|
||||
using namespace FlyCapture2;
|
||||
|
||||
class SerialPortWindow
|
||||
{
|
||||
public:
|
||||
SerialPortWindow();
|
||||
~SerialPortWindow();
|
||||
|
||||
bool Initialize();
|
||||
bool Run( PGRGuid guid );
|
||||
bool Cleanup();
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
/** Interval between timer events, in milliseconds. */
|
||||
static const int sk_timeout = 100;
|
||||
|
||||
unsigned int baseAddress;
|
||||
|
||||
Glib::RefPtr<Gnome::Glade::Xml> m_refXml;
|
||||
Gtk::Window* m_pWindow;
|
||||
|
||||
Gtk::ImageMenuItem* m_pMenuQuit;
|
||||
Gtk::ImageMenuItem* m_pMenuAbout;
|
||||
|
||||
Gtk::Label* m_pLabelSerialNumber;
|
||||
Gtk::Label* m_pLabelModel;
|
||||
Gtk::Label* m_pLabelSensor;
|
||||
Gtk::Label* m_pLabelInterface;
|
||||
|
||||
Gtk::Label* m_pLabelBaudRate;
|
||||
Gtk::Label* m_pLabelParity;
|
||||
Gtk::Label* m_pLabelCharacterLength;
|
||||
Gtk::Label* m_pLabelStopBits;
|
||||
Gtk::Label* m_pLabelBufferSize;
|
||||
|
||||
Gtk::Entry* m_pEntryTransmit;
|
||||
Gtk::Button* m_pButtonTransmit;
|
||||
|
||||
Gtk::TextView* m_pTextViewReceiveData;
|
||||
Glib::RefPtr<Gtk::TextBuffer> m_refTextBuffer;
|
||||
|
||||
Gtk::Button* m_pButtonQuit;
|
||||
|
||||
/** Pixbuf for the PGR icon. */
|
||||
Glib::RefPtr<Gdk::Pixbuf> m_iconPixBuf;
|
||||
|
||||
/** Pointer to the receive loop thread handle. */
|
||||
Glib::Thread* m_pReceiveLoop;
|
||||
|
||||
/** The camera object. */
|
||||
Camera m_camera;
|
||||
|
||||
/** Whether to exit the receive loop. */
|
||||
bool m_run;
|
||||
|
||||
/** Message queue for messages to be displayed. */
|
||||
std::queue<Glib::ustring> m_messageQueue;
|
||||
|
||||
/** Mutex protecting access to the message queue. */
|
||||
Glib::Mutex m_messageMutex;
|
||||
|
||||
/** Load widgets. */
|
||||
void GetWidgets();
|
||||
|
||||
/** Attach signals to widgets. */
|
||||
void AttachSignals();
|
||||
|
||||
/** Populate the camera information widgets. */
|
||||
void PopulateCameraInfo();
|
||||
|
||||
/** Populate the connection parameter widgets. */
|
||||
void PopulateConnectionParameters();
|
||||
|
||||
/** Load the PGR icon. */
|
||||
void LoadIcon();
|
||||
|
||||
/** Launch the receive thread. */
|
||||
void LaunchReceiveLoop();
|
||||
|
||||
/** Receive thread function. */
|
||||
void ReceiveLoop( SerialPortWindow* pWindow );
|
||||
|
||||
/** Timer event handler. */
|
||||
bool OnTimer();
|
||||
|
||||
/** Transmit button handler. */
|
||||
void OnTransmit();
|
||||
|
||||
/** Quit button handler. */
|
||||
void OnQuit();
|
||||
|
||||
/** Destroy handler. Called when clicking "X" on the window. */
|
||||
bool OnDestroy( GdkEventAny* event );
|
||||
|
||||
/** Quit menu item handler. */
|
||||
void OnMenuQuit();
|
||||
|
||||
/** About menu item handler. */
|
||||
void OnMenuAbout();
|
||||
|
||||
/**
|
||||
* Get current values in the serial control register.
|
||||
*
|
||||
* @return A bitset containing the register value.
|
||||
*/
|
||||
std::bitset<32> GetSerialControlBS();
|
||||
|
||||
/**
|
||||
* Set the specified value to the serial control register.
|
||||
*
|
||||
* @param serialControlBS Bitset to be set to register.
|
||||
*
|
||||
* @return Whether the write to the camera was successful.
|
||||
*/
|
||||
bool SetSerialControlBS( std::bitset<32> serialControlBS );
|
||||
|
||||
/**
|
||||
* Push a message on to message queue.
|
||||
*
|
||||
* @param message Message to be pushed.
|
||||
*/
|
||||
void PushMessage( Glib::ustring message );
|
||||
|
||||
/**
|
||||
* Pop a message off the message queue.
|
||||
*
|
||||
* @return The message at the front of the message queue.
|
||||
*/
|
||||
Glib::ustring PopMessage();
|
||||
|
||||
/**
|
||||
* Reverse the endianness of a specified string.
|
||||
*
|
||||
* @param original Original string.
|
||||
*
|
||||
* @return The string, reversed in endianness.
|
||||
*/
|
||||
Glib::ustring ReverseStrEndianness( Glib::ustring original );
|
||||
|
||||
/**
|
||||
* Get the current baud rate setting, given the serial control register.
|
||||
*
|
||||
* @param serialRegVal Serial control register value.
|
||||
*
|
||||
* @return Current baud rate.
|
||||
*/
|
||||
static unsigned int GetBaudRate( unsigned int serialRegVal );
|
||||
|
||||
/**
|
||||
* Get the character length setting, given the serial control register.
|
||||
*
|
||||
* @param serialRegVal Serial control register value.
|
||||
*
|
||||
* @return Current character length.
|
||||
*/
|
||||
static unsigned int GetCharacterLength( unsigned int serialRegVal );
|
||||
|
||||
/**
|
||||
* Get the current parity setting, given the serial control register.
|
||||
*
|
||||
* @param serialRegVal Serial control register value.
|
||||
*
|
||||
* @return Current parity setting.
|
||||
*/
|
||||
static unsigned int GetParity( unsigned int serialRegVal );
|
||||
|
||||
/**
|
||||
* Get the current stop bit setting, given the serial control register.
|
||||
*
|
||||
* @param serialRegVal Serial control register value.
|
||||
*
|
||||
* @return Current stop bit setting.
|
||||
*/
|
||||
static float GetStopBit( unsigned int serialRegVal );
|
||||
|
||||
/**
|
||||
* Get the current buffer size setting, given the serial control register.
|
||||
*
|
||||
* @param serialRegVal Serial control register value.
|
||||
*
|
||||
* @return Current buffer size setting.
|
||||
*/
|
||||
static unsigned int GetBufferSize( unsigned int serialRegVal );
|
||||
|
||||
static int ShowErrorMessageDialog( Glib::ustring mainTxt, Error error );
|
||||
static int ShowErrorMessageDialog( Glib::ustring mainTxt, Glib::ustring secondaryTxt );
|
||||
};
|
||||
|
||||
#endif // PGR_FC2_SERIALPORTWINDOW_H
|
||||
64
Lib/FlyCapture2/src/SerialPortEx/main.cpp
Normal file
64
Lib/FlyCapture2/src/SerialPortEx/main.cpp
Normal file
@@ -0,0 +1,64 @@
|
||||
//=============================================================================
|
||||
// Copyright © 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
|
||||
//
|
||||
// This software is the confidential and proprietary information of FLIR
|
||||
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
|
||||
// shall not disclose such Confidential Information and shall use it only in
|
||||
// accordance with the terms of the license agreement you entered into
|
||||
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
|
||||
//
|
||||
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
|
||||
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
|
||||
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
|
||||
// THIS SOFTWARE OR ITS DERIVATIVES.
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
// $Id: main.cpp,v 1.3 2009-05-12 17:34:44 soowei Exp $
|
||||
//=============================================================================
|
||||
|
||||
#include "Precompiled.h"
|
||||
#include <iostream>
|
||||
|
||||
#include "FlyCapture2.h"
|
||||
#include "FlyCapture2GUI.h"
|
||||
|
||||
#include "SerialPortWindow.h"
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/)
|
||||
{
|
||||
// Create a Gtk instance
|
||||
Gtk::Main kit = Gtk::Main( 0, NULL );
|
||||
|
||||
// Initialize the thread system
|
||||
if( !Glib::thread_supported() )
|
||||
{
|
||||
Glib::thread_init();
|
||||
}
|
||||
|
||||
// Display the camera selection dialog
|
||||
CameraSelectionDlg camSlnDlg;
|
||||
PGRGuid guid[64];
|
||||
unsigned int size = 64;
|
||||
|
||||
bool ok;
|
||||
camSlnDlg.ShowModal( &ok, guid, &size );
|
||||
|
||||
if ( ok != true || size <= 0 )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool success;
|
||||
SerialPortWindow serialPortWin;
|
||||
success = serialPortWin.Initialize();
|
||||
if ( success != true )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
serialPortWin.Run( guid[0] );
|
||||
|
||||
return 0;
|
||||
}
|
||||
BIN
Lib/FlyCapture2/src/SerialPortEx/res/FlyCap2.ico
Normal file
BIN
Lib/FlyCapture2/src/SerialPortEx/res/FlyCap2.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 273 KiB |
16
Lib/FlyCapture2/src/SerialPortEx/resource.h
Normal file
16
Lib/FlyCapture2/src/SerialPortEx/resource.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by SerialPortEx.rc
|
||||
//
|
||||
#define IDI_ICON1 103
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 104
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user