Public Member Functions | Public Attributes | Protected Member Functions | List of all members
OSCInputComponentInstance Class Reference

#include <oscinputcomponent.h>

Public Member Functions

 OSCInputComponentInstance (EntityInstance &entity, Component &resource)
virtual ~OSCInputComponentInstance ()
virtual bool init (utility::ErrorState &errorState) override
Signal< const OSCEvent & > * getMessageReceived ()
- Public Member Functions inherited from ComponentInstance
 ComponentInstance (EntityInstance &entity, Component &resource)
virtual void update (double deltaTime)
nap::EntityInstancegetEntityInstance () const
nap::ComponentgetComponent () const
template<typename T >
T * getComponent () const
- Public Member Functions inherited from Object
 Object ()
virtual ~Object ()
virtual void onDestroy ()
 Object (Object &)=delete
Objectoperator= (const Object &)=delete
 Object (Object &&)=delete
Objectoperator= (Object &&)=delete

Public Attributes

std::vector< std::string > mAddressFilter
 List of available osc addresses, when empty all osc events are forwarded. More...
Signal< const OSCEvent & > messageReceived
 Triggered when the component receives an osc message. More...
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...

Protected Member Functions

void trigger (const nap::OSCEvent &oscEvent)

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)


Instance part of the OSCInputComponent, receives osc events based on the address filter. This component will forward any received osc messages to listening components. Listen to the messageReceived signal to receive osc events that match the address pattern. The osc service forwards an event when one of the names in the address filter starts with the address of the received osc event. When the address filter is empty all events are forwarded.

Inheritance diagram for OSCInputComponentInstance:
Collaboration diagram for OSCInputComponentInstance:

Constructor & Destructor Documentation

◆ OSCInputComponentInstance()

OSCInputComponentInstance ( EntityInstance entity,
Component resource 

◆ ~OSCInputComponentInstance()

virtual ~OSCInputComponentInstance ( )

Member Function Documentation

◆ getMessageReceived()

Signal<const OSCEvent&>* getMessageReceived ( )

Returns the signal that is called when an osc message is received.

the message received signal.

◆ init()

virtual bool init ( utility::ErrorState errorState)

Initializes the component and copies over the osc addresses

errorStatecontains the error when the component could not be initialized
if initialization succeeded

Reimplemented from ComponentInstance.

◆ trigger()

void trigger ( const nap::OSCEvent oscEvent)

This is triggered by the service when a new osc message is received

oscEventthe osc event that will be forwarded by this component

Member Data Documentation

◆ mAddressFilter

std::vector<std::string> mAddressFilter

List of available osc addresses, when empty all osc events are forwarded.

◆ messageReceived

Signal<const OSCEvent&> messageReceived

Triggered when the component receives an osc message.