OSVR-Core
Classes | Macros | Typedefs | Functions | Variables
MeasureTrackingCameraLatency.cpp File Reference

Implementation. More...

#include "ImageSources/ImageSource.h"
#include "ImageSources/ImageSourceFactories.h"
#include <osvr/Util/MiniArgsHandling.h>
#include <boost/lexical_cast.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <vrpn_SerialPort.h>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <fstream>
#include <functional>
#include <iostream>
#include <memory>
#include <random>
#include <sstream>
#include <thread>

Classes

class  SerialIRLED
 Abstract base class for ways of controlling an IR LED through a serial port. More...
 
class  ArduinoLED
 A class for an LED connected to an Arduino running a sketch that pulses an LED on then off on receiving a single character over serial. More...
 
class  BusPirateAuxLED
 A class for an LED connected to a Bus Pirate's AUX pin (with resistor), using the binary bit-bang mode to turn it on then off. More...
 
struct  Config
 

Typedefs

using SerialBufType = const unsigned char
 
using SerialIRLEDPtr = std::unique_ptr< SerialIRLED >
 
using SerialLEDControllerFactory = std::function< SerialIRLEDPtr(vrpn_SerialPort &)>
 

Functions

template<typename T , std::size_t N>
void writeStringWithoutNullTerminator (vrpn_SerialPort &port, T(&buf)[N], std::size_t repetitions=1)
 Utility function to take in a (typically) string literal and write it, without its null terminator, to the serial port, optionally repeatedly. More...
 
template<typename T , std::size_t N>
void writeCommand (vrpn_SerialPort &port, T(&buf)[N], std::size_t repetitions=1)
 Utility function to take in a string literal and write it, without its null terminator, followed by a newline, to the serial port, optionally repeatedly. More...
 
template<std::size_t N>
void writeBinaryArray (vrpn_SerialPort &port, SerialBufType(&buf)[N], std::size_t repetitions=1)
 Utility function to take in a binary array and write it verbatim to the serial port, optionally repeatedly. More...
 
int main (int argc, char *argv[])
 

Variables

struct Config g_config
 

Detailed Description

Implementation.

Date
2015
Author
Sensics, Inc. http://sensics.com/osvr

Function Documentation

§ main()

int main ( int  argc,
char *  argv[] 
)
Todo:
add usage

§ writeBinaryArray()

template<std::size_t N>
void writeBinaryArray ( vrpn_SerialPort &  port,
SerialBufType(&)  buf[N],
std::size_t  repetitions = 1 
)
inline

Utility function to take in a binary array and write it verbatim to the serial port, optionally repeatedly.

(Size deduced by template)

§ writeCommand()

template<typename T , std::size_t N>
void writeCommand ( vrpn_SerialPort &  port,
T(&)  buf[N],
std::size_t  repetitions = 1 
)
inline

Utility function to take in a string literal and write it, without its null terminator, followed by a newline, to the serial port, optionally repeatedly.

(Size deduced by template)

§ writeStringWithoutNullTerminator()

template<typename T , std::size_t N>
void writeStringWithoutNullTerminator ( vrpn_SerialPort &  port,
T(&)  buf[N],
std::size_t  repetitions = 1 
)
inline

Utility function to take in a (typically) string literal and write it, without its null terminator, to the serial port, optionally repeatedly.

(Size deduced by template)