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

#include <artnetinputcomponent.h>

Public Member Functions

 ArtNetInputComponentInstance (EntityInstance &entity, Component &resource)
 
virtual ~ArtNetInputComponentInstance ()
 
virtual bool init (utility::ErrorState &errorState) override
 
Signal< const ArtNetEvent & > * getPacketReceived ()
 
- 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
 
virtual bool init (utility::ErrorState &errorState)
 
- 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

uint8 mNet = 0
 Property: 'Net' the Net from which events should be received. More...
 
uint8 mSubNet = 0
 Property: 'SubNet' the SubNet from which events should be received. More...
 
uint8 mUniverse = 0
 Property: 'Universe' the Universe from which events should be received. More...
 
bool mReceiveAll = false
 Property: 'Receive All' when true, all events are forwarded. More...
 
Signal< const ArtNetEvent & > packetReceived
 Triggered when the component receives an ArtDmx packet event. 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 ArtNetEvent &event)
 

Additional Inherited Members

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

Description

Instance part of the ArtNetInputComponent, receives ArtDmx packet events based on the net, subnet and universe. This component will forward any received ArtDmx packet events to listening components. Listen to the packetReceived signal to receive ArtDmx packet events that pass the filters set for this component. The Art-Net service forwards an event when the net, subnet and universe match with those in the ArtDmx packet. When Receive All is true, all events are forwarded.

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

Constructor & Destructor Documentation

◆ ArtNetInputComponentInstance()

ArtNetInputComponentInstance ( EntityInstance entity,
Component resource 
)

◆ ~ArtNetInputComponentInstance()

virtual ~ArtNetInputComponentInstance ( )
virtual

Member Function Documentation

◆ getPacketReceived()

Signal<const ArtNetEvent&>* getPacketReceived ( )

Returns the signal that is called when an ArtDmx packet is received.

Returns
the message received signal.

◆ init()

virtual bool init ( utility::ErrorState errorState)
overridevirtual

Initializes the component and copies over the component settings.

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

Reimplemented from ComponentInstance.

◆ trigger()

void trigger ( const ArtNetEvent event)
protected

This is triggered by the service when a new ArtDmx packet is received

Parameters
eventthe ArtDmx packet event that will be forwarded by this component

Member Data Documentation

◆ mNet

uint8 mNet = 0

Property: 'Net' the Net from which events should be received.

◆ mReceiveAll

bool mReceiveAll = false

Property: 'Receive All' when true, all events are forwarded.

◆ mSubNet

uint8 mSubNet = 0

Property: 'SubNet' the SubNet from which events should be received.

◆ mUniverse

uint8 mUniverse = 0

Property: 'Universe' the Universe from which events should be received.

◆ packetReceived

Signal<const ArtNetEvent&> packetReceived

Triggered when the component receives an ArtDmx packet event.