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

#include <artnetreceiver.h>

Public Member Functions

 ArtNetReceiver ()=default
 
 ArtNetReceiver (ArtNetService &service)
 
virtual bool start (utility::ErrorState &errorState) override
 
virtual void stop () override
 
void addEvent (ArtNetEventPtr event)
 
void consumeEvents (std::queue< ArtNetEventPtr > &outEvents)
 
- 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

std::string mIpAddress = ""
 Property: 'IP Address' The IP address of the interface to use for receiving Art-Net, will use 0.0.0.0 (all local addresses) if left empty. More...
 
uint16 mPort = 6454
 Property: 'Port' The port that is opened and used to receive Art-Net messages. 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

Receives and processes Art-Net messages.

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

Constructor & Destructor Documentation

◆ ArtNetReceiver() [1/2]

ArtNetReceiver ( )
default

◆ ArtNetReceiver() [2/2]

ArtNetReceiver ( ArtNetService service)

Member Function Documentation

◆ addEvent()

void addEvent ( ArtNetEventPtr  event)

Adds an event to the queue

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

◆ consumeEvents()

void consumeEvents ( std::queue< ArtNetEventPtr > &  outEvents)

Consumes all received Art-Net events and moves them to outEvents, called by the service on the main thread. Calling this will clear the internal queue and transfers ownership of the events to the caller

Parameters
outEventswill hold the transferred Art-Net events

◆ start()

virtual bool start ( utility::ErrorState errorState)
overridevirtual

Starts the Art-Net receiver.

Parameters
errorStateContains error information in case the function returns false.
Returns
true on success, false otherwise. In case of an error, errorState contains error information.

Reimplemented from Device.

◆ stop()

virtual void stop ( )
overridevirtual

Stops the Art-Net receiver.

Reimplemented from Device.

Member Data Documentation

◆ mIpAddress

std::string mIpAddress = ""

Property: 'IP Address' The IP address of the interface to use for receiving Art-Net, will use 0.0.0.0 (all local addresses) if left empty.

◆ mPort

uint16 mPort = 6454

Property: 'Port' The port that is opened and used to receive Art-Net messages.