Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • danc/MicroCART
  • snawerdt/MicroCART_17-18
  • bbartels/MicroCART_17-18
  • jonahu/MicroCART
4 results
Show changes
Showing
with 0 additions and 7430 deletions
---
Language: Cpp
BasedOnStyle: LLVM
Standard: Auto
IndentWidth: 4
TabWidth: 4
UseTab: Never
AccessModifierOffset: -4
AllowShortIfStatementsOnASingleLine: true
BreakBeforeBraces: Stroustrup
BreakConstructorInitializersBeforeComma: true
NamespaceIndentation: All
DerivePointerBinding: true
...
---
# Remove these blocked checks once the first batch are cleaned up
# - readability-braces-around-statements
Checks: '*,-clang-analyzer-alpha*,-llvm-include-order,-google-*,-llvm-header-guard,-readability-braces-around-statements,-misc-use-override'
HeaderFilterRegex: '.*'
...
[submodule "submodules/hidapi"]
path = submodules/hidapi
url = https://github.com/vrpn/hidapi.git
[submodule "submodules/jsoncpp"]
path = submodules/jsoncpp
url = https://github.com/vrpn/jsoncpp.git
compiler:
- clang
- gcc
before_install:
- git submodule update --init --recursive
- sudo apt-get update -qq
- sudo apt-get install -qq libgpm-dev freeglut3-dev libxmu-dev libxi-dev libusb-1.0-0-dev libqt4-dev
language: cpp
script: mkdir build && cd build && cmake -DVRPN_GPL_SERVER=TRUE -D VRPN_BUILD_EXTRA_COMPILER_WARNINGS=TRUE .. && make && make test
This diff is collapsed.
This diff is collapsed.
# Project configuration settings
set(VRPN_USE_PHANTOM_SERVER "@VRPN_USE_PHANTOM_SERVER@" CACHE BOOL "")
set(VRPN_INCLUDE_TIMECODE_SERVER "@VRPN_INCLUDE_TIMECODE_SERVER@" CACHE BOOL "")
set(VRPN_INCLUDE_INTERSENSE "@VRPN_INCLUDE_INTERSENSE@" CACHE BOOL "")
set(VRPN_USE_NATIONAL_INSTRUMENTS "@VRPN_USE_NATIONAL_INSTRUMENTS@" CACHE BOOL "")
set(VRPN_USE_NATIONAL_INSTRUMENTS_MX "@VRPN_USE_NATIONAL_INSTRUMENTS_MX@" CACHE BOOL "")
set(VRPN_USE_NIDAQ "@VRPN_USE_NIDAQ@" CACHE BOOL "")
set(VRPN_USE_USDIGITAL "@VRPN_USE_USDIGITAL@" CACHE BOOL "")
set(VRPN_USE_MICROSCRIBE "@VRPN_USE_MICROSCRIBE@" CACHE BOOL "")
set(VRPN_INCLUDE_PHASESPACE "@VRPN_INCLUDE_PHASESPACE@" CACHE BOOL "")
set(VRPN_USE_MOTIONNODE "@VRPN_USE_MOTIONNODE@" CACHE BOOL "")
set(VRPN_USE_WIIUSE "@VRPN_USE_WIIUSE@" CACHE BOOL "")
set(VRPN_USE_FREESPACE "@VRPN_USE_FREESPACE@" CACHE BOOL "")
set(VRPN_USE_DIRECTINPUT "@VRPN_USE_DIRECTINPUT@" CACHE BOOL "")
set(VRPN_USE_DIRECTSHOW "@VRPN_USE_DIRECTSHOW@" CACHE BOOL "")
set(VRPN_USE_SHARED_LIBRARY "@VRPN_USE_SHARED_LIBRARY@" CACHE BOOL "")
set(VRPN_USE_GPM_MOUSE "@VRPN_USE_GPM_MOUSE@" CACHE BOOL "")
set(VRPN_GPL_SERVER "@VRPN_GPL_SERVER@" CACHE BOOL "")
# Root directories to search for dependencies
set(WIIUSE22_ROOT_DIR "@WIIUSE_ROOT_DIR@" CACHE PATH "")
/*
*
* VRPN Header Format
*
* +------------+------------+------------+------------+
* | Total Length |
* +------------+------------+------------+------------+
* | Timestamp (Seconds) |
* +------------+------------+------------+------------+
* | Timestamp (Microseconds) |
* +------------+------------+------------+------------+
* | Sender |
* +------------+------------+------------+------------+
* | Type |
* +------------+------------+------------+------------+
* | padding |
* +------------+------------+------------+------------+
*
* Total Length = Padded Payload Length + Padded Header Length.
* Padded Header Length = 24 bytes.
* Padded Payload Length = Payload Length + (Payload Length % 8).
*
* All header fields are 32-bit integers sent in network order.
* Both header and payload are padded to end on 8-byte boundaries.
*
* Implementation in vrpn_Connection::marshall_message().
*
*/
/*
*
* VRPN Connection setup sequence
*
* Server opens a TCP socket and listens() on port - default vrpn_DEFAULT_LISTEN_PORT_NO
* Client connects() to port
* Server and client both write a COOKIE
* Server and client both wait (nonblocking) for a COOKIE and
* verify version #, etc.
* If either peer is requesting remote logging, a log_description message
* is sent.
* Server and client both open UDP sockets.
* Server and client both send udp_description messages.
* Server and client both send sender_description messages for all senders
* registered locally.
* Server and client both send type_description messages for all types
* registered locally.
*
* Implementation in vrpn_Connection::setup_new_connection(),
* finish_new_connection_setup(),
*/
/*
* VRPN Cookie Format
*
* +------------+------------+------------+------------+
* + 'v' | 'r' | 'p' | 'n' +
* +------------+------------+------------+------------+
* + ':' | ' ' | 'v' | 'e' +
* +------------+------------+------------+------------+
* + 'r' | '.' | ' ' | X +
* +------------+------------+------------+------------+
* + X | '.' | Y | Y +
* +------------+------------+------------+------------+
* + ' ' | ' ' | L | padding |
* +------------+------------+------------+------------+
* + padding |
* +------------+------------+------------+------------+
*
* XX = major version number (2 ASCII characters)
* YY = minor version number (2 ASCII characters)
* L = remote log mode requested (ASCII '0', '1', '2', or '3')
*
* This cookie is in ASCII so that humans scanning a dump can
* quickly determine whether or not it is a VRPN session.
*/
/*
* VRPN Log description message:
*
* type = vrpn_CONNECTION_LOG_DESCRIPTION (-4)
* sender = logging mode (0, 1, 2, or 3)
* payload length = strlen(logfile name) + 1
* data = null-terminated ASCII string giving pathname of file to log to
*/
/*
* VRPN UDP description message:
*
* type = vrpn_CONNECTION_UDP_DESCRIPTION (-3)
* sender = UDP port number to contact
* payload length = strlen(IP address) + 1
* data = ASCII string containing host's IP address
*/
/*
* VRPN Sender description message:
*
* type = vrpn_CONNECTION_SENDER_DESCRIPTION (-1)
* sender = ID of sender
* payload length = 5 + strlen(sender name)
* data =
*
* +------------+------------+------------+------------+
* + length of sender name + 1 |
* +------------+------------+------------+------------+
* + sender name |
* +------------+------------+------------+------------+
* + ... |
* +------------+------------+------------+------------+
*
* N.B. There is redundant length data here
*/
/*
* VRPN Type description message:
*
* type = vrpn_CONNECTION_TYPE_DESCRIPTION (-2)
* sender = ID of type
* payload length = 5 + strlen(sender name)
* data =
*
* +------------+------------+------------+------------+
* + length of type name + 1 |
* +------------+------------+------------+------------+
* + type name |
* +------------+------------+------------+------------+
* + ... |
* +------------+------------+------------+------------+
*
* N.B. There is redundant length data here
*/
/*
* VRPN disconnect message:
*
* type = vrpn_CONNECTION_DISCONNECT_MESSAGE (-5)
* sender = 0
* payload length = 0
*
* This message is never sent over the wire; it is written into logs
* to mark the point at which a connection was broken.
*/
This diff is collapsed.
# Example toolchain file for building with mingw32 on Ubuntu 10.04 x64
# Pass to CMake using cmake -DCMAKE_TOOLCHAIN_FILE=MinGWToolchain.cmake
# Not needed when actually building on Windows using mingw, only when
# cross-compiling
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
set(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
set(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
# here is the target environment located
set(CMAKE_FIND_ROOT_PATH
/usr/i586-mingw32msvc
$ENV{HOME}/mingw-install)
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
###
# Get the version number by parsing vrpn_Connection.C
###
include(WarningDev.cmake)
set(_vrpn_version_file "${CMAKE_CURRENT_SOURCE_DIR}/vrpn_Connection.C")
if(EXISTS "${_vrpn_version_file}")
file(READ "${_vrpn_version_file}" _vrpn_version_contents)
endif()
set(_vrpn_version_regex "vrpn: ver. ([0-9]+).([0-9]+)")
string(REGEX
MATCH
"${_vrpn_version_regex}"
_dummy
"${_vrpn_version_contents}")
if(CMAKE_MATCH_1)
set(CPACK_PACKAGE_VERSION_MAJOR "${CMAKE_MATCH_1}")
else()
set(CPACK_PACKAGE_VERSION_MAJOR "07")
warning_dev("Could not parse major version from vrpn_Connection.C")
endif()
if(CMAKE_MATCH_2)
set(CPACK_PACKAGE_VERSION_MINOR "${CMAKE_MATCH_2}")
else()
set(CPACK_PACKAGE_VERSION_MAJOR "26")
warning_dev("Could not parse minor version from vrpn_Connection.C")
endif()
set(CPACK_PACKAGE_VERSION
"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(CONFIG_VERSION "${CPACK_PACKAGE_VERSION}")
set(BRIEF_VERSION "${CPACK_PACKAGE_VERSION}")
include(GetGitRevisionDescription)
git_get_exact_tag(GIT_EXACT_TAG --tags --match version_*)
if(GIT_EXACT_TAG)
# Extract simple version number from description to verify it
string(REPLACE "version_" "" GIT_LAST_TAGGED_VER "${GIT_EXACT_TAG}")
string(REGEX
REPLACE
"-.*"
""
GIT_LAST_TAGGED_VER
"${GIT_LAST_TAGGED_VER}")
if(GIT_LAST_TAGGED_VER VERSION_EQUAL CPACK_PACKAGE_VERSION)
# OK, they match. All done!
return()
endif()
message("WARNING: Git reports that the current source code is tagged '${GIT_EXACT_TAG}',
but the version extracted from the source code (${CPACK_PACKAGE_VERSION}) differs!
You may need to fix the source code's version and/or update the tag!
The version extracted from the source code will be trusted for now,
but please fix this issue!\n")
else()
# Not an exact tag, let's try a description
git_describe(GIT_REVISION_DESCRIPTION --tags --match version_*)
if(GIT_REVISION_DESCRIPTION)
# Extract simple version number from description
string(REPLACE
"version_"
""
GIT_LAST_TAGGED_VER
"${GIT_REVISION_DESCRIPTION}")
set(GIT_REDUCED_REVISION_DESCRIPTION "${GIT_LAST_TAGGED_VER}")
string(REGEX
REPLACE
"-.*"
""
GIT_LAST_TAGGED_VER
"${GIT_LAST_TAGGED_VER}")
if(GIT_LAST_TAGGED_VER VERSION_LESS CPACK_PACKAGE_VERSION)
# Prerelease
message(STATUS
"Git's description of the current revision indicates this is a prerelease of ${CPACK_PACKAGE_VERSION}: ${GIT_REVISION_DESCRIPTION}\n")
set(CPACK_PACKAGE_VERSION_PATCH
"0~prerelease-git-${GIT_REDUCED_REVISION_DESCRIPTION}")
set(CONFIG_VERSION "pre-${CONFIG_VERSION}")
else()
# OK, this is a followup version
# TODO verify assumption
message(STATUS
"Git's description of the current revision indicates this is a patched version of ${CPACK_PACKAGE_VERSION}: ${GIT_REVISION_DESCRIPTION}\n")
set(CONFIG_VERSION "post-${CONFIG_VERSION}")
set(CPACK_PACKAGE_VERSION_PATCH "0-git-${GIT_REDUCED_REVISION_DESCRIPTION}")
endif()
set(CPACK_PACKAGE_VERSION
"${CPACK_PACKAGE_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")
endif()
endif()
IMPORTANT LEGAL INFORMATION for offsite use is in README.Legal
IMPORTANT compiling at other sites information in README.Compile
NOTE: See http://www.vrpn.org for
information on VRPN.
VRPN has had a CMake-based build system since version 07.23. CMake is
similar in purpose but not in implementation to the Autoconf collection
of tools, and permits building on multiple platforms by creating native
project files for MSVC, XCode, Eclipse, Code::Blocks, makefiles, and
more.
Get CMake from your Linux distribution and/or from www.cmake.org
Use the current directory (vrpn_XX_XX) as the "source code" directory
in the CMake GUI; the quat directory (vrpn_XX_XX/quat) will be automatically
detected and built as well. Choose any directory you want (the source
directory followed by /build is suggested) as the "build binaries"
directory: generated build files will be placed there rather than cluttering
up your source tree.
Many options can be fully configured using CMake as of Dec 2009, and more
are sure to come. Until then, if you need specific compilation needs
that CMake doesn't appear to provide an interface for, look in the
vrpn_Configure.h.cmake_in file.
If you'd rather use the command line, here's the basics:
mkdir build
cd build
ccmake ../
- Press 'c' to run the initial configuration
- Change any options, pressing 'c' to re-configure after each change
- when satisfied, after configuring, press 'g' to create makefiles, etc
make
and any/all of these if desired:
make package
- Create binary install packages of your configured build using CPack
make package_source
- Create source code packages using CPack
make install
- Install all libraries, executables, and headers (as configured)
to your system, to the configured path. Add DESTDIR=whatever/
to place the installation tree somewhere other than root.
Instructions for the original Makefile-based or project-based build follow.
For those not at UNC, you compile by doing the following:
for Visual C++:
Open the vrpn.dsw file.
Compile the quat project.
Compile the VRPN project.
Then compile whichever of vrpn_server, printvals, etc you want.
for Unix/Cygwin:
Go to ../quat.
Edit 'makefile' to uncomment the architecture you are on.
gmake
Come back here (cd ../vrpn)
Edit Makefile to uncomment your architecture
gmake
Go to client_src
Edit Makefile to uncomment your architecture
gmake
Go to server_src
Edit Makefile to uncomment your architecture
gmake
edit the vrpn.cfg file to set it to start tracker you want
See the file vrpn.cfg.SAMPLE for examples.
Example: vrpn_Tracker_NULL Tracker0@MYHOSTNAME 2 2
(Run the server: sgi_irix/vrpn_server -millisleep 1 -f vrpn.cfg)
Go to client_src
Run printvals to check the server
Example: sgi_irix/printvals localhost
For those wanting to build client code for Android, see the README_Android.txt in
the java_vrpn directory.
The initial release of VRPN (The Virtual Reality Peripheral Network) was placed into the public domain on 5/4/1998 by the copyright holder Russell M. Taylor II at the University of North Carolina at Chapel Hill.
To protect all VRPN contributors from liability without restricting the use of VRPN, as of July 22, 2010, future versions of VRPN (versions 7.27 and higher) are being released under the Boost Software License 1.0, which is as follows:
Boost Software License 1.0 (BSL1.0)
Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:
The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Additional requests follow:
1. Please acknowledge this library in any publication, written, videotaped,
or otherwise produced, that results from making programs using it.
The acknowledgement will credit
CISMM Project
University of North Carolina at Chapel Hill,
Supported by the NIH/NCRR and the NIH/NIBIB.
2. Please furnish us a copy of any publication, including videotape,
that you produce and disseminate outside your group using our
program. These should be addressed to Professor R.M. Taylor
at taylorr@cs.unc.edu.
3. Please send us derived classes and drivers for new devices that you
create for the library. We will attempt to include them in
future releases of the library for you and others to use. This
is the fastest way to get a working system for everyone.
vrpn_devel is currently accessed over https:// at git.cs.unc.edu.
Use a password to push changes.
Getting to the Git repository using a public/private key pair from a UNC Linux host.
---------------------
1) Generate a public/private key pair and store them securely on your AFS space:
cd ~
mkdir .ssh-private
fs sa .ssh-private system:anyuser none
fs sa .ssh-private system:administrators none
cd ~/.ssh-private
ssh-keygen -t dsa -b 1024 -f ./git_dsa
(Decide if you want a passphrase on the key, enter it if so
or blank if not.)
---------------------
2) Tell SSH to share this key with the other side when you're connecting to the server by adding the following lines into the file ~/.ssh/config under Linux:
Host cvs.cs.unc.edu
IdentityFile ~/.ssh-private/git_dsa
Host git.cs.unc.edu
IdentityFile ~/.ssh-private/git_dsa
---------------------
3) Send the public key to Murray to be added to the list of users who can log on to CVS as the git user. You can paste the text of the key into an email to him.
---------------------
4) Use the following name for the repository: git@git.cs.unc.edu:vrpn.git, for example:
git clone git@git.cs.unc.edu:vrpn.git
git push git@git.cs.unc.edu:vrpn.git master
---------------------
Random: If you end up pushing in a way that requires a password, you may need to do the following in your shell ahead of time to avoid having it attempt to display via an X server:
unset DISPLAY
unset SSH_ASKPASS
JSONCPP is required to build a VRPN server for the Vrpn Android widgets (see android_widgets directory).
If you've done a recursive clone, JSONCPP is in the submodules directory,
will be built automatically, and you can completely ignore the rest of this file.
Get the latest JSONCPP (r156 has been used successfully) from
http://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/jsoncpp
You will also need Scons and Python
To build jsoncpp, see README.txt in the JSONCPP directory, but :
1/ Get scons-local (2.0.1 is OK) from http://www.scons.org/download.php
instead of the link in the README, then
extract scons-local into the jsoncpp directory as mentionned in the README
2/ To avoid LNK2005 errors when building VRPN, you will need to edit jsoncpp/Sconstruct
locate the section relative to your build environment, for instance :
elif platform == 'msvc90':
in this instruction block, replace the line :
env['CXXFLAGS']='xxxxxxx /MT'
by :
env['CXXFLAGS']='xxxxxxx /MD'
3/ To build with Visual Studio, run the Visual Studio command that configures environment variables
(on VS-2008-32, look for a file named vsvars32.bat), otherwise scons may not find the compiler
Then build, for instance with the command
c:\Python27\python.exe scons.py platform=msvc90
The values allowed for platform are
suncc vacpp mingw msvc6 msvc7 msvc71 msvc80 msvc90 linux-gcc
WARNING:
the JSONCPP build system builds a Release version. Using this release library with a
Debug VRPN server crashes.
To clean, use the command
c:\Python271\python.exe scons.py platform=msvc90 -c
Then, run CMAKE for VRPN, define VRPN_USE_JSONNET and JSONCPP_ROOT_DIR.
python_vrpn:
VRPN wrapped in Python using Swig. Works with Python 2.7.
python:
Hand-written Python classes that work with Python 2.7 and 3.2.
Compile the main library (ie.: root of VRPN) and the quat library. Then, go to the "python" folder. Before making the binary, you have to define the "PYTHON_VERSION" environment variable to the version of python you want to compile it for (ie.: "3.2", "2.7" ...). And you have to put the resulting vrpn.so shared library (found in $HW_OS/$PYTHON_VERSION) in the python module folder or in a path defined in the PYTHONPATH environment variable.
The "essai_*.py" are simple python files that show you how to use this module (the single difference is a call to python3.2 or python2.7 interpreter).
# - Print a developer warning, using author_warning if we have cmake 2.8
#
# warning_dev("your desired message")
#
# Original Author:
# 2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
function(warning_dev _yourmsg)
if("1.${CMAKE_VERSION}" VERSION_LESS "1.2.8.0")
# CMake version <2.8.0
message(STATUS
"The following is a developer warning - end users may ignore it")
message(STATUS "Dev Warning: ${_yourmsg}")
else()
message(AUTHOR_WARNING "${_yourmsg}")
endif()
endfunction()