├── .github
└── workflows
│ └── build.yml
├── .gitignore
├── .gitmodules
├── Application.pro
├── EtcDmxTool.pro
├── Gadget.pri
├── LICENSE
├── README.md
├── Whip.pri
├── doc
├── HowToSniff.png
├── HowToSniff.svg
├── SCRIPTING.md
└── scripting.png
├── gadget
└── stub
│ └── GadgetDLL.cpp
├── install
├── AdvUninstLog.nsh
├── gadget_drv
│ └── ETC_WinUSB.exe
├── install.nsi
└── whip_drv
│ ├── amd64
│ ├── ftbusui.dll
│ ├── ftcserco.dll
│ ├── ftd2xx.lib
│ ├── ftd2xx64.dll
│ ├── ftdibus.sys
│ ├── ftlang.dll
│ ├── ftser2k.sys
│ └── ftserui2.dll
│ ├── etc_whip.inf
│ ├── ftdibus.cat
│ └── i386
│ ├── ftbusui.dll
│ ├── ftcserco.dll
│ ├── ftd2xx.dll
│ ├── ftd2xx.lib
│ ├── ftdibus.sys
│ ├── ftlang.dll
│ ├── ftser2k.sys
│ └── ftserui2.dll
├── linux
├── 99-etcusb.rules
└── README.md
├── res
├── Icon.svg
├── add_btn.png
├── baseline-add_circle-24px.svg
├── baseline-remove_circle-24px.svg
├── capture_dis.png
├── capture_en.png
├── controller_dis.png
├── controller_en.png
├── controller_off.png
├── dmxgrid_dis.png
├── dmxgrid_en.png
├── dmxgrid_off.png
├── erase_dmx.png
├── estaid.csv
├── icon.ico
├── icon_16.png
├── icon_256.png
├── icon_32.png
├── icon_48.png
├── info.png
├── open.png
├── remove_btn.png
├── resources.qrc
├── resources.rc
├── restart.png
├── rx.png
├── save.png
├── script_dis.png
├── script_en.png
├── start.png
├── stop.png
├── transmit_dis.png
├── transmit_en.png
└── tx.png
├── scripts
├── catchError.js
└── fluke45.js
├── src
├── capturedevice.cpp
├── capturedevice.h
├── codeeditor.cpp
├── codeeditor.h
├── commandlineparse.cpp
├── commandlineparse.h
├── customdataroles.h
├── dissectors.cpp
├── dissectors.h
├── dissectors
│ ├── ASCII
│ │ ├── ASCII.pro
│ │ ├── README.md
│ │ ├── asciiplugin.cpp
│ │ └── asciiplugin.h
│ ├── DMX
│ │ ├── DMX.pro
│ │ ├── README.md
│ │ ├── dmxplugin.cpp
│ │ └── dmxplugin.h
│ ├── RDM
│ │ ├── RDM.pro
│ │ ├── README.md
│ │ ├── RdmDiscoveryResponseDissector.cpp
│ │ ├── RdmDiscoveryResponseDissector.h
│ │ ├── rdm_appendix_b.cpp
│ │ ├── rdm_appendix_b.h
│ │ ├── rdm_dimmermsg.cpp
│ │ ├── rdm_dimmermsg.h
│ │ ├── rdmdissector.cpp
│ │ ├── rdmdissector.h
│ │ ├── rdmplugin.cpp
│ │ └── rdmplugin.h
│ ├── SIP
│ │ ├── README.md
│ │ ├── SIP.pro
│ │ ├── sipplugin.cpp
│ │ └── sipplugin.h
│ ├── UTF8
│ │ ├── README.md
│ │ ├── UTF8.pro
│ │ ├── utf8plugin.cpp
│ │ └── utf8plugin.h
│ └── dissectorplugin.h
├── e110_mfctrIDs.h
├── e110_startcodes.h
├── etc_include
│ ├── CID.cpp
│ ├── CID.h
│ ├── RDM_CmdC.h
│ ├── RdmDeviceInfo.h
│ ├── defpack.h
│ ├── deftypes.h
│ ├── rdmEtcConsts.h
│ └── uid.h
├── fancysliderstyle.cpp
├── fancysliderstyle.h
├── file.cpp
├── file.h
├── gridwidget.cpp
├── gridwidget.h
├── hexlineedit.cpp
├── hexlineedit.h
├── levelindicator.cpp
├── levelindicator.h
├── logmodel.cpp
├── logmodel.h
├── main.cpp
├── mainwindow.cpp
├── mainwindow.h
├── packetbuffer.cpp
├── packetbuffer.h
├── packettable.cpp
├── packettable.h
├── pcap
│ ├── pcapng.cpp
│ ├── pcapng.h
│ └── pcapngLinkTypes.h
├── rdm
│ ├── estardm.h
│ ├── rdmEtcConsts.h
│ ├── rdmcontroller.cpp
│ ├── rdmcontroller.h
│ ├── rdmpidstrings.cpp
│ └── rdmpidstrings.h
├── scripting.cpp
├── scripting.h
├── selectdevicedialog.cpp
├── selectdevicedialog.h
├── serialdialog.cpp
├── serialdialog.h
├── stdout.cpp
├── stdout.h
├── updatedialog.cpp
├── updatedialog.h
├── util.cpp
├── util.h
└── whip
│ ├── comm.cpp
│ ├── comm.h
│ ├── ft_comm.cpp
│ ├── ft_comm.h
│ ├── ftdcomm.cpp
│ └── ftdcomm.h
├── ui
├── mainwindow.ui
├── selectdevicedialog.ui
└── serialdialog.ui
└── whip
├── linux
├── libftd2xx-i386-1.4.8
│ └── release
│ │ ├── ReadMe.txt
│ │ ├── WinTypes.h
│ │ ├── build
│ │ ├── libftd2xx.a
│ │ ├── libftd2xx.so.1.4.8
│ │ ├── libftd2xx.txt
│ │ ├── libftd2xx
│ │ │ ├── EEPROM
│ │ │ │ ├── eedata.o
│ │ │ │ ├── fte2data.o
│ │ │ │ ├── ftee2232.o
│ │ │ │ ├── ftee2232h.o
│ │ │ │ ├── ftee232.o
│ │ │ │ ├── ftee232h.o
│ │ │ │ ├── ftee232r.o
│ │ │ │ ├── ftee4232h.o
│ │ │ │ ├── fteeftx.o
│ │ │ │ └── serialno.o
│ │ │ ├── Event.o
│ │ │ ├── baud.o
│ │ │ ├── bulk_in.o
│ │ │ ├── config.o
│ │ │ ├── device-list.o
│ │ │ ├── ee.o
│ │ │ ├── ftd2xx-private.o
│ │ │ ├── ftd2xx.o
│ │ │ ├── idtable.o
│ │ │ └── usb_control.o
│ │ └── libusb
│ │ │ └── libusb
│ │ │ ├── core.o
│ │ │ ├── descriptor.o
│ │ │ ├── hotplug.o
│ │ │ ├── io.o
│ │ │ ├── os
│ │ │ ├── linux_netlink.o
│ │ │ ├── linux_usbfs.o
│ │ │ ├── poll_posix.o
│ │ │ └── threads_posix.o
│ │ │ └── sync.o
│ │ ├── examples
│ │ ├── BitMode
│ │ │ └── main.c
│ │ ├── EEPROM
│ │ │ ├── erase
│ │ │ │ └── main.c
│ │ │ ├── read
│ │ │ │ ├── eeprom-read.c
│ │ │ │ └── main.c
│ │ │ ├── user
│ │ │ │ ├── read
│ │ │ │ │ ├── main.c
│ │ │ │ │ └── ua_data.bin
│ │ │ │ ├── size
│ │ │ │ │ └── main.c
│ │ │ │ └── write
│ │ │ │ │ └── main.c
│ │ │ └── write
│ │ │ │ └── main.c
│ │ ├── Events
│ │ │ └── main.c
│ │ ├── LargeRead
│ │ │ └── main.c
│ │ ├── MultiThread
│ │ │ └── main.c
│ │ ├── Rules.make
│ │ ├── SetVIDPID
│ │ │ └── main.c
│ │ ├── Simple
│ │ │ └── main.c
│ │ ├── Timeouts
│ │ │ └── main.c
│ │ ├── W32
│ │ │ ├── escapeseq
│ │ │ │ └── main.c
│ │ │ ├── events
│ │ │ │ └── main.c
│ │ │ ├── simple
│ │ │ │ └── main.c
│ │ │ ├── timeouts
│ │ │ │ └── main.c
│ │ │ └── unsupported
│ │ │ │ └── main.c
│ │ ├── WinTypes.h
│ │ ├── ftd2xx.h
│ │ ├── loopback
│ │ │ ├── jtag.c
│ │ │ └── main.c
│ │ ├── static
│ │ │ └── main.c
│ │ └── write
│ │ │ └── main.c
│ │ ├── ftd2xx.h
│ │ ├── libusb
│ │ ├── COPYING
│ │ ├── config.h
│ │ └── libusb
│ │ │ ├── core.c
│ │ │ ├── descriptor.c
│ │ │ ├── hotplug.c
│ │ │ ├── hotplug.h
│ │ │ ├── io.c
│ │ │ ├── libusb-1.0.def
│ │ │ ├── libusb-1.0.rc
│ │ │ ├── libusb.h
│ │ │ ├── libusbi.h
│ │ │ ├── os
│ │ │ ├── darwin_usb.c
│ │ │ ├── darwin_usb.h
│ │ │ ├── haiku
│ │ │ │ ├── aclocal.m4
│ │ │ │ ├── compile
│ │ │ │ ├── config.guess
│ │ │ │ ├── config.sub
│ │ │ │ ├── configure
│ │ │ │ ├── configure.ac
│ │ │ │ ├── depcomp
│ │ │ │ ├── haiku_pollfs.cpp
│ │ │ │ ├── haiku_usb.h
│ │ │ │ ├── haiku_usb_backend.cpp
│ │ │ │ ├── haiku_usb_raw.cpp
│ │ │ │ ├── haiku_usb_raw.h
│ │ │ │ ├── install-sh
│ │ │ │ ├── ltmain.sh
│ │ │ │ ├── m4
│ │ │ │ │ ├── libtool.m4
│ │ │ │ │ ├── ltoptions.m4
│ │ │ │ │ ├── ltsugar.m4
│ │ │ │ │ ├── ltversion.m4
│ │ │ │ │ └── lt~obsolete.m4
│ │ │ │ └── missing
│ │ │ ├── linux_netlink.c
│ │ │ ├── linux_udev.c
│ │ │ ├── linux_usbfs.c
│ │ │ ├── linux_usbfs.h
│ │ │ ├── netbsd_usb.c
│ │ │ ├── openbsd_usb.c
│ │ │ ├── poll_posix.c
│ │ │ ├── poll_posix.h
│ │ │ ├── poll_windows.c
│ │ │ ├── poll_windows.h
│ │ │ ├── threads_posix.c
│ │ │ ├── threads_posix.h
│ │ │ ├── threads_windows.c
│ │ │ ├── threads_windows.h
│ │ │ ├── wince_usb.c
│ │ │ ├── wince_usb.h
│ │ │ ├── windows_common.h
│ │ │ ├── windows_usb.c
│ │ │ └── windows_usb.h
│ │ │ ├── strerror.c
│ │ │ ├── sync.c
│ │ │ ├── version.h
│ │ │ └── version_nano.h
│ │ └── release-notes.txt
└── libftd2xx-x86_64-1.4.8
│ └── release
│ ├── ReadMe.txt
│ ├── WinTypes.h
│ ├── build
│ ├── libftd2xx.a
│ ├── libftd2xx.so.1.4.8
│ ├── libftd2xx.txt
│ ├── libftd2xx
│ │ ├── EEPROM
│ │ │ ├── eedata.o
│ │ │ ├── fte2data.o
│ │ │ ├── ftee2232.o
│ │ │ ├── ftee2232h.o
│ │ │ ├── ftee232.o
│ │ │ ├── ftee232h.o
│ │ │ ├── ftee232r.o
│ │ │ ├── ftee4232h.o
│ │ │ ├── fteeftx.o
│ │ │ └── serialno.o
│ │ ├── Event.o
│ │ ├── baud.o
│ │ ├── bulk_in.o
│ │ ├── config.o
│ │ ├── device-list.o
│ │ ├── ee.o
│ │ ├── ftd2xx-private.o
│ │ ├── ftd2xx.o
│ │ ├── idtable.o
│ │ ├── memcpy.o
│ │ └── usb_control.o
│ └── libusb
│ │ └── libusb
│ │ ├── core.o
│ │ ├── descriptor.o
│ │ ├── hotplug.o
│ │ ├── io.o
│ │ ├── os
│ │ ├── linux_netlink.o
│ │ ├── linux_usbfs.o
│ │ ├── poll_posix.o
│ │ └── threads_posix.o
│ │ └── sync.o
│ ├── examples
│ ├── BitMode
│ │ └── main.c
│ ├── EEPROM
│ │ ├── erase
│ │ │ └── main.c
│ │ ├── read
│ │ │ ├── eeprom-read.c
│ │ │ └── main.c
│ │ ├── user
│ │ │ ├── read
│ │ │ │ ├── main.c
│ │ │ │ └── ua_data.bin
│ │ │ ├── size
│ │ │ │ └── main.c
│ │ │ └── write
│ │ │ │ └── main.c
│ │ └── write
│ │ │ └── main.c
│ ├── Events
│ │ └── main.c
│ ├── LargeRead
│ │ └── main.c
│ ├── MultiThread
│ │ └── main.c
│ ├── Rules.make
│ ├── SetVIDPID
│ │ └── main.c
│ ├── Simple
│ │ └── main.c
│ ├── Timeouts
│ │ └── main.c
│ ├── W32
│ │ ├── escapeseq
│ │ │ └── main.c
│ │ ├── events
│ │ │ └── main.c
│ │ ├── simple
│ │ │ └── main.c
│ │ ├── timeouts
│ │ │ └── main.c
│ │ └── unsupported
│ │ │ └── main.c
│ ├── WinTypes.h
│ ├── ftd2xx.h
│ ├── loopback
│ │ ├── jtag.c
│ │ └── main.c
│ ├── static
│ │ └── main.c
│ └── write
│ │ └── main.c
│ ├── ftd2xx.h
│ ├── libusb
│ ├── COPYING
│ ├── config.h
│ └── libusb
│ │ ├── core.c
│ │ ├── descriptor.c
│ │ ├── hotplug.c
│ │ ├── hotplug.h
│ │ ├── io.c
│ │ ├── libusb-1.0.def
│ │ ├── libusb-1.0.rc
│ │ ├── libusb.h
│ │ ├── libusbi.h
│ │ ├── os
│ │ ├── darwin_usb.c
│ │ ├── darwin_usb.h
│ │ ├── haiku
│ │ │ ├── aclocal.m4
│ │ │ ├── compile
│ │ │ ├── config.guess
│ │ │ ├── config.sub
│ │ │ ├── configure
│ │ │ ├── configure.ac
│ │ │ ├── depcomp
│ │ │ ├── haiku_pollfs.cpp
│ │ │ ├── haiku_usb.h
│ │ │ ├── haiku_usb_backend.cpp
│ │ │ ├── haiku_usb_raw.cpp
│ │ │ ├── haiku_usb_raw.h
│ │ │ ├── install-sh
│ │ │ ├── ltmain.sh
│ │ │ ├── m4
│ │ │ │ ├── libtool.m4
│ │ │ │ ├── ltoptions.m4
│ │ │ │ ├── ltsugar.m4
│ │ │ │ ├── ltversion.m4
│ │ │ │ └── lt~obsolete.m4
│ │ │ └── missing
│ │ ├── linux_netlink.c
│ │ ├── linux_udev.c
│ │ ├── linux_usbfs.c
│ │ ├── linux_usbfs.h
│ │ ├── netbsd_usb.c
│ │ ├── openbsd_usb.c
│ │ ├── poll_posix.c
│ │ ├── poll_posix.h
│ │ ├── poll_windows.c
│ │ ├── poll_windows.h
│ │ ├── threads_posix.c
│ │ ├── threads_posix.h
│ │ ├── threads_windows.c
│ │ ├── threads_windows.h
│ │ ├── wince_usb.c
│ │ ├── wince_usb.h
│ │ ├── windows_common.h
│ │ ├── windows_usb.c
│ │ └── windows_usb.h
│ │ ├── strerror.c
│ │ ├── sync.c
│ │ ├── version.h
│ │ └── version_nano.h
│ └── release-notes.txt
└── windows
├── Static
├── amd64
│ └── ftd2xx.lib
└── i386
│ └── ftd2xx.lib
├── amd64
├── ftbusui.dll
├── ftcserco.dll
├── ftd2xx.lib
├── ftd2xx64.dll
├── ftdibus.sys
├── ftlang.dll
├── ftser2k.sys
└── ftserui2.dll
├── ftd2xx.h
├── ftdibus.cat
├── ftdibus.inf
├── ftdiport.cat
├── ftdiport.inf
└── i386
├── ftbusui.dll
├── ftcserco.dll
├── ftd2xx.dll
├── ftd2xx.lib
├── ftdibus.sys
├── ftlang.dll
├── ftser2k.sys
└── ftserui2.dll
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | # Github Actions configuration file
2 | # Build ETCDMXTool for Windows
3 | name: Build
4 |
5 | on:
6 | push:
7 | pull_request:
8 | page_build:
9 | release:
10 | types:
11 | - created
12 | - edited
13 | - prereleased
14 | - released
15 |
16 | jobs:
17 | job:
18 | name: build-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.qtver }}
19 | runs-on: ${{ matrix.os }}
20 | strategy:
21 | matrix:
22 | os: [windows-latest]
23 | qtver: ['5.15.2']
24 | arch: [x86, x64]
25 | include:
26 | - os: windows-latest
27 | arch: x86
28 | qtarch: win32_msvc2019
29 | - os: windows-latest
30 | arch: x64
31 | qtarch: win64_msvc2019_64
32 |
33 | steps:
34 | - name: Checkout
35 | uses: actions/checkout@v2
36 | with:
37 | submodules: recursive
38 | - name: Install Qt
39 | uses: jurplel/install-qt-action@v2.14.0
40 | with:
41 | version: ${{ matrix.qtver }}
42 | arch: ${{ matrix.qtarch }}
43 | - name: MSVC Environment Setup
44 | uses: ilammy/msvc-dev-cmd@v1
45 | with:
46 | arch: ${{ matrix.arch }}
47 | - name: Create Makefile
48 | run: qmake EtcDmxTool.pro
49 | - name: Run MakeFile
50 | run: nmake
51 | - name: Upload Artifact
52 | if: contains(matrix.arch, 'x86')
53 | uses: actions/upload-artifact@v2
54 | with:
55 | name: windows
56 | path: |
57 | install/ETCDmxTool*.exe
58 | release/*.pdb
59 | - name: Setup TMate Session (Failure Only)
60 | if: ${{ failure() }}
61 | uses: mxschmitt/action-tmate@v3
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Project Specific #
2 | ####################
3 | LogFile.txt
4 |
5 | # Windows Explorer DBs #
6 | ########################
7 | .copyarea.db
8 | Thumbs.db
9 |
10 | # Qt qmake and moc output #
11 | #################
12 | Makefile*
13 | moc_*.cpp
14 |
15 | # Visual Studio Output #
16 | ########################
17 | ipch/
18 | GeneratedFiles/
19 | *Release/
20 | *Debug/
21 |
22 | # Installer Files #
23 | install/deploy/
24 |
25 | # Visual Studio Temp #
26 | ######################
27 | install/*.exe
28 | # build result
29 |
30 | *.user
31 | # User-specific settings
32 | *.aps
33 | # last resource editor state
34 | *.idb
35 | # build state
36 | *.ipch
37 | # build helper
38 | *.lastbuildstate
39 | # build helper
40 | # *.lib
41 | # build result. Can be 3rd party
42 | *.log
43 | # build log
44 | *.manifest
45 | # build helper. Can be written yourself.
46 | *.obj
47 | # build helper
48 | *.pch
49 | # build helper
50 | #*.pdb
51 | # build result
52 | *.res
53 | # build helper
54 | *.sdf
55 | *.opensdf
56 | # intellisense dbase
57 | *.suo
58 | # solution user options
59 | *.tlog
60 | # build log
61 |
62 | # MS Office Temp Files #
63 | ########################
64 | ~*
65 |
66 | #Zip file for builds
67 | *.zip
68 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "gadget/libGadget"]
2 | path = gadget/libGadget
3 | url = https://github.com/ETCLabs/libGadget.git
4 |
--------------------------------------------------------------------------------
/EtcDmxTool.pro:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2018 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | #
3 | # Permission is hereby granted, free of charge, to any person obtaining a copy
4 | # of this software and associated documentation files (the "Software"), to deal
5 | # in the Software without restriction, including without limitation the rights
6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | # copies of the Software, and to permit persons to whom the Software is
8 | # furnished to do so, subject to the following conditions:
9 | #
10 | # The above copyright notice and this permission notice shall be included in
11 | # all copies or substantial portions of the Software.
12 | #
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | # THE SOFTWARE.
20 |
21 | # Master PRO file. To add extra dissectors, see src/dissectors
22 |
23 | TEMPLATE = subdirs
24 | CONFIG += ordered
25 |
26 | # Include the dissector plugins here
27 | SUBDIRS += $$files($${_PRO_FILE_PWD_}/src/dissectors/*.pro, true) \
28 | $${_PRO_FILE_PWD_}/Application.pro
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Gadget.pri:
--------------------------------------------------------------------------------
1 | # Gadget II
2 | win32 {
3 | contains(QT_ARCH, i386) {
4 | GADGET_DLL_SRC = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/gadget/libGadget/Win32/bin/GadgetDLL.dll))
5 | LIBS += -L$$PWD/gadget/libGadget/Win32/lib -lGadgetDll
6 | INCLUDEPATH += $$PWD/gadget/libGadget/Win32/include
7 | HEADERS += $$PWD/gadget/libGadget/Win32/include/GadgetDLL.h
8 | } else {
9 | GADGET_DLL_SRC = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/gadget/libGadget/x64/bin/GadgetDLL.dll))
10 | LIBS += -L$$PWD/gadget/libGadget/x64/lib -lGadgetDll
11 | INCLUDEPATH += $$PWD/gadget/libGadget/x64/include
12 | HEADERS += $$PWD/gadget/libGadget/x64/include/GadgetDLL.h
13 | }
14 | GADGET_DLL_DST = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/install/deploy/GadgetDll.dll))
15 | } else {
16 | SOURCES += gadget/stub/GadgetDLL.cpp
17 | }
18 |
19 | win32 {
20 | # Copy the Gadget DLL to the debug directory for debugging
21 | QMAKE_POST_LINK += $$QMAKE_COPY $${GADGET_DLL_SRC} $$shell_quote($$system_path($${DESTDIR})) $$escape_expand(\\n\\t)
22 | }
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ETCDmxTool
2 | 
3 |
4 | ETCDmxTool is a free, open-source tool with the ability to capture DMX/RDM data; to control DMX levels; and to act as an RDM controller. It is provided by ETC Inc without any warranty, in the hope that it is a useful tool.
5 |
6 | # Supported DMX Devices
7 | To interface to a DMX/RDM system, ETCDmxTool supports three USB devices - the ETC Gadget I, the ETC Gadget II and the ETC USB Whip. The features available differ slightly depending on the selected device:
8 |
9 | | Feature | USB Whip | Gadget I1 | Gadget II1 | Gadget II (CPU2)1 |
10 | |----------------------|--------------------|----------------------|---------------------------------|---------------------------------|
11 | | DMX/RDM Data Capture | :heavy_check_mark: | :x: | :heavy_check_mark: 2 | :white_check_mark: 3 |
12 | | DMX Output | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
13 | | RDM Controller | :x: | :heavy_check_mark: | :heavy_check_mark: | :white_check_mark: 3 |
14 |
15 | 1 Windows Only
16 | 2 Firmware v1.2.0 or above
17 | 3 Coming in future firmware versions
18 |
19 | # Supported Platforms
20 | ## Windows
21 | ETCDmxTool is supported on Windows (Win 7/Win 10).
22 |
23 | An installer is provided on the [release page](https://github.com/ETCLabs/ETCDmxTool/releases/latest/)
24 |
25 | ## Linux
26 | ETCDmxTool also supports Linux, but only certain hardware currently (see the table above).
27 |
28 | For help with configuring on Linux, please see the [Linux readme](linux/README.md).
29 |
30 | # Connecting to a system
31 | In order to sniff DMX/RDM, you will need to wire your DMX device in to your system in a slighly unusual way using male-male XLR connectors or similar. Below is an example of how this might be set up.
32 |
33 | 
34 |
35 | # Scripting
36 | The application supports the ability to run in a scripted mode which may help with automation of testing or troubleshooting. For more info, take a look at the [Scripting](./doc/SCRIPTING.md) readme file.
37 |
38 | # Building
39 | If you are interested in building the application you will need the following:
40 |
41 | * Qt Library and Creator - https://www.qt.io/ide/
42 | * To build the windows installer - NSIS - http://nsis.sourceforge.net/
43 | * If NSIS is included in your $PATH the installer will be built automatically
44 |
45 | The dissectors are arranged as plugins; additional dissectors can simply be added to the src/dissectors directory
46 |
47 | # About this ETCLabs Project
48 |
49 | ETCDmxTool is designed to interact with ETC products, but it is not official ETC software. For challenges using, integrating, compiling, or modifying items in this project, we encourage posting on the Issues page. ETCDmxTool is a community-supported initiative, and the community is the best place to ask for help!
50 |
--------------------------------------------------------------------------------
/Whip.pri:
--------------------------------------------------------------------------------
1 | # Whip
2 | HEADERS += src/whip/ftdcomm.h
3 | SOURCES += src/whip/ftdcomm.cpp
4 | contains(QT_ARCH, i386) {
5 | win32 {
6 | INCLUDEPATH += whip/windows
7 | FTD2xx_DLL_SRC = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/whip/windows/i386/ftd2xx.dll))
8 | FTD2xx_DLL_DST = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/install/deploy/ftd2xx.dll))
9 | LIBS += -L$$PWD/whip/windows/i386 -lftd2xx
10 | }
11 | unix {
12 | INCLUDEPATH += whip/linux/libftd2xx-i386-1.4.8/release
13 | LIBS += -L$$PWD/whip/linux/libftd2xx-i386-1.4.8/release/build -lftd2xx
14 | }
15 | } else {
16 | win32 {
17 | INCLUDEPATH += whip/windows
18 | FTD2xx_DLL_SRC = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/whip/windows/amd64/ftd2xx64.dll))
19 | FTD2xx_DLL_DST = $$shell_quote($$system_path($${_PRO_FILE_PWD_}/install/deploy/ftd2xx64.dll))
20 | LIBS += -L$$PWD/whip/windows/amd64 -lftd2xx
21 | }
22 | unix {
23 | INCLUDEPATH += whip/linux/libftd2xx-x86_64-1.4.8/release
24 | LIBS += -L$$PWD/whip/linux/libftd2xx-x86_64-1.4.8/release/build -lftd2xx
25 | }
26 | }
27 |
28 | win32 {
29 | # Copy the Whip DLL to the debug directory for debugging
30 | QMAKE_POST_LINK += $$QMAKE_COPY $${FTD2xx_DLL_SRC} $$shell_quote($$system_path($${DESTDIR})) $$escape_expand(\\n\\t)
31 | }
32 |
--------------------------------------------------------------------------------
/doc/HowToSniff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/doc/HowToSniff.png
--------------------------------------------------------------------------------
/doc/scripting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/doc/scripting.png
--------------------------------------------------------------------------------
/install/gadget_drv/ETC_WinUSB.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/gadget_drv/ETC_WinUSB.exe
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftbusui.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftbusui.dll
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftcserco.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftcserco.dll
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftd2xx.lib
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftd2xx64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftd2xx64.dll
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftdibus.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftdibus.sys
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftlang.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftlang.dll
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftser2k.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftser2k.sys
--------------------------------------------------------------------------------
/install/whip_drv/amd64/ftserui2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/amd64/ftserui2.dll
--------------------------------------------------------------------------------
/install/whip_drv/ftdibus.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/ftdibus.cat
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftbusui.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftbusui.dll
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftcserco.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftcserco.dll
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftd2xx.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftd2xx.dll
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftd2xx.lib
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftdibus.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftdibus.sys
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftlang.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftlang.dll
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftser2k.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftser2k.sys
--------------------------------------------------------------------------------
/install/whip_drv/i386/ftserui2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/install/whip_drv/i386/ftserui2.dll
--------------------------------------------------------------------------------
/linux/99-etcusb.rules:
--------------------------------------------------------------------------------
1 | SUBSYSTEM=="usb", ATTRS{idVendor}=="14d5", MODE="0666"
2 |
--------------------------------------------------------------------------------
/linux/README.md:
--------------------------------------------------------------------------------
1 | # ETCDmxTool
2 | ## Linux
3 |
4 | ### Hardware support
5 | | Hardware | Linux Support |
6 | |---------------|---------------|
7 | | USB Whip | Yes |
8 | | Gadget I | Not yet |
9 | | Gadget II | Not yet |
10 |
11 | ### Permissions
12 | Read/write access is required to the relevant USB bus device.
13 | For systems that support udev, this can be applied by copying "99-etcusb.rules" to /etc/udev
14 |
--------------------------------------------------------------------------------
/res/add_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/add_btn.png
--------------------------------------------------------------------------------
/res/baseline-add_circle-24px.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/res/baseline-remove_circle-24px.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/res/capture_dis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/capture_dis.png
--------------------------------------------------------------------------------
/res/capture_en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/capture_en.png
--------------------------------------------------------------------------------
/res/controller_dis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/controller_dis.png
--------------------------------------------------------------------------------
/res/controller_en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/controller_en.png
--------------------------------------------------------------------------------
/res/controller_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/controller_off.png
--------------------------------------------------------------------------------
/res/dmxgrid_dis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/dmxgrid_dis.png
--------------------------------------------------------------------------------
/res/dmxgrid_en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/dmxgrid_en.png
--------------------------------------------------------------------------------
/res/dmxgrid_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/dmxgrid_off.png
--------------------------------------------------------------------------------
/res/erase_dmx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/erase_dmx.png
--------------------------------------------------------------------------------
/res/estaid.csv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/estaid.csv
--------------------------------------------------------------------------------
/res/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/icon.ico
--------------------------------------------------------------------------------
/res/icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/icon_16.png
--------------------------------------------------------------------------------
/res/icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/icon_256.png
--------------------------------------------------------------------------------
/res/icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/icon_32.png
--------------------------------------------------------------------------------
/res/icon_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/icon_48.png
--------------------------------------------------------------------------------
/res/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/info.png
--------------------------------------------------------------------------------
/res/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/open.png
--------------------------------------------------------------------------------
/res/remove_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/remove_btn.png
--------------------------------------------------------------------------------
/res/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | start.png
4 | stop.png
5 | open.png
6 | save.png
7 | restart.png
8 | rx.png
9 | tx.png
10 | icon_16.png
11 | icon_32.png
12 | capture_dis.png
13 | capture_en.png
14 | transmit_dis.png
15 | transmit_en.png
16 | controller_dis.png
17 | controller_en.png
18 | add_btn.png
19 | remove_btn.png
20 | controller_off.png
21 | dmxgrid_dis.png
22 | dmxgrid_en.png
23 | dmxgrid_off.png
24 | erase_dmx.png
25 | info.png
26 | script_dis.png
27 | script_en.png
28 |
29 |
30 | estaid.csv
31 |
32 |
33 |
--------------------------------------------------------------------------------
/res/resources.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "icon.ico"
--------------------------------------------------------------------------------
/res/restart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/restart.png
--------------------------------------------------------------------------------
/res/rx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/rx.png
--------------------------------------------------------------------------------
/res/save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/save.png
--------------------------------------------------------------------------------
/res/script_dis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/script_dis.png
--------------------------------------------------------------------------------
/res/script_en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/script_en.png
--------------------------------------------------------------------------------
/res/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/start.png
--------------------------------------------------------------------------------
/res/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/stop.png
--------------------------------------------------------------------------------
/res/transmit_dis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/transmit_dis.png
--------------------------------------------------------------------------------
/res/transmit_en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/transmit_en.png
--------------------------------------------------------------------------------
/res/tx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/res/tx.png
--------------------------------------------------------------------------------
/scripts/catchError.js:
--------------------------------------------------------------------------------
1 | // Script to turn a DMX channel on and off
2 | // until the string "ERROR" is seen on the serial port
3 |
4 | // Tom Steer, April 2022
5 |
6 | // Enable DMX output
7 | dmx.enable();
8 |
9 | var foundError = false;
10 | var outputOn = false;
11 |
12 | while (!foundError) {
13 | // Flip channel
14 | outputOn = !outputOn;
15 | dmx.setLevel(0, outputOn ? 255 : 0);
16 |
17 | // Wait 5s for reading to stabilize
18 | utils.sleep(5000);
19 |
20 | // Check for error
21 | if (serial.readText().includes("ERROR")) {
22 | console.log("Error reported - stopping test");
23 | foundError = true;
24 | }
25 | }
--------------------------------------------------------------------------------
/scripts/fluke45.js:
--------------------------------------------------------------------------------
1 | // Script to read voltage measurements
2 | // From a Fluke 45 Compatible voltage meter
3 | // based on DMX level
4 |
5 | // Tom Steer, 3/15/2022
6 |
7 | // Enable DMX output
8 | dmx.enable();
9 |
10 |
11 | for (var i = 0; i <= 255; i++) {
12 | // Ramp channel 1 from 0 to 255
13 | dmx.setLevel(0, i);
14 | // Wait 0.5s for reading to stabilize
15 | utils.sleep(500);
16 | // Issue measure command
17 | serial.writeText("MEAS?\r\n");
18 | utils.sleep(200);
19 | console.log("," + i + "," + serial.readText().split(/\r?\n/)[0]);
20 | }
--------------------------------------------------------------------------------
/src/codeeditor.h:
--------------------------------------------------------------------------------
1 | #ifndef CODEEDITOR_H
2 | #define CODEEDITOR_H
3 |
4 | #include
5 | #include
6 |
7 | QT_BEGIN_NAMESPACE
8 | class QPaintEvent;
9 | class QResizeEvent;
10 | class QSize;
11 | class QWidget;
12 | QT_END_NAMESPACE
13 |
14 | class LineNumberArea;
15 |
16 |
17 | class CodeEditor : public QPlainTextEdit
18 | {
19 | Q_OBJECT
20 |
21 | public:
22 | CodeEditor(QWidget *parent = 0);
23 |
24 | void lineNumberAreaPaintEvent(QPaintEvent *event);
25 | int lineNumberAreaWidth();
26 | public slots:
27 | void clearErrors();
28 | void setErrorOnLine(int line, const QString &error);
29 | protected:
30 | void resizeEvent(QResizeEvent *event) override;
31 |
32 | bool event(QEvent *event) override;
33 | private slots:
34 | void updateLineNumberAreaWidth(int newBlockCount);
35 | void updateLineNumberArea(const QRect &, int);
36 |
37 | private:
38 | QWidget *lineNumberArea;
39 | int m_errorLine;
40 | QString m_errorString;
41 | };
42 |
43 | class LineNumberArea : public QWidget
44 | {
45 | public:
46 | LineNumberArea(CodeEditor *editor) : QWidget(editor) {
47 | codeEditor = editor;
48 | }
49 |
50 | QSize sizeHint() const override {
51 | return QSize(codeEditor->lineNumberAreaWidth(), 0);
52 | }
53 |
54 | protected:
55 | void paintEvent(QPaintEvent *event) override {
56 | codeEditor->lineNumberAreaPaintEvent(event);
57 | }
58 |
59 | private:
60 | CodeEditor *codeEditor;
61 | };
62 |
63 | #endif
64 |
--------------------------------------------------------------------------------
/src/commandlineparse.h:
--------------------------------------------------------------------------------
1 | #ifndef COMMANDLINEPARSE_H
2 | #define COMMANDLINEPARSE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include "packettable.h"
8 |
9 | class commandLineParse : public QObject
10 | {
11 | Q_OBJECT
12 | public:
13 | explicit commandLineParse(const QCoreApplication &app, QObject *parent = nullptr);
14 | ~commandLineParse();
15 | enum parseResult_t {
16 | GuiOnly,
17 | ConsoleOnly,
18 | ExitApp
19 | };
20 | parseResult_t getResult() { return parseResult; }
21 |
22 | signals:
23 |
24 | public slots:
25 |
26 | private:
27 | void showConsole();
28 | #if defined(Q_OS_WIN)
29 | FILE * pStdout = Q_NULLPTR;
30 | FILE * pStderr = Q_NULLPTR;
31 | #endif
32 |
33 | parseResult_t parseResult = GuiOnly;
34 | QCommandLineParser parser;
35 |
36 | PacketTable packetTable;
37 |
38 | const QCommandLineOption optSniff = {{"s", "sniff"}, "Sniff directly into .", "file"};
39 | const QCommandLineOption optCompress = {"compress", "Compress file output"};
40 | void doSniff();
41 | };
42 |
43 | #endif // COMMANDLINEPARSE_H
44 |
--------------------------------------------------------------------------------
/src/customdataroles.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef CUSTOMDATAROLES_H
22 | #define CUSTOMDATAROLES_H
23 |
24 | #include
25 |
26 | enum CustomDataRoles
27 | {
28 | DATA_ROLE_STARTOFFSET = Qt::UserRole +1,
29 | DATA_ROLE_ENDOFFSET
30 | };
31 |
32 | #endif // CUSTOMDATAROLES_H
33 |
--------------------------------------------------------------------------------
/src/dissectors.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef DISSECTORS_H
22 | #define DISSECTORS_H
23 |
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include "packetbuffer.h"
30 | #include "dissectors/dissectorplugin.h"
31 |
32 | class dissectors : public QObject
33 | {
34 | Q_OBJECT
35 | public:
36 | explicit dissectors(QObject *parent = nullptr);
37 |
38 | DissectorPlugin *getDissector(const Packet &p);
39 |
40 | struct s_DissectorList
41 | {
42 | DissectorPlugin* dissector;
43 | bool isEnabled() { return m_enabled; }
44 | void setEnabled(bool enabled = true) {
45 | m_enabled = enabled;
46 | }
47 |
48 | explicit s_DissectorList(DissectorPlugin* d)
49 | {
50 | m_enabled = true;
51 | dissector = d;
52 | }
53 |
54 | private:
55 | bool m_enabled;
56 | };
57 | auto getDissectorList() { return m_dissectors; }
58 |
59 | signals:
60 |
61 | public slots:
62 |
63 | private:
64 | void load(QDir sourcePath);
65 |
66 | QList m_dissectors;
67 |
68 | #if defined (Q_OS_WIN)
69 | const QString disectorPatternMatch = "dissectorplugin*.dll";
70 | #elif defined(Q_OS_LINUX)
71 | const QString disectorPatternMatch = "libdissectorplugin*.so";
72 | #endif
73 | };
74 |
75 | #endif // DISSECTORS_H
76 |
--------------------------------------------------------------------------------
/src/dissectors/ASCII/ASCII.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = lib
2 | CONFIG += plugin
3 | QT += widgets
4 | INCLUDEPATH += ../../
5 | HEADERS = asciiplugin.h \
6 | ../../packetbuffer.h \
7 | ../../util.h
8 | SOURCES = asciiplugin.cpp \
9 | ../../packetbuffer.cpp \
10 | ../../util.cpp
11 | TARGET = $$qtLibraryTarget(dissectorpluginASCII)
12 |
13 | CONFIG(debug, debug|release) {
14 | DESTDIR = ../../../debug
15 | }
16 | CONFIG(release, debug|release) {
17 | DESTDIR = ../../../release
18 | }
19 |
--------------------------------------------------------------------------------
/src/dissectors/ASCII/README.md:
--------------------------------------------------------------------------------
1 | E1.11:2008 ASCII Text Packet
--------------------------------------------------------------------------------
/src/dissectors/ASCII/asciiplugin.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2018 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef ASCII_H
22 | #define ASCII_H
23 |
24 | #include
25 | #include
26 | #include "dissectors/dissectorplugin.h"
27 |
28 | class ASCIIPlugin : public QObject, DissectorPlugin
29 | {
30 | Q_OBJECT
31 | Q_PLUGIN_METADATA(IID DissectorPlugin_iid)
32 | Q_INTERFACES(DissectorPlugin)
33 |
34 | public:
35 | QVariant getProtocolName() override;
36 | bool enableByDefault() override;
37 | QList getStartCodes() override;
38 | QVariant getSource(const Packet &p) override;
39 | QVariant getDestination(const Packet &p) override;
40 | QVariant getInfo(const Packet &p, int role = Qt::DisplayRole) override;
41 | int preprocessPacket(const Packet &p, QList &list) override;
42 | void dissectPacket(const Packet &p, QTreeWidgetItem *parent) override;
43 |
44 | private:
45 | QString getText(const Packet &p);
46 | };
47 |
48 | #endif // DMX_H
49 |
--------------------------------------------------------------------------------
/src/dissectors/DMX/DMX.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = lib
2 | CONFIG += plugin
3 | QT += widgets
4 | INCLUDEPATH += ../../
5 | HEADERS = dmxplugin.h \
6 | ../../packetbuffer.h \
7 | ../../util.h
8 | SOURCES = dmxplugin.cpp \
9 | ../../packetbuffer.cpp \
10 | ../../util.cpp
11 | TARGET = $$qtLibraryTarget(dissectorpluginDMX)
12 |
13 | CONFIG(debug, debug|release) {
14 | DESTDIR = ../../../debug
15 | }
16 | CONFIG(release, debug|release) {
17 | DESTDIR = ../../../release
18 | }
19 |
--------------------------------------------------------------------------------
/src/dissectors/DMX/README.md:
--------------------------------------------------------------------------------
1 | DMX
2 |
--------------------------------------------------------------------------------
/src/dissectors/DMX/dmxplugin.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include "dmxplugin.h"
22 | #include "e110_startcodes.h"
23 | #include "packetbuffer.h"
24 | #include "util.h"
25 | #include
26 | #include
27 |
28 | QVariant DmxPlugin::getProtocolName()
29 | {
30 | return "DMX";
31 | }
32 |
33 | bool DmxPlugin::enableByDefault()
34 | {
35 | return true;
36 | }
37 |
38 | QList DmxPlugin::getStartCodes()
39 | {
40 | QList startCodes;
41 | startCodes << E110_SC::DIMMER_DATA;
42 | return startCodes;
43 | }
44 |
45 | QVariant DmxPlugin::getSource(const Packet &p)
46 | {
47 | Q_UNUSED(p);
48 | return QString();
49 | }
50 |
51 | QVariant DmxPlugin::getDestination(const Packet &p)
52 | {
53 | Q_UNUSED(p);
54 | return QString("Broadcast");
55 | }
56 |
57 | QVariant DmxPlugin::getInfo(const Packet &p, int role)
58 | {
59 | if (role != Qt::DisplayRole)
60 | return QVariant();
61 |
62 | return QString("Slots %1").arg(p.size() - 1);
63 | }
64 |
65 | int DmxPlugin::preprocessPacket(const Packet &p, QList &list)
66 | {
67 | list.append(p);
68 | return 1;
69 | }
70 |
71 | void DmxPlugin::dissectPacket(const Packet &p, QTreeWidgetItem *parent)
72 | {
73 | QTreeWidgetItem *i = nullptr;
74 |
75 | parent->setText(0, getProtocolName().toString());
76 | Util::setPacketByteHighlight(parent, 0, p.size());
77 |
78 | if (p.size() > 1)
79 | {
80 | i = new QTreeWidgetItem();
81 | i->setText(0, QObject::tr("Start Code"));
82 | if ((quint8)p.at(0) == E110_SC::DIMMER_DATA)
83 | i->setText(1, QObject::tr("Default"));
84 | else
85 | i->setText(1, QObject::tr("Unknown"));
86 | Util::setPacketByteHighlight(i, 0, 1);
87 | parent->addChild(i);
88 |
89 | i = new QTreeWidgetItem();
90 | i->setText(0, QObject::tr("Slot levels"));
91 | i->setText(1, QString::number(p.size() - 1));
92 | Util::setPacketByteHighlight(i, 1, p.size() - 1);
93 | parent->addChild(i);
94 | }
95 | return;
96 | }
97 |
98 |
99 |
--------------------------------------------------------------------------------
/src/dissectors/DMX/dmxplugin.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef DMX_H
22 | #define DMX_H
23 |
24 | #include
25 | #include
26 | #include "dissectors/dissectorplugin.h"
27 |
28 | class DmxPlugin : public QObject, DissectorPlugin
29 | {
30 | Q_OBJECT
31 | Q_PLUGIN_METADATA(IID DissectorPlugin_iid)
32 | Q_INTERFACES(DissectorPlugin)
33 |
34 | public:
35 | QVariant getProtocolName() override;
36 | bool enableByDefault() override;
37 | QList getStartCodes() override;
38 | QVariant getSource(const Packet &p) override;
39 | QVariant getDestination(const Packet &p) override;
40 | QVariant getInfo(const Packet &p, int role = Qt::DisplayRole) override;
41 | int preprocessPacket(const Packet &p, QList &list) override;
42 | void dissectPacket(const Packet &p, QTreeWidgetItem *parent) override;
43 | };
44 |
45 | #endif // DMX_H
46 |
--------------------------------------------------------------------------------
/src/dissectors/RDM/RDM.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = lib
2 | CONFIG += plugin
3 | QT += widgets
4 |
5 | INCLUDEPATH *= $$clean_path($$PWD/../../)
6 |
7 | HEADERS += \
8 | $$PWD/rdmplugin.h \
9 | $$PWD/../../packetbuffer.h \
10 | $$PWD/../../util.h \
11 | $$PWD/rdmdissector.h \
12 | $$PWD/../../rdm/rdmpidstrings.h \
13 | $$PWD/rdm_appendix_b.h \
14 | $$PWD/rdm_dimmermsg.h
15 |
16 | SOURCES += \
17 | $$PWD/rdmplugin.cpp \
18 | $$PWD/../../packetbuffer.cpp \
19 | $$PWD/../../util.cpp \
20 | $$PWD/rdmdissector.cpp \
21 | $$PWD/../../rdm/rdmpidstrings.cpp \
22 | $$PWD/rdm_appendix_b.cpp \
23 | $$PWD/rdm_dimmermsg.cpp
24 |
25 | TARGET = $$qtLibraryTarget(dissectorpluginRDM)
26 |
27 | CONFIG(debug, debug|release) {
28 | DESTDIR = ../../../debug
29 | }
30 | CONFIG(release, debug|release) {
31 | DESTDIR = ../../../release
32 | }
33 |
34 |
35 |
36 | CONFIG += install_ok
37 |
--------------------------------------------------------------------------------
/src/dissectors/RDM/README.md:
--------------------------------------------------------------------------------
1 | RDM
2 |
--------------------------------------------------------------------------------
/src/dissectors/RDM/RdmDiscoveryResponseDissector.h:
--------------------------------------------------------------------------------
1 | class RdmDiscoveryResponseDissector : public PacketDissector
2 | {
3 | public:
4 | friend class RdmDissector;
5 |
6 | virtual quint8 startCode() const;
7 | virtual QVariant protocolName(const Packet &p, int role) const;
8 | virtual QVariant getSource(const Packet &p, int role) const;
9 | virtual QVariant getDestination(const Packet &p, int role) const;
10 | virtual QVariant getInfo(const Packet &p, int role) const;
11 |
12 | virtual int preprocessPacket(Packet &p, /*out*/ QList &list) const;
13 |
14 | private:
15 | static void extractRdmSourceDest(Packet &p);
16 | };
--------------------------------------------------------------------------------
/src/dissectors/RDM/rdm_appendix_b.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef RDM_APPENDIX_B_H
22 | #define RDM_APPENDIX_B_H
23 |
24 | #include
25 |
26 | namespace RDM_2010
27 | {
28 | enum StatusMessageId
29 | {
30 | STS_CAL_FAIL = 0x0001,
31 | STS_SENS_NOT_FOUND = 0x0002,
32 | STS_SENS_ALWAYS_ON = 0x0003,
33 | STS_LAMP_DOUSED = 0x0011,
34 | STS_LAMP_STRIKE = 0x0012,
35 | STS_OVERTEMP = 0x0021,
36 | STS_UNDERTEMP = 0x0022,
37 | STS_SENS_OUT_RANGE = 0x0023,
38 | STS_OVERVOLTAGE_PHASE = 0x0031,
39 | STS_UNDERVOLTAGE_PHASE = 0x0032,
40 | STS_OVERCURRENT = 0x0033,
41 | STS_UNDERCURRENT = 0x0034,
42 | STS_PHASE = 0x0035,
43 | STS_PHASE_ERROR = 0x0036,
44 | STS_AMPS = 0x0037,
45 | STS_VOLTS = 0x0038,
46 | STS_DIMSLOT_OCCUPIED = 0x0041,
47 | STS_BREAKER_TRIP = 0x0042,
48 | STS_WATTS = 0x0043,
49 | STS_DIM_FAILURE = 0x0044,
50 | STS_DIM_PANIC = 0x0045,
51 | STS_READY = 0x0050,
52 | STS_NOT_READY = 0x0051,
53 | STS_LOW_FLUID = 0x0052,
54 |
55 | STS_MAX_STD = 0x7FFF
56 | };
57 |
58 | QString statusMessageToDescription(quint16 statusMessageId, quint16 data1, quint16 data2);
59 |
60 | }
61 |
62 | #endif // RDM_APPENDIX_B_H
63 |
--------------------------------------------------------------------------------
/src/dissectors/RDM/rdmdissector.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include
22 | #include "util.h"
23 | #include "rdm/rdmEtcConsts.h"
24 | #include "rdm/estardm.h"
25 | #include "rdm_appendix_b.h"
26 | #include "rdm_dimmermsg.h"
27 | #include "rdm/rdmpidstrings.h"
28 |
29 | // Length in bytes
30 | #define RDM_UID_LENGTH 6
31 |
32 | enum RDM_MESSAGEBLOCK
33 | {
34 | RDM_CC,
35 | RDM_PARAMETER_ID,
36 | RDM_PDL = 3,
37 | RDM_PARAMETER_DATA
38 | };
39 |
40 | enum RDM_MUTE_PARAMETER_DATA
41 | {
42 | RDM_MUTE_CONTROL_FIELD = 0,
43 | RDM_MUTE_BINDING_UID = 2
44 | };
45 |
46 | enum RDM_PACKET_STRUCT
47 | {
48 | RDM_START_CODE = 0,
49 | RDM_SUB_START_CODE = 1,
50 | RDM_LENGTH = 2,
51 | RDM_DEST_UID = 3,
52 | RDM_SOURCE_UID = 9,
53 | RDM_TRANSACTION_NR = 15,
54 | RDM_PORT_ID = 16,
55 | RDM_RESPONSE_TYPE = 16,
56 | RDM_MESSAGE_COUNT = 17,
57 | RDM_SUBDEVICE = 18,
58 | RDM_MESSAGE_BLOCK = 20,
59 |
60 | // Packet overall sizes
61 | RDM_PACKET_MIN_BYTES = 26,
62 | RDM_PACKET_MAX_BYTES = 257
63 | };
64 |
65 | typedef enum {
66 | FRAME_VALID,
67 | FRAME_INVALID
68 | } dissectRdm_t;
69 |
70 | dissectRdm_t dissectRdmDiscResponse(const Packet &p, QTreeWidgetItem *parent);
71 |
72 | dissectRdm_t dissectRdm(const Packet &p, QTreeWidgetItem *parent);
73 |
74 | quint64 unpackRdmId(const Packet &p, int start);
75 |
76 | QString formatRdmUid(quint64 value, bool addManufName = true);
77 |
78 |
--------------------------------------------------------------------------------
/src/dissectors/RDM/rdmplugin.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef DMX_H
22 | #define DMX_H
23 |
24 | #include
25 | #include
26 | #include "dissectors/dissectorplugin.h"
27 |
28 | class RdmPlugin : public QObject, DissectorPlugin
29 | {
30 | Q_OBJECT
31 | Q_PLUGIN_METADATA(IID DissectorPlugin_iid)
32 | Q_INTERFACES(DissectorPlugin)
33 |
34 | public:
35 | QVariant getProtocolName() override;
36 | bool enableByDefault() override;
37 | QList getStartCodes() override;
38 | QVariant getSource(const Packet &p) override;
39 | QVariant getDestination(const Packet &p) override;
40 | QVariant getInfo(const Packet &p, int role = Qt::DisplayRole) override;
41 | int preprocessPacket(const Packet &p, QList &list) override;
42 | void dissectPacket(const Packet &p, QTreeWidgetItem *parent) override;
43 |
44 | private:
45 | bool quickValidateDiscoveryResponse(const Packet &p, quint64 &decoded_id);
46 | static const QColor DISCOVERY_COLLISION_BACKGROUND;
47 | };
48 |
49 | #endif // DMX_H
50 |
--------------------------------------------------------------------------------
/src/dissectors/SIP/README.md:
--------------------------------------------------------------------------------
1 | E1.11:2008 System Information Packet (SIP)
2 |
--------------------------------------------------------------------------------
/src/dissectors/SIP/SIP.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = lib
2 | CONFIG += plugin
3 | QT += widgets
4 | INCLUDEPATH += ../../
5 | HEADERS = sipplugin.h \
6 | ../../packetbuffer.h \
7 | ../../util.h
8 | SOURCES = sipplugin.cpp \
9 | ../../packetbuffer.cpp \
10 | ../../util.cpp
11 | TARGET = $$qtLibraryTarget(dissectorpluginSIP)
12 |
13 | CONFIG(debug, debug|release) {
14 | DESTDIR = ../../../debug
15 | }
16 | CONFIG(release, debug|release) {
17 | DESTDIR = ../../../release
18 | }
19 |
--------------------------------------------------------------------------------
/src/dissectors/SIP/sipplugin.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2018 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef SIP_H
22 | #define SIP_H
23 |
24 | #include
25 | #include
26 | #include "dissectors/dissectorplugin.h"
27 |
28 | class SIPPlugin : public QObject, DissectorPlugin
29 | {
30 | Q_OBJECT
31 | Q_PLUGIN_METADATA(IID DissectorPlugin_iid)
32 | Q_INTERFACES(DissectorPlugin)
33 |
34 | public:
35 | QVariant getProtocolName() override;
36 | bool enableByDefault() override;
37 | QList getStartCodes() override;
38 | QVariant getSource(const Packet &p) override;
39 | QVariant getDestination(const Packet &p) override;
40 | QVariant getInfo(const Packet &p, int role = Qt::DisplayRole) override;
41 | int preprocessPacket(const Packet &p, QList &list) override;
42 | void dissectPacket(const Packet &p, QTreeWidgetItem *parent) override;
43 |
44 | private:
45 | void dissectDMXInfo(const Packet &p, QTreeWidgetItem *parent);
46 | void dissectSIPInfo(const Packet &p, QTreeWidgetItem *parent);
47 | void dissectOrginatorInfo(const Packet &p, QTreeWidgetItem *parent);
48 | void dissectHistoryInfo(const Packet &p, QTreeWidgetItem *parent);
49 |
50 | QTreeWidgetItem& manufacturerDetails(const Packet &p, uint8_t slotMSB, uint8_t slotLSB);
51 | bool validateChecksum(const Packet &p);
52 | };
53 |
54 | #endif // SIP_H
55 |
--------------------------------------------------------------------------------
/src/dissectors/UTF8/README.md:
--------------------------------------------------------------------------------
1 | E1.11:2008 UTF-8 Text Packet
2 |
--------------------------------------------------------------------------------
/src/dissectors/UTF8/UTF8.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = lib
2 | CONFIG += plugin
3 | QT += widgets
4 | INCLUDEPATH += ../../
5 | HEADERS = utf8plugin.h \
6 | ../../packetbuffer.h \
7 | ../../util.h
8 | SOURCES = utf8plugin.cpp \
9 | ../../packetbuffer.cpp \
10 | ../../util.cpp
11 | TARGET = $$qtLibraryTarget(dissectorpluginUTF8)
12 |
13 | CONFIG(debug, debug|release) {
14 | DESTDIR = ../../../debug
15 | }
16 | CONFIG(release, debug|release) {
17 | DESTDIR = ../../../release
18 | }
19 |
--------------------------------------------------------------------------------
/src/dissectors/UTF8/utf8plugin.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2018 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef UTF8_H
22 | #define UTF8_H
23 |
24 | #include
25 | #include
26 | #include "dissectors/dissectorplugin.h"
27 |
28 | class UTF8Plugin : public QObject, DissectorPlugin
29 | {
30 | Q_OBJECT
31 | Q_PLUGIN_METADATA(IID DissectorPlugin_iid)
32 | Q_INTERFACES(DissectorPlugin)
33 |
34 | public:
35 | QVariant getProtocolName() override;
36 | bool enableByDefault() override;
37 | QList getStartCodes() override;
38 | QVariant getSource(const Packet &p) override;
39 | QVariant getDestination(const Packet &p) override;
40 | QVariant getInfo(const Packet &p, int role = Qt::DisplayRole) override;
41 | int preprocessPacket(const Packet &p, QList &list) override;
42 | void dissectPacket(const Packet &p, QTreeWidgetItem *parent) override;
43 |
44 | private:
45 | QString getText(const Packet &p);
46 | };
47 |
48 | #endif // UTF8_H
49 |
--------------------------------------------------------------------------------
/src/dissectors/dissectorplugin.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2018 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | // The interface for dissector plugins
22 |
23 | #ifndef DISSECTORPLUGIN_H
24 | #define DISSECTORPLUGIN_H
25 |
26 | #include
27 | #include
28 |
29 | class Packet;
30 |
31 | class DissectorPlugin
32 | {
33 | public:
34 | /*
35 | * @return Protocol friendly name
36 | */
37 | virtual QVariant getProtocolName() = 0;
38 |
39 | /*
40 | * @return Should this protocol be enabled by default
41 | * Generally disable for 'greedy' protocols that absorb
42 | * multiple start codes
43 | */
44 | virtual bool enableByDefault() = 0;
45 |
46 | /*
47 | * @return Accepted startcodes
48 | */
49 | virtual QList getStartCodes() = 0;
50 |
51 | /*
52 | * @return Packet source address
53 | */
54 | virtual QVariant getSource(const Packet &p) = 0;
55 |
56 | /*
57 | * @return Packet destination address
58 | */
59 | virtual QVariant getDestination(const Packet &p) = 0;
60 |
61 | /*
62 | * @return Get packet info
63 | */
64 | virtual QVariant getInfo(const Packet &p, int role = Qt::DisplayRole) = 0;
65 |
66 | /*
67 | * Process packet and add to list
68 | * @return number of packets added to list
69 | */
70 | virtual int preprocessPacket(const Packet &p, QList &list) = 0;
71 |
72 | /*
73 | * Dissect and create tree
74 | */
75 | virtual void dissectPacket(const Packet &p, QTreeWidgetItem *parent) = 0;
76 | };
77 |
78 | #define DissectorPlugin_iid "org.etc.EtcDmxTool.Plugins.Dissector"
79 |
80 | Q_DECLARE_INTERFACE(DissectorPlugin, DissectorPlugin_iid)
81 |
82 | #endif // DISSECTORPLUGIN_H
83 |
--------------------------------------------------------------------------------
/src/e110_startcodes.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef E120_STARTCODES_H
22 | #define E120_STARTCODES_H
23 |
24 | namespace E110_SC {
25 | enum {
26 | DIMMER_DATA = 0x00,
27 | ASCII_TEXT = 0x17,
28 | UTF8_TEXT = 0x90,
29 | RDM = 0xCC,
30 | SIP = 0xCF,
31 | RDM_DSC_RESPONSE = 0xFE,
32 |
33 | // Electronic Theatre Controls
34 | NONOFFICIAL_ETC_FIXLINK = 0x45,
35 |
36 | // Goldern Sea/Highend Systems
37 | NONOFFICIAL_HIGHEND_NOOP = 0xA8,
38 | NONOFFICIAL_HIGHEND_UPDATE_HEADER = 0xA9,
39 | NONOFFICIAL_HIGHEND_UPDATE_DATA = 0xAA
40 | };
41 | }
42 |
43 | #endif // E120_STARTCODES_H
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/etc_include/RdmDeviceInfo.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright 2019 ETC Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *****************************************************************************/
16 |
17 | #ifndef RDM_DEVICE_INFO_H_
18 | #define RDM_DEVICE_INFO_H_
19 |
20 | #include
21 | #include
22 |
23 | #include "rdmEtcConsts.h"
24 | #include "uid.h"
25 |
26 | struct RdmDeviceInfo
27 | {
28 | // Constructor for RdmDeviceInfo; two flags determine if the information is valid yet
29 | explicit RdmDeviceInfo(uid i)
30 | : manufacturer_id (i.manu),
31 | device_id (i.id),
32 | rdm_protocol_version(0),
33 | device_model_id(0),
34 | product_category_type(0),
35 | software_version_id(0),
36 | dmx_footprint(0),
37 | dmx_personality(0),
38 | dmx_start_address(0),
39 | subdevice_count(0),
40 | sensor_count(0),
41 | port_number(0),
42 | subdevice_id(0),
43 | software_version_label_valid(false),
44 | e120_device_info_valid(false)
45 | {
46 | memset(software_version_label, 0, sizeof(software_version_label));
47 | }
48 | RdmDeviceInfo() {}
49 | uint16_t manufacturer_id; // ESTA-assigned manufacturer id
50 | uint32_t device_id; // Unique to the manufacturer
51 | uint8_t software_version_label[RDM_MAX_TEXT + 1]; // text, up to 32 characters
52 |
53 | uint16_t rdm_protocol_version;
54 | uint16_t device_model_id; // manufacturer-unique, assigned to device/model
55 | uint16_t product_category_type; // enumerated
56 | uint32_t software_version_id;
57 |
58 | // DMX universe footprint of the device
59 | uint16_t dmx_footprint; // up to 512
60 | uint16_t dmx_personality;
61 | uint16_t dmx_start_address; // start at slot 1
62 |
63 | uint16_t subdevice_count;
64 | uint8_t sensor_count;
65 |
66 | // Other Device Properties
67 | uint8_t port_number; // Port number on which the device has been discovered (1-based)
68 |
69 | uint16_t subdevice_id;
70 |
71 | // Used to test for full completion of the struct
72 | bool software_version_label_valid;
73 | bool e120_device_info_valid;
74 | };
75 |
76 | #endif // RDM_DEVICE_INFO_H_
77 |
--------------------------------------------------------------------------------
/src/etc_include/deftypes.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2015 Electronic Theatre Controls, http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | /*deftypes.h
22 | This is the list of standard types used in common code.
23 | Except for uint, they represent types that are always the same size,
24 | no matter what platform they are on.
25 |
26 | Note that int is also a standard type that is acceptable (although
27 | not always the same size)
28 |
29 | This version wraps the Qt standard types, so is platform neutral
30 | */
31 | #ifndef _DEFTYPES_H_
32 | #define _DEFTYPES_H_
33 |
34 | #include
35 |
36 | typedef unsigned int uint; //An arbitrary unsigned integer
37 | typedef qint8 int1; //An integer 1 byte long
38 | typedef quint8 uint1; //An unsigned integer 1 byte long
39 | typedef qint16 int2; //An integer 2 bytes long
40 | typedef quint16 uint2; //An unsigned integer 2 bytes long
41 | typedef qint32 int4; //An integer 4 bytes long
42 | typedef quint32 uint4; //An unsigned integer 4 bytes long
43 | typedef qint64 int8; //An integer 8 bytes long
44 | typedef quint64 uint8; //An unsigned integer 8 bytes long
45 |
46 | #endif /*_DEFTYPES_H_*/
47 |
--------------------------------------------------------------------------------
/src/etc_include/uid.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright 2019 ETC Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *****************************************************************************/
16 |
17 | #ifndef UID_H_
18 | #define UID_H_
19 |
20 | #include
21 |
22 | #ifdef __cplusplus
23 | extern "C" {
24 | #endif
25 |
26 | /*****The basic RDM UID definition*****/
27 | typedef struct uid
28 | {
29 | uint16_t manu; /*The manufacturer id*/
30 | uint32_t id; /*the device id under that manufacturer*/
31 | } uid;
32 |
33 | #ifdef __cplusplus
34 | };
35 | #endif
36 |
37 | #endif /* UID_H_ */
38 |
--------------------------------------------------------------------------------
/src/fancysliderstyle.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef FANCYSLIDER_H
22 | #define FANCYSLIDER_H
23 |
24 | #include
25 | #include
26 | #include
27 | #include
28 |
29 | class FancyFaderStyle : public QProxyStyle
30 | {
31 | public:
32 | virtual void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = Q_NULLPTR) const;
33 | virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *option, SubControl sc, const QWidget *widget) const;
34 | virtual int pixelMetric(PixelMetric metric, const QStyleOption *option = Q_NULLPTR, const QWidget *widget = Q_NULLPTR) const;
35 | };
36 |
37 | #endif // FANCYSLIDER_H
38 |
--------------------------------------------------------------------------------
/src/file.h:
--------------------------------------------------------------------------------
1 | #ifndef FILE_H
2 | #define FILE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include "packettable.h"
8 |
9 | class FileOpen : public QObject
10 | {
11 | Q_OBJECT
12 | public:
13 | explicit FileOpen(PacketTable &packetTable, QString fileName, QObject *parent = nullptr);
14 | ~FileOpen();
15 |
16 | signals:
17 | void Started();
18 | void Finished();
19 |
20 | public slots:
21 | void doRead();
22 | private:
23 | void loadOriginal(QFile* file);
24 | bool loadCompressed(QFile* file);
25 | bool loadGoddardDesigns(QFile* file);
26 |
27 | PacketTable *m_packetTable;
28 | QFile *m_file;
29 | };
30 |
31 | class FileSave : public QObject
32 | {
33 | Q_OBJECT
34 | public:
35 | typedef enum {
36 | original,
37 | compressed
38 | } format_t;
39 |
40 | typedef enum {
41 | CopyAndSave,
42 | StreamToFile
43 | } operatingMode_t;
44 |
45 | explicit FileSave(PacketTable &packetTable, QString fileName, format_t fileFormat = original, operatingMode_t mode = CopyAndSave, QObject *parent = nullptr);
46 | ~FileSave();
47 |
48 | signals:
49 | void Started();
50 | void Finished();
51 |
52 | public slots:
53 | void doSave();
54 | private:
55 | void writeTable();
56 | void writePacket(QTextStream &fileStream, const Packet &packet);
57 | void writePacket(QDataStream &fileStream, const Packet &packet);
58 | PacketTable *m_packetTable;
59 | QFile *m_file;
60 | QTextStream *m_stream;
61 | operatingMode_t m_mode;
62 | format_t m_format;
63 | };
64 |
65 | #endif // FILESAVE_H
66 |
--------------------------------------------------------------------------------
/src/gridwidget.h:
--------------------------------------------------------------------------------
1 | // Copyright 2016 Tom Barthel-Steer
2 | // http://www.tomsteer.net
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | #ifndef GRIDWIDGET_H
17 | #define GRIDWIDGET_H
18 |
19 | #include
20 | #include
21 |
22 | /**
23 | * @brief The GridWidget class provides a control for a grid of 512 numeric values, with
24 | * configurable color backgrounds and selection. Used in the app for showing and editing DMX style values
25 | */
26 | class GridWidget : public QWidget
27 | {
28 | Q_OBJECT
29 | public:
30 | explicit GridWidget(QWidget *parent = Q_NULLPTR);
31 |
32 | void setCellColor(int cell, const QColor &color);
33 | /**
34 | * @brief setCellValue - sets the value for a cell
35 | * @param cell - The cell number to set, 0-511
36 | * @param value - The string value to set
37 | */
38 | void setCellValue(int cell, const QString &value);
39 | /**
40 | * @brief cellValue returns the value of the specified cell
41 | * @param cell - which cell, 0-511
42 | * @return the value
43 | */
44 | QString cellValue(int cell);
45 | /**
46 | * @brief selectedCell returns the currently selected cell, or -1 if no cell is selected
47 | * @return the selected cell, or -1 if no cell selected
48 | */
49 | QList selectedCells() const { return m_selectedAddresses; }
50 | /**
51 | * @brief setMultiSelect sets whether multiple cells can be selected at once
52 | **/
53 | void setMultiSelect(bool value) {m_allowMultiSelect = value;}
54 | signals:
55 | // The user changed the selected address. -1 means no selected address
56 | void selectedCellsChanged(QList selectedCells);
57 | // User double clicked on a cell.
58 | void cellDoubleClick(quint16 address);
59 |
60 | protected:
61 | virtual void paintEvent(QPaintEvent *event) override;
62 | virtual QSize minimumSizeHint() const override;
63 | virtual QSize sizeHint() const override;
64 | virtual void mousePressEvent(QMouseEvent *event) override;
65 | virtual void mouseMoveEvent(QMouseEvent *event) override;
66 | virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
67 | virtual bool event(QEvent *event) override;
68 | virtual void keyPressEvent(QKeyEvent *event) override;
69 |
70 | // Returns the cell under point, -1 for none
71 | int cellHitTest(const QPoint &point);
72 |
73 | private:
74 | QList m_selectedAddresses;
75 | QVector m_colors;
76 | QStringList m_values;
77 | bool m_allowMultiSelect = false;
78 | QPoint m_lastClickPoint;
79 | protected:
80 | int m_cellHeight;
81 | };
82 |
83 | #endif // GRIDWIDGET_H
84 |
--------------------------------------------------------------------------------
/src/hexlineedit.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include "hexlineedit.h"
22 | #include
23 |
24 | static QList ACCEPTED_KEYS =
25 | {
26 | Qt::Key_0,
27 | Qt::Key_1,
28 | Qt::Key_2,
29 | Qt::Key_3,
30 | Qt::Key_4,
31 | Qt::Key_5,
32 | Qt::Key_6,
33 | Qt::Key_7,
34 | Qt::Key_8,
35 | Qt::Key_9,
36 | Qt::Key_A,
37 | Qt::Key_B,
38 | Qt::Key_C,
39 | Qt::Key_D,
40 | Qt::Key_E,
41 | Qt::Key_F,
42 | Qt::Key_Delete,
43 | Qt::Key_Backspace,
44 | Qt::Key_Space
45 | };
46 |
47 | HexLineEdit::HexLineEdit(QWidget *parent) : QLineEdit(parent)
48 | {
49 | m_valid = true;
50 | }
51 |
52 | void HexLineEdit::keyPressEvent(QKeyEvent * event)
53 | {
54 | if(!ACCEPTED_KEYS.contains(event->key()))
55 | {
56 | event->setAccepted(false);
57 | return;
58 | }
59 | QLineEdit::keyPressEvent(event);
60 | if(event->key()!=Qt::Key_Backspace && event->key()!=Qt::Key_Delete)
61 | setText(fixupHex(text()));
62 | }
63 |
64 | QString HexLineEdit::fixupHex(const QString &input)
65 | {
66 | QString hex = input.toUpper();
67 | QString result;
68 | hex = hex.replace(QString(" "), QString());
69 | for(int i=0; i(value.toInt(Q_NULLPTR, 16)));
89 | }
90 | return result;
91 | }
92 |
--------------------------------------------------------------------------------
/src/hexlineedit.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef HEXLINEEDIT_H
22 | #define HEXLINEEDIT_H
23 |
24 | #include
25 | #include
26 |
27 | class HexLineEdit : public QLineEdit
28 | {
29 | Q_OBJECT
30 | public:
31 | HexLineEdit(QWidget *parent = Q_NULLPTR);
32 | QByteArray currentValue();
33 | protected:
34 | virtual void keyPressEvent(QKeyEvent * event);
35 | private:
36 | QString fixupHex(const QString &input);
37 | bool m_valid;
38 | };
39 |
40 | #endif // HEXLINEEDIT_H
41 |
--------------------------------------------------------------------------------
/src/levelindicator.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include "levelindicator.h"
22 | #include
23 | #include
24 |
25 | LevelIndicator::LevelIndicator(QWidget *parent) : QWidget(parent) , m_value(0)
26 | {
27 | }
28 |
29 |
30 |
31 | void LevelIndicator::setValue(quint8 value)
32 | {
33 | m_value = value;
34 | update();
35 | }
36 |
37 | void LevelIndicator::paintEvent(QPaintEvent *event)
38 | {
39 | Q_UNUSED(event);
40 | QPainter painter(this);
41 | painter.setRenderHint(QPainter::Antialiasing);
42 |
43 | // Draw background rounded rect
44 | QRect bounds;
45 | bounds.setWidth(qMin(30, this->rect().width()));
46 | bounds.setHeight(this->rect().height()-6);
47 | bounds.moveCenter(this->rect().center());
48 | QPainterPath boundsPath;
49 | boundsPath.addRoundedRect(bounds, 10, 10);
50 | painter.fillPath(boundsPath, QBrush(QColor("#e5e5e5")));
51 |
52 | // Draw level bar
53 | QRect levelBar = bounds;
54 | levelBar.setHeight(levelBar.height() * m_value / 255);
55 | levelBar.moveBottom(bounds.bottom());
56 | QPainterPath levelPath;
57 | levelPath.addRoundedRect(levelBar, 10, 10);
58 | painter.fillPath(levelPath, QBrush(QColor("#00aeef")));
59 |
60 | // Draw bounding rect
61 | QPen boundsPen(QColor("#262524"));
62 | boundsPen.setWidth(2);
63 | painter.strokePath(boundsPath, boundsPen);
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/src/levelindicator.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef LEVELINDICATOR_H
22 | #define LEVELINDICATOR_H
23 |
24 | #include
25 |
26 | class LevelIndicator : public QWidget
27 | {
28 | Q_OBJECT
29 | public:
30 | explicit LevelIndicator(QWidget *parent = nullptr);
31 | public slots:
32 | void setValue(quint8 value);
33 | protected:
34 | virtual void paintEvent(QPaintEvent *event);
35 | private:
36 | quint8 m_value;
37 | };
38 |
39 | #endif // LEVELINDICATOR_H
40 |
--------------------------------------------------------------------------------
/src/packetbuffer.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include
22 |
23 | const QColor Packet::Invalid::INVALID_PACKET_BACKGROUND = QColor(255, 80, 80);
24 | const QColor Packet::Invalid::INVALID_PARAMETER_BACKGROUND = QColor(255, 80, 80);
25 |
26 | Packet::Packet()
27 | : QByteArray()
28 | , timestamp(0)
29 | {
30 | }
31 |
32 | Packet::Packet(const char* data, int size)
33 | : QByteArray(data, size)
34 | , timestamp(0)
35 | {
36 | }
37 |
38 | Packet::Packet(const QByteArray &data)
39 | : QByteArray(data)
40 | , timestamp(0)
41 | {
42 | }
43 |
44 | Packet::Packet(const Packet &other, int start)
45 | : QByteArray()
46 | , timestamp(other.timestamp)
47 | {
48 | append(other.mid(start));
49 | }
50 |
51 | unsigned char Packet::operator[](int i) const
52 | {
53 | if(icount())
54 | return (unsigned char)this->at(i);
55 |
56 | return 0;
57 | // TODO : better handling of invalid access/packets with exceptions
58 | //throw PacketAccessException();
59 | }
60 |
--------------------------------------------------------------------------------
/src/packetbuffer.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 | #include
26 |
27 | struct PacketAccessException : public std::exception {
28 | const char * what () const throw () {
29 | return "Packet Invalid Access";
30 | }
31 | };
32 |
33 |
34 | class Packet : public QByteArray
35 | {
36 | public:
37 | Packet();
38 | Packet(const char *data, int size);
39 | Packet(const QByteArray &data);
40 | Packet(const Packet &other, int start = 0);
41 |
42 | qint64 timestamp;
43 | unsigned char operator[] ( int i ) const;
44 |
45 | class Invalid
46 | {
47 | public:
48 | static const QColor INVALID_PACKET_BACKGROUND;
49 | static const QColor INVALID_PARAMETER_BACKGROUND;
50 | };
51 | };
52 |
--------------------------------------------------------------------------------
/src/packettable.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #ifndef PACKETTABLE_H
22 | #define PACKETTABLE_H
23 |
24 | #include
25 |
26 | #include "packetbuffer.h"
27 | #include "dissectors.h"
28 |
29 | class PacketDissector;
30 |
31 | class PacketTable : public QAbstractTableModel
32 | {
33 | Q_OBJECT
34 |
35 | public:
36 | PacketTable(QObject *parent = Q_NULLPTR);
37 | virtual ~PacketTable();
38 |
39 | enum COLUMNS
40 | {
41 | Timestamp,
42 | Source,
43 | Destination,
44 | Protocol,
45 | Info,
46 | COLCOUNT
47 | };
48 |
49 | enum TIMEFORMAT
50 | {
51 | DATE_AND_TIME,
52 | TIME_OF_DAY,
53 | SECONDS_SINCE_CAPTURE_START,
54 | SECONDS_SINCE_PREVIOUS_PACKET
55 | };
56 |
57 | int rowCount(const QModelIndex & parent = QModelIndex()) const;
58 | int columnCount(const QModelIndex & parent = QModelIndex()) const;
59 |
60 | QVariant headerData(int section, Qt::Orientation orientation, int role) const;
61 | QVariant data(const QModelIndex &index, int role) const;
62 |
63 | // Raw data access
64 | void clearAll();
65 | void appendPacket(Packet &packet);
66 |
67 | const Packet &getPacket(int row) const;
68 | Packet takePacket(int row);
69 |
70 | // Register dissectors
71 | void registerProtocolDissectors(dissectors *dissectors);
72 |
73 | // Time Format
74 | void setTimeFormat(TIMEFORMAT format) {
75 | m_timeFormat = format;
76 | emit timeFormatChange();
77 | }
78 | TIMEFORMAT timeFormat() const { return m_timeFormat;}
79 |
80 | void discardDmxData();
81 | signals:
82 | void newPacket();
83 | void timeFormatChange();
84 |
85 | private:
86 | QList m_packets;
87 | dissectors *m_dissectors = Q_NULLPTR;
88 | TIMEFORMAT m_timeFormat;
89 | QString formatTime(quint64 time, quint64 previous, quint64 start) const;
90 | };
91 |
92 | #endif // PACKETTABLE_H
93 |
--------------------------------------------------------------------------------
/src/rdm/rdmpidstrings.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include
22 |
23 | namespace RDM_PIDString {
24 | QString productCategoryToString(quint16 value);
25 |
26 | QString detailIdToString(quint16 detailId);
27 |
28 | QString statusTypeToString(quint8 statusType);
29 |
30 | QString commandClassToString(quint8 commandClass);
31 |
32 | QString responseTypeToString(quint8 responseType);
33 |
34 | QString nackReasonToString(quint16 reasonCode);
35 |
36 | QString statusMessageToString(quint16 statusMessage);
37 |
38 | QString dataTypeToString(quint8 dataType);
39 | }
40 |
--------------------------------------------------------------------------------
/src/selectdevicedialog.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include "selectdevicedialog.h"
22 | #include "capturedevice.h"
23 |
24 |
25 | SelectDeviceDialog::SelectDeviceDialog(QWidget *parent ) :
26 | QDialog(parent),
27 | m_devList(Q_NULLPTR)
28 | {
29 | setWindowFlag(Qt::WindowContextHelpButtonHint, false);
30 | m_dialog.setupUi(this);
31 | m_dialog.okButton->setEnabled(false);
32 | refreshDeviceList();
33 | }
34 |
35 | SelectDeviceDialog::~SelectDeviceDialog()
36 | {
37 | delete m_devList;
38 | }
39 |
40 | ICaptureDevice *SelectDeviceDialog::selectedDevice()
41 | {
42 | int row = m_dialog.listWidget->currentRow();
43 | if(row<0) return Q_NULLPTR;
44 | return m_devList->getDevice(row);
45 | }
46 |
47 | void SelectDeviceDialog::on_btnRefreshList_pressed()
48 | {
49 | refreshDeviceList();
50 | }
51 |
52 | void SelectDeviceDialog::refreshDeviceList()
53 | {
54 | m_dialog.listWidget->clear();
55 | if(m_devList) delete m_devList;
56 |
57 | m_devList = new CaptureDeviceList();
58 |
59 | QStringList devices = m_devList->deviceNames();
60 | m_dialog.listWidget->addItems(devices);
61 |
62 | if(devices.count() > 0)
63 | {
64 | m_dialog.listWidget->setCurrentItem(m_dialog.listWidget->item(0));
65 | } else {
66 | #if defined(Q_OS_LINUX) || defined(Q_OS_Q_OS_OSX)
67 | m_dialog.listWidget->addItem(tr("No devices found - permission issue?"));
68 | #endif
69 | }
70 | m_dialog.okButton->setEnabled(devices.count() > 0);
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/src/selectdevicedialog.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #pragma once
22 | #include
23 | #include "ui_selectdevicedialog.h"
24 | #include "whip/ftdcomm.h"
25 |
26 |
27 | class ICaptureDevice;
28 | class CaptureDeviceList;
29 |
30 | class SelectDeviceDialog : public QDialog
31 | {
32 | Q_OBJECT
33 | public:
34 | SelectDeviceDialog(QWidget *parent = Q_NULLPTR);
35 | virtual ~SelectDeviceDialog();
36 | void addDevices(const QStringList &devices);
37 | ICaptureDevice *selectedDevice();
38 | private slots:
39 | void on_btnRefreshList_pressed();
40 | private:
41 | void refreshDeviceList();
42 | Ui::SelectDeviceDialog m_dialog;
43 | CaptureDeviceList *m_devList;
44 | };
45 |
46 |
--------------------------------------------------------------------------------
/src/serialdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "serialdialog.h"
2 | #include
3 |
4 | SerialDialog::SerialDialog(QWidget *parent) : QDialog(parent)
5 | {
6 | m_dialog.setupUi(this);
7 | setWindowFlag(Qt::WindowContextHelpButtonHint, false);
8 |
9 | QList ports = QSerialPortInfo::availablePorts();
10 | foreach(auto port, ports)
11 | {
12 | m_dialog.cbPort->addItem(port.portName());
13 | }
14 |
15 | foreach(auto baud, QSerialPortInfo::standardBaudRates())
16 | {
17 | m_dialog.cbSpeed->addItem(QString::number(baud));
18 | if(baud==115200) m_dialog.cbSpeed->setCurrentIndex(m_dialog.cbSpeed->count()-1);
19 | }
20 |
21 | // Data bits
22 | m_dialog.cbData->addItem(tr("5 bits"), QVariant(QSerialPort::Data5));
23 | m_dialog.cbData->addItem(tr("6 bits"), QVariant(QSerialPort::Data6));
24 | m_dialog.cbData->addItem(tr("7 bits"), QVariant(QSerialPort::Data7));
25 | m_dialog.cbData->addItem(tr("8 bits"), QVariant(QSerialPort::Data8));
26 | m_dialog.cbData->setCurrentIndex(m_dialog.cbData->count()-1);
27 |
28 | //parity
29 | m_dialog.cbParity->addItem(tr("None"), QVariant(QSerialPort::NoParity));
30 | m_dialog.cbParity->addItem(tr("Even"), QVariant(QSerialPort::EvenParity));
31 | m_dialog.cbParity->addItem(tr("Odd"), QVariant(QSerialPort::OddParity));
32 | m_dialog.cbParity->addItem(tr("Space"), QVariant(QSerialPort::SpaceParity));
33 | m_dialog.cbParity->addItem(tr("Mark"), QVariant(QSerialPort::MarkParity));
34 | // stop
35 | m_dialog.cbStop->addItem(tr("1"), QVariant(QSerialPort::OneStop));
36 | m_dialog.cbStop->addItem(tr("1.5"), QVariant(QSerialPort::OneAndHalfStop));
37 | m_dialog.cbStop->addItem(tr("2"), QVariant(QSerialPort::TwoStop));
38 |
39 | // flow
40 | m_dialog.cbFlow->addItem(tr("None"), QVariant(QSerialPort::NoFlowControl));
41 | m_dialog.cbFlow->addItem(tr("Hardware"), QVariant(QSerialPort::HardwareControl));
42 | m_dialog.cbFlow->addItem(tr("XON/XOFF"), QVariant(QSerialPort::SoftwareControl));
43 | }
44 |
45 | SerialDialog::~SerialDialog()
46 | {
47 |
48 | }
49 | QString SerialDialog::portName()
50 | {
51 | return m_dialog.cbPort->currentText();
52 | }
53 |
54 | QSerialPort::BaudRate SerialDialog::baud()
55 | {
56 | return static_cast(m_dialog.cbSpeed->currentText().toInt());
57 | }
58 |
59 | QSerialPort::DataBits SerialDialog::dataBits()
60 | {
61 | return static_cast(m_dialog.cbData->currentData().toInt());
62 | }
63 |
64 | QSerialPort::Parity SerialDialog::parity()
65 | {
66 | return static_cast(m_dialog.cbParity->currentData().toInt());
67 | }
68 | QSerialPort::StopBits SerialDialog::stopBits()
69 | {
70 | return static_cast(m_dialog.cbStop->currentData().toInt());
71 | }
72 |
73 | QSerialPort::FlowControl SerialDialog::flowControl()
74 | {
75 | return static_cast(m_dialog.cbFlow->currentData().toInt());
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/src/serialdialog.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #pragma once
22 | #include
23 | #include "ui_serialdialog.h"
24 | #include
25 |
26 | class SerialDialog : public QDialog
27 | {
28 | Q_OBJECT
29 | public:
30 | SerialDialog(QWidget *parent = Q_NULLPTR);
31 | virtual ~SerialDialog();
32 |
33 | QString portName();
34 | QSerialPort::BaudRate baud();
35 | QSerialPort::DataBits dataBits();
36 | QSerialPort::Parity parity();
37 | QSerialPort::StopBits stopBits();
38 | QSerialPort::FlowControl flowControl();
39 | private:
40 | Ui::SerialDialog m_dialog;
41 | };
42 |
43 |
--------------------------------------------------------------------------------
/src/stdout.cpp:
--------------------------------------------------------------------------------
1 | #include "stdout.h"
2 | QTextStream& qStdOut()
3 | {
4 | static QTextStream ts( stdout );
5 | return ts;
6 | }
7 |
8 | QTextStream& qStdErr()
9 | {
10 | static QTextStream ts( stderr );
11 | return ts;
12 | }
13 |
--------------------------------------------------------------------------------
/src/stdout.h:
--------------------------------------------------------------------------------
1 | #ifndef STDOUT_H
2 | #define STDOUT_H
3 | #include
4 |
5 | QTextStream& qStdOut();
6 | QTextStream& qStdErr();
7 |
8 | #endif // STDOUT_H
9 |
--------------------------------------------------------------------------------
/src/updatedialog.cpp:
--------------------------------------------------------------------------------
1 | #include "updatedialog.h"
2 |
3 | #include
4 |
5 | UpdateDialog::UpdateDialog(QWidget *parent): QDialog(parent)
6 | {
7 | this->setWindowTitle(tr("Update Gadget2"));
8 | this->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
9 | m_bar = new QProgressBar(this);
10 | m_bar->setMinimum(0);
11 | m_bar->setMaximum(0);
12 |
13 | m_label = new QLabel(this);
14 | m_label->setMinimumHeight(200);
15 | m_label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
16 | m_label->setWordWrap(true);
17 |
18 | m_button = new QPushButton(this);
19 | m_button->setText(tr("Done"));
20 | m_button->setEnabled(false);
21 |
22 | QVBoxLayout *layout = new QVBoxLayout(this);
23 | layout->addWidget(m_label);
24 | layout->addWidget(m_bar);
25 | layout->addWidget(m_button);
26 |
27 | this->setLayout(layout);
28 | }
29 |
30 | void UpdateDialog::setStatusText(const QString &text)
31 | {
32 | m_label->setText(text);
33 | }
34 |
35 | void UpdateDialog::doneAndRestart()
36 | {
37 | m_button->setText(tr("Restart"));
38 | m_button->setEnabled(true);
39 | }
40 |
--------------------------------------------------------------------------------
/src/updatedialog.h:
--------------------------------------------------------------------------------
1 | #ifndef UPDATEDIALOG_H
2 | #define UPDATEDIALOG_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | class UpdateDialog : public QDialog
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | UpdateDialog(QWidget *parent = Q_NULLPTR);
16 |
17 | public slots:
18 | void setStatusText(const QString &text);
19 | void doneAndRestart();
20 | private:
21 | QProgressBar *m_bar;
22 | QLabel *m_label;
23 | QPushButton *m_button;
24 | };
25 |
26 | #endif // UPDATEDIALOG_H
27 |
--------------------------------------------------------------------------------
/src/whip/comm.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #include
7 | #include
8 | #include "ft_comm.h"
9 |
10 | enum FTDCommError
11 | {
12 | FTDCOMM_OK,
13 | FTDCOMM_ERROR,
14 | FTDCOMM_NOTETC,
15 | FTDCOMM_ALREADYOPEN,
16 | FTDCOMM_ALREADYCLOSED,
17 | FTDCOMM_INVALIDDEVICENUMBER
18 | };
19 |
20 | class CComm
21 | {
22 | public:
23 | CComm(void);
24 | ~CComm(void);
25 |
26 | // Attempt to connect to the USB device. Returns TRUE if connection was made OK.
27 | bool Connect();
28 |
29 | int SendBlock(unsigned char *iDataOut, int iNumToSend);
30 | int GetBlock(unsigned char *iData, int iNumRead, bool i_bUnPack=true);
31 | int setBaudRate(unsigned char iBaud=0xA0);
32 | void CharToASCIIhex(unsigned char ucInput, unsigned char* pucOutMSB, unsigned char* pucOutLSB);
33 | void NumberToASCIIhex(unsigned short usNumb, CStringA& csDest);
34 | unsigned char AppendChecksum(CStringA &csCmdString, bool ibPreserveCmnd=true);
35 | unsigned char utilChar2Hex(unsigned char wdChar);
36 | void Close();
37 | void getVer(unsigned char *iData);
38 | void setVer(unsigned char *iData);
39 | void pack_USB_out(unsigned char *iOutBuff, unsigned char *iInBuff, int iLen);
40 | int UnPackFromUSB(unsigned char *iInBuff, unsigned char *iOutBuff, int len, int *sawBreak);
41 | bool m_bSFPresent;
42 | void SetSFSetting(bool isPresent);
43 | bool GetSFSetting();
44 |
45 | // For Desire. Copied(ish) from FTDComm.cpp
46 | FTDCommError SendData(unsigned char * Data, int DataLength);
47 | FTDCommError SendBreak();
48 | FTDCommError SendHoldOff();
49 | FTDCommError SendBreakStartAndData(unsigned char StartCode, unsigned char * Data, int DataLength);
50 | int ReceiveData(unsigned short * Data, int MaxLength);
51 |
52 | QString getDeviceName();
53 |
54 | FT_Comm Comm;
55 | bool m_bConnected;
56 | QString m_csDevName;
57 | private:
58 | void PackOutgoingBytes(unsigned char * InputBuff, unsigned char *OutputBuff, int Length);
59 | int UnPackIncomingBytes(unsigned char * InputBuff, unsigned short * OutputBuff, int Length);
60 | };
61 |
--------------------------------------------------------------------------------
/src/whip/ftdcomm.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Electronic Theatre Controls, Inc., http://www.etcconnect.com
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #pragma once
22 |
23 | #include "ftd2xx.h"
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | typedef enum
30 | {
31 | FTDCOMM_OK,
32 | FTDCOMM_ERROR,
33 | FTDCOMM_NOTETC,
34 | FTDCOMM_ALREADYOPEN,
35 | FTDCOMM_ALREADYCLOSED,
36 | FTDCOMM_INVALIDDEVICENUMBER
37 | } FTDCommError;
38 |
39 | class FTDComm
40 | {
41 | public:
42 | FTDComm(void);
43 | ~FTDComm(void);
44 |
45 | struct FtdiDevice
46 | {
47 | FtdiDevice();
48 | FtdiDevice(int devNum, QString serial, QString desc);
49 | int deviceNum;
50 | QString serialNum;
51 | QString description;
52 | };
53 |
54 | FTDCommError Open(int DeviceNum);
55 | FTDCommError OpenBySerialNumber(QString SerialNumber);
56 | FTDCommError Close();
57 | bool GetDeviceOpen();
58 | FTDCommError SetupDevice(long BaudRate);
59 | int GetNumberOfDevices();
60 |
61 | QList GetUsbWhips();
62 |
63 | QString GetDeviceDescription(int DeviceNum);
64 | QString GetDeviceSerialNumber(int DeviceNum);
65 |
66 | FTDCommError SendData(unsigned char * Data, int DataLength);
67 | FTDCommError SendBreak();
68 | FTDCommError SendHoldOff();
69 | FTDCommError SendBreakStartAndData(unsigned char StartCode, unsigned char * Data, int DataLength);
70 |
71 | int ReceiveData(unsigned short * Data, DWORD MaxLength);
72 |
73 | private:
74 |
75 |
76 |
77 | FT_HANDLE DeviceHandle;
78 | bool DeviceOpen;
79 | int NumDevices;
80 |
81 | void PackOutgoingBytes(unsigned char * InputBuff, unsigned char *OutputBuff, int Length);
82 | int UnPackIncomingBytes(unsigned char * InputBuff, unsigned short * OutputBuff, int Length);
83 | };
84 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx.a
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx.so.1.4.8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx.so.1.4.8
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx.txt:
--------------------------------------------------------------------------------
1 | Output of 'file' command:
2 | =========================
3 | ./build/i386/libftd2xx.so.1.4.8: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=b81d8c00ca29a35dcd835f89a6eef84aba57236f, not stripped
4 | Output of 'readelf -A' command:
5 | ===============================
6 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/eedata.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/eedata.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/fte2data.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/fte2data.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee2232.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee2232.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee2232h.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee2232h.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee232.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee232.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee232h.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee232h.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee232r.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee232r.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee4232h.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/ftee4232h.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/fteeftx.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/fteeftx.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/serialno.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/EEPROM/serialno.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/Event.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/Event.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/baud.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/baud.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/bulk_in.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/bulk_in.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/config.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/config.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/device-list.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/device-list.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/ee.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/ee.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/ftd2xx-private.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/ftd2xx-private.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/ftd2xx.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/ftd2xx.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/idtable.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/idtable.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/usb_control.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libftd2xx/usb_control.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/core.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/core.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/descriptor.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/descriptor.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/hotplug.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/hotplug.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/io.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/io.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/linux_netlink.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/linux_netlink.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/linux_usbfs.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/linux_usbfs.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/poll_posix.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/poll_posix.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/threads_posix.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/os/threads_posix.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/sync.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/build/libusb/libusb/sync.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/BitMode/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Assuming libftd2xx.so is in /usr/local/lib, build with:
3 | *
4 | * gcc -o bitmode main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
5 | *
6 | * and run with:
7 | *
8 | * sudo ./bitmode [port number]
9 | */
10 | #include
11 | #include "../ftd2xx.h"
12 |
13 |
14 |
15 | int main(int argc, char *argv[])
16 | {
17 | DWORD bytesWritten = 0;
18 | DWORD baudRate = 9600;
19 | FT_STATUS ftStatus = FT_OK;
20 | FT_HANDLE ftHandle;
21 | UCHAR outputData;
22 | UCHAR pinStatus;
23 | int portNumber;
24 |
25 | if (argc > 1)
26 | {
27 | sscanf(argv[1], "%d", &portNumber);
28 | }
29 | else
30 | {
31 | portNumber = 0;
32 | }
33 |
34 | ftStatus = FT_Open(portNumber, &ftHandle);
35 | if (ftStatus != FT_OK)
36 | {
37 | /* FT_Open can fail if the ftdi_sio module is already loaded. */
38 | printf("FT_Open(%d) failed (error %d).\n", portNumber, (int)ftStatus);
39 | printf("Use lsmod to check if ftdi_sio (and usbserial) are present.\n");
40 | printf("If so, unload them using rmmod, as they conflict with ftd2xx.\n");
41 | return 1;
42 | }
43 |
44 | /* Enable bit-bang mode, where 8 UART pins (RX, TX, RTS etc.) become
45 | * general-purpose I/O pins.
46 | */
47 | printf("Selecting asynchronous bit-bang mode.\n");
48 | ftStatus = FT_SetBitMode(ftHandle,
49 | 0xFF, /* sets all 8 pins as outputs */
50 | FT_BITMODE_ASYNC_BITBANG);
51 | if (ftStatus != FT_OK)
52 | {
53 | printf("FT_SetBitMode failed (error %d).\n", (int)ftStatus);
54 | goto exit;
55 | }
56 |
57 | /* In bit-bang mode, setting the baud rate gives a clock rate
58 | * 16 times higher, e.g. baud = 9600 gives 153600 bytes per second.
59 | */
60 | printf("Setting clock rate to %d\n", baudRate * 16);
61 | ftStatus = FT_SetBaudRate(ftHandle, baudRate);
62 | if (ftStatus != FT_OK)
63 | {
64 | printf("FT_SetBaudRate failed (error %d).\n", (int)ftStatus);
65 | goto exit;
66 | }
67 |
68 | /* Use FT_Write to set values of output pins. Here we set
69 | * them to alternate low and high (0xAA == 10101010).
70 | */
71 | outputData = 0xAA;
72 | ftStatus = FT_Write(ftHandle, &outputData, 1, &bytesWritten);
73 | if (ftStatus != FT_OK)
74 | {
75 | printf("FT_Write failed (error %d).\n", (int)ftStatus);
76 | goto exit;
77 | }
78 |
79 | /* Despite its name, GetBitMode samples the values of the data pins. */
80 | ftStatus = FT_GetBitMode(ftHandle, &pinStatus);
81 | if (ftStatus != FT_OK)
82 | {
83 | printf("FT_GetBitMode failed (error %d).\n", (int)ftStatus);
84 | goto exit;
85 | }
86 |
87 | if (pinStatus != outputData)
88 | {
89 | printf("Failure: pin data is %02X, but expected %02X\n",
90 | (unsigned int)pinStatus,
91 | (unsigned int)outputData);
92 | goto exit;
93 | }
94 |
95 | printf("Success: pin data is %02X, as expected.\n",
96 | (unsigned int)pinStatus);
97 |
98 |
99 | exit:
100 | /* Return chip to default (UART) mode. */
101 | (void)FT_SetBitMode(ftHandle,
102 | 0, /* ignored with FT_BITMODE_RESET */
103 | FT_BITMODE_RESET);
104 |
105 | (void)FT_Close(ftHandle);
106 | return 0;
107 | }
108 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/EEPROM/erase/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | To build use the following gcc statement
3 | (assuming you have the d2xx library in the /usr/local/lib directory).
4 | gcc -o erase main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
5 | */
6 |
7 | #include
8 | #include "../../ftd2xx.h"
9 |
10 | #define BUF_SIZE 0x1000
11 |
12 | int main(int argc, char *argv[])
13 | {
14 | FT_STATUS ftStatus;
15 | FT_HANDLE ftHandle0;
16 | int iport;
17 |
18 | if(argc > 1) {
19 | sscanf(argv[1], "%d", &iport);
20 | }
21 | else {
22 | iport = 0;
23 | }
24 | printf("opening port %d\n", iport);
25 | FT_SetVIDPID(0x0403, 0x6007);
26 | ftStatus = FT_Open(iport, &ftHandle0);
27 | if(ftStatus != FT_OK) {
28 | /*
29 | This can fail if the ftdi_sio driver is loaded
30 | use lsmod to check this and rmmod ftdi_sio to remove
31 | also rmmod usbserial
32 | */
33 | printf("FT_Open(%d) failed\n", iport);
34 | return 1;
35 | }
36 |
37 | ftStatus = FT_EraseEE(ftHandle0);
38 | if(ftStatus != FT_OK) {
39 | printf("Erase failed\n");
40 | }
41 |
42 | FT_Close(ftHandle0);
43 | return 0;
44 | }
45 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/EEPROM/user/read/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | UA read sample.
3 |
4 | To build use the following gcc statement
5 | (assuming you have the d2xx library in the /usr/local/lib directory).
6 | gcc -o readua main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
7 | */
8 |
9 | #include
10 | #include
11 | #include
12 | #include "../../../ftd2xx.h"
13 |
14 | int main(int argc, char *argv[])
15 | {
16 | unsigned char * pucUAdata;
17 | DWORD dwUASize, dwUARead;
18 | FILE * fp;
19 | FT_HANDLE ftHandle0;
20 | FT_STATUS ftStatus;
21 | int iport;
22 |
23 | if(argc > 1) {
24 | sscanf(argv[1], "%d", &iport);
25 | }
26 | else {
27 | iport = 0;
28 | }
29 |
30 | printf("opening port %d\n", iport);
31 | ftStatus = FT_Open(iport, &ftHandle0);
32 | if(ftStatus == FT_OK) {
33 | printf("ftHandle0 = %p\n", ftHandle0);
34 | }
35 | else {
36 | /*
37 | This can fail if the ftdi_sio driver is loaded
38 | use lsmod to check this and rmmod ftdi_sio to remove
39 | also rmmod usbserial
40 | */
41 | printf("FT_Open(%d) failed\n", iport);
42 | return 1;
43 | }
44 |
45 | ftStatus = FT_EE_UASize(ftHandle0, &dwUASize);
46 | if(ftStatus == FT_OK)
47 | printf("dwUASize = %d\n", (int)dwUASize);
48 | else {
49 | printf("Could not read UA size\n");
50 | FT_Close(ftHandle0);
51 | return 1;
52 | }
53 | pucUAdata = (unsigned char *)malloc(dwUASize);
54 | if(pucUAdata == NULL) {
55 | printf("Out of resources\n");
56 | FT_Close(ftHandle0);
57 | return 1;
58 | }
59 | ftStatus = FT_EE_UARead(ftHandle0, pucUAdata, dwUASize, &dwUARead);
60 | if(ftStatus == FT_OK) {
61 | fp = fopen("UA_DATA.bin", "w+");
62 | fwrite(pucUAdata, 1, dwUARead, fp);
63 | fclose(fp);
64 | }
65 | else{
66 | printf("could not read UA\n");
67 | }
68 | free(pucUAdata);
69 | FT_Close(ftHandle0);
70 |
71 | return 0;
72 | }
73 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/EEPROM/user/read/ua_data.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-i386-1.4.8/release/examples/EEPROM/user/read/ua_data.bin
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/EEPROM/user/size/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | UA size sample.
3 |
4 | To build use the following gcc statement
5 | (assuming you have the d2xx library in the /usr/local/lib directory).
6 | gcc -o sizeua main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
7 | */
8 |
9 | #include
10 | #include
11 | #include "../../../ftd2xx.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | DWORD dwUASize;
16 | FT_STATUS ftStatus;
17 | FT_HANDLE ftHandle0;
18 | int iport;
19 |
20 | if(argc > 1) {
21 | sscanf(argv[1], "%d", &iport);
22 | }
23 | else {
24 | iport = 0;
25 | }
26 |
27 | printf("opening port %d\n", iport);
28 | ftStatus = FT_Open(iport, &ftHandle0);
29 | if(ftStatus == FT_OK) {
30 | printf("ftHandle0 = %p\n", (void *)ftHandle0);
31 | }
32 | else {
33 | /*
34 | This can fail if the ftdi_sio driver is loaded
35 | use lsmod to check this and rmmod ftdi_sio to remove
36 | also rmmod usbserial
37 | */
38 | printf("FT_Open(%d) failed\n", iport);
39 | return 1;
40 | }
41 |
42 | ftStatus = FT_EE_UASize(ftHandle0, &dwUASize);
43 | if(ftStatus == FT_OK)
44 | printf("dwUASize = %d\n", (int)dwUASize);
45 |
46 | ftStatus = FT_Close(ftHandle0);
47 |
48 | return 0;
49 | }
50 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/EEPROM/user/write/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | UA write sample.
3 |
4 | To build use the following gcc statement
5 | (assuming you have the d2xx library in the /usr/local/lib directory).
6 | gcc -o writeua main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
7 | */
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include "../../../ftd2xx.h"
14 |
15 | int main(int argc, char *argv[])
16 | {
17 | unsigned char * pucUAdata;
18 | DWORD dwUASize;
19 | FT_HANDLE ftHandle0;
20 | FT_STATUS ftStatus;
21 | int iport;
22 |
23 | if(argc > 1) {
24 | sscanf(argv[1], "%d", &iport);
25 | }
26 | else {
27 | iport = 0;
28 | }
29 |
30 | printf("opening port %d\n", iport);
31 | ftStatus = FT_Open(iport, &ftHandle0);
32 | if(ftStatus == FT_OK) {
33 | printf("ftHandle0 = %p\n", ftHandle0);
34 | }
35 | else {
36 | /*
37 | This can fail if the ftdi_sio driver is loaded
38 | use lsmod to check this and rmmod ftdi_sio to remove
39 | also rmmod usbserial
40 | */
41 | printf("FT_Open(%d) failed\n", iport);
42 | return 1;
43 | }
44 |
45 | ftStatus = FT_EE_UASize(ftHandle0, &dwUASize);
46 | if(ftStatus == FT_OK)
47 | printf("dwUASize = %d\n", (int)dwUASize);
48 | else {
49 | printf("Could not read UA size\n");
50 | FT_Close(ftHandle0);
51 | return 1;
52 | }
53 | pucUAdata = (unsigned char *)malloc(dwUASize);
54 | if(pucUAdata == NULL) {
55 | printf("Out of resources\n");
56 | FT_Close(ftHandle0);
57 | return 1;
58 | }
59 | memset(pucUAdata, 0xF0, dwUASize);
60 |
61 | if(ftStatus == FT_OK) {
62 | ftStatus = FT_EE_UAWrite(ftHandle0, pucUAdata, dwUASize);
63 | }
64 |
65 | free(pucUAdata);
66 | FT_Close(ftHandle0);
67 |
68 | return 0;
69 | }
70 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/Events/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | Simple example to show the RX event. This example assumes you have a
3 | hardware setup with the receive port using this sample code and another app
4 | (such as hyperterm) is sending serial data to the receiving device.
5 |
6 | To build use the following gcc statement
7 | (assuming you have the d2xx library in the /usr/local/lib directory).
8 | gcc -o events main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
9 | */
10 |
11 | #include
12 | #include "../ftd2xx.h"
13 |
14 | int main(int argc, char *argv[])
15 | {
16 | DWORD dwBytesInQueue = 0;
17 | EVENT_HANDLE eh;
18 | FT_STATUS ftStatus;
19 | FT_HANDLE ftHandle;
20 | int iport;
21 |
22 | if(argc > 1) {
23 | sscanf(argv[1], "%d", &iport);
24 | }
25 | else {
26 | iport = 0;
27 | }
28 |
29 | pthread_mutex_init(&eh.eMutex, NULL);
30 | pthread_cond_init(&eh.eCondVar, NULL);
31 |
32 | ftStatus = FT_Open(iport, &ftHandle);
33 | if(ftStatus != FT_OK) {
34 | /*
35 | This can fail if the ftdi_sio driver is loaded
36 | use lsmod to check this and rmmod ftdi_sio to remove
37 | also rmmod usbserial
38 | */
39 | printf("FT_Open(%d) failed\n", iport);
40 | return 1;
41 | }
42 |
43 | ftStatus = FT_SetFlowControl(ftHandle, FT_FLOW_NONE, 0, 0);
44 | if(ftStatus != FT_OK) {
45 | printf("Failed to set flow control\n");
46 | }
47 |
48 | ftStatus = FT_SetEventNotification(ftHandle, FT_EVENT_RXCHAR, (PVOID)&eh);
49 | if(ftStatus != FT_OK) {
50 | printf("Failed to set events\n");
51 | return 1;
52 | }
53 |
54 | pthread_mutex_lock(&eh.eMutex);
55 | pthread_cond_wait(&eh.eCondVar, &eh.eMutex);
56 | pthread_mutex_unlock(&eh.eMutex);
57 |
58 | FT_GetQueueStatus(ftHandle, &dwBytesInQueue);
59 | printf("Received chars %d bytes in queue\n", (int)dwBytesInQueue);
60 |
61 | FT_Close(ftHandle);
62 |
63 | return 0;
64 | }
65 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/LargeRead/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | Simple example to read a large amount of data from a BM device.
3 | Device must have bitbang capabilities to enable this to work
4 |
5 | To build use the following gcc statement
6 | (assuming you have the d2xx library in the /usr/local/lib directory).
7 | gcc -o largeread main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
8 | */
9 |
10 | #include
11 | #include
12 | #include "../ftd2xx.h"
13 |
14 | #define BUF_SIZE 0x100000 // 1 Megabyte
15 |
16 | int main(int argc, char *argv[])
17 | {
18 | char * pcBufRead;
19 | DWORD dwBytesRead;
20 | FILE * fh;
21 | FT_HANDLE ftHandle;
22 | FT_STATUS ftStatus;
23 | int iport;
24 |
25 | if(argc > 1) {
26 | sscanf(argv[1], "%d", &iport);
27 | }
28 | else {
29 | iport = 0;
30 | }
31 |
32 | fh = fopen("target.bin", "wb+");
33 | if(fh == NULL) {
34 | printf("Cant open source file\n");
35 | return 1;
36 | }
37 |
38 | ftStatus = FT_Open(iport, &ftHandle);
39 | if(ftStatus != FT_OK) {
40 | /*
41 | This can fail if the ftdi_sio driver is loaded
42 | use lsmod to check this and rmmod ftdi_sio to remove
43 | also rmmod usbserial
44 | */
45 | printf("FT_Open(%d) failed\n", iport);
46 | return 1;
47 | }
48 |
49 | pcBufRead = (char *)malloc(BUF_SIZE);
50 | FT_ResetDevice(ftHandle);
51 | FT_SetBaudRate(ftHandle, 115200);
52 | FT_SetDtr(ftHandle);
53 | FT_SetRts(ftHandle);
54 | FT_SetFlowControl(ftHandle, FT_FLOW_RTS_CTS, 0, 0);
55 | FT_SetTimeouts(ftHandle, 0, 0); // infinite timeouts
56 | FT_SetBitMode(ftHandle, 0xFF, 0x01);
57 | FT_Read(ftHandle, pcBufRead, BUF_SIZE, &dwBytesRead);
58 |
59 | fwrite(pcBufRead, 1, dwBytesRead, fh);
60 | fclose(fh);
61 | free(pcBufRead);
62 | FT_Close(ftHandle);
63 |
64 | return 0;
65 | }
66 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/MultiThread/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | A Simple multithreaded application that continually watches the read queue
3 | until the application exits.
4 |
5 | gcc -o multi main.c -lpthread -lftd2xx -Wl,-rpath /usr/local/lib
6 |
7 | */
8 | #include
9 | #include
10 | #include
11 | #include "../ftd2xx.h"
12 |
13 | FT_HANDLE ftHandle;
14 | int exit_reader = 0;
15 |
16 | /*
17 | This is the main reader thread - continually waits for a read
18 |
19 | */
20 | void *read_watch(void *pArgs)
21 | {
22 | char buf[20];
23 | DWORD dwRet;
24 | FT_STATUS ftStatus;
25 |
26 | (void)pArgs; /* Deliberately unused parameter */
27 |
28 | while(exit_reader != 1) {
29 | // printf("Write\n");
30 | ftStatus = FT_Write(ftHandle, buf, 20, &dwRet);
31 | if (ftStatus != FT_OK)
32 | printf("Error: FT_Write returned %d\n", (int)ftStatus);
33 | // sleep(1);
34 | }
35 | (void)FT_Close(ftHandle);
36 |
37 | return NULL;
38 | }
39 |
40 | int main(int argc, char *argv[])
41 | {
42 | pthread_t thread_id;
43 | int i;
44 | FT_STATUS ftStatus;
45 |
46 | (void)argc; /* Deliberately unused parameter */
47 | (void)argv; /* Deliberately unused parameter */
48 |
49 | exit_reader = 0;
50 |
51 | ftStatus = FT_Open(0, &ftHandle);
52 | pthread_create(&thread_id, NULL, &read_watch, NULL);
53 |
54 | for(i = 0; i < 1000; i++) {
55 | char buf[100];
56 | DWORD index = 0;
57 |
58 | ftStatus = FT_ListDevices((PVOID)(uintptr_t)index,
59 | (void*)buf,
60 | FT_LIST_BY_INDEX | FT_OPEN_BY_SERIAL_NUMBER);
61 | if(ftStatus == FT_OK) {
62 | // printf("FT_LIST_BY_INDEX = %s\n");
63 | }
64 | else {
65 | printf("FT_LIST_BY_INDEX failed(%d)\n", (int)ftStatus);
66 | }
67 | }
68 |
69 | exit_reader = 1;
70 |
71 | /* wait for it to exit */
72 | pthread_join(thread_id, NULL);
73 |
74 | return 0;
75 | }
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/Rules.make:
--------------------------------------------------------------------------------
1 | DEPENDENCIES := -lftd2xx -lpthread
2 |
3 | UNAME := $(shell uname)
4 | # Assume target is Mac OS if build host is Mac OS; any other host targets Linux
5 | ifeq ($(UNAME), Darwin)
6 | DEPENDENCIES += -lobjc -framework IOKit -framework CoreFoundation
7 | else
8 | DEPENDENCIES += -lrt
9 | endif
10 |
11 | # Embed in the executable a run-time path to libftd2xx
12 | LINKER_OPTIONS := -Wl,-rpath /usr/local/lib
13 |
14 | CFLAGS = -Wall -Wextra $(DEPENDENCIES) $(LINKER_OPTIONS) -L/usr/local/lib
15 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/Timeouts/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | A very simple example to show a 5 second timout when reading nothing from a
3 | device. This example assumes that there is no hardware attached to the device
4 | so a timeout will occur after 5 seconds
5 |
6 | To build use the following gcc statement
7 | (assuming you have the d2xx library in the /usr/local/lib directory).
8 | gcc -o timeouts main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
9 | */
10 |
11 | #include
12 | #include "../ftd2xx.h"
13 |
14 | #define BUF_SIZE 0x1000
15 |
16 | #define MAX_DEVICES 4
17 |
18 | int main(int argc, char *argv[])
19 | {
20 | char cBufRead[BUF_SIZE];
21 | DWORD dwBytesRead;
22 | FT_STATUS ftStatus;
23 | FT_HANDLE ftHandle;
24 | int iport;
25 | int i;
26 |
27 | if(argc > 1) {
28 | sscanf(argv[1], "%d", &iport);
29 | }
30 | else {
31 | iport = 0;
32 | }
33 |
34 | ftStatus = FT_Open(iport, &ftHandle);
35 | if(ftStatus != FT_OK) {
36 | /*
37 | This can fail if the ftdi_sio driver is loaded
38 | use lsmod to check this and rmmod ftdi_sio to remove
39 | also rmmod usbserial
40 | */
41 | printf("FT_Open(%d) failed, with error %d.\n", iport, (int)ftStatus);
42 | printf("Use lsmod to check if ftdi_sio (and usbserial) are present.\n");
43 | printf("If so, unload them using rmmod, as they conflict with ftd2xx.\n");
44 | return 1;
45 | }
46 |
47 | FT_SetTimeouts(ftHandle, 3000, 3000); // 3 second read timeout
48 |
49 | for(i = 0; i < 10 ; i++) {
50 | FT_Read(ftHandle, cBufRead, BUF_SIZE, &dwBytesRead);
51 | if(dwBytesRead != BUF_SIZE)
52 | printf("Timeout %d\n", i);
53 | else
54 | printf("Read %d\n", (int)dwBytesRead);
55 | }
56 |
57 |
58 | FT_Close(ftHandle);
59 | return 0;
60 | }
61 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/examples/W32/unsupported/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | To build use the following gcc statement
3 | (assuming you have the d2xx library in the /usr/local/lib directory).
4 | gcc -o w32_unsupported main.c -L. -lftd2xx
5 | */
6 |
7 | #include
8 | #include
9 | #include
10 | #include "../../ftd2xx.h"
11 |
12 | #define BUF_SIZE 0x11
13 |
14 | #define MAX_DEVICES 5
15 |
16 | int main()
17 | {
18 | char cBufWrite[BUF_SIZE];
19 | char * pcBufRead = NULL;
20 | char * pcBufLD[MAX_DEVICES + 1];
21 | char cBufLD[MAX_DEVICES][64];
22 | DWORD dwRxSize = 0;
23 | DWORD dwBytesWritten, dwBytesRead;
24 | FT_STATUS ftStatus;
25 | FT_HANDLE ftHandle[MAX_DEVICES];
26 | int iNumDevs = 0;
27 | int i, j;
28 | int iDevicesOpen;
29 | FTDCB ftDCB;
30 |
31 | for(i = 0; i < MAX_DEVICES; i++) {
32 | pcBufLD[i] = cBufLD[i];
33 | }
34 | pcBufLD[MAX_DEVICES] = NULL;
35 |
36 | ftStatus = FT_ListDevices(pcBufLD, &iNumDevs, FT_LIST_ALL | FT_OPEN_BY_SERIAL_NUMBER);
37 |
38 | if(ftStatus != FT_OK) {
39 | printf("Error: FT_ListDevices(%d)\n", ftStatus);
40 | return 1;
41 | }
42 | for(j = 0; j < BUF_SIZE; j++) {
43 | cBufWrite[j] = j;
44 | }
45 |
46 | for(i = 0; ( (i
5 | * Copyright © 2012-2013 Peter Stuge
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with this library; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #if !defined(USBI_HOTPLUG_H)
23 | #define USBI_HOTPLUG_H
24 |
25 | #ifndef LIBUSBI_H
26 | #include "libusbi.h"
27 | #endif
28 |
29 | /** \ingroup hotplug
30 | * The hotplug callback structure. The user populates this structure with
31 | * libusb_hotplug_prepare_callback() and then calls libusb_hotplug_register_callback()
32 | * to receive notification of hotplug events.
33 | */
34 | struct libusb_hotplug_callback {
35 | /** Context this callback is associated with */
36 | struct libusb_context *ctx;
37 |
38 | /** Vendor ID to match or LIBUSB_HOTPLUG_MATCH_ANY */
39 | int vendor_id;
40 |
41 | /** Product ID to match or LIBUSB_HOTPLUG_MATCH_ANY */
42 | int product_id;
43 |
44 | /** Device class to match or LIBUSB_HOTPLUG_MATCH_ANY */
45 | int dev_class;
46 |
47 | /** Hotplug callback flags */
48 | libusb_hotplug_flag flags;
49 |
50 | /** Event(s) that will trigger this callback */
51 | libusb_hotplug_event events;
52 |
53 | /** Callback function to invoke for matching event/device */
54 | libusb_hotplug_callback_fn cb;
55 |
56 | /** Handle for this callback (used to match on deregister) */
57 | libusb_hotplug_callback_handle handle;
58 |
59 | /** User data that will be passed to the callback function */
60 | void *user_data;
61 |
62 | /** Callback is marked for deletion */
63 | int needs_free;
64 |
65 | /** List this callback is registered in (ctx->hotplug_cbs) */
66 | struct list_head list;
67 | };
68 |
69 | typedef struct libusb_hotplug_callback libusb_hotplug_callback;
70 |
71 | struct libusb_hotplug_message {
72 | /** The hotplug event that occurred */
73 | libusb_hotplug_event event;
74 |
75 | /** The device for which this hotplug event occurred */
76 | struct libusb_device *device;
77 |
78 | /** List this message is contained in (ctx->hotplug_msgs) */
79 | struct list_head list;
80 | };
81 |
82 | typedef struct libusb_hotplug_message libusb_hotplug_message;
83 |
84 | void usbi_hotplug_deregister_all(struct libusb_context *ctx);
85 | void usbi_hotplug_match(struct libusb_context *ctx, struct libusb_device *dev,
86 | libusb_hotplug_event event);
87 | void usbi_hotplug_notification(struct libusb_context *ctx, struct libusb_device *dev,
88 | libusb_hotplug_event event);
89 |
90 | #endif
91 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/libusb-1.0.rc:
--------------------------------------------------------------------------------
1 | /*
2 | * For Windows: input this file to the Resoure Compiler to produce a binary
3 | * .res file. This is then embedded in the resultant library (like any other
4 | * compilation object).
5 | * The information can then be queried using standard APIs and can also be
6 | * viewed with utilities such as Windows Explorer.
7 | */
8 | #ifndef _WIN32_WCE
9 | #include "winresrc.h"
10 | #endif
11 |
12 | #include "version.h"
13 | #ifndef LIBUSB_VERSIONSTRING
14 | #define LU_STR(s) #s
15 | #define LU_XSTR(s) LU_STR(s)
16 | #if LIBUSB_NANO > 0
17 | #define LIBUSB_VERSIONSTRING \
18 | LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \
19 | LU_XSTR(LIBUSB_MICRO) "." LU_XSTR(LIBUSB_NANO) LIBUSB_RC "\0"
20 | #else
21 | #define LIBUSB_VERSIONSTRING \
22 | LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \
23 | LU_XSTR(LIBUSB_MICRO) LIBUSB_RC "\0"
24 | #endif
25 | #endif
26 |
27 | VS_VERSION_INFO VERSIONINFO
28 | FILEVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
29 | PRODUCTVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
30 | FILEFLAGSMASK 0x3fL
31 | #ifdef _DEBUG
32 | FILEFLAGS 0x1L
33 | #else
34 | FILEFLAGS 0x0L
35 | #endif
36 | FILEOS 0x40004L
37 | FILETYPE 0x2L
38 | FILESUBTYPE 0x0L
39 | BEGIN
40 | BLOCK "StringFileInfo"
41 | BEGIN
42 | BLOCK "040904b0"
43 | BEGIN
44 | VALUE "CompanyName", "libusb.info\0"
45 | VALUE "FileDescription", "C library for writing portable USB drivers in userspace\0"
46 | VALUE "FileVersion", LIBUSB_VERSIONSTRING
47 | VALUE "InternalName", "libusb\0"
48 | VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0"
49 | VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0"
50 | VALUE "OriginalFilename", "libusb-1.0.dll\0"
51 | VALUE "PrivateBuild", "\0"
52 | VALUE "ProductName", "libusb-1.0\0"
53 | VALUE "ProductVersion", LIBUSB_VERSIONSTRING
54 | VALUE "SpecialBuild", "\0"
55 | END
56 | END
57 | BLOCK "VarFileInfo"
58 | BEGIN
59 | VALUE "Translation", 0x409, 1200
60 | END
61 | END
62 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/os/haiku/configure.ac:
--------------------------------------------------------------------------------
1 | AC_INIT([haikuusb], [1.0])
2 | AM_INIT_AUTOMAKE([no-define foreign])
3 | AM_MAINTAINER_MODE
4 | LT_INIT
5 | AC_PROG_CXX
6 | AC_CONFIG_FILES([Makefile])
7 | AC_CONFIG_MACRO_DIR([m4])
8 | AC_OUTPUT
9 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/os/haiku/m4/ltversion.m4:
--------------------------------------------------------------------------------
1 | # ltversion.m4 -- version numbers -*- Autoconf -*-
2 | #
3 | # Copyright (C) 2004 Free Software Foundation, Inc.
4 | # Written by Scott James Remnant, 2004
5 | #
6 | # This file is free software; the Free Software Foundation gives
7 | # unlimited permission to copy and/or distribute it, with or without
8 | # modifications, as long as this notice is preserved.
9 |
10 | # @configure_input@
11 |
12 | # serial 3337 ltversion.m4
13 | # This file is part of GNU Libtool
14 |
15 | m4_define([LT_PACKAGE_VERSION], [2.4.2])
16 | m4_define([LT_PACKAGE_REVISION], [1.3337])
17 |
18 | AC_DEFUN([LTVERSION_VERSION],
19 | [macro_version='2.4.2'
20 | macro_revision='1.3337'
21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
22 | _LT_DECL(, macro_revision, 0)
23 | ])
24 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/os/poll_posix.c:
--------------------------------------------------------------------------------
1 | /*
2 | * poll_posix: poll compatibility wrapper for POSIX systems
3 | * Copyright © 2013 RealVNC Ltd.
4 | *
5 | * This library is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * This library is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with this library; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | *
19 | */
20 |
21 | #include
22 |
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 | #include "libusbi.h"
29 |
30 | int usbi_pipe(int pipefd[2])
31 | {
32 | int ret = pipe(pipefd);
33 | if (ret != 0) {
34 | return ret;
35 | }
36 | ret = fcntl(pipefd[1], F_GETFL);
37 | if (ret == -1) {
38 | usbi_dbg("Failed to get pipe fd flags: %d", errno);
39 | goto err_close_pipe;
40 | }
41 | ret = fcntl(pipefd[1], F_SETFL, ret | O_NONBLOCK);
42 | if (ret != 0) {
43 | usbi_dbg("Failed to set non-blocking on new pipe: %d", errno);
44 | goto err_close_pipe;
45 | }
46 |
47 | return 0;
48 |
49 | err_close_pipe:
50 | usbi_close(pipefd[0]);
51 | usbi_close(pipefd[1]);
52 | return ret;
53 | }
54 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/os/poll_posix.h:
--------------------------------------------------------------------------------
1 | #ifndef LIBUSB_POLL_POSIX_H
2 | #define LIBUSB_POLL_POSIX_H
3 |
4 | #define usbi_write write
5 | #define usbi_read read
6 | #define usbi_close close
7 | #define usbi_poll poll
8 |
9 | int usbi_pipe(int pipefd[2]);
10 |
11 | #endif /* LIBUSB_POLL_POSIX_H */
12 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/os/threads_posix.c:
--------------------------------------------------------------------------------
1 | /*
2 | * libusb synchronization using POSIX Threads
3 | *
4 | * Copyright © 2011 Vitali Lovich
5 | * Copyright © 2011 Peter Stuge
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with this library; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #include
23 |
24 | #if defined(__linux__) || defined(__OpenBSD__)
25 | # if defined(__OpenBSD__)
26 | # define _BSD_SOURCE
27 | # endif
28 | # include
29 | # include
30 | #elif defined(__APPLE__)
31 | # include
32 | #elif defined(__CYGWIN__)
33 | # include
34 | #endif
35 |
36 | #include "threads_posix.h"
37 |
38 | int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr)
39 | {
40 | int err;
41 | pthread_mutexattr_t stack_attr;
42 | if (!attr) {
43 | attr = &stack_attr;
44 | err = pthread_mutexattr_init(&stack_attr);
45 | if (err != 0)
46 | return err;
47 | }
48 |
49 | /* mutexattr_settype requires _GNU_SOURCE or _XOPEN_SOURCE >= 500 on Linux */
50 | err = pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
51 | if (err != 0)
52 | goto finish;
53 |
54 | err = pthread_mutex_init(mutex, attr);
55 |
56 | finish:
57 | if (attr == &stack_attr)
58 | pthread_mutexattr_destroy(&stack_attr);
59 |
60 | return err;
61 | }
62 |
63 | int usbi_get_tid(void)
64 | {
65 | int ret = -1;
66 | #if defined(__ANDROID__)
67 | ret = gettid();
68 | #elif defined(__linux__)
69 | ret = syscall(SYS_gettid);
70 | #elif defined(__OpenBSD__)
71 | /* The following only works with OpenBSD > 5.1 as it requires
72 | real thread support. For 5.1 and earlier, -1 is returned. */
73 | ret = syscall(SYS_getthrid);
74 | #elif defined(__APPLE__)
75 | ret = mach_thread_self();
76 | mach_port_deallocate(mach_task_self(), ret);
77 | #elif defined(__CYGWIN__)
78 | ret = GetCurrentThreadId();
79 | #endif
80 | /* TODO: NetBSD thread ID support */
81 | return ret;
82 | }
83 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/os/threads_posix.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libusb synchronization using POSIX Threads
3 | *
4 | * Copyright © 2010 Peter Stuge
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef LIBUSB_THREADS_POSIX_H
22 | #define LIBUSB_THREADS_POSIX_H
23 |
24 | #include
25 |
26 | #define usbi_mutex_static_t pthread_mutex_t
27 | #define USBI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
28 | #define usbi_mutex_static_lock pthread_mutex_lock
29 | #define usbi_mutex_static_unlock pthread_mutex_unlock
30 |
31 | #define usbi_mutex_t pthread_mutex_t
32 | #define usbi_mutex_init pthread_mutex_init
33 | #define usbi_mutex_lock pthread_mutex_lock
34 | #define usbi_mutex_unlock pthread_mutex_unlock
35 | #define usbi_mutex_trylock pthread_mutex_trylock
36 | #define usbi_mutex_destroy pthread_mutex_destroy
37 |
38 | #define usbi_cond_t pthread_cond_t
39 | #define usbi_cond_init pthread_cond_init
40 | #define usbi_cond_wait pthread_cond_wait
41 | #define usbi_cond_timedwait pthread_cond_timedwait
42 | #define usbi_cond_broadcast pthread_cond_broadcast
43 | #define usbi_cond_destroy pthread_cond_destroy
44 | #define usbi_cond_signal pthread_cond_signal
45 |
46 | extern int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr);
47 |
48 | int usbi_get_tid(void);
49 |
50 | #endif /* LIBUSB_THREADS_POSIX_H */
51 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/os/threads_windows.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libusb synchronization on Microsoft Windows
3 | *
4 | * Copyright © 2010 Michael Plante
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef LIBUSB_THREADS_WINDOWS_H
22 | #define LIBUSB_THREADS_WINDOWS_H
23 |
24 | #define usbi_mutex_static_t volatile LONG
25 | #define USBI_MUTEX_INITIALIZER 0
26 |
27 | #define usbi_mutex_t HANDLE
28 |
29 | struct usbi_cond_perthread {
30 | struct list_head list;
31 | DWORD tid;
32 | HANDLE event;
33 | };
34 | struct usbi_cond_t_ {
35 | // Every time a thread touches the CV, it winds up in one of these lists.
36 | // It stays there until the CV is destroyed, even if the thread
37 | // terminates.
38 | struct list_head waiters;
39 | struct list_head not_waiting;
40 | };
41 | typedef struct usbi_cond_t_ usbi_cond_t;
42 |
43 | // We *were* getting timespec from pthread.h:
44 | #if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
45 | #define HAVE_STRUCT_TIMESPEC 1
46 | #define _TIMESPEC_DEFINED 1
47 | struct timespec {
48 | long tv_sec;
49 | long tv_nsec;
50 | };
51 | #endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
52 |
53 | // We *were* getting ETIMEDOUT from pthread.h:
54 | #ifndef ETIMEDOUT
55 | # define ETIMEDOUT 10060 /* This is the value in winsock.h. */
56 | #endif
57 |
58 | #define usbi_mutexattr_t void
59 | #define usbi_condattr_t void
60 |
61 | // all Windows mutexes are recursive
62 | #define usbi_mutex_init_recursive(mutex, attr) usbi_mutex_init((mutex), (attr))
63 |
64 | int usbi_mutex_static_lock(usbi_mutex_static_t *mutex);
65 | int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex);
66 |
67 |
68 | int usbi_mutex_init(usbi_mutex_t *mutex,
69 | const usbi_mutexattr_t *attr);
70 | int usbi_mutex_lock(usbi_mutex_t *mutex);
71 | int usbi_mutex_unlock(usbi_mutex_t *mutex);
72 | int usbi_mutex_trylock(usbi_mutex_t *mutex);
73 | int usbi_mutex_destroy(usbi_mutex_t *mutex);
74 |
75 | int usbi_cond_init(usbi_cond_t *cond,
76 | const usbi_condattr_t *attr);
77 | int usbi_cond_destroy(usbi_cond_t *cond);
78 | int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex);
79 | int usbi_cond_timedwait(usbi_cond_t *cond,
80 | usbi_mutex_t *mutex,
81 | const struct timespec *abstime);
82 | int usbi_cond_broadcast(usbi_cond_t *cond);
83 | int usbi_cond_signal(usbi_cond_t *cond);
84 |
85 | int usbi_get_tid(void);
86 |
87 | #endif /* LIBUSB_THREADS_WINDOWS_H */
88 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/version.h:
--------------------------------------------------------------------------------
1 | /* This file is parsed by m4 and windres and RC.EXE so please keep it simple. */
2 | #include "version_nano.h"
3 | #ifndef LIBUSB_MAJOR
4 | #define LIBUSB_MAJOR 1
5 | #endif
6 | #ifndef LIBUSB_MINOR
7 | #define LIBUSB_MINOR 0
8 | #endif
9 | #ifndef LIBUSB_MICRO
10 | #define LIBUSB_MICRO 20
11 | #endif
12 | #ifndef LIBUSB_NANO
13 | #define LIBUSB_NANO 0
14 | #endif
15 | /* LIBUSB_RC is the release candidate suffix. Should normally be empty. */
16 | #ifndef LIBUSB_RC
17 | #define LIBUSB_RC ""
18 | #endif
19 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-i386-1.4.8/release/libusb/libusb/version_nano.h:
--------------------------------------------------------------------------------
1 | #define LIBUSB_NANO 11004
2 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx.a
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx.so.1.4.8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx.so.1.4.8
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx.txt:
--------------------------------------------------------------------------------
1 | Output of 'file' command:
2 | =========================
3 | ./build/x86_64/libftd2xx.so.1.4.8: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=b23bc0e7a6ec39c8cc5b29f3f0698fc1658ce602, not stripped
4 | Output of 'readelf -A' command:
5 | ===============================
6 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/eedata.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/eedata.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/fte2data.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/fte2data.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee2232.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee2232.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee2232h.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee2232h.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee232.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee232.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee232h.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee232h.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee232r.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee232r.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee4232h.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/ftee4232h.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/fteeftx.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/fteeftx.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/serialno.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/EEPROM/serialno.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/Event.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/Event.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/baud.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/baud.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/bulk_in.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/bulk_in.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/config.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/config.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/device-list.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/device-list.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/ee.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/ee.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/ftd2xx-private.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/ftd2xx-private.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/ftd2xx.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/ftd2xx.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/idtable.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/idtable.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/memcpy.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/memcpy.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/usb_control.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libftd2xx/usb_control.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/core.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/core.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/descriptor.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/descriptor.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/hotplug.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/hotplug.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/io.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/io.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/linux_netlink.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/linux_netlink.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/linux_usbfs.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/linux_usbfs.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/poll_posix.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/poll_posix.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/threads_posix.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/os/threads_posix.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/sync.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/build/libusb/libusb/sync.o
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/BitMode/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Assuming libftd2xx.so is in /usr/local/lib, build with:
3 | *
4 | * gcc -o bitmode main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
5 | *
6 | * and run with:
7 | *
8 | * sudo ./bitmode [port number]
9 | */
10 | #include
11 | #include "../ftd2xx.h"
12 |
13 |
14 |
15 | int main(int argc, char *argv[])
16 | {
17 | DWORD bytesWritten = 0;
18 | DWORD baudRate = 9600;
19 | FT_STATUS ftStatus = FT_OK;
20 | FT_HANDLE ftHandle;
21 | UCHAR outputData;
22 | UCHAR pinStatus;
23 | int portNumber;
24 |
25 | if (argc > 1)
26 | {
27 | sscanf(argv[1], "%d", &portNumber);
28 | }
29 | else
30 | {
31 | portNumber = 0;
32 | }
33 |
34 | ftStatus = FT_Open(portNumber, &ftHandle);
35 | if (ftStatus != FT_OK)
36 | {
37 | /* FT_Open can fail if the ftdi_sio module is already loaded. */
38 | printf("FT_Open(%d) failed (error %d).\n", portNumber, (int)ftStatus);
39 | printf("Use lsmod to check if ftdi_sio (and usbserial) are present.\n");
40 | printf("If so, unload them using rmmod, as they conflict with ftd2xx.\n");
41 | return 1;
42 | }
43 |
44 | /* Enable bit-bang mode, where 8 UART pins (RX, TX, RTS etc.) become
45 | * general-purpose I/O pins.
46 | */
47 | printf("Selecting asynchronous bit-bang mode.\n");
48 | ftStatus = FT_SetBitMode(ftHandle,
49 | 0xFF, /* sets all 8 pins as outputs */
50 | FT_BITMODE_ASYNC_BITBANG);
51 | if (ftStatus != FT_OK)
52 | {
53 | printf("FT_SetBitMode failed (error %d).\n", (int)ftStatus);
54 | goto exit;
55 | }
56 |
57 | /* In bit-bang mode, setting the baud rate gives a clock rate
58 | * 16 times higher, e.g. baud = 9600 gives 153600 bytes per second.
59 | */
60 | printf("Setting clock rate to %d\n", baudRate * 16);
61 | ftStatus = FT_SetBaudRate(ftHandle, baudRate);
62 | if (ftStatus != FT_OK)
63 | {
64 | printf("FT_SetBaudRate failed (error %d).\n", (int)ftStatus);
65 | goto exit;
66 | }
67 |
68 | /* Use FT_Write to set values of output pins. Here we set
69 | * them to alternate low and high (0xAA == 10101010).
70 | */
71 | outputData = 0xAA;
72 | ftStatus = FT_Write(ftHandle, &outputData, 1, &bytesWritten);
73 | if (ftStatus != FT_OK)
74 | {
75 | printf("FT_Write failed (error %d).\n", (int)ftStatus);
76 | goto exit;
77 | }
78 |
79 | /* Despite its name, GetBitMode samples the values of the data pins. */
80 | ftStatus = FT_GetBitMode(ftHandle, &pinStatus);
81 | if (ftStatus != FT_OK)
82 | {
83 | printf("FT_GetBitMode failed (error %d).\n", (int)ftStatus);
84 | goto exit;
85 | }
86 |
87 | if (pinStatus != outputData)
88 | {
89 | printf("Failure: pin data is %02X, but expected %02X\n",
90 | (unsigned int)pinStatus,
91 | (unsigned int)outputData);
92 | goto exit;
93 | }
94 |
95 | printf("Success: pin data is %02X, as expected.\n",
96 | (unsigned int)pinStatus);
97 |
98 |
99 | exit:
100 | /* Return chip to default (UART) mode. */
101 | (void)FT_SetBitMode(ftHandle,
102 | 0, /* ignored with FT_BITMODE_RESET */
103 | FT_BITMODE_RESET);
104 |
105 | (void)FT_Close(ftHandle);
106 | return 0;
107 | }
108 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/EEPROM/erase/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | To build use the following gcc statement
3 | (assuming you have the d2xx library in the /usr/local/lib directory).
4 | gcc -o erase main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
5 | */
6 |
7 | #include
8 | #include "../../ftd2xx.h"
9 |
10 | #define BUF_SIZE 0x1000
11 |
12 | int main(int argc, char *argv[])
13 | {
14 | FT_STATUS ftStatus;
15 | FT_HANDLE ftHandle0;
16 | int iport;
17 |
18 | if(argc > 1) {
19 | sscanf(argv[1], "%d", &iport);
20 | }
21 | else {
22 | iport = 0;
23 | }
24 | printf("opening port %d\n", iport);
25 | FT_SetVIDPID(0x0403, 0x6007);
26 | ftStatus = FT_Open(iport, &ftHandle0);
27 | if(ftStatus != FT_OK) {
28 | /*
29 | This can fail if the ftdi_sio driver is loaded
30 | use lsmod to check this and rmmod ftdi_sio to remove
31 | also rmmod usbserial
32 | */
33 | printf("FT_Open(%d) failed\n", iport);
34 | return 1;
35 | }
36 |
37 | ftStatus = FT_EraseEE(ftHandle0);
38 | if(ftStatus != FT_OK) {
39 | printf("Erase failed\n");
40 | }
41 |
42 | FT_Close(ftHandle0);
43 | return 0;
44 | }
45 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/EEPROM/user/read/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | UA read sample.
3 |
4 | To build use the following gcc statement
5 | (assuming you have the d2xx library in the /usr/local/lib directory).
6 | gcc -o readua main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
7 | */
8 |
9 | #include
10 | #include
11 | #include
12 | #include "../../../ftd2xx.h"
13 |
14 | int main(int argc, char *argv[])
15 | {
16 | unsigned char * pucUAdata;
17 | DWORD dwUASize, dwUARead;
18 | FILE * fp;
19 | FT_HANDLE ftHandle0;
20 | FT_STATUS ftStatus;
21 | int iport;
22 |
23 | if(argc > 1) {
24 | sscanf(argv[1], "%d", &iport);
25 | }
26 | else {
27 | iport = 0;
28 | }
29 |
30 | printf("opening port %d\n", iport);
31 | ftStatus = FT_Open(iport, &ftHandle0);
32 | if(ftStatus == FT_OK) {
33 | printf("ftHandle0 = %p\n", ftHandle0);
34 | }
35 | else {
36 | /*
37 | This can fail if the ftdi_sio driver is loaded
38 | use lsmod to check this and rmmod ftdi_sio to remove
39 | also rmmod usbserial
40 | */
41 | printf("FT_Open(%d) failed\n", iport);
42 | return 1;
43 | }
44 |
45 | ftStatus = FT_EE_UASize(ftHandle0, &dwUASize);
46 | if(ftStatus == FT_OK)
47 | printf("dwUASize = %d\n", (int)dwUASize);
48 | else {
49 | printf("Could not read UA size\n");
50 | FT_Close(ftHandle0);
51 | return 1;
52 | }
53 | pucUAdata = (unsigned char *)malloc(dwUASize);
54 | if(pucUAdata == NULL) {
55 | printf("Out of resources\n");
56 | FT_Close(ftHandle0);
57 | return 1;
58 | }
59 | ftStatus = FT_EE_UARead(ftHandle0, pucUAdata, dwUASize, &dwUARead);
60 | if(ftStatus == FT_OK) {
61 | fp = fopen("UA_DATA.bin", "w+");
62 | fwrite(pucUAdata, 1, dwUARead, fp);
63 | fclose(fp);
64 | }
65 | else{
66 | printf("could not read UA\n");
67 | }
68 | free(pucUAdata);
69 | FT_Close(ftHandle0);
70 |
71 | return 0;
72 | }
73 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/EEPROM/user/read/ua_data.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/EEPROM/user/read/ua_data.bin
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/EEPROM/user/size/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | UA size sample.
3 |
4 | To build use the following gcc statement
5 | (assuming you have the d2xx library in the /usr/local/lib directory).
6 | gcc -o sizeua main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
7 | */
8 |
9 | #include
10 | #include
11 | #include "../../../ftd2xx.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | DWORD dwUASize;
16 | FT_STATUS ftStatus;
17 | FT_HANDLE ftHandle0;
18 | int iport;
19 |
20 | if(argc > 1) {
21 | sscanf(argv[1], "%d", &iport);
22 | }
23 | else {
24 | iport = 0;
25 | }
26 |
27 | printf("opening port %d\n", iport);
28 | ftStatus = FT_Open(iport, &ftHandle0);
29 | if(ftStatus == FT_OK) {
30 | printf("ftHandle0 = %p\n", (void *)ftHandle0);
31 | }
32 | else {
33 | /*
34 | This can fail if the ftdi_sio driver is loaded
35 | use lsmod to check this and rmmod ftdi_sio to remove
36 | also rmmod usbserial
37 | */
38 | printf("FT_Open(%d) failed\n", iport);
39 | return 1;
40 | }
41 |
42 | ftStatus = FT_EE_UASize(ftHandle0, &dwUASize);
43 | if(ftStatus == FT_OK)
44 | printf("dwUASize = %d\n", (int)dwUASize);
45 |
46 | ftStatus = FT_Close(ftHandle0);
47 |
48 | return 0;
49 | }
50 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/EEPROM/user/write/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | UA write sample.
3 |
4 | To build use the following gcc statement
5 | (assuming you have the d2xx library in the /usr/local/lib directory).
6 | gcc -o writeua main.c -L. -lftd2xx -Wl,-rpath,/usr/local/lib
7 | */
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include "../../../ftd2xx.h"
14 |
15 | int main(int argc, char *argv[])
16 | {
17 | unsigned char * pucUAdata;
18 | DWORD dwUASize;
19 | FT_HANDLE ftHandle0;
20 | FT_STATUS ftStatus;
21 | int iport;
22 |
23 | if(argc > 1) {
24 | sscanf(argv[1], "%d", &iport);
25 | }
26 | else {
27 | iport = 0;
28 | }
29 |
30 | printf("opening port %d\n", iport);
31 | ftStatus = FT_Open(iport, &ftHandle0);
32 | if(ftStatus == FT_OK) {
33 | printf("ftHandle0 = %p\n", ftHandle0);
34 | }
35 | else {
36 | /*
37 | This can fail if the ftdi_sio driver is loaded
38 | use lsmod to check this and rmmod ftdi_sio to remove
39 | also rmmod usbserial
40 | */
41 | printf("FT_Open(%d) failed\n", iport);
42 | return 1;
43 | }
44 |
45 | ftStatus = FT_EE_UASize(ftHandle0, &dwUASize);
46 | if(ftStatus == FT_OK)
47 | printf("dwUASize = %d\n", (int)dwUASize);
48 | else {
49 | printf("Could not read UA size\n");
50 | FT_Close(ftHandle0);
51 | return 1;
52 | }
53 | pucUAdata = (unsigned char *)malloc(dwUASize);
54 | if(pucUAdata == NULL) {
55 | printf("Out of resources\n");
56 | FT_Close(ftHandle0);
57 | return 1;
58 | }
59 | memset(pucUAdata, 0xF0, dwUASize);
60 |
61 | if(ftStatus == FT_OK) {
62 | ftStatus = FT_EE_UAWrite(ftHandle0, pucUAdata, dwUASize);
63 | }
64 |
65 | free(pucUAdata);
66 | FT_Close(ftHandle0);
67 |
68 | return 0;
69 | }
70 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/Events/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | Simple example to show the RX event. This example assumes you have a
3 | hardware setup with the receive port using this sample code and another app
4 | (such as hyperterm) is sending serial data to the receiving device.
5 |
6 | To build use the following gcc statement
7 | (assuming you have the d2xx library in the /usr/local/lib directory).
8 | gcc -o events main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
9 | */
10 |
11 | #include
12 | #include "../ftd2xx.h"
13 |
14 | int main(int argc, char *argv[])
15 | {
16 | DWORD dwBytesInQueue = 0;
17 | EVENT_HANDLE eh;
18 | FT_STATUS ftStatus;
19 | FT_HANDLE ftHandle;
20 | int iport;
21 |
22 | if(argc > 1) {
23 | sscanf(argv[1], "%d", &iport);
24 | }
25 | else {
26 | iport = 0;
27 | }
28 |
29 | pthread_mutex_init(&eh.eMutex, NULL);
30 | pthread_cond_init(&eh.eCondVar, NULL);
31 |
32 | ftStatus = FT_Open(iport, &ftHandle);
33 | if(ftStatus != FT_OK) {
34 | /*
35 | This can fail if the ftdi_sio driver is loaded
36 | use lsmod to check this and rmmod ftdi_sio to remove
37 | also rmmod usbserial
38 | */
39 | printf("FT_Open(%d) failed\n", iport);
40 | return 1;
41 | }
42 |
43 | ftStatus = FT_SetFlowControl(ftHandle, FT_FLOW_NONE, 0, 0);
44 | if(ftStatus != FT_OK) {
45 | printf("Failed to set flow control\n");
46 | }
47 |
48 | ftStatus = FT_SetEventNotification(ftHandle, FT_EVENT_RXCHAR, (PVOID)&eh);
49 | if(ftStatus != FT_OK) {
50 | printf("Failed to set events\n");
51 | return 1;
52 | }
53 |
54 | pthread_mutex_lock(&eh.eMutex);
55 | pthread_cond_wait(&eh.eCondVar, &eh.eMutex);
56 | pthread_mutex_unlock(&eh.eMutex);
57 |
58 | FT_GetQueueStatus(ftHandle, &dwBytesInQueue);
59 | printf("Received chars %d bytes in queue\n", (int)dwBytesInQueue);
60 |
61 | FT_Close(ftHandle);
62 |
63 | return 0;
64 | }
65 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/LargeRead/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | Simple example to read a large amount of data from a BM device.
3 | Device must have bitbang capabilities to enable this to work
4 |
5 | To build use the following gcc statement
6 | (assuming you have the d2xx library in the /usr/local/lib directory).
7 | gcc -o largeread main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
8 | */
9 |
10 | #include
11 | #include
12 | #include "../ftd2xx.h"
13 |
14 | #define BUF_SIZE 0x100000 // 1 Megabyte
15 |
16 | int main(int argc, char *argv[])
17 | {
18 | char * pcBufRead;
19 | DWORD dwBytesRead;
20 | FILE * fh;
21 | FT_HANDLE ftHandle;
22 | FT_STATUS ftStatus;
23 | int iport;
24 |
25 | if(argc > 1) {
26 | sscanf(argv[1], "%d", &iport);
27 | }
28 | else {
29 | iport = 0;
30 | }
31 |
32 | fh = fopen("target.bin", "wb+");
33 | if(fh == NULL) {
34 | printf("Cant open source file\n");
35 | return 1;
36 | }
37 |
38 | ftStatus = FT_Open(iport, &ftHandle);
39 | if(ftStatus != FT_OK) {
40 | /*
41 | This can fail if the ftdi_sio driver is loaded
42 | use lsmod to check this and rmmod ftdi_sio to remove
43 | also rmmod usbserial
44 | */
45 | printf("FT_Open(%d) failed\n", iport);
46 | return 1;
47 | }
48 |
49 | pcBufRead = (char *)malloc(BUF_SIZE);
50 | FT_ResetDevice(ftHandle);
51 | FT_SetBaudRate(ftHandle, 115200);
52 | FT_SetDtr(ftHandle);
53 | FT_SetRts(ftHandle);
54 | FT_SetFlowControl(ftHandle, FT_FLOW_RTS_CTS, 0, 0);
55 | FT_SetTimeouts(ftHandle, 0, 0); // infinite timeouts
56 | FT_SetBitMode(ftHandle, 0xFF, 0x01);
57 | FT_Read(ftHandle, pcBufRead, BUF_SIZE, &dwBytesRead);
58 |
59 | fwrite(pcBufRead, 1, dwBytesRead, fh);
60 | fclose(fh);
61 | free(pcBufRead);
62 | FT_Close(ftHandle);
63 |
64 | return 0;
65 | }
66 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/MultiThread/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | A Simple multithreaded application that continually watches the read queue
3 | until the application exits.
4 |
5 | gcc -o multi main.c -lpthread -lftd2xx -Wl,-rpath /usr/local/lib
6 |
7 | */
8 | #include
9 | #include
10 | #include
11 | #include "../ftd2xx.h"
12 |
13 | FT_HANDLE ftHandle;
14 | int exit_reader = 0;
15 |
16 | /*
17 | This is the main reader thread - continually waits for a read
18 |
19 | */
20 | void *read_watch(void *pArgs)
21 | {
22 | char buf[20];
23 | DWORD dwRet;
24 | FT_STATUS ftStatus;
25 |
26 | (void)pArgs; /* Deliberately unused parameter */
27 |
28 | while(exit_reader != 1) {
29 | // printf("Write\n");
30 | ftStatus = FT_Write(ftHandle, buf, 20, &dwRet);
31 | if (ftStatus != FT_OK)
32 | printf("Error: FT_Write returned %d\n", (int)ftStatus);
33 | // sleep(1);
34 | }
35 | (void)FT_Close(ftHandle);
36 |
37 | return NULL;
38 | }
39 |
40 | int main(int argc, char *argv[])
41 | {
42 | pthread_t thread_id;
43 | int i;
44 | FT_STATUS ftStatus;
45 |
46 | (void)argc; /* Deliberately unused parameter */
47 | (void)argv; /* Deliberately unused parameter */
48 |
49 | exit_reader = 0;
50 |
51 | ftStatus = FT_Open(0, &ftHandle);
52 | pthread_create(&thread_id, NULL, &read_watch, NULL);
53 |
54 | for(i = 0; i < 1000; i++) {
55 | char buf[100];
56 | DWORD index = 0;
57 |
58 | ftStatus = FT_ListDevices((PVOID)(uintptr_t)index,
59 | (void*)buf,
60 | FT_LIST_BY_INDEX | FT_OPEN_BY_SERIAL_NUMBER);
61 | if(ftStatus == FT_OK) {
62 | // printf("FT_LIST_BY_INDEX = %s\n");
63 | }
64 | else {
65 | printf("FT_LIST_BY_INDEX failed(%d)\n", (int)ftStatus);
66 | }
67 | }
68 |
69 | exit_reader = 1;
70 |
71 | /* wait for it to exit */
72 | pthread_join(thread_id, NULL);
73 |
74 | return 0;
75 | }
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/Rules.make:
--------------------------------------------------------------------------------
1 | DEPENDENCIES := -lftd2xx -lpthread
2 |
3 | UNAME := $(shell uname)
4 | # Assume target is Mac OS if build host is Mac OS; any other host targets Linux
5 | ifeq ($(UNAME), Darwin)
6 | DEPENDENCIES += -lobjc -framework IOKit -framework CoreFoundation
7 | else
8 | DEPENDENCIES += -lrt
9 | endif
10 |
11 | # Embed in the executable a run-time path to libftd2xx
12 | LINKER_OPTIONS := -Wl,-rpath /usr/local/lib
13 |
14 | CFLAGS = -Wall -Wextra $(DEPENDENCIES) $(LINKER_OPTIONS) -L/usr/local/lib
15 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/Timeouts/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | A very simple example to show a 5 second timout when reading nothing from a
3 | device. This example assumes that there is no hardware attached to the device
4 | so a timeout will occur after 5 seconds
5 |
6 | To build use the following gcc statement
7 | (assuming you have the d2xx library in the /usr/local/lib directory).
8 | gcc -o timeouts main.c -L. -lftd2xx -Wl,-rpath /usr/local/lib
9 | */
10 |
11 | #include
12 | #include "../ftd2xx.h"
13 |
14 | #define BUF_SIZE 0x1000
15 |
16 | #define MAX_DEVICES 4
17 |
18 | int main(int argc, char *argv[])
19 | {
20 | char cBufRead[BUF_SIZE];
21 | DWORD dwBytesRead;
22 | FT_STATUS ftStatus;
23 | FT_HANDLE ftHandle;
24 | int iport;
25 | int i;
26 |
27 | if(argc > 1) {
28 | sscanf(argv[1], "%d", &iport);
29 | }
30 | else {
31 | iport = 0;
32 | }
33 |
34 | ftStatus = FT_Open(iport, &ftHandle);
35 | if(ftStatus != FT_OK) {
36 | /*
37 | This can fail if the ftdi_sio driver is loaded
38 | use lsmod to check this and rmmod ftdi_sio to remove
39 | also rmmod usbserial
40 | */
41 | printf("FT_Open(%d) failed, with error %d.\n", iport, (int)ftStatus);
42 | printf("Use lsmod to check if ftdi_sio (and usbserial) are present.\n");
43 | printf("If so, unload them using rmmod, as they conflict with ftd2xx.\n");
44 | return 1;
45 | }
46 |
47 | FT_SetTimeouts(ftHandle, 3000, 3000); // 3 second read timeout
48 |
49 | for(i = 0; i < 10 ; i++) {
50 | FT_Read(ftHandle, cBufRead, BUF_SIZE, &dwBytesRead);
51 | if(dwBytesRead != BUF_SIZE)
52 | printf("Timeout %d\n", i);
53 | else
54 | printf("Read %d\n", (int)dwBytesRead);
55 | }
56 |
57 |
58 | FT_Close(ftHandle);
59 | return 0;
60 | }
61 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/examples/W32/unsupported/main.c:
--------------------------------------------------------------------------------
1 | /*
2 | To build use the following gcc statement
3 | (assuming you have the d2xx library in the /usr/local/lib directory).
4 | gcc -o w32_unsupported main.c -L. -lftd2xx
5 | */
6 |
7 | #include
8 | #include
9 | #include
10 | #include "../../ftd2xx.h"
11 |
12 | #define BUF_SIZE 0x11
13 |
14 | #define MAX_DEVICES 5
15 |
16 | int main()
17 | {
18 | char cBufWrite[BUF_SIZE];
19 | char * pcBufRead = NULL;
20 | char * pcBufLD[MAX_DEVICES + 1];
21 | char cBufLD[MAX_DEVICES][64];
22 | DWORD dwRxSize = 0;
23 | DWORD dwBytesWritten, dwBytesRead;
24 | FT_STATUS ftStatus;
25 | FT_HANDLE ftHandle[MAX_DEVICES];
26 | int iNumDevs = 0;
27 | int i, j;
28 | int iDevicesOpen;
29 | FTDCB ftDCB;
30 |
31 | for(i = 0; i < MAX_DEVICES; i++) {
32 | pcBufLD[i] = cBufLD[i];
33 | }
34 | pcBufLD[MAX_DEVICES] = NULL;
35 |
36 | ftStatus = FT_ListDevices(pcBufLD, &iNumDevs, FT_LIST_ALL | FT_OPEN_BY_SERIAL_NUMBER);
37 |
38 | if(ftStatus != FT_OK) {
39 | printf("Error: FT_ListDevices(%d)\n", ftStatus);
40 | return 1;
41 | }
42 | for(j = 0; j < BUF_SIZE; j++) {
43 | cBufWrite[j] = j;
44 | }
45 |
46 | for(i = 0; ( (i
5 | * Copyright © 2012-2013 Peter Stuge
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with this library; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #if !defined(USBI_HOTPLUG_H)
23 | #define USBI_HOTPLUG_H
24 |
25 | #ifndef LIBUSBI_H
26 | #include "libusbi.h"
27 | #endif
28 |
29 | /** \ingroup hotplug
30 | * The hotplug callback structure. The user populates this structure with
31 | * libusb_hotplug_prepare_callback() and then calls libusb_hotplug_register_callback()
32 | * to receive notification of hotplug events.
33 | */
34 | struct libusb_hotplug_callback {
35 | /** Context this callback is associated with */
36 | struct libusb_context *ctx;
37 |
38 | /** Vendor ID to match or LIBUSB_HOTPLUG_MATCH_ANY */
39 | int vendor_id;
40 |
41 | /** Product ID to match or LIBUSB_HOTPLUG_MATCH_ANY */
42 | int product_id;
43 |
44 | /** Device class to match or LIBUSB_HOTPLUG_MATCH_ANY */
45 | int dev_class;
46 |
47 | /** Hotplug callback flags */
48 | libusb_hotplug_flag flags;
49 |
50 | /** Event(s) that will trigger this callback */
51 | libusb_hotplug_event events;
52 |
53 | /** Callback function to invoke for matching event/device */
54 | libusb_hotplug_callback_fn cb;
55 |
56 | /** Handle for this callback (used to match on deregister) */
57 | libusb_hotplug_callback_handle handle;
58 |
59 | /** User data that will be passed to the callback function */
60 | void *user_data;
61 |
62 | /** Callback is marked for deletion */
63 | int needs_free;
64 |
65 | /** List this callback is registered in (ctx->hotplug_cbs) */
66 | struct list_head list;
67 | };
68 |
69 | typedef struct libusb_hotplug_callback libusb_hotplug_callback;
70 |
71 | struct libusb_hotplug_message {
72 | /** The hotplug event that occurred */
73 | libusb_hotplug_event event;
74 |
75 | /** The device for which this hotplug event occurred */
76 | struct libusb_device *device;
77 |
78 | /** List this message is contained in (ctx->hotplug_msgs) */
79 | struct list_head list;
80 | };
81 |
82 | typedef struct libusb_hotplug_message libusb_hotplug_message;
83 |
84 | void usbi_hotplug_deregister_all(struct libusb_context *ctx);
85 | void usbi_hotplug_match(struct libusb_context *ctx, struct libusb_device *dev,
86 | libusb_hotplug_event event);
87 | void usbi_hotplug_notification(struct libusb_context *ctx, struct libusb_device *dev,
88 | libusb_hotplug_event event);
89 |
90 | #endif
91 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/libusb-1.0.rc:
--------------------------------------------------------------------------------
1 | /*
2 | * For Windows: input this file to the Resoure Compiler to produce a binary
3 | * .res file. This is then embedded in the resultant library (like any other
4 | * compilation object).
5 | * The information can then be queried using standard APIs and can also be
6 | * viewed with utilities such as Windows Explorer.
7 | */
8 | #ifndef _WIN32_WCE
9 | #include "winresrc.h"
10 | #endif
11 |
12 | #include "version.h"
13 | #ifndef LIBUSB_VERSIONSTRING
14 | #define LU_STR(s) #s
15 | #define LU_XSTR(s) LU_STR(s)
16 | #if LIBUSB_NANO > 0
17 | #define LIBUSB_VERSIONSTRING \
18 | LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \
19 | LU_XSTR(LIBUSB_MICRO) "." LU_XSTR(LIBUSB_NANO) LIBUSB_RC "\0"
20 | #else
21 | #define LIBUSB_VERSIONSTRING \
22 | LU_XSTR(LIBUSB_MAJOR) "." LU_XSTR(LIBUSB_MINOR) "." \
23 | LU_XSTR(LIBUSB_MICRO) LIBUSB_RC "\0"
24 | #endif
25 | #endif
26 |
27 | VS_VERSION_INFO VERSIONINFO
28 | FILEVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
29 | PRODUCTVERSION LIBUSB_MAJOR,LIBUSB_MINOR,LIBUSB_MICRO,LIBUSB_NANO
30 | FILEFLAGSMASK 0x3fL
31 | #ifdef _DEBUG
32 | FILEFLAGS 0x1L
33 | #else
34 | FILEFLAGS 0x0L
35 | #endif
36 | FILEOS 0x40004L
37 | FILETYPE 0x2L
38 | FILESUBTYPE 0x0L
39 | BEGIN
40 | BLOCK "StringFileInfo"
41 | BEGIN
42 | BLOCK "040904b0"
43 | BEGIN
44 | VALUE "CompanyName", "libusb.info\0"
45 | VALUE "FileDescription", "C library for writing portable USB drivers in userspace\0"
46 | VALUE "FileVersion", LIBUSB_VERSIONSTRING
47 | VALUE "InternalName", "libusb\0"
48 | VALUE "LegalCopyright", "See individual source files, GNU LGPL v2.1 or later.\0"
49 | VALUE "LegalTrademarks", "http://www.gnu.org/licenses/lgpl-2.1.html\0"
50 | VALUE "OriginalFilename", "libusb-1.0.dll\0"
51 | VALUE "PrivateBuild", "\0"
52 | VALUE "ProductName", "libusb-1.0\0"
53 | VALUE "ProductVersion", LIBUSB_VERSIONSTRING
54 | VALUE "SpecialBuild", "\0"
55 | END
56 | END
57 | BLOCK "VarFileInfo"
58 | BEGIN
59 | VALUE "Translation", 0x409, 1200
60 | END
61 | END
62 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/os/haiku/configure.ac:
--------------------------------------------------------------------------------
1 | AC_INIT([haikuusb], [1.0])
2 | AM_INIT_AUTOMAKE([no-define foreign])
3 | AM_MAINTAINER_MODE
4 | LT_INIT
5 | AC_PROG_CXX
6 | AC_CONFIG_FILES([Makefile])
7 | AC_CONFIG_MACRO_DIR([m4])
8 | AC_OUTPUT
9 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/os/haiku/m4/ltversion.m4:
--------------------------------------------------------------------------------
1 | # ltversion.m4 -- version numbers -*- Autoconf -*-
2 | #
3 | # Copyright (C) 2004 Free Software Foundation, Inc.
4 | # Written by Scott James Remnant, 2004
5 | #
6 | # This file is free software; the Free Software Foundation gives
7 | # unlimited permission to copy and/or distribute it, with or without
8 | # modifications, as long as this notice is preserved.
9 |
10 | # @configure_input@
11 |
12 | # serial 3337 ltversion.m4
13 | # This file is part of GNU Libtool
14 |
15 | m4_define([LT_PACKAGE_VERSION], [2.4.2])
16 | m4_define([LT_PACKAGE_REVISION], [1.3337])
17 |
18 | AC_DEFUN([LTVERSION_VERSION],
19 | [macro_version='2.4.2'
20 | macro_revision='1.3337'
21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
22 | _LT_DECL(, macro_revision, 0)
23 | ])
24 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/os/poll_posix.c:
--------------------------------------------------------------------------------
1 | /*
2 | * poll_posix: poll compatibility wrapper for POSIX systems
3 | * Copyright © 2013 RealVNC Ltd.
4 | *
5 | * This library is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) any later version.
9 | *
10 | * This library is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public
16 | * License along with this library; if not, write to the Free Software
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 | *
19 | */
20 |
21 | #include
22 |
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 | #include "libusbi.h"
29 |
30 | int usbi_pipe(int pipefd[2])
31 | {
32 | int ret = pipe(pipefd);
33 | if (ret != 0) {
34 | return ret;
35 | }
36 | ret = fcntl(pipefd[1], F_GETFL);
37 | if (ret == -1) {
38 | usbi_dbg("Failed to get pipe fd flags: %d", errno);
39 | goto err_close_pipe;
40 | }
41 | ret = fcntl(pipefd[1], F_SETFL, ret | O_NONBLOCK);
42 | if (ret != 0) {
43 | usbi_dbg("Failed to set non-blocking on new pipe: %d", errno);
44 | goto err_close_pipe;
45 | }
46 |
47 | return 0;
48 |
49 | err_close_pipe:
50 | usbi_close(pipefd[0]);
51 | usbi_close(pipefd[1]);
52 | return ret;
53 | }
54 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/os/poll_posix.h:
--------------------------------------------------------------------------------
1 | #ifndef LIBUSB_POLL_POSIX_H
2 | #define LIBUSB_POLL_POSIX_H
3 |
4 | #define usbi_write write
5 | #define usbi_read read
6 | #define usbi_close close
7 | #define usbi_poll poll
8 |
9 | int usbi_pipe(int pipefd[2]);
10 |
11 | #endif /* LIBUSB_POLL_POSIX_H */
12 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/os/threads_posix.c:
--------------------------------------------------------------------------------
1 | /*
2 | * libusb synchronization using POSIX Threads
3 | *
4 | * Copyright © 2011 Vitali Lovich
5 | * Copyright © 2011 Peter Stuge
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Lesser General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2.1 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Lesser General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Lesser General Public
18 | * License along with this library; if not, write to the Free Software
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | */
21 |
22 | #include
23 |
24 | #if defined(__linux__) || defined(__OpenBSD__)
25 | # if defined(__OpenBSD__)
26 | # define _BSD_SOURCE
27 | # endif
28 | # include
29 | # include
30 | #elif defined(__APPLE__)
31 | # include
32 | #elif defined(__CYGWIN__)
33 | # include
34 | #endif
35 |
36 | #include "threads_posix.h"
37 |
38 | int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr)
39 | {
40 | int err;
41 | pthread_mutexattr_t stack_attr;
42 | if (!attr) {
43 | attr = &stack_attr;
44 | err = pthread_mutexattr_init(&stack_attr);
45 | if (err != 0)
46 | return err;
47 | }
48 |
49 | /* mutexattr_settype requires _GNU_SOURCE or _XOPEN_SOURCE >= 500 on Linux */
50 | err = pthread_mutexattr_settype(attr, PTHREAD_MUTEX_RECURSIVE);
51 | if (err != 0)
52 | goto finish;
53 |
54 | err = pthread_mutex_init(mutex, attr);
55 |
56 | finish:
57 | if (attr == &stack_attr)
58 | pthread_mutexattr_destroy(&stack_attr);
59 |
60 | return err;
61 | }
62 |
63 | int usbi_get_tid(void)
64 | {
65 | int ret = -1;
66 | #if defined(__ANDROID__)
67 | ret = gettid();
68 | #elif defined(__linux__)
69 | ret = syscall(SYS_gettid);
70 | #elif defined(__OpenBSD__)
71 | /* The following only works with OpenBSD > 5.1 as it requires
72 | real thread support. For 5.1 and earlier, -1 is returned. */
73 | ret = syscall(SYS_getthrid);
74 | #elif defined(__APPLE__)
75 | ret = mach_thread_self();
76 | mach_port_deallocate(mach_task_self(), ret);
77 | #elif defined(__CYGWIN__)
78 | ret = GetCurrentThreadId();
79 | #endif
80 | /* TODO: NetBSD thread ID support */
81 | return ret;
82 | }
83 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/os/threads_posix.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libusb synchronization using POSIX Threads
3 | *
4 | * Copyright © 2010 Peter Stuge
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef LIBUSB_THREADS_POSIX_H
22 | #define LIBUSB_THREADS_POSIX_H
23 |
24 | #include
25 |
26 | #define usbi_mutex_static_t pthread_mutex_t
27 | #define USBI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
28 | #define usbi_mutex_static_lock pthread_mutex_lock
29 | #define usbi_mutex_static_unlock pthread_mutex_unlock
30 |
31 | #define usbi_mutex_t pthread_mutex_t
32 | #define usbi_mutex_init pthread_mutex_init
33 | #define usbi_mutex_lock pthread_mutex_lock
34 | #define usbi_mutex_unlock pthread_mutex_unlock
35 | #define usbi_mutex_trylock pthread_mutex_trylock
36 | #define usbi_mutex_destroy pthread_mutex_destroy
37 |
38 | #define usbi_cond_t pthread_cond_t
39 | #define usbi_cond_init pthread_cond_init
40 | #define usbi_cond_wait pthread_cond_wait
41 | #define usbi_cond_timedwait pthread_cond_timedwait
42 | #define usbi_cond_broadcast pthread_cond_broadcast
43 | #define usbi_cond_destroy pthread_cond_destroy
44 | #define usbi_cond_signal pthread_cond_signal
45 |
46 | extern int usbi_mutex_init_recursive(pthread_mutex_t *mutex, pthread_mutexattr_t *attr);
47 |
48 | int usbi_get_tid(void);
49 |
50 | #endif /* LIBUSB_THREADS_POSIX_H */
51 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/os/threads_windows.h:
--------------------------------------------------------------------------------
1 | /*
2 | * libusb synchronization on Microsoft Windows
3 | *
4 | * Copyright © 2010 Michael Plante
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2.1 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Lesser General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #ifndef LIBUSB_THREADS_WINDOWS_H
22 | #define LIBUSB_THREADS_WINDOWS_H
23 |
24 | #define usbi_mutex_static_t volatile LONG
25 | #define USBI_MUTEX_INITIALIZER 0
26 |
27 | #define usbi_mutex_t HANDLE
28 |
29 | struct usbi_cond_perthread {
30 | struct list_head list;
31 | DWORD tid;
32 | HANDLE event;
33 | };
34 | struct usbi_cond_t_ {
35 | // Every time a thread touches the CV, it winds up in one of these lists.
36 | // It stays there until the CV is destroyed, even if the thread
37 | // terminates.
38 | struct list_head waiters;
39 | struct list_head not_waiting;
40 | };
41 | typedef struct usbi_cond_t_ usbi_cond_t;
42 |
43 | // We *were* getting timespec from pthread.h:
44 | #if (!defined(HAVE_STRUCT_TIMESPEC) && !defined(_TIMESPEC_DEFINED))
45 | #define HAVE_STRUCT_TIMESPEC 1
46 | #define _TIMESPEC_DEFINED 1
47 | struct timespec {
48 | long tv_sec;
49 | long tv_nsec;
50 | };
51 | #endif /* HAVE_STRUCT_TIMESPEC | _TIMESPEC_DEFINED */
52 |
53 | // We *were* getting ETIMEDOUT from pthread.h:
54 | #ifndef ETIMEDOUT
55 | # define ETIMEDOUT 10060 /* This is the value in winsock.h. */
56 | #endif
57 |
58 | #define usbi_mutexattr_t void
59 | #define usbi_condattr_t void
60 |
61 | // all Windows mutexes are recursive
62 | #define usbi_mutex_init_recursive(mutex, attr) usbi_mutex_init((mutex), (attr))
63 |
64 | int usbi_mutex_static_lock(usbi_mutex_static_t *mutex);
65 | int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex);
66 |
67 |
68 | int usbi_mutex_init(usbi_mutex_t *mutex,
69 | const usbi_mutexattr_t *attr);
70 | int usbi_mutex_lock(usbi_mutex_t *mutex);
71 | int usbi_mutex_unlock(usbi_mutex_t *mutex);
72 | int usbi_mutex_trylock(usbi_mutex_t *mutex);
73 | int usbi_mutex_destroy(usbi_mutex_t *mutex);
74 |
75 | int usbi_cond_init(usbi_cond_t *cond,
76 | const usbi_condattr_t *attr);
77 | int usbi_cond_destroy(usbi_cond_t *cond);
78 | int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex);
79 | int usbi_cond_timedwait(usbi_cond_t *cond,
80 | usbi_mutex_t *mutex,
81 | const struct timespec *abstime);
82 | int usbi_cond_broadcast(usbi_cond_t *cond);
83 | int usbi_cond_signal(usbi_cond_t *cond);
84 |
85 | int usbi_get_tid(void);
86 |
87 | #endif /* LIBUSB_THREADS_WINDOWS_H */
88 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/version.h:
--------------------------------------------------------------------------------
1 | /* This file is parsed by m4 and windres and RC.EXE so please keep it simple. */
2 | #include "version_nano.h"
3 | #ifndef LIBUSB_MAJOR
4 | #define LIBUSB_MAJOR 1
5 | #endif
6 | #ifndef LIBUSB_MINOR
7 | #define LIBUSB_MINOR 0
8 | #endif
9 | #ifndef LIBUSB_MICRO
10 | #define LIBUSB_MICRO 20
11 | #endif
12 | #ifndef LIBUSB_NANO
13 | #define LIBUSB_NANO 0
14 | #endif
15 | /* LIBUSB_RC is the release candidate suffix. Should normally be empty. */
16 | #ifndef LIBUSB_RC
17 | #define LIBUSB_RC ""
18 | #endif
19 |
--------------------------------------------------------------------------------
/whip/linux/libftd2xx-x86_64-1.4.8/release/libusb/libusb/version_nano.h:
--------------------------------------------------------------------------------
1 | #define LIBUSB_NANO 11004
2 |
--------------------------------------------------------------------------------
/whip/windows/Static/amd64/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/Static/amd64/ftd2xx.lib
--------------------------------------------------------------------------------
/whip/windows/Static/i386/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/Static/i386/ftd2xx.lib
--------------------------------------------------------------------------------
/whip/windows/amd64/ftbusui.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftbusui.dll
--------------------------------------------------------------------------------
/whip/windows/amd64/ftcserco.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftcserco.dll
--------------------------------------------------------------------------------
/whip/windows/amd64/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftd2xx.lib
--------------------------------------------------------------------------------
/whip/windows/amd64/ftd2xx64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftd2xx64.dll
--------------------------------------------------------------------------------
/whip/windows/amd64/ftdibus.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftdibus.sys
--------------------------------------------------------------------------------
/whip/windows/amd64/ftlang.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftlang.dll
--------------------------------------------------------------------------------
/whip/windows/amd64/ftser2k.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftser2k.sys
--------------------------------------------------------------------------------
/whip/windows/amd64/ftserui2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/amd64/ftserui2.dll
--------------------------------------------------------------------------------
/whip/windows/ftd2xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/ftd2xx.h
--------------------------------------------------------------------------------
/whip/windows/ftdibus.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/ftdibus.cat
--------------------------------------------------------------------------------
/whip/windows/ftdibus.inf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/ftdibus.inf
--------------------------------------------------------------------------------
/whip/windows/ftdiport.cat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/ftdiport.cat
--------------------------------------------------------------------------------
/whip/windows/ftdiport.inf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/ftdiport.inf
--------------------------------------------------------------------------------
/whip/windows/i386/ftbusui.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftbusui.dll
--------------------------------------------------------------------------------
/whip/windows/i386/ftcserco.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftcserco.dll
--------------------------------------------------------------------------------
/whip/windows/i386/ftd2xx.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftd2xx.dll
--------------------------------------------------------------------------------
/whip/windows/i386/ftd2xx.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftd2xx.lib
--------------------------------------------------------------------------------
/whip/windows/i386/ftdibus.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftdibus.sys
--------------------------------------------------------------------------------
/whip/windows/i386/ftlang.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftlang.dll
--------------------------------------------------------------------------------
/whip/windows/i386/ftser2k.sys:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftser2k.sys
--------------------------------------------------------------------------------
/whip/windows/i386/ftserui2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ETCLabs/ETCDmxTool/628b49ea2bed4e9af61ee9f36c1a8cb102fe401d/whip/windows/i386/ftserui2.dll
--------------------------------------------------------------------------------