FDMXPortManager

Manager for all DMX ports.

Windows
MacOS
Linux

References

Module

DMXProtocol

Header

/Engine/Plugins/VirtualProduction/DMX/DMXProtocol/Source/DMXProtocol/Public/IO/DMXPortManager.h

Include

#include "IO/DMXPortManager.h"

Syntax

class FDMXPortManager

Remarks

Manager for all DMX ports. Exposes available input and output ports anywhere.

A) Overview of the IO System - for developers that want to send and receive DMX

  1. Definition of Ports in Project Settings:

DMX Protocol Settings (the DMX Project Settings) holds arrays of DMX Port Configs. This is where ports are defined.

Port Manager automatically creates DMXInputPortS and DMXOutputPortS that match these settings. Generally this is self-contained and does not need any user code.

Applications that want to offer dynamic ports should specify a fixed number of ports in project settings, e.g. 8, 16 ports and work with these at runtime. (While it is possible to mutate the protocol settings at runtime and create ports from that via FDMXPortManager.Get()::UpdateFromProtocolSettings(), ports created alike are not available in blueprints as port references, hence this approach is disfavored in most situations.)2. Acquire a DMXInputPort or DMXOutputPort:

Get all input ports or all output ports available via the Port Manager's GetInputPorts and GetOutputPorts methods. Alternatively use the Editor-Only SDMXPortSelector widget to select a port from available ports.

  1. Receive DMX in an object:

a) Latest (frame time relevant) data on the Game-Thread:

  • Call the port's GameThreadGetDMXSignal method to get a DMX Signal of a local universe.

b) All data on any thread:

  • Create an instance of DMXRawListener. Use its constructor to specify which port it should use.

  • Use DequeueSignal to receive DMX.

This applies for both input and output ports. This is to provide loopback functionality for outputs. Generally you want to listen to input and output ports, not just the inputs.

GameThreadGetDMXSignal is the right method to use for almost any use-case. DMXRawListener is only useful where the latest data isn't sufficient, e.g. to record all incoming data in Sequencer. DMXRawListener is thread-safe, but may stall the engine when used in the game-thread due to the possibly infinite work load it leaves to the user.4. Send DMX from your object:

Use the DMXOutputPort's SendDMX method to output DMX

Variables

Name Description

Public variable

FDMXOnIOsAvaila...

 

OnIOsAvailable

Broadcast when Input and Output Ports are available

Public variable

FDMXOnPortsChan...

 

OnPortsChanged

Broadcast when port arrays or data changed

Constructors

Name Description

Public function

FDMXPortManager()

Initialization.

Public function

FDMXPortManager

(
    FDMXPortManager const&
)

Non-copyable.

Destructors

Name Description

Public function Virtual

~FDMXPortManager()

Functions

Name Description

Public function Const

bool

 

AreIOsAvailable()

Returns true once Input and Output Ports are available

Public function

bool

 

AreProtocolsSuspended()

Returns true if protocols are suspended

Public function Const

FDMXInputPor...

 

FindInputPortByGuid

(
    const FGuid& PortGuid
)

Returns the input port matching the port guid. Returns nullptr if the port doesn't exist.

Public function Const

FDMXInputPor...

 

FindInputPortByGuidChecked

(
    const FGuid& PortGuid
)

Returns the input port matching the port guid, checkedversion.

Public function Const

FDMXOutputPo...

 

FindOutputPortByGuid

(
    const FGuid& PortGuid
)

Returns the output port matching the port guid. Returns nullptr if the port doesn't exist.

Public function Const

FDMXOutputPo...

 

FindOutputPortByGuidChecked

(
    const FGuid& PortGuid
)

Returns the output port matching the port guid, checked version.

Public function Const

FDMXPortShar...

 

FindPortByGuid

(
    const FGuid& PortGuid
)

Returns the port matching the port guid. Returns nullptr if the port doesn't exist.

Public function Const

FDMXPortShar...

 

FindPortByGuidChecked

(
    const FGuid& PortGuid
)

Returns the port matching the port guid, checked version.

Public function Static

FDMXPortMana...

 

Get()

Public function

FDMXInputPor...

 

GetInputPortFromConfigChecked

(
    const FDMXInputPortConfig& InputPo...
)

Gets the input port that corresponds to the input port config.

Public function Const

const TArray...

 

GetInputPorts()

Public function

FDMXOutputPo...

 

GetOutputPortFromConfigChecked

(
    const FDMXOutputPortConfig& Output...
)

Gets the output port that corresponds to the input port config.

Public function Const

const TArray...

 

GetOutputPorts()

Public function Static

void

 

ShutdownManager()

Destroys the manager.

Public function Static

void

 

StartupManager()

Initializes the manager

Public function

void

 

SuspendProtocols()

Thread-safe: Suspends the protocols irrevocably, and with it all sending and receiving of DMX via the protocols.

Public function

void

 

UpdateFromProtocolSettings()

Updates ports from protocol settings. Useful when project settings were modified in some way

Operators

Name Description

Public function

void

 

operator=

(
    FDMXPortManager const& x
)

Typedefs

Constants

Name

Description

CurrentManager

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss