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

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

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