NAP
Public Member Functions | Protected Member Functions | List of all members
OSCService Class Reference

#include <oscservice.h>

Public Member Functions

 OSCService (ServiceConfiguration *configuration)
 
virtual ~OSCService ()
 
- Public Member Functions inherited from Service
UNPREFIXED_MODULE_NAME_INPUTCASE Service (ServiceConfiguration *configuration)
 
virtual void getDependentServices (std::vector< rtti::TypeInfo > &dependencies) override
 
virtual void shutdown () override
 
 Service (ServiceConfiguration *configuration)
 
virtual ~Service ()
 
CoregetCore ()
 
const CoregetCore () const
 
std::string getTypeName () const
 
const ModulegetModule () const
 
 Service (Service &)=delete
 
Serviceoperator= (const Service &)=delete
 
 Service (Service &&)=delete
 
Serviceoperator= (Service &&)=delete
 

Protected Member Functions

virtual void registerObjectCreators (rtti::Factory &factory) override
 
virtual bool init (nap::utility::ErrorState &errorState) override
 
virtual void update (double deltaTime) override
 
- Protected Member Functions inherited from Service
virtual void getDependentServices (std::vector< rtti::TypeInfo > &dependencies)
 
virtual void created ()
 
virtual void preUpdate (double deltaTime)
 
virtual void postUpdate (double deltaTime)
 
virtual void preShutdown ()
 
virtual void shutdown ()
 
virtual void preResourcesLoaded ()
 
virtual void postResourcesLoaded ()
 
template<typename SERVICE_CONFIG >
SERVICE_CONFIG * getConfiguration ()
 
template<typename SERVICE_CONFIG >
const SERVICE_CONFIG * getConfiguration () const
 
std::string getIniFilePath () const
 
std::string getIniFilePath (const std::string &appendix) const
 

Description

Main interface for processing OSC messages in NAP All osc components and receivers are registered and de-registered with this service on initialization and destruction This service consumes all received osc messages and forwards them to all registered osc components. Events are only forwarded to a component if an individual address in the filter starts with the address of an osc event. Components that don't have any filter entries are forwarded all osc events Processing is handled automatically every frame

Inheritance diagram for OSCService:
[legend]
Collaboration diagram for OSCService:
[legend]

Constructor & Destructor Documentation

◆ OSCService()

OSCService ( ServiceConfiguration configuration)

◆ ~OSCService()

virtual ~OSCService ( )
virtual

Member Function Documentation

◆ init()

virtual bool init ( nap::utility::ErrorState errorState)
overrideprotectedvirtual

Initializes the osc service

Reimplemented from Service.

◆ registerObjectCreators()

virtual void registerObjectCreators ( rtti::Factory factory)
overrideprotectedvirtual

Registers all objects that need a specific way of construction

Parameters
factorythe factory to register the object creators with

Reimplemented from Service.

◆ update()

virtual void update ( double  deltaTime)
overrideprotectedvirtual

Processes all received osc events from all registered osc receivers The events are forwarded to all the the registered osc components This function is called automatically by the application loop

Parameters
deltaTimetime in between calls in seconds

Reimplemented from Service.