SlideShare a Scribd company logo
1 of 10
Download to read offline
OSVR Client API
Overview
Ryan A. Pavlik, PhD
Sensics, Inc.
July-2015
Links
● Dev Portal: http://osvr.github.io/build-with/#building-an-app-with-c++-or-c
● Docs on “Writing a Client Application”
○ http://resource.osvr.com/docs/OSVR-Core/md_TopicWritingClientApplication.
html
● Example state-based tracker client:
○ Cross-referenced source in Doxygen: http://resource.osvr.com/docs/OSVR-
Core/TrackerState_8cpp_source.html
○ https://github.com/OSVR/OSVR-
Core/blob/master/examples/clients/TrackerState.cpp
● Example callback-based button client:
○ Cross-referenced source in Doxygen: http://resource.osvr.com/docs/OSVR-
Core/ButtonCallback_8cpp_source.html
○ https://github.com/OSVR/OSVR-
Core/blob/master/examples/clients/ButtonCallback.cpp
Basic Concepts
● Direct API is C, for ABI stability and FFI
compatibility
● Recommended native code interface is
included C++ header-only wrappers
● .NET/Mono interface: Managed-OSVR
○ Used for Unity support
● All share a similar design, and are generally
modeled on the C++ API.
Client Context Object
● Pass reverse domain name “app id”.
● No implicit global state: on startup, get a
context object, on shutdown, close it.
● Client context handles the attempted
connection to the OSVR server.
● Does not spawn its own thread - call update
on the client context to transfer control and
process messages.
Interface Objects (handles)
● Request using a “semantic path” in the path
tree
○ example: /me/head
○ If no applicable path exists, just add an alias using
the server config.
● Obtained from client context
● If not freed before client context is closed,
freed automatically.
Two Ways of Accessing Data
● Most data accessible equally through the
“state interface” and the “callback interface”
● For native code, no substantial difference in
performance between the two, just different
ways of getting the same data.
Callback
● Can register a callback for a particular
device interface or message type
○ “userdata” void pointer to be able to associate a
callback with an object.
○ During a ClientContext Update, gets called once for
each new data point for that path.
○ Since tracker rate is > framerate, often processing
multiple tracker callbacks per frame
● Unregister callback: Free interface object
State
● Fundamentally the same data as callback,
but on demand
○ Internally, callback automatically registered that
updates the state.
○ May be more convenient than native-managed
transitions for data that will be ignored anyway.
● Caveat: No state data until first new data
received with Update!
Timing
● Everything tied to the Client Context Update
○ Callbacks only fire during Update
○ State only changes during Update
● Threading:
○ Keep Update for a client context in a single thread
○ Don’t call update while accessing data other ways
(no locking included by default)
For more information:
● OSVR developer portal
○ http://osvr.github.io
● Sensics – Founding contributor to OSVR,
experts working in VR/AR for over a decade
○ http://www.sensics.com

More Related Content

What's hot

A New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEsA New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEsDr. Jan Köhnlein
 
Getting started with .NET Core on Linux
Getting started with .NET Core on LinuxGetting started with .NET Core on Linux
Getting started with .NET Core on LinuxJochen Kirstätter
 
Introduction to python requests
Introduction to python requestsIntroduction to python requests
Introduction to python requestsAbhijeet Kasurde
 
Plc2 2015 your own ide
Plc2 2015 your own idePlc2 2015 your own ide
Plc2 2015 your own ideSigasi
 
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...NETWAYS
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP ExtensionsMichaelBrunoLochemem
 
Eclipse demo camp 2016 Toronto
Eclipse demo camp 2016 TorontoEclipse demo camp 2016 Toronto
Eclipse demo camp 2016 TorontoGorkem Ercan
 
Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )Андрей Вандакуров
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
Custom angular libraries
Custom angular librariesCustom angular libraries
Custom angular librariesMattVaughn9
 
Clang compiler `
Clang compiler `Clang compiler `
Clang compiler `Rabin BK
 
Contributing to Core Python
Contributing to Core PythonContributing to Core Python
Contributing to Core PythonAbhijeet Kasurde
 
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
Introducing ofgodpaperframework
Introducing ofgodpaperframeworkIntroducing ofgodpaperframework
Introducing ofgodpaperframeworkyangbo zhou
 
Introduction of dotnet
Introduction of dotnetIntroduction of dotnet
Introduction of dotnetAjay Wadekar
 

What's hot (20)

A New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEsA New Approach Towards Web-based IDEs
A New Approach Towards Web-based IDEs
 
Getting started with .NET Core on Linux
Getting started with .NET Core on LinuxGetting started with .NET Core on Linux
Getting started with .NET Core on Linux
 
Introduction to python requests
Introduction to python requestsIntroduction to python requests
Introduction to python requests
 
VN Tech Seminor Vol.1
VN Tech Seminor Vol.1VN Tech Seminor Vol.1
VN Tech Seminor Vol.1
 
Plc2 2015 your own ide
Plc2 2015 your own idePlc2 2015 your own ide
Plc2 2015 your own ide
 
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
OSDC 2015: Dr. Udo Seidel | Developing Applications for the New Cloud Operati...
 
Ruxmon.2015-08.-.proxenet
Ruxmon.2015-08.-.proxenetRuxmon.2015-08.-.proxenet
Ruxmon.2015-08.-.proxenet
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP Extensions
 
Eclipse demo camp 2016 Toronto
Eclipse demo camp 2016 TorontoEclipse demo camp 2016 Toronto
Eclipse demo camp 2016 Toronto
 
Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
Custom angular libraries
Custom angular librariesCustom angular libraries
Custom angular libraries
 
Clang compiler `
Clang compiler `Clang compiler `
Clang compiler `
 
Contributing to Core Python
Contributing to Core PythonContributing to Core Python
Contributing to Core Python
 
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
InChI Resolver
InChI ResolverInChI Resolver
InChI Resolver
 
Introducing ofgodpaperframework
Introducing ofgodpaperframeworkIntroducing ofgodpaperframework
Introducing ofgodpaperframework
 
Introduction of dotnet
Introduction of dotnetIntroduction of dotnet
Introduction of dotnet
 

Similar to OSVR Client Application Design

Chromium: NaCl and Pepper API
Chromium: NaCl and Pepper APIChromium: NaCl and Pepper API
Chromium: NaCl and Pepper APIChang W. Doh
 
Using Event Streams in Serverless Applications
Using Event Streams in Serverless ApplicationsUsing Event Streams in Serverless Applications
Using Event Streams in Serverless ApplicationsJonathan Dee
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in ChoreoWSO2
 
Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)svub
 
Apigility introduction v2 (glasgow php)
Apigility introduction v2 (glasgow php)Apigility introduction v2 (glasgow php)
Apigility introduction v2 (glasgow php)Engineor
 
Designing a json/rest api for your mobile app
Designing a json/rest api for your mobile appDesigning a json/rest api for your mobile app
Designing a json/rest api for your mobile appOlivier Destrebecq
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerAndrew Phillips
 
FITC presents: Mobile & offline data synchronization in Angular JS
FITC presents: Mobile & offline data synchronization in Angular JSFITC presents: Mobile & offline data synchronization in Angular JS
FITC presents: Mobile & offline data synchronization in Angular JSFITC
 
Design Web Service API by HungerStation
Design Web Service API by HungerStationDesign Web Service API by HungerStation
Design Web Service API by HungerStationArabNet ME
 
MongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB
 
Load testing in Zonky with Gatling
Load testing in Zonky with GatlingLoad testing in Zonky with Gatling
Load testing in Zonky with GatlingPetr Vlček
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application developmentshelloidhq
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless worldMatthias Luebken
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixC4Media
 
Introduction to Apigility
Introduction to ApigilityIntroduction to Apigility
Introduction to ApigilityEngineor
 
Powering machine learning workflows with Apache Airflow and Python
Powering machine learning workflows with Apache Airflow and PythonPowering machine learning workflows with Apache Airflow and Python
Powering machine learning workflows with Apache Airflow and PythonTatiana Al-Chueyr
 
Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at DecisivTeleport
 
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrfDEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrfFelipe Prado
 
Introducing Neo4j 3.0
Introducing Neo4j 3.0Introducing Neo4j 3.0
Introducing Neo4j 3.0Neo4j
 
"Offline mode for a mobile application, redux on server and a little bit abou...
"Offline mode for a mobile application, redux on server and a little bit abou..."Offline mode for a mobile application, redux on server and a little bit abou...
"Offline mode for a mobile application, redux on server and a little bit abou...Viktor Turskyi
 

Similar to OSVR Client Application Design (20)

Chromium: NaCl and Pepper API
Chromium: NaCl and Pepper APIChromium: NaCl and Pepper API
Chromium: NaCl and Pepper API
 
Using Event Streams in Serverless Applications
Using Event Streams in Serverless ApplicationsUsing Event Streams in Serverless Applications
Using Event Streams in Serverless Applications
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)
 
Apigility introduction v2 (glasgow php)
Apigility introduction v2 (glasgow php)Apigility introduction v2 (glasgow php)
Apigility introduction v2 (glasgow php)
 
Designing a json/rest api for your mobile app
Designing a json/rest api for your mobile appDesigning a json/rest api for your mobile app
Designing a json/rest api for your mobile app
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
 
FITC presents: Mobile & offline data synchronization in Angular JS
FITC presents: Mobile & offline data synchronization in Angular JSFITC presents: Mobile & offline data synchronization in Angular JS
FITC presents: Mobile & offline data synchronization in Angular JS
 
Design Web Service API by HungerStation
Design Web Service API by HungerStationDesign Web Service API by HungerStation
Design Web Service API by HungerStation
 
MongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless World
 
Load testing in Zonky with Gatling
Load testing in Zonky with GatlingLoad testing in Zonky with Gatling
Load testing in Zonky with Gatling
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application development
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFix
 
Introduction to Apigility
Introduction to ApigilityIntroduction to Apigility
Introduction to Apigility
 
Powering machine learning workflows with Apache Airflow and Python
Powering machine learning workflows with Apache Airflow and PythonPowering machine learning workflows with Apache Airflow and Python
Powering machine learning workflows with Apache Airflow and Python
 
Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at Decisiv
 
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrfDEF CON 27 - JOSHUA MADDUX - api induced ssrf
DEF CON 27 - JOSHUA MADDUX - api induced ssrf
 
Introducing Neo4j 3.0
Introducing Neo4j 3.0Introducing Neo4j 3.0
Introducing Neo4j 3.0
 
"Offline mode for a mobile application, redux on server and a little bit abou...
"Offline mode for a mobile application, redux on server and a little bit abou..."Offline mode for a mobile application, redux on server and a little bit abou...
"Offline mode for a mobile application, redux on server and a little bit abou...
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

OSVR Client Application Design

  • 1. OSVR Client API Overview Ryan A. Pavlik, PhD Sensics, Inc. July-2015
  • 2. Links ● Dev Portal: http://osvr.github.io/build-with/#building-an-app-with-c++-or-c ● Docs on “Writing a Client Application” ○ http://resource.osvr.com/docs/OSVR-Core/md_TopicWritingClientApplication. html ● Example state-based tracker client: ○ Cross-referenced source in Doxygen: http://resource.osvr.com/docs/OSVR- Core/TrackerState_8cpp_source.html ○ https://github.com/OSVR/OSVR- Core/blob/master/examples/clients/TrackerState.cpp ● Example callback-based button client: ○ Cross-referenced source in Doxygen: http://resource.osvr.com/docs/OSVR- Core/ButtonCallback_8cpp_source.html ○ https://github.com/OSVR/OSVR- Core/blob/master/examples/clients/ButtonCallback.cpp
  • 3. Basic Concepts ● Direct API is C, for ABI stability and FFI compatibility ● Recommended native code interface is included C++ header-only wrappers ● .NET/Mono interface: Managed-OSVR ○ Used for Unity support ● All share a similar design, and are generally modeled on the C++ API.
  • 4. Client Context Object ● Pass reverse domain name “app id”. ● No implicit global state: on startup, get a context object, on shutdown, close it. ● Client context handles the attempted connection to the OSVR server. ● Does not spawn its own thread - call update on the client context to transfer control and process messages.
  • 5. Interface Objects (handles) ● Request using a “semantic path” in the path tree ○ example: /me/head ○ If no applicable path exists, just add an alias using the server config. ● Obtained from client context ● If not freed before client context is closed, freed automatically.
  • 6. Two Ways of Accessing Data ● Most data accessible equally through the “state interface” and the “callback interface” ● For native code, no substantial difference in performance between the two, just different ways of getting the same data.
  • 7. Callback ● Can register a callback for a particular device interface or message type ○ “userdata” void pointer to be able to associate a callback with an object. ○ During a ClientContext Update, gets called once for each new data point for that path. ○ Since tracker rate is > framerate, often processing multiple tracker callbacks per frame ● Unregister callback: Free interface object
  • 8. State ● Fundamentally the same data as callback, but on demand ○ Internally, callback automatically registered that updates the state. ○ May be more convenient than native-managed transitions for data that will be ignored anyway. ● Caveat: No state data until first new data received with Update!
  • 9. Timing ● Everything tied to the Client Context Update ○ Callbacks only fire during Update ○ State only changes during Update ● Threading: ○ Keep Update for a client context in a single thread ○ Don’t call update while accessing data other ways (no locking included by default)
  • 10. For more information: ● OSVR developer portal ○ http://osvr.github.io ● Sensics – Founding contributor to OSVR, experts working in VR/AR for over a decade ○ http://www.sensics.com