NAP
Public Member Functions | Public Attributes | List of all members
OSCReceiver Class Reference

#include <oscreceiver.h>

Public Member Functions

 OSCReceiver (OSCService &service)
 
virtual bool start (utility::ErrorState &errorState) override
 
virtual void stop () override
 
void addEvent (OSCEventPtr event)
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

int mPort = 7000
 Property: 'Port' The port that is opened and used to receive osc messages. More...
 
bool mDebugOutput = false
 Property: 'EnableDebugOutput' when enabled this objects prints all received osc messages. More...
 
bool mAllowPortReuse = false
 Property: 'AllowPortReuse' enables / disables multiple listeners for a single port on the same network interface. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

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

Description

Object that receives and processes OSC events. The receiver manages it's own connection in a background thread. All received messages are consumed by the nap::OSCService and dispatched on the main thread to a valid nap::OSCInputComponent. Listen to the messageReceived signal of the OSC input component to receive OSC events in the running application.

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

Constructor & Destructor Documentation

◆ OSCReceiver()

OSCReceiver ( OSCService service)

Member Function Documentation

◆ addEvent()

void addEvent ( OSCEventPtr  event)

Adds an event to the queue

Parameters
eventthe event to add, note that this receiver will take ownership of the event

◆ start()

virtual bool start ( utility::ErrorState errorState)
overridevirtual

Initializes the receiver and registers it with the OSCService This call will also start the background thread that received the messages

Reimplemented from Device.

◆ stop()

virtual void stop ( )
overridevirtual

Stop the OSCReceiver

Reimplemented from Device.

Member Data Documentation

◆ mAllowPortReuse

bool mAllowPortReuse = false

Property: 'AllowPortReuse' enables / disables multiple listeners for a single port on the same network interface.

◆ mDebugOutput

bool mDebugOutput = false

Property: 'EnableDebugOutput' when enabled this objects prints all received osc messages.

◆ mPort

int mPort = 7000

Property: 'Port' The port that is opened and used to receive osc messages.