Navigation
API > API/Plugins > API/Plugins/DMXProtocol
Manager for all DMX ports. Exposes available input and output ports anywhere.A) Overview of the IO System1. Definition of Ports in Project Settings:
DMX Protocol Settings (the DMX Project Settings) holds two arrays of DMX Input Port Configs resp. DMX Output 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.
Note: 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.3. 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.
Note: 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.
Note: 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 send DMX.
| Name | FDMXPortManager |
| Type | class |
| Header File | /Engine/Plugins/VirtualProduction/DMX/DMXProtocol/Source/DMXProtocol/Public/IO/DMXPortManager.h |
| Include Path | #include "IO/DMXPortManager.h" |
Syntax
class FDMXPortManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Initialization. | IO/DMXPortManager.h | ||
FDMXPortManager
(
FDMXPortManager const& |
Non-copyable. | IO/DMXPortManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FDMXPortManager() |
IO/DMXPortManager.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CurrentManager | TUniquePtr< FDMXPortManager > | IO/DMXPortManager.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnPortsChanged | FDMXOnPortsChangedDelegate | Broadcast when port arrays or data changed | IO/DMXPortManager.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIOsAvailable | bool | True once Input and Output Ports are available | IO/DMXPortManager.h | |
| bProtocolsSuspended | bool | True when protocols are suspended | IO/DMXPortManager.h | |
| InputPorts | TArray< FDMXInputPortSharedRef > | Array of input ports | IO/DMXPortManager.h | |
| OnBuffersClearedDelegate | FSimpleMulticastDelegate | Delegate raised when buffers were cleared | IO/DMXPortManager.h | |
| OutputPorts | TArray< FDMXOutputPortSharedRef > | Array of output ports | IO/DMXPortManager.h | |
| PortGuidsFromProtocolSettings | TArray< FGuid > | Array of Port Guids added from protocol settings | IO/DMXPortManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AreProtocolsSuspended() |
Returns true if protocols are suspended | IO/DMXPortManager.h | |
void ClearBuffers () |
Clears all buffered data of Input Ports, Output Ports and Raw Listeners. | IO/DMXPortManager.h | |
FDMXInputPortSharedPtr FindInputPortByGuid
(
const FGuid& PortGuid |
Returns the input port matching the port guid. Returns nullptr if the port doesn't exist. | IO/DMXPortManager.h | |
FDMXInputPortSharedRef FindInputPortByGuidChecked
(
const FGuid& PortGuid |
Returns the input port matching the port guid, checkedversion. | IO/DMXPortManager.h | |
FDMXOutputPortSharedPtr FindOutputPortByGuid
(
const FGuid& PortGuid |
Returns the output port matching the port guid. Returns nullptr if the port doesn't exist. | IO/DMXPortManager.h | |
FDMXOutputPortSharedRef FindOutputPortByGuidChecked
(
const FGuid& PortGuid |
Returns the output port matching the port guid, checked version. | IO/DMXPortManager.h | |
FDMXPortSharedPtr FindPortByGuid
(
const FGuid& PortGuid |
Returns the port matching the port guid. Returns nullptr if the port doesn't exist. | IO/DMXPortManager.h | |
FDMXPortSharedRef FindPortByGuidChecked
(
const FGuid& PortGuid |
Returns the port matching the port guid, checked version. | IO/DMXPortManager.h | |
FDMXInputPortSharedRef GetInputPortFromConfigChecked
(
const FDMXInputPortConfig& InputPortConfig |
Gets the input port that corresponds to the input port config. | IO/DMXPortManager.h | |
const TArray< FDMXInputPortSharedRef > & GetInputPorts() |
Returns the current input ports | IO/DMXPortManager.h | |
FSimpleMulticastDelegate & GetOnBuffersCleared() |
Returns a delegate broadcast when port buffers were cleared | IO/DMXPortManager.h | |
FDMXOutputPortSharedRef GetOutputPortFromConfigChecked
(
const FDMXOutputPortConfig& OutputPortConfig |
Gets the output port that corresponds to the input port config. | IO/DMXPortManager.h | |
const TArray< FDMXOutputPortSharedRef > & GetOutputPorts() |
Returns the current output ports | IO/DMXPortManager.h | |
void SuspendProtocols () |
Thread-safe: Suspends the protocols irrevocably, and with it all sending and receiving of DMX via the protocols. | IO/DMXPortManager.h | |
void UpdateFromProtocolSettings
(
bool bForceUpdateRegistrationWithProtocol |
Updates ports from protocol settings. | IO/DMXPortManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FDMXPortManager & Get() |
IO/DMXPortManager.h | ||
static void ShutdownManager() |
Destroys the manager. | IO/DMXPortManager.h | |
static void StartupManager() |
Initializes the manager | IO/DMXPortManager.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void operator=
(
FDMXPortManager const& x |
IO/DMXPortManager.h |