This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Classes

  • namespace Acl
    • namespace AclLog
      A namespace for logging utilities.
    • struct AlignedAudioFrame
      AlignedAudioFrame is a frame of interleaved floating point audio samples with a given number of channels.
    • struct AlignedFrame
      A frame of aligned data that is passed to the rendering engine from the MediaReceiver. A DataFrame contains a time stamped frame of media, which might be video, audio and auxiliary data such as subtitles. A single DataFrame can contain one or multiple types of media. Which media types are included can be probed by nullptr-checking/size checking the data members. The struct has ownership of all data pointers included. The struct includes all logic for freeing the resources held by this struct and the user should therefore just make sure the struct itself is deallocated to ensure all resources are freed.
    • class ControlDataAddress
      A class representing an address within the control protocol. The address consists of an internal list of UUIDs, which all represent a component that needs to be passed to reach the final address. An address might end with a wildcard, which is represented by the omni UUID (i.e. all digits set to 0xF) and will then match all addresses with the same UUID sequence in the start.
    • namespace ControlDataCommon
      • struct ConnectionEvent
        A connection related event.
      • struct Response
        A response from a ControlDataReceiver to a request. The UUID tells which receiver the response is sent from.
      • struct StatusMessage
        A status message from a ControlDataReceiver. The UUID tells which receiver the message is sent from.
    • class ControlDataSender
      A ControlDataSender can send control signals to one or more receivers using a network connection. A single ControlDataSender can connect to multiple receivers, all identified by a UUID. The class is controlled using an ISystemControllerInterface; this interface is responsible for setting up connections to receivers. The ControlDataSender can send asynchronous requests to (all) the receivers and get a response back. Each response is identified with a request ID as well as the UUID of the responding receiver. The ControlDataSender can also receive status messages from the receivers.
    • class DeviceMemory
      RAII class for a CUDA memory buffer.
    • class IControlDataReceiver
      IControlDataReceiver is the interface class for the control data receiver. An IControlDataReceiver can receive messages from a sender or other IControlDataReceivers using a network connection. It can also connect to and forward the incoming request messages to other receivers. The connections to the sender and the other receivers are controlled by an ISystemControllerInterface instance. The ControlDataReceiver has a receiving or listening side, as well as a sending side. The listening side can listen to one single network port and have multiple ControlDataSenders and ControlDataReceivers connected to that port to receive requests from them. On the sending side of the ControlDataReceiver, it can be connected to the listening side of other ControlDataReceivers, used to forward all incoming messages to that receiver, as well as sending its own requests.
      • class IRequest
        Interface for a request that can be responded to.
      • struct RequestData
        An incoming request to this ControlDataReceiver.
      • struct Settings
        Settings for a ControlDataReceiver.
    • class IMediaStreamer
      IMediaStreamer is an interface class for MediaStreamers, that can take a single stream of uncompressed video and/or audio frames and encode and output it in some way. This output can either be a stream to a network or writing down the data to a file on the hard drive. This class is configured from two interfaces. The input configuration (input video resolution, frame rate, pixel format, number of audio channels…) is made through this C++ API. The output stream is then started from the System Controller. Any of these configurations can be made first. The actual stream to output will start once the first call to.
    • class ISystemControllerInterface
      An ISystemControllerInterface is the interface between a component and the System controller controlling the component. The interface allows for two-way communication between the component and the system controller by means of sending requests and getting responses. Classes deriving from the ISystemControllerInterface should provide the component side implementation of the communication with the system controller. This interface can be inherited and implemented by developers to connect to custom system controllers, or to directly control a component programmatically, without the need for connecting to a remote server.
      • struct Callbacks
        A struct containing the callbacks that needs to be registered by the component using this interface.
      • struct Response
        A response to a request, consists of a status code and an (optional) parameters JSON object.
    • class IngestApplication
    • namespace IngestUtils
    • class MediaReceiver
      A MediaReceiver contains the logic for receiving, decoding and aligning incoming media sources from the Ingests. The aligned data is then delivered to the Rendering Engine which is also responsible for setting up the MediaReceiver. The MediaReceiver has a builtin multi view generator, which can create output streams containing composited subsets of the incoming video sources. This class is controlled using an ISystemControllerInterface provided when starting it.
    • class SystemControllerConnection
      An implementation of the ISystemControllerInterface for a System controller residing in a remote server. The connection to the server uses a Websocket.
    • namespace TimeCommon
    • class UUID
      A class holding a UUID, stored as a sequence of bytes. This class only supports version 4 variant 1 of the UUID standard.
  • namespace fmt
  • namespace spdlog

1 - Acl::AclLog::FileLocationFormatterFlag

Acl::AclLog::FileLocationFormatterFlag Class Reference

A custom flag formatter which logs the source file location between a par of “[]”, in case the location is provided with the log call.

#include <AclLog.h>

Inherits from spdlog::custom_flag_formatter

Public Functions

Name
voidformat(const spdlog::details::log_msg & msg, const std::tm & , spdlog::memory_buf_t & dest) override
std::unique_ptr< custom_flag_formatter >clone() const override

Public Functions Documentation

function format

inline void format(
    const spdlog::details::log_msg & msg,
    const std::tm & ,
    spdlog::memory_buf_t & dest
) override

function clone

inline std::unique_ptr< custom_flag_formatter > clone() const override

2 - Acl::AclLog::ThreadNameFormatterFlag

Acl::AclLog::ThreadNameFormatterFlag Class Reference

Inherits from spdlog::custom_flag_formatter

Public Functions

Name
voidformat(const spdlog::details::log_msg & , const std::tm & , spdlog::memory_buf_t & dest) override
std::unique_ptr< custom_flag_formatter >clone() const override

Public Functions Documentation

function format

inline void format(
    const spdlog::details::log_msg & ,
    const std::tm & ,
    spdlog::memory_buf_t & dest
) override

function clone

inline std::unique_ptr< custom_flag_formatter > clone() const override

3 - Acl::AlignedAudioFrame

Acl::AlignedAudioFrame Struct Reference

AlignedAudioFrame is a frame of interleaved floating point audio samples with a given number of channels.

#include <AlignedFrame.h>

Public Attributes

Name
std::vector< float >mSamples
uint8_tmNumberOfChannels
uint32_tmNumberOfSamplesPerChannel

Public Attributes Documentation

variable mSamples

std::vector< float > mSamples;

variable mNumberOfChannels

uint8_t mNumberOfChannels = 0;

variable mNumberOfSamplesPerChannel

uint32_t mNumberOfSamplesPerChannel = 0;

4 - Acl::AlignedFrame

Acl::AlignedFrame Struct Reference

A frame of aligned data that is passed to the rendering engine from the MediaReceiver. A DataFrame contains a time stamped frame of media, which might be video, audio and auxiliary data such as subtitles. A single DataFrame can contain one or multiple types of media. Which media types are included can be probed by nullptr-checking/size checking the data members. The struct has ownership of all data pointers included. The struct includes all logic for freeing the resources held by this struct and the user should therefore just make sure the struct itself is deallocated to ensure all resources are freed.

#include <AlignedFrame.h>

Public Functions

Name
AlignedFrame() =default
~AlignedFrame() =default
AlignedFrame(AlignedFrame const & ) =delete
AlignedFrame &operator=(AlignedFrame const & ) =delete
std::shared_ptr< AlignedFrame >makeShallowCopy() const
Make a shallow copy of this AlignedFrame (video and audio pointers will point to the same video and audio memory buffers as in the frame copied from)

Public Attributes

Name
int64_tmCaptureTimestamp
int64_tmRenderingTimestamp
std::shared_ptr< DeviceMemory >mVideoFrame
PixelFormatmPixelFormat
uint32_tmFrameRateN
uint32_tmFrameRateD
uint32_tmWidth
uint32_tmHeight
AlignedAudioFrameConstPtrmAudioFrame
uint32_tmAudioSamplingFrequency

Public Functions Documentation

function AlignedFrame

AlignedFrame() =default

function ~AlignedFrame

~AlignedFrame() =default

function AlignedFrame

AlignedFrame(
    AlignedFrame const & 
) =delete

function operator=

AlignedFrame & operator=(
    AlignedFrame const & 
) =delete

function makeShallowCopy

std::shared_ptr< AlignedFrame > makeShallowCopy() const

Make a shallow copy of this AlignedFrame (video and audio pointers will point to the same video and audio memory buffers as in the frame copied from)

Return: A pointer to a new frame, which is a shallow copy of the old one, pointing to the same video and audio memory buffers

Public Attributes Documentation

variable mCaptureTimestamp

int64_t mCaptureTimestamp = 0;

The TAI timestamp in microseconds since the TAI epoch when this frame was captured by the ingest

variable mRenderingTimestamp

int64_t mRenderingTimestamp = 0;

The TAI timestamp in microseconds since the TAI epoch when this frame should be delivered to the rendering engine

variable mVideoFrame

std::shared_ptr< DeviceMemory > mVideoFrame = nullptr;

variable mPixelFormat

PixelFormat mPixelFormat = PixelFormat::kUnknown;

variable mFrameRateN

uint32_t mFrameRateN = 0;

variable mFrameRateD

uint32_t mFrameRateD = 0;

variable mWidth

uint32_t mWidth = 0;

variable mHeight

uint32_t mHeight = 0;

variable mAudioFrame

AlignedAudioFrameConstPtr mAudioFrame = nullptr;

variable mAudioSamplingFrequency

uint32_t mAudioSamplingFrequency = 0;

5 - Acl::ControlDataAddress

Acl::ControlDataAddress Class Reference

A class representing an address within the control protocol. The address consists of an internal list of UUIDs, which all represent a component that needs to be passed to reach the final address. An address might end with a wildcard, which is represented by the omni UUID (i.e. all digits set to 0xF) and will then match all addresses with the same UUID sequence in the start.

#include <ControlDataAddress.h>

Public Functions

Name
ControlDataAddress() =default
Default constructor for an empty address.
ControlDataAddress(const UUID & destinationUUID)
Constructor which creates an address with the final destination UUID.
size_tsize() const
Returns the number of parts of the address that is currently stored.
boolempty() const
Check if address is empty or contains any parts.
boolextend(const UUID & uuid)
Extend the address with a new UUID that must be passed to get to the next UUID in the address.
boolextend(const ControlDataAddress & address)
Extend the address with all UUIDs in another ControlDataAddress. The UUIDs will be added in the same order as in the other ControlDataAddress to the beginning of this ControlDataAddress (i.e. the UUIDs in the other ControlDataAddress must be passed before the UUIDs in this ControlDataAddress to reach the final destination)
boolhasWildcard() const
boolcurrentUuidIsWildcard() const
boolcurrentUuidMatch(const UUID & uuid) const
Check if the uuid match the first UUID of the address.
boolfullAddressMatch(const ControlDataAddress & other) const
Check if another address matches this address. This check might pass in two ways:
std::optional< UUID >getCurrentUuid() const
std::optional< UUID >moveToAndGetNextUuid()
Move to the next UUID in the address, by removing the current one, and return the next UUID of the address. In case there was at least one UUID in the address, the size of the address will be decreased by one.
std::vector< uint8_t >pack() const
Pack a ControlDataAddress into a byte vector.
std::stringtoString() const
booloperator==(const ControlDataAddress & other) const
Compare this ControlDataAddress for equality to another ControlDataAddress.
booloperator!=(const ControlDataAddress & other) const
Compare this ControlDataAddress for non-equality to another ControlDataAddress.
std::optional< ControlDataAddress >unpack(const std::vector< uint8_t >::const_iterator & packedBegin, const std::vector< uint8_t >::const_iterator & packedEnd)
Unpack a packed ControlDataAddress, the size of packedEnd - packedBegin must be a multiple of UUID::kUUIDSize to be able to unpack anything.
std::optional< ControlDataAddress >unpack(const uint8_t * packedBegin, const uint8_t * packedEnd)
Unpack a packed ControlDataAddress, the size of packedEnd - packedBegin must be a multiple of UUID::kUUIDSize to be able to unpack anything.

Friends

Name
std::ostream &operator«(std::ostream & stream, const ControlDataAddress & address)
Print this ControlDataAddress to an output stream, UUIDs separated with ‘:’.

Public Functions Documentation

function ControlDataAddress

ControlDataAddress() =default

Default constructor for an empty address.

function ControlDataAddress

explicit ControlDataAddress(
    const UUID & destinationUUID
)

Constructor which creates an address with the final destination UUID.

Parameters:

  • destinationUUID The destination UUID of the address

function size

size_t size() const

Returns the number of parts of the address that is currently stored.

Return: The number of parts of the address that is currently stored

function empty

bool empty() const

Check if address is empty or contains any parts.

Return: True if there are no parts left in the address, false otherwise.

function extend

bool extend(
    const UUID & uuid
)

Extend the address with a new UUID that must be passed to get to the next UUID in the address.

Parameters:

  • uuid The new UUID to add to the address.

Return: False in case an omni UUID is passed to a non-empty ControlDataAddress

function extend

bool extend(
    const ControlDataAddress & address
)

Extend the address with all UUIDs in another ControlDataAddress. The UUIDs will be added in the same order as in the other ControlDataAddress to the beginning of this ControlDataAddress (i.e. the UUIDs in the other ControlDataAddress must be passed before the UUIDs in this ControlDataAddress to reach the final destination)

Parameters:

Return: False in case @address contains an omni UUID

function hasWildcard

bool hasWildcard() const

Return: True if the address ends with a wildcard UUID (the special omni UUID), false otherwise.

function currentUuidIsWildcard

bool currentUuidIsWildcard() const

Return: True if the first UUID in the address is a wildcard UUID (the special omni UUID), false otherwise.

function currentUuidMatch

bool currentUuidMatch(
    const UUID & uuid
) const

Check if the uuid match the first UUID of the address.

Parameters:

  • uuid The UUID to match against

Return: True if the UUID is the same as the first UUID in the address, or in case the first UUID of the address is a wildcard UUID, false otherwise.

function fullAddressMatch

bool fullAddressMatch(
    const ControlDataAddress & other
) const

Check if another address matches this address. This check might pass in two ways:

  • Both addresses are identical
  • At least one of the addresses includes a wildcard, and the other address is identical up to that wildcard otherThe address to match against.

True if the addresses match either because they are equal, or in case they are equal up to a wildcard in either address, false otherwise.

function getCurrentUuid

std::optional< UUID > getCurrentUuid() const

Return: The first UUID of the address, or an empty optional in case there are no more UUIDs in the address.

function moveToAndGetNextUuid

std::optional< UUID > moveToAndGetNextUuid()

Move to the next UUID in the address, by removing the current one, and return the next UUID of the address. In case there was at least one UUID in the address, the size of the address will be decreased by one.

Return: The next UUID of the address, or an empty optional in case there are no more UUIDs in the address.

function pack

std::vector< uint8_t > pack() const

Pack a ControlDataAddress into a byte vector.

Return: A vector with the packed message address.

function toString

std::string toString() const

Return: A string representation of the ControlDataAddress with ‘:’ separated UUIDs.

function operator==

bool operator==(
    const ControlDataAddress & other
) const

Compare this ControlDataAddress for equality to another ControlDataAddress.

Parameters:

Return: True if the ControlDataAddresses are identical, false otherwise

function operator!=

bool operator!=(
    const ControlDataAddress & other
) const

Compare this ControlDataAddress for non-equality to another ControlDataAddress.

Parameters:

Return: False if the ControlDataAddresses are identical, true otherwise

function unpack

static std::optional< ControlDataAddress > unpack(
    const std::vector< uint8_t >::const_iterator & packedBegin,
    const std::vector< uint8_t >::const_iterator & packedEnd
)

Unpack a packed ControlDataAddress, the size of packedEnd - packedBegin must be a multiple of UUID::kUUIDSize to be able to unpack anything.

Parameters:

  • packedBegin Iterator to the start of the vector to unpack.
  • packedEnd Iterator to the end of the vector to unpack.

Return: A ControlDataAddress if unpack was successful, std::nullopt if it failed.

function unpack

static std::optional< ControlDataAddress > unpack(
    const uint8_t * packedBegin,
    const uint8_t * packedEnd
)

Unpack a packed ControlDataAddress, the size of packedEnd - packedBegin must be a multiple of UUID::kUUIDSize to be able to unpack anything.

Parameters:

  • packedBegin Pointer to the first byte of the address to unpack
  • packedEnd Pointer to the last byte of the address to unpack

Return: A ControlDataAddress if unpack was successful, std::nullopt if it failed.

Friends

friend operator«

friend std::ostream & operator<<(
    std::ostream & stream,

    const ControlDataAddress & address
);

Print this ControlDataAddress to an output stream, UUIDs separated with ‘:’.

Parameters:

  • stream The stream to print to
  • address The address to print

Return: Reference to the output stream

6 - Acl::ControlDataCommon::ConnectionEvent

Acl::ControlDataCommon::ConnectionEvent Struct Reference

A connection related event.

#include <ControlDataCommon.h>

Public Attributes

Name
EventTypemEventType
ControlDataAddressmAddress
The type of event that occurred.
UUIDmEventNode
The address of the node that detected the event.

Public Attributes Documentation

variable mEventType

EventType mEventType = EventType::kDisconnect;

variable mAddress

ControlDataAddress mAddress;

The type of event that occurred.

variable mEventNode

UUID mEventNode;

The address of the node that detected the event.

7 - Acl::ControlDataCommon::Response

Acl::ControlDataCommon::Response Struct Reference

A response from a ControlDataReceiver to a request. The UUID tells which receiver the response is sent from.

#include <ControlDataCommon.h>

Public Attributes

Name
std::stringmMessage
uint64_tmRequestId
The actual message.
UUIDmFromUUID
The ID of the request this is a response to.
ControlDataAddressmRecipient
The UUID of the responder.

Public Attributes Documentation

variable mMessage

std::string mMessage;

variable mRequestId

uint64_t mRequestId = 0;

The actual message.

variable mFromUUID

UUID mFromUUID;

The ID of the request this is a response to.

variable mRecipient

ControlDataAddress mRecipient;

The UUID of the responder.

8 - Acl::ControlDataCommon::StatusMessage

Acl::ControlDataCommon::StatusMessage Struct Reference

A status message from a ControlDataReceiver. The UUID tells which receiver the message is sent from.

#include <ControlDataCommon.h>

Public Attributes

Name
std::stringmMessage
UUIDmFromUUID
The actual message.
ControlDataAddressmRecipient
The UUID of the sender.

Public Attributes Documentation

variable mMessage

std::string mMessage;

variable mFromUUID

UUID mFromUUID;

The actual message.

variable mRecipient

ControlDataAddress mRecipient;

The UUID of the sender.

9 - Acl::ControlDataSender

Acl::ControlDataSender Class Reference

A ControlDataSender can send control signals to one or more receivers using a network connection. A single ControlDataSender can connect to multiple receivers, all identified by a UUID. The class is controlled using an ISystemControllerInterface; this interface is responsible for setting up connections to receivers. The ControlDataSender can send asynchronous requests to (all) the receivers and get a response back. Each response is identified with a request ID as well as the UUID of the responding receiver. The ControlDataSender can also receive status messages from the receivers.

#include <ControlDataSender.h>

Public Classes

Name
structSettings
Settings for a ControlDataSender.

Public Types

Name
enum classSendRequestStatus { kSuccess, kFailed, kSendFailedForSome, kSenderNotConfigured, kNoConnectedReceiver, kInternalError}

Public Functions

Name
ControlDataSender()
Default constructor, creates an empty object.
~ControlDataSender()
Destructor. Will disconnect from the connected receivers and close the System controller connection.
boolconfigure(const std::shared_ptr< ISystemControllerInterface > & controllerInterface, const Settings & settings)
Configure this ControlDataSender and connect it to the System Controller. This method will fail in case the ISystemControllerInterface has already been connected to the controller by another component, as such interface can only be used by one component.
SendRequestStatussendRequestToReceivers(const std::string & request, uint64_t & requestId, const UUID & requester =UUID::kNilUUID, int8_t hops =-1)
Send a request to all the connected ControlDataReceivers asynchronously. The responses will be sent to the response callback.
std::vector< UUID >getDirectlyConnectedReceivers() const
Get a list of the UUIDs of all receivers that are directly connected to this ControlDataSender. Useful for checking if this ControlDataSender is connected to something that will receive the control commands sent.
ControlDataSender(ControlDataSender const & ) =delete
ControlDataSender &operator=(ControlDataSender const & ) =delete
std::stringgetVersion()
Get application version.

Public Types Documentation

enum SendRequestStatus

EnumeratorValueDescription
kSuccessRequest was successfully sent.
kFailedFailed to send the request to any connected receivers.
kSendFailedForSomeMultiple receivers are connected but not all received the message.
kSenderNotConfiguredCannot send messages before sender is configured.
kNoConnectedReceiverThere is no connected receiver.
kInternalErrorCheck the logs for error.

Public Functions Documentation

function ControlDataSender

ControlDataSender()

Default constructor, creates an empty object.

function ~ControlDataSender

~ControlDataSender()

Destructor. Will disconnect from the connected receivers and close the System controller connection.

function configure

bool configure(
    const std::shared_ptr< ISystemControllerInterface > & controllerInterface,
    const Settings & settings
)

Configure this ControlDataSender and connect it to the System Controller. This method will fail in case the ISystemControllerInterface has already been connected to the controller by another component, as such interface can only be used by one component.

Parameters:

Return: True on success, false otherwise

function sendRequestToReceivers

SendRequestStatus sendRequestToReceivers(
    const std::string & request,
    uint64_t & requestId,
    const UUID & requester =UUID::kNilUUID,
    int8_t hops =-1
)

Send a request to all the connected ControlDataReceivers asynchronously. The responses will be sent to the response callback.

Parameters:

  • request The request message
  • requestId The unique identifier of this request. Used to identify the async responses.
  • requester UUID that identifies the entity that sent the request, can be used if the ControlDataSender serves multiple clients and need to distinguish between them when receiving responses. A value of the nil UUID indicates that the requester field will not be used.
  • hops The number of hops the message should be delivered/forwarded. A value of 1 means to all connected receivers, but not further. A value of 2 means all connected receivers to this sender, and all connected receivers to those, but not further, and so on. A value of -1 means infinity.

Return: True if the request was successfully sent, false otherwise

function getDirectlyConnectedReceivers

std::vector< UUID > getDirectlyConnectedReceivers() const

Get a list of the UUIDs of all receivers that are directly connected to this ControlDataSender. Useful for checking if this ControlDataSender is connected to something that will receive the control commands sent.

Return: A list of all receivers that are connected directly to this ControlDataSender

function ControlDataSender

ControlDataSender(
    ControlDataSender const & 
) =delete

function operator=

ControlDataSender & operator=(
    ControlDataSender const & 
) =delete

function getVersion

static std::string getVersion()

Get application version.

Return: a string with the current version, e.g. “6.0.0-39-g60a35937”

10 - Acl::ControlDataSender::Settings

Acl::ControlDataSender::Settings Struct Reference

Settings for a ControlDataSender.

#include <ControlDataSender.h>

Public Attributes

Name
std::function< void(const ControlDataCommon::Response &)>mResponseCallback
std::function< void(const ControlDataCommon::StatusMessage &)>mStatusMessageCallback
std::function< void(const ControlDataCommon::ConnectionEvent &)>mConnectionEventCallback

Public Attributes Documentation

variable mResponseCallback

std::function< void(const ControlDataCommon::Response &)> mResponseCallback;

variable mStatusMessageCallback

std::function< void(const ControlDataCommon::StatusMessage &)> mStatusMessageCallback;

variable mConnectionEventCallback

std::function< void(const ControlDataCommon::ConnectionEvent &)> mConnectionEventCallback;

11 - Acl::DeviceMemory

Acl::DeviceMemory Class Reference

RAII class for a CUDA memory buffer.

#include <DeviceMemory.h>

Public Functions

Name
DeviceMemory() =default
Default constructor, creates an empty object, without allocating any memory on the device.
DeviceMemory(size_t numberOfBytes)
Constructor allocating the required number of bytes.
DeviceMemory(size_t numberOfBytes, cudaStream_t cudaStream)
Constructor allocating the required number of bytes by making an async allocation. The allocation will be put in the given CUDA stream.
DeviceMemory(void * deviceMemory)
Constructor taking ownership of an already allocated CUDA memory pointer. This class will free the pointer once it goes out of scope.
boolallocateMemory(size_t numberOfBytes)
Allocates device memory. The memory allocated will automatically be freed by the destructor.
boolallocateMemoryAsync(size_t numberOfBytes, cudaStream_t cudaStream)
Allocates device memory. The memory allocated will automatically be freed by the destructor.
boolreallocateMemory(size_t numberOfBytes)
Reallocates device memory. Already existing memory allocation will be freed before the new allocation is made. In case this DeviceMemory has no earlier memory allocation, this method will just allocate new CUDA memory and return a success status.
boolreallocateMemoryAsync(size_t numberOfBytes, cudaStream_t cudaStream)
Asynchronously reallocate device memory. Already existing memory allocation will be freed before the new allocation is made. In case this DeviceMemory has no earlier memory allocation, this method will just allocate new CUDA memory and return a success status.
boolallocateAndResetMemory(size_t numberOfBytes)
Allocates device memory and resets all bytes to zeroes. The memory allocated will automatically be freed by the destructor.
boolallocateAndResetMemoryAsync(size_t numberOfBytes, cudaStream_t cudaStream)
Allocates device memory and resets all bytes to zeroes. The memory allocated will automatically be freed by the destructor.
boolfreeMemory()
Free the device memory held by this class. Calling this when no memory is allocated is a no-op.
boolfreeMemoryAsync(cudaStream_t cudaStream)
Deallocate memory asynchronously, in a given CUDA stream. Calling this when no memory is allocated is a no-op.
voidsetFreeingCudaStream(cudaStream_t cudaStream)
Set which CUDA stream to use for freeing this DeviceMemory. In case the DeviceMemory already holds a CUDA stream to use for freeing the memory, this will be overwritten.
~DeviceMemory()
Destructor, frees the internal CUDA memory.
template
T *
getDevicePointer() const
size_tgetSize() const
DeviceMemory(DeviceMemory && other)
DeviceMemory &operator=(DeviceMemory && other)
voidswap(DeviceMemory & other)
DeviceMemory(DeviceMemory const & ) =delete
DeviceMemory is not copyable.
DeviceMemoryoperator=(DeviceMemory const & ) =delete

Public Functions Documentation

function DeviceMemory

DeviceMemory() =default

Default constructor, creates an empty object, without allocating any memory on the device.

function DeviceMemory

explicit DeviceMemory(
    size_t numberOfBytes
)

Constructor allocating the required number of bytes.

Parameters:

  • numberOfBytes Number of bytes to allocate

Exceptions:

  • std::runtime_error In case the allocation failed

function DeviceMemory

explicit DeviceMemory(
    size_t numberOfBytes,
    cudaStream_t cudaStream
)

Constructor allocating the required number of bytes by making an async allocation. The allocation will be put in the given CUDA stream.

Parameters:

  • size Number of bytes to allocate
  • cudaStream The CUDA stream to put the async allocation in. A reference to this stream will also be saved internally to be used to asynchronously free them memory when the instance goes out of scope.

Exceptions:

  • std::runtime_error In case the async allocation failed to be put in queue.

See: freeMemoryAsync method is not explicitly called, the memory will be freed synchronously when this DeviceMemory instance goes out of scope, meaning that the entire GPU is synchronized, which will impact performance negatively.

Note:

  • The method will return as soon as the allocation is put in queue in the CUDA stream, i.e. before the actual allocation is made. Using this DeviceMemory is only valid as long as it is used in the same CUDA stream, or in case another stream is used, only if that stream is synchronized first with respect to cudaStream.
  • In case the

function DeviceMemory

explicit DeviceMemory(
    void * deviceMemory
)

Constructor taking ownership of an already allocated CUDA memory pointer. This class will free the pointer once it goes out of scope.

Parameters:

  • deviceMemory CUDA memory pointer to take ownership over.

function allocateMemory

bool allocateMemory(
    size_t numberOfBytes
)

Allocates device memory. The memory allocated will automatically be freed by the destructor.

Parameters:

  • numberOfBytes Number of bytes to allocate

Return: True on success, false if there is already memory allocated by this instance, or if the CUDA malloc failed.

function allocateMemoryAsync

bool allocateMemoryAsync(
    size_t numberOfBytes,
    cudaStream_t cudaStream
)

Allocates device memory. The memory allocated will automatically be freed by the destructor.

Parameters:

  • numberOfBytes Number of bytes to allocate
  • cudaStream The CUDA stream to use for the allocation. A reference to this stream will also be saved internally to be used to asynchronously free them memory when the instance goes out of scope.

Return: True on success, false if there is already memory allocated by this instance, or if the CUDA malloc failed.

function reallocateMemory

bool reallocateMemory(
    size_t numberOfBytes
)

Reallocates device memory. Already existing memory allocation will be freed before the new allocation is made. In case this DeviceMemory has no earlier memory allocation, this method will just allocate new CUDA memory and return a success status.

Parameters:

  • numberOfBytes Number of bytes to allocate in the new allocation

Return: True on success, false if CUDA free or CUDA malloc failed.

function reallocateMemoryAsync

bool reallocateMemoryAsync(
    size_t numberOfBytes,
    cudaStream_t cudaStream
)

Asynchronously reallocate device memory. Already existing memory allocation will be freed before the new allocation is made. In case this DeviceMemory has no earlier memory allocation, this method will just allocate new CUDA memory and return a success status.

Parameters:

  • numberOfBytes Number of bytes to allocate in the new allocation
  • cudaStream The CUDA stream to use for the allocation and freeing of memory. A reference to this stream will also be saved internally to be used to asynchronously free them memory when this instance goes out of scope.

Return: True on success, false if CUDA free or CUDA malloc failed.

function allocateAndResetMemory

bool allocateAndResetMemory(
    size_t numberOfBytes
)

Allocates device memory and resets all bytes to zeroes. The memory allocated will automatically be freed by the destructor.

Parameters:

  • numberOfBytes Number of bytes to allocate

Return: True on success, false if there is already memory allocated by this instance, or if any of the CUDA operations failed.

function allocateAndResetMemoryAsync

bool allocateAndResetMemoryAsync(
    size_t numberOfBytes,
    cudaStream_t cudaStream
)

Allocates device memory and resets all bytes to zeroes. The memory allocated will automatically be freed by the destructor.

Parameters:

  • numberOfBytes Number of bytes to allocate
  • cudaStream The CUDA stream to use for the allocation and resetting. A reference to this stream will also be saved internally to be used to asynchronously free them memory when the instance goes out of scope.

Return: True on success, false if there is already memory allocated by this instance, or if any of the CUDA operations failed.

function freeMemory

bool freeMemory()

Free the device memory held by this class. Calling this when no memory is allocated is a no-op.

See: freeMemoryAsync instead.

Return: True in case the memory was successfully freed (or not allocated to begin with), false otherwise.

Note: This method will free the memory in an synchronous fashion, synchronizing the entire CUDA context and ignoring the internally saved CUDA stream reference in case one exist. For async freeing of the memory, use

function freeMemoryAsync

bool freeMemoryAsync(
    cudaStream_t cudaStream
)

Deallocate memory asynchronously, in a given CUDA stream. Calling this when no memory is allocated is a no-op.

Parameters:

  • cudaStream The CUDA stream to free the memory asynchronously in

Return: True in case the memory deallocation request was successfully put in queue in the CUDA stream.

Note:

  • The method will return as soon as the deallocation is put in queue in the CUDA stream, i.e. before the actual deallocation is made.
  • It is the programmer’s responsibility to ensure this DeviceMemory is not used in another CUDA stream before this method is called. In case it is used in another CUDA stream, sufficient synchronization must be made before calling this method (and a very good reason given for not freeing the memory in that CUDA stream instead)

function setFreeingCudaStream

void setFreeingCudaStream(
    cudaStream_t cudaStream
)

Set which CUDA stream to use for freeing this DeviceMemory. In case the DeviceMemory already holds a CUDA stream to use for freeing the memory, this will be overwritten.

Parameters:

  • cudaStream The new CUDA stream to use for freeing the memory when the destructor is called.

Note: It is the programmer’s responsibility to ensure this DeviceMemory is not used in another CUDA stream before this instance is destructed. In case it is used in another CUDA stream, sufficient synchronization must be made before setting this as the new CUDA stream to use when freeing the memory.

function ~DeviceMemory

~DeviceMemory()

Destructor, frees the internal CUDA memory.

function getDevicePointer

template <typename T  =uint8_t>
inline T * getDevicePointer() const

Template Parameters:

  • T The pointer type to return

Return: the CUDA memory pointer handled by this class. Nullptr in case no memory is allocated.

function getSize

size_t getSize() const

Return: The size of the CUDA memory allocation held by this class.

function DeviceMemory

DeviceMemory(
    DeviceMemory && other
)

function operator=

DeviceMemory & operator=(
    DeviceMemory && other
)

function swap

void swap(
    DeviceMemory & other
)

function DeviceMemory

DeviceMemory(
    DeviceMemory const & 
) =delete

DeviceMemory is not copyable.

function operator=

DeviceMemory operator=(
    DeviceMemory const & 
) =delete

12 - Acl::IControlDataReceiver

Acl::IControlDataReceiver Class Reference

IControlDataReceiver is the interface class for the control data receiver. An IControlDataReceiver can receive messages from a sender or other IControlDataReceivers using a network connection. It can also connect to and forward the incoming request messages to other receivers. The connections to the sender and the other receivers are controlled by an ISystemControllerInterface instance. The ControlDataReceiver has a receiving or listening side, as well as a sending side. The listening side can listen to one single network port and have multiple ControlDataSenders and ControlDataReceivers connected to that port to receive requests from them. On the sending side of the ControlDataReceiver, it can be connected to the listening side of other ControlDataReceivers, used to forward all incoming messages to that receiver, as well as sending its own requests. More…

#include <IControlDataReceiver.h>

Public Classes

Name
classIRequest
Interface for a request that can be responded to.
structRequestData
An incoming request to this ControlDataReceiver.
structSettings
Settings for a ControlDataReceiver.

Public Types

Name
using std::shared_ptr< IRequest >IRequestPtr

Public Functions

Name
virtual~IControlDataReceiver() =default
Destructor.
virtual boolconfigure(const Settings & settings) =0
Configure this instance.
virtual std::vector< IRequestPtr >getRequests(int64_t timestampUs) =0
Get all requests from the control data receiver that has a delivery time prior to the given timestamp. The user should call this function to receive and execute the requests. Before calling this the next time, all returned requests should be responded to, otherwise the control data receiver will consider them as timed out.
virtual boolsendStatusMessageToSender(std::string && message, const ControlDataAddress & address) =0
Send a status message to the (directly or indirectly) connected ControlDataSender(s) according to the address parameter. In case this ControlDataReceiver has another ControlDataReceiver as sender, that receiver will forward the status message to the sender according to the address. If the address parameter, at any part, is an omni UUID, the message will be sent to all connected senders from that level and downwards.
virtual boolsendRequestToReceivers(const std::string & request, uint64_t & requestId) =0
Send a request to the connected ControlDataReceivers asynchronously. This request will only be sent to ControlDataReceivers on the sending side of this receiver. In case a receiver is located between this ControlDataReceiver and the sender, neither of those will see this request. The response will be sent to the response callback asynchronously.
virtual size_tgetNumberOfConnectedSenders() =0
Get number of connected senders.
virtual size_tgetNumberOfConnectedReceivers() =0
Get number of connected receivers.

Detailed Description

class Acl::IControlDataReceiver;

IControlDataReceiver is the interface class for the control data receiver. An IControlDataReceiver can receive messages from a sender or other IControlDataReceivers using a network connection. It can also connect to and forward the incoming request messages to other receivers. The connections to the sender and the other receivers are controlled by an ISystemControllerInterface instance. The ControlDataReceiver has a receiving or listening side, as well as a sending side. The listening side can listen to one single network port and have multiple ControlDataSenders and ControlDataReceivers connected to that port to receive requests from them. On the sending side of the ControlDataReceiver, it can be connected to the listening side of other ControlDataReceivers, used to forward all incoming messages to that receiver, as well as sending its own requests.

Each ControlDataReceiver can be configured to have a certain message delay. This delay parameter is set when the System controller instructs the ControlDataReceiver to start listening for incoming connections from senders (or sending ControlDataReceiver). Each incoming request will then be delayed and delivered according to the parameter, compared to the send timestamp in the message. In case multiple receivers are chained, like sender->receiver1->receiver2, receiver1 will delay the incoming messages from the sender based on when they were sent from the sender. Furthermore, receiver2 will delay them compared to when they were sent from receiver1.

An IControlDataReceiver can send status messages back to the sender. In case of chained receivers, the message will be forwarded back to the sender. A user of the ControlDataReceiver can register callbacks to receive requests and status messages. There is also an optional “preview” callback that is useful in case the incoming messages are delayed (have a delay > 0). This callback will then be called as soon as the request message arrives, to allow the user to prepare for when the actual delayed request callback is called.

Public Types Documentation

using IRequestPtr

using Acl::IControlDataReceiver::IRequestPtr =  std::shared_ptr<IRequest>;

Public Functions Documentation

function ~IControlDataReceiver

virtual ~IControlDataReceiver() =default

Destructor.

function configure

virtual bool configure(
    const Settings & settings
) =0

Configure this instance.

Parameters:

  • settings The settings to use for this receiver

Return: True on success, false otherwise

function getRequests

virtual std::vector< IRequestPtr > getRequests(
    int64_t timestampUs
) =0

Get all requests from the control data receiver that has a delivery time prior to the given timestamp. The user should call this function to receive and execute the requests. Before calling this the next time, all returned requests should be responded to, otherwise the control data receiver will consider them as timed out.

Parameters:

  • timestampUs A timestamp in microseconds since the TAI epoch. The function will return all requests that has a delivery timestamp prior to this timestamp.

Return: A vector of all requests that should be executed prior to the given time.

function sendStatusMessageToSender

virtual bool sendStatusMessageToSender(
    std::string && message,
    const ControlDataAddress & address
) =0

Send a status message to the (directly or indirectly) connected ControlDataSender(s) according to the address parameter. In case this ControlDataReceiver has another ControlDataReceiver as sender, that receiver will forward the status message to the sender according to the address. If the address parameter, at any part, is an omni UUID, the message will be sent to all connected senders from that level and downwards.

Parameters:

  • message The status message
  • address The address to send the status message to

Return: True in case the message was successfully enqueued for sending, false otherwise.

function sendRequestToReceivers

virtual bool sendRequestToReceivers(
    const std::string & request,
    uint64_t & requestId
) =0

Send a request to the connected ControlDataReceivers asynchronously. This request will only be sent to ControlDataReceivers on the sending side of this receiver. In case a receiver is located between this ControlDataReceiver and the sender, neither of those will see this request. The response will be sent to the response callback asynchronously.

Parameters:

  • request The request message
  • requestId The unique identifier of this request. Used to identify the async response.

Return: True if the request was successfully sent, false otherwise

function getNumberOfConnectedSenders

virtual size_t getNumberOfConnectedSenders() =0

Get number of connected senders.

Return: The number of connected senders

function getNumberOfConnectedReceivers

virtual size_t getNumberOfConnectedReceivers() =0

Get number of connected receivers.

Return: The number of connected receivers

13 - Acl::IControlDataReceiver::IRequest

Acl::IControlDataReceiver::IRequest Class Reference

Interface for a request that can be responded to.

#include <IControlDataReceiver.h>

Public Functions

Name
IRequest() =default
Default constructor.
virtual~IRequest() =default
Default destructor.
virtual const RequestData &getRequestData() =0
Get the incoming request.
virtual boolrespond(std::string && message) =0
Respond to a request, can only be called once per request.

Public Functions Documentation

function IRequest

IRequest() =default

Default constructor.

function ~IRequest

virtual ~IRequest() =default

Default destructor.

function getRequestData

virtual const RequestData & getRequestData() =0

Get the incoming request.

Return: A reference to the incoming request object

function respond

virtual bool respond(
    std::string && message
) =0

Respond to a request, can only be called once per request.

Parameters:

  • message The response message for this request

Return: True if the response was accepted, false in case the request already has a response

14 - Acl::IControlDataReceiver::RequestData

Acl::IControlDataReceiver::RequestData Struct Reference

An incoming request to this ControlDataReceiver.

#include <IControlDataReceiver.h>

Public Attributes

Name
std::stringmMessage
UUIDmSenderUUID
The actual message.
ControlDataAddressmRequester
UUID of the sender/forwarder that sent the request to this ControlDataReceiver.
uint64_tmRequestID
The requester’s address.
int64_tmSenderTimestampUs
The requester’s unique id of this request.
int64_tmDeliveryTimestampUs
The TAI timestamp when this message was sent from the sender/forwarder in micro sec since TAI epoch.

Public Attributes Documentation

variable mMessage

std::string mMessage;

variable mSenderUUID

UUID mSenderUUID;

The actual message.

variable mRequester

ControlDataAddress mRequester;

UUID of the sender/forwarder that sent the request to this ControlDataReceiver.

variable mRequestID

uint64_t mRequestID = 0;

The requester’s address.

variable mSenderTimestampUs

int64_t mSenderTimestampUs =
            0;

The requester’s unique id of this request.

variable mDeliveryTimestampUs

int64_t mDeliveryTimestampUs =
            0;

The TAI timestamp when this message was sent from the sender/forwarder in micro sec since TAI epoch.

15 - Acl::IControlDataReceiver::Settings

Acl::IControlDataReceiver::Settings Struct Reference

Settings for a ControlDataReceiver.

#include <IControlDataReceiver.h>

Public Attributes

Name
UUIDmProductionPipelineUUID
std::function< void(const ControlDataCommon::Response &)>mResponseCallback
UUID of the Production Pipeline component this Receiver is a part of.
std::function< void(const ControlDataCommon::ConnectionEvent &)>mConnectionEventCallback
Callback for responses to requests sent from this receiver.

Public Attributes Documentation

variable mProductionPipelineUUID

UUID mProductionPipelineUUID;

variable mResponseCallback

std::function< void(const ControlDataCommon::Response &)> mResponseCallback;

UUID of the Production Pipeline component this Receiver is a part of.

variable mConnectionEventCallback

std::function< void(const ControlDataCommon::ConnectionEvent &)> mConnectionEventCallback;

Callback for responses to requests sent from this receiver.

16 - Acl::IMediaStreamer

Acl::IMediaStreamer Class Reference

IMediaStreamer is an interface class for MediaStreamers, that can take a single stream of uncompressed video and/or audio frames and encode and output it in some way. This output can either be a stream to a network or writing down the data to a file on the hard drive. This class is configured from two interfaces. The input configuration (input video resolution, frame rate, pixel format, number of audio channels…) is made through this C++ API. The output stream is then started from the System Controller. Any of these configurations can be made first. The actual stream to output will start once the first call to. More…

#include <IMediaStreamer.h>

Public Classes

Name
structConfiguration
The input configuration of the frames that will be sent to this MediaStreamer. The output stream configuration is made from the System controller via the ISystemControllerInterface.
structSettings
Settings used when creating a new MediaStreamer.

Public Functions

Name
virtual~IMediaStreamer() =default
Destructor.
virtual boolconfigure(const UUID & uuid, const Settings & settings, CUcontext cudaContext) =0
Configure this MediaStreamer. This must be called before any call to the.
virtual boolsetInputFormatAndStart(const Configuration & configuration) =0
Set the input format of this MediaStreamer and start the streamer. The.
virtual boolstopAndResetFormat() =0
Stop streaming and reset the format. A call to this method will stop any output streams set up by the ISystemControllerInterface and reset the input format set by the.
virtual boolhasFormatAndIsRunning() const =0
virtual boolhasOpenOutputStream() const =0
virtual booloutputData(const AlignedFramePtr & frame) =0
Output data through this streamer. The AlignedFrame::mRenderingTimestamp of the frame will be used as PTS when encoding the uncompressed frame.

Detailed Description

class Acl::IMediaStreamer;

IMediaStreamer is an interface class for MediaStreamers, that can take a single stream of uncompressed video and/or audio frames and encode and output it in some way. This output can either be a stream to a network or writing down the data to a file on the hard drive. This class is configured from two interfaces. The input configuration (input video resolution, frame rate, pixel format, number of audio channels…) is made through this C++ API. The output stream is then started from the System Controller. Any of these configurations can be made first. The actual stream to output will start once the first call to.

See: outputData is made.

Public Functions Documentation

function ~IMediaStreamer

virtual ~IMediaStreamer() =default

Destructor.

function configure

virtual bool configure(
    const UUID & uuid,
    const Settings & settings,
    CUcontext cudaContext
) =0

Configure this MediaStreamer. This must be called before any call to the.

Parameters:

  • uuid UUID of this MediaStreamer
  • settings Settings for this MediaStreamer
  • cudaContext The CUDA context to use for this MediaStreamer. The frames passed to this instance should be valid in this CUDA context. The streamer will use this context for preprocessing and encoding.

See:

Return: True if the streamer was successfully configured

function setInputFormatAndStart

virtual bool setInputFormatAndStart(
    const Configuration & configuration
) =0

Set the input format of this MediaStreamer and start the streamer. The.

Parameters:

  • configuration The configuration with the format of the frames that will be sent to this MediaReceiver

See:

  • configure method must be called before this method is called. This method must be called before any call to
  • outputData. If the format should be reset, the
  • stopAndResetFormat method should be called first and then this method can be called again to reset the format.

Return: True if the streamer was successfully started, false otherwise

function stopAndResetFormat

virtual bool stopAndResetFormat() =0

Stop streaming and reset the format. A call to this method will stop any output streams set up by the ISystemControllerInterface and reset the input format set by the.

See: setInputFormatAndStart method. The connection to the ISystemControllerInterface will be kept.

Return: True if the stream was successfully stopped and the format reset, or if the format was not set before this method was called, false on error.

function hasFormatAndIsRunning

virtual bool hasFormatAndIsRunning() const =0

Return: True if the input format is set and the OutputStreamer is running, false otherwise

function hasOpenOutputStream

virtual bool hasOpenOutputStream() const =0

See:

  • outputData will be discarded without being encoded, as there is no stream to output them to. This method can be used to check if the frame even needs to be produced by the rendering engine. Note however, that the
  • outputData method will still log the frames sent to it as received, even if they are not encoded when the output stream is closed.

Return: True if the output stream of the MediaStreamer is currently open and outputting the data, false otherwise. In case this returns false all frames passed to

function outputData

virtual bool outputData(
    const AlignedFramePtr & frame
) =0

Output data through this streamer. The AlignedFrame::mRenderingTimestamp of the frame will be used as PTS when encoding the uncompressed frame.

Parameters:

  • frame The data frame to output, with video data in CUDA memory

See: setInputFormatAndStart method, or if the format has not been set by a call to that method.

Return: True if the frame was accepted (but not necessarily streamed, in case the output stream has not been set up by the ISystemControllerInterface), false in case the frame did not match the configuration made in the

Note: The DeviceMemory in the AlignedFrame passed to this method must not be in use by any CUDA stream. In case the memory has been used in kernels in another CUDA stream, make sure to first synchronize with the stream, before passing it over to the MediaStreamer.

17 - Acl::IMediaStreamer::Configuration

Acl::IMediaStreamer::Configuration Struct Reference

The input configuration of the frames that will be sent to this MediaStreamer. The output stream configuration is made from the System controller via the ISystemControllerInterface.

#include <IMediaStreamer.h>

Public Attributes

Name
PixelFormatmIncomingPixelFormat
uint32_tmWidth
uint32_tmHeight
uint32_tmFrameRateN
uint32_tmFrameRateD
uint32_tmAudioSampleRate
uint32_tmNumAudioChannels

Public Attributes Documentation

variable mIncomingPixelFormat

PixelFormat mIncomingPixelFormat = PixelFormat::kUnknown;

variable mWidth

uint32_t mWidth = 0;

variable mHeight

uint32_t mHeight = 0;

variable mFrameRateN

uint32_t mFrameRateN = 0;

variable mFrameRateD

uint32_t mFrameRateD = 0;

variable mAudioSampleRate

uint32_t mAudioSampleRate = 0;

variable mNumAudioChannels

uint32_t mNumAudioChannels = 0;

18 - Acl::IMediaStreamer::Settings

Acl::IMediaStreamer::Settings Struct Reference

Settings used when creating a new MediaStreamer.

#include <IMediaStreamer.h>

Public Attributes

Name
std::stringmName

Public Attributes Documentation

variable mName

std::string mName;

19 - Acl::IngestApplication

Acl::IngestApplication Class Reference

Public Classes

Name
structSettings

Public Functions

Name
IngestApplication()
Constructor, creates an empty IngestApplication without starting it.
~IngestApplication()
Destructor.
boolstart(const std::shared_ptr< ISystemControllerInterface > & controllerInterface, const Settings & settings)
Start this IngestApplication given an interface to the System Controller and an UUID.
boolstop()
Stop this IngestApplication.
std::stringgetVersion()
Get application version.
std::stringgetLibraryVersions()
Get the versions of the libraries available at runtime, among others, CUDA version, BMD and NDI versions.

Public Functions Documentation

function IngestApplication

IngestApplication()

Constructor, creates an empty IngestApplication without starting it.

function ~IngestApplication

~IngestApplication()

Destructor.

function start

bool start(
    const std::shared_ptr< ISystemControllerInterface > & controllerInterface,
    const Settings & settings
)

Start this IngestApplication given an interface to the System Controller and an UUID.

Parameters:

  • controllerInterface The interface for communication with the System Controller
  • settings The settings for the IngestApplication

Return: True if the IngestApplication was successfully started, false otherwise

function stop

bool stop()

Stop this IngestApplication.

Return: True if the IngestApplication was successfully stopped, false otherwise

function getVersion

static std::string getVersion()

Get application version.

Return: a string with the current version, e.g. “6.0.0-39-g60a35937”

function getLibraryVersions

static std::string getLibraryVersions()

Get the versions of the libraries available at runtime, among others, CUDA version, BMD and NDI versions.

Return: a string with the currently found versions of the libraries used by this application

20 - Acl::IngestApplication::Settings

Acl::IngestApplication::Settings Struct Reference

21 - Acl::ISystemControllerInterface

Acl::ISystemControllerInterface Class Reference

An ISystemControllerInterface is the interface between a component and the System controller controlling the component. The interface allows for two-way communication between the component and the system controller by means of sending requests and getting responses. Classes deriving from the ISystemControllerInterface should provide the component side implementation of the communication with the system controller. This interface can be inherited and implemented by developers to connect to custom system controllers, or to directly control a component programmatically, without the need for connecting to a remote server.

#include <ISystemControllerInterface.h>

Inherited by Acl::SystemControllerConnection

Public Classes

Name
structCallbacks
A struct containing the callbacks that needs to be registered by the component using this interface.
structResponse
A response to a request, consists of a status code and an (optional) parameters JSON object.

Public Types

Name
enum class uint32_tStatusCode { SUCCESS = 3001, TOO_MANY_REQUESTS = 3101, UUID_ALREADY_REGISTERED = 3201, FORMAT_ERROR = 3202, ALREADY_CONFIGURED = 3203, OUT_OF_RESOURCES = 3204, NOT_FOUND = 3205, INTERNAL_ERROR = 3206, CONNECTION_FAILED = 3207, TIMEOUT_EXCEEDED = 3208, KEY_MISMATCH = 3209, UNKNOWN_REQUEST = 3210, MALFORMED_REQUEST = 3211, ALREADY_IN_USE = 3212, VERSION_MISMATCH = 3213}
Status codes used in JSON response messages for Websockets. These are starting at 3000 since the 1000 - 2000 range is taken up by the Spec: https://datatracker.ietf.org/doc/html/rfc6455#section-7.4.1.

Public Functions

Name
virtual~ISystemControllerInterface() =default
Virtual destructor.
virtual std::optional< std::string >sendMessage(const std::string & messageTitle, const nlohmann::json & parameters) =0
Send a message containing a JSON object to the controller.
virtual boolregisterRequestCallback(const Callbacks & callbacks) =0
Register the callbacks to call for events in this class.
virtual boolconnect() =0
Connect to the System controller.
virtual booldisconnect() =0
Disconnect from the System controller.
virtual boolisConnected() const =0
virtual UUIDgetUUID() const =0

Public Types Documentation

enum StatusCode

EnumeratorValueDescription
SUCCESS30013000-3099 Info/Notifications
TOO_MANY_REQUESTS31013100-3199 Warnings
UUID_ALREADY_REGISTERED32013200-3299 Error
FORMAT_ERROR3202
ALREADY_CONFIGURED3203
OUT_OF_RESOURCES3204
NOT_FOUND3205
INTERNAL_ERROR3206
CONNECTION_FAILED3207
TIMEOUT_EXCEEDED3208
KEY_MISMATCH3209
UNKNOWN_REQUEST3210
MALFORMED_REQUEST3211
ALREADY_IN_USE3212
VERSION_MISMATCH3213

Status codes used in JSON response messages for Websockets. These are starting at 3000 since the 1000 - 2000 range is taken up by the Spec: https://datatracker.ietf.org/doc/html/rfc6455#section-7.4.1.

Public Functions Documentation

function ~ISystemControllerInterface

virtual ~ISystemControllerInterface() =default

Virtual destructor.

function sendMessage

virtual std::optional< std::string > sendMessage(
    const std::string & messageTitle,
    const nlohmann::json & parameters
) =0

Send a message containing a JSON object to the controller.

Parameters:

  • messageTitle The title of the status type or request
  • parameters The parameters part of the JSON message

Return: Optional containing an error message on error, else nullopt in case the message was successfully sent

Reimplemented by: Acl::SystemControllerConnection::sendMessage

function registerRequestCallback

virtual bool registerRequestCallback(
    const Callbacks & callbacks
) =0

Register the callbacks to call for events in this class.

Parameters:

  • callbacks The callbacks to use when events in this class happen

Return: True on successful registration, false if some callback is not set or if already connected

Reimplemented by: Acl::SystemControllerConnection::registerRequestCallback

function connect

virtual bool connect() =0

Connect to the System controller.

Return: True on successful connection, false on error or if already connected

Reimplemented by: Acl::SystemControllerConnection::connect

function disconnect

virtual bool disconnect() =0

Disconnect from the System controller.

Return: True on successful disconnection, false on error or if not connected

Reimplemented by: Acl::SystemControllerConnection::disconnect

function isConnected

virtual bool isConnected() const =0

Return: True if connected to the System controller, false otherwise

Reimplemented by: Acl::SystemControllerConnection::isConnected

function getUUID

virtual UUID getUUID() const =0

Return: The UUID of this interface to the System controller

Reimplemented by: Acl::SystemControllerConnection::getUUID

22 - Acl::ISystemControllerInterface::Callbacks

Acl::ISystemControllerInterface::Callbacks Struct Reference

A struct containing the callbacks that needs to be registered by the component using this interface.

#include <ISystemControllerInterface.h>

Public Attributes

Name
std::function< Response(const std::string &, const nlohmann::json &)>mRequestCallback
std::function< void(uint32_t, const std::string &, const std::error_code &)>mConnectionClosedCallback

Public Attributes Documentation

variable mRequestCallback

std::function< Response(const std::string &, const nlohmann::json &)> mRequestCallback;

variable mConnectionClosedCallback

std::function< void(uint32_t, const std::string &, const std::error_code &)> mConnectionClosedCallback;

23 - Acl::ISystemControllerInterface::Response

Acl::ISystemControllerInterface::Response Struct Reference

A response to a request, consists of a status code and an (optional) parameters JSON object.

#include <ISystemControllerInterface.h>

Public Attributes

Name
StatusCodemCode
nlohmann::jsonmParameters

Public Attributes Documentation

variable mCode

StatusCode mCode;

variable mParameters

nlohmann::json mParameters;

24 - Acl::MediaReceiver

Acl::MediaReceiver Class Reference

A MediaReceiver contains the logic for receiving, decoding and aligning incoming media sources from the Ingests. The aligned data is then delivered to the Rendering Engine which is also responsible for setting up the MediaReceiver. The MediaReceiver has a builtin multi view generator, which can create output streams containing composited subsets of the incoming video sources. This class is controlled using an ISystemControllerInterface provided when starting it.

#include <MediaReceiver.h>

Public Classes

Name
structCustomSystemControllerCallResponse
A struct containing the data returned from the Rendering Engine on a custom System Controller call, with information that will be propagated back to the System Controller and its client.
structNewStreamParameters
A struct containing information on the format of an incoming stream.
structSettings
Settings for a MediaReceiver.

Public Types

Name
enum class uint32_tTallyBorderColor { kNone, kRed, kGreen, kYellow}
Available colors for tally border in multi view.

Public Functions

Name
MediaReceiver()
Default constructor.
~MediaReceiver()
Default destructor.
boolstart(const std::shared_ptr< ISystemControllerInterface > & controllerInterface, CUcontext cudaContext, const Settings & settings, const ControlDataReceiver::Settings & receiverSettings)
Start the MediaReceiver. This method will call connect on the System controller interface and set up the callbacks from the interface to call internal methods.
voidstop()
Stop the MediaReceiver.
std::function< void(const AlignedFramePtr &)>getCustomMultiViewSourceInput(uint32_t inputSlot, bool fixedFramerate, const std::string & name ="")
This method allows the Rendering Engine to provide custom input sources to the Multi-view generator to send video streams that can be added to the multi-views. This could for instance be used for adding a “preview” of the video stream the rendering engine is about to cut to.
boolremoveCustomMultiViewSourceInput(uint32_t inputSlot)
Remove a custom multi-view generator source input earlier registered using the getCustomMultiViewSourceInput method.
voidclearCustomMultiViewSourceInputs()
Remove all feedback streams and unregister the multi-view generator callbacks for those streams.
std::shared_ptr< IMediaStreamer >createMediaStreamerOutput(const MediaStreamer::Settings & settings)
Create a new MediaStreamer instance to output data from this MediaReceiver.
boolremoveMediaStreamerOutput(const UUID & uuid)
Remove a MediaStreamer created via the.
voidclearMediaStreamerOutputs()
Remove all MediaStreamers created via the.
std::shared_ptr< IControlDataReceiver >getControlDataReceiver()
Get a pointer to the ControlDataReceiver instance of this MediaReceiver. A call to this method will always return the same instance.
voidsetTallyBorder(uint32_t inputSlot, TallyBorderColor color)
Set tally border color in the multi-views for a specific input slot.
voidclearTallyBorder(uint32_t inputSlot)
Remove tally border in the multi-views for a specific input slot.
voidclearAllTallyBorders()
Remove all tally borders.
MediaReceiver::TallyBorderColorgetTallyBorder(uint32_t inputSlot) const
get tally border color for an input slot
MediaReceiver(MediaReceiver const & ) =delete
MediaReceiver is neither copyable nor movable.
MediaReceiver(MediaReceiver && ) =delete
MediaReceiver &operator=(MediaReceiver const & ) =delete
MediaReceiver &operator=(MediaReceiver && ) =delete
std::stringgetVersion()
Get application version.
std::stringgetLibraryVersions()
Get versions of the libraries available at runtime, among others, CUDA runtime and driver versions.

Public Types Documentation

enum TallyBorderColor

EnumeratorValueDescription
kNone
kRed
kGreen
kYellow

Available colors for tally border in multi view.

Public Functions Documentation

function MediaReceiver

MediaReceiver()

Default constructor.

function ~MediaReceiver

~MediaReceiver()

Default destructor.

function start

bool start(
    const std::shared_ptr< ISystemControllerInterface > & controllerInterface,
    CUcontext cudaContext,
    const Settings & settings,
    const ControlDataReceiver::Settings & receiverSettings
)

Start the MediaReceiver. This method will call connect on the System controller interface and set up the callbacks from the interface to call internal methods.

Parameters:

  • controllerInterface The ISystemControllerInterface to use for this MediaReceiver. The interface should be configured (Such as setting the IP address and port of the System Controller if a server based System Controller is used) but not connected before passed to this method. This method will internally set the callbacks before connecting to the controller. If the controller is already connected or if the controller is not configured, this method will return false. This class will take ownership of the smart pointer.
  • cudaContext The CUDA context to use for this MediaReceiver. The frames will delivered as CUDA pointers, valid in this context, and the multi-view generator will use this context for rendering and encoding.
  • settings The settings to use for the MediaReceiver.
  • receiverSettings The settings to use for the ControlDataReceiver.

Return: True if the MediaReceiver was started successfully, false otherwise.

function stop

void stop()

Stop the MediaReceiver.

function getCustomMultiViewSourceInput

std::function< void(const AlignedFramePtr &)> getCustomMultiViewSourceInput(
    uint32_t inputSlot,
    bool fixedFramerate,
    const std::string & name =""
)

This method allows the Rendering Engine to provide custom input sources to the Multi-view generator to send video streams that can be added to the multi-views. This could for instance be used for adding a “preview” of the video stream the rendering engine is about to cut to.

Parameters:

  • inputSlot The input slot this source will be “plugged in” to. The custom input sources share the input slots with the streams connected from Ingests. This means that it is probably a good idea to use higher numbered slots for these custom inputs, such as numbers from 1000, so that the lower numbers, 1 and up, can be used by the connected video cameras, as the input slot number will also be used when cutting.
  • fixedFramerate True if the source input delivers frames at a fixed framerate. If set to true, missing frames will trigger the display of a visual warning symbol in the source’s area of the multi-view.
  • name Optional human readable name of this stream, to be presented to the System Controller.

See: MediaReceiver::Settings::mDecodedFormat.

Return: A function to where the Rendering Engine should send the frames. In case the requested inputSlot is already used by another custom input source, or a stream from an ingest, the returned function will be nullptr.

Note: Make sure no CUDA stream will write to the DeviceMemory in the AlignedFrame passed to the function. Failing to do so will lead to undefined behavior. In case another CUDA stream has written to the DeviceMemory, make sure to synchronize with the stream before passing the AlignedFrame.

Precondition: The AlignedFrame sent to this function must have the same pixel format as this MediaReceiver is configured to deliver to the Rendering Engine,

function removeCustomMultiViewSourceInput

bool removeCustomMultiViewSourceInput(
    uint32_t inputSlot
)

Remove a custom multi-view generator source input earlier registered using the getCustomMultiViewSourceInput method.

Parameters:

  • inputSlot The input slot the custom multi-view source input is connected to, that should be removed

Return: True if the custom multi-view source input was successfully removed, false in case there was no custom input registered for the given input slot, or in case of an internal error.

function clearCustomMultiViewSourceInputs

void clearCustomMultiViewSourceInputs()

Remove all feedback streams and unregister the multi-view generator callbacks for those streams.

function createMediaStreamerOutput

std::shared_ptr< IMediaStreamer > createMediaStreamerOutput(
    const MediaStreamer::Settings & settings
)

Create a new MediaStreamer instance to output data from this MediaReceiver.

Parameters:

  • settings The settings for the new MediaStreamer

Return: A shared pointer to the MediaStreamer instance in case of a successful creation, otherwise nullptr

function removeMediaStreamerOutput

bool removeMediaStreamerOutput(
    const UUID & uuid
)

Remove a MediaStreamer created via the.

Parameters:

  • uuid The UUID of the MediaStreamer to remove

See: createMediaStreamerOutput method by its UUID.

Return: True if the MediaStreamer was successfully removed, false in case no MediaStreamer with the given UUID was found.

function clearMediaStreamerOutputs

void clearMediaStreamerOutputs()

Remove all MediaStreamers created via the.

See: createMediaStreamerOutput method

function getControlDataReceiver

std::shared_ptr< IControlDataReceiver > getControlDataReceiver()

Get a pointer to the ControlDataReceiver instance of this MediaReceiver. A call to this method will always return the same instance.

See: start.

Return: Pointer to the ControlDataReceiver instance. Nullptr if called before a successful call to

function setTallyBorder

void setTallyBorder(
    uint32_t inputSlot,
    TallyBorderColor color
)

Set tally border color in the multi-views for a specific input slot.

Parameters:

  • inputSlot the input slot for a source
  • color the color to set

function clearTallyBorder

void clearTallyBorder(
    uint32_t inputSlot
)

Remove tally border in the multi-views for a specific input slot.

Parameters:

  • inputSlot the input slot for a source

function clearAllTallyBorders

void clearAllTallyBorders()

Remove all tally borders.

function getTallyBorder

MediaReceiver::TallyBorderColor getTallyBorder(
    uint32_t inputSlot
) const

get tally border color for an input slot

Parameters:

  • inputSlot the input slot to get color for

Return: the tally border color for the given input slot

function MediaReceiver

MediaReceiver(
    MediaReceiver const & 
) =delete

MediaReceiver is neither copyable nor movable.

function MediaReceiver

MediaReceiver(
    MediaReceiver && 
) =delete

function operator=

MediaReceiver & operator=(
    MediaReceiver const & 
) =delete

function operator=

MediaReceiver & operator=(
    MediaReceiver && 
) =delete

function getVersion

static std::string getVersion()

Get application version.

Return: a string with the current version, e.g. “6.0.0-39-g60a35937”

function getLibraryVersions

static std::string getLibraryVersions()

Get versions of the libraries available at runtime, among others, CUDA runtime and driver versions.

Return: a string with the currently found versions of the libraries used by this application

25 - Acl::MediaReceiver::CustomSystemControllerCallResponse

Acl::MediaReceiver::CustomSystemControllerCallResponse Struct Reference

A struct containing the data returned from the Rendering Engine on a custom System Controller call, with information that will be propagated back to the System Controller and its client.

#include <MediaReceiver.h>

Public Attributes

Name
ISystemControllerInterface::StatusCodemCode
nlohmann::jsonmParameters
std::stringmErrorMessage

Public Attributes Documentation

variable mCode

ISystemControllerInterface::StatusCode mCode;

variable mParameters

nlohmann::json mParameters;

variable mErrorMessage

std::string mErrorMessage;

26 - Acl::MediaReceiver::NewStreamParameters

Acl::MediaReceiver::NewStreamParameters Struct Reference

A struct containing information on the format of an incoming stream.

#include <MediaReceiver.h>

Public Attributes

Name
uint32_tmVideoHeight
uint32_tmVideoWidth
uint32_tmFrameRateN
uint32_tmFrameRateD
uint32_tmAudioSampleRate

Public Attributes Documentation

variable mVideoHeight

uint32_t mVideoHeight = 0;

variable mVideoWidth

uint32_t mVideoWidth = 0;

variable mFrameRateN

uint32_t mFrameRateN = 0;

variable mFrameRateD

uint32_t mFrameRateD = 1;

variable mAudioSampleRate

uint32_t mAudioSampleRate = 0;

27 - Acl::MediaReceiver::Settings

Acl::MediaReceiver::Settings Struct Reference

Settings for a MediaReceiver.

#include <MediaReceiver.h>

Public Attributes

Name
PixelFormatmDecodedFormat
The pixel format delivered to the rendering engine.
std::function< std::function< void(const AlignedFramePtr &)>uint32_t inputSlot, const std::string &streamID, const NewStreamParameters &newStreamParameters)>mNewConnectionCallback
std::function< void(uint32_t inputSlot)>mClosedConnectionCallback
std::function< CustomSystemControllerCallResponse(const std::string &request, const nlohmann::json &parameters)>mCustomSystemControllerRequestCallback
boolmUseMultiViewer
boolmDeliverOld
Set to true if this MediaReceiver should have a multi-view generator.
CUstreammAlignedFrameFreeStream

Public Attributes Documentation

variable mDecodedFormat

PixelFormat mDecodedFormat = PixelFormat::kRgba64Le;

The pixel format delivered to the rendering engine.

variable mNewConnectionCallback

std::function< std::function< void(const AlignedFramePtr &)>uint32_t inputSlot, const std::string &streamID, const NewStreamParameters &newStreamParameters)> mNewConnectionCallback;

Parameters:

  • inputSlot can be seen as a virtual SDI input on a hardware mixer and should be used by the Rendering engine to identify sources. For example, if a source is connected to input slot 5, the button “Cut to camera 5” on the control panel ought to cut to this stream. The MediaReceiver is responsible for making sure only one stream can be connected to an input slot at a time. This callback might be called multiple times with the same input slot, however, in case the stream has been disconnected and the mClosedConnectionCallback has been called for that input slot earlier.
  • streamID is the identification string of the video/audio source on the Ingest. A Rendering engine might have the same StreamID connected multiple times (for instance if two different alignments are used for the same source) so this should not be used as an unique identifier for the stream.
  • newStreamParameters contains information on the pending incoming stream to allow the Rendering engine to decide if it can receive it or not.

Note: The internal CUDA stream is synchronized before delivering the AlignedFrames, meaning the DeviceMemory in the AlignedFrame will always contain the written data; no further synchronization is needed before the rendering engine can read the data.

A callback called by the MediaReceiver whenever a new connection from an Ingest is set up. The callback should return a function to which the data will be delivered. In case the Rendering engine does not want to accept the pending incoming stream (due to a format not supported, etc) the Rendering engine can return nullptr.

variable mClosedConnectionCallback

std::function< void(uint32_t inputSlot)> mClosedConnectionCallback;

Parameters:

  • inputSlot The input slot that was disconnected

A callback called whenever a connection from an Ingest has been stopped. When receiving this callback, the callback function returned by the mNewConnectionCallback will not be called anymore and can be discarded if required by the application. After this function has been called, the input slot might be reused by another incoming stream after a call to the mNewConnectionCallback.

variable mCustomSystemControllerRequestCallback

std::function< CustomSystemControllerCallResponse(const std::string &request, const nlohmann::json &parameters)> mCustomSystemControllerRequestCallback;

Parameters:

  • request The name of the request
  • parameters The JSON object with parameters for the request

Return: A struct with the response from the Rendering Engine with the custom request call

A callback called whenever the System Controller has sent a custom request aimed at the Rendering Engine. The API for this is up to the Rendering Engine implementor.

variable mUseMultiViewer

bool mUseMultiViewer = false;

variable mDeliverOld

bool mDeliverOld = false;

Set to true if this MediaReceiver should have a multi-view generator.

variable mAlignedFrameFreeStream

CUstream mAlignedFrameFreeStream = nullptr;

Set to true if the media frames should be delivered, even if the delivery time has already passed, otherwise they are discarded The CUDA stream to use for asynchronously freeing the AlignedFrames’ DeviceMemory. Set this to the rendering engine’s CUDA stream, to ensure memory is not freed before the rendering engine is done using it asynchronously in its CUDA stream. Note that the MediaReceiver instance and all AlignedFrames delivered from it must be destroyed before the CUDA stream can be destroyed.

28 - Acl::SystemControllerConnection

Acl::SystemControllerConnection Class Reference

An implementation of the ISystemControllerInterface for a System controller residing in a remote server. The connection to the server uses a Websocket.

#include <SystemControllerConnection.h>

Inherits from Acl::ISystemControllerInterface

Public Classes

Name
structSettings
Settings for a SystemControllerConnection.

Public Types

Name
enum class uint32_tComponentType { kIngest, kPipeline, kControlPanel}
Enumeration of component types the component using this SystemControllerConnection can tell the System Controller to be seen as.

Public Functions

Name
SystemControllerConnection()
~SystemControllerConnection() override
boolconfigure(const Settings & settings)
Configure this connection. This method should be called before calling.
virtual boolconnect() override
Connect to the server using the settings set with the.
virtual boolisConnected() const override
virtual UUIDgetUUID() const override
virtual std::optional< std::string >sendMessage(const std::string & messageTitle, const nlohmann::json & parameters) override
Send a message containing a JSON object to the system controller server.
virtual booldisconnect() override
Disconnect from the server.
virtual boolregisterRequestCallback(const Callbacks & callbacks) override
Register callbacks to call when getting requests from the server or the server connection is lost.
SystemControllerConnection(SystemControllerConnection const & ) =delete
SystemControllerConnection(SystemControllerConnection && ) =delete
SystemControllerConnection &operator=(SystemControllerConnection const & ) =delete
SystemControllerConnection &operator=(SystemControllerConnection && ) =delete

Additional inherited members

Public Classes inherited from Acl::ISystemControllerInterface

Name
structCallbacks
A struct containing the callbacks that needs to be registered by the component using this interface.
structResponse
A response to a request, consists of a status code and an (optional) parameters JSON object.

Public Types inherited from Acl::ISystemControllerInterface

Name
enum class uint32_tStatusCode { SUCCESS, TOO_MANY_REQUESTS, UUID_ALREADY_REGISTERED, FORMAT_ERROR, ALREADY_CONFIGURED, OUT_OF_RESOURCES, NOT_FOUND, INTERNAL_ERROR, CONNECTION_FAILED, TIMEOUT_EXCEEDED, KEY_MISMATCH, UNKNOWN_REQUEST, MALFORMED_REQUEST, ALREADY_IN_USE, VERSION_MISMATCH}
Status codes used in JSON response messages for Websockets. These are starting at 3000 since the 1000 - 2000 range is taken up by the Spec: https://datatracker.ietf.org/doc/html/rfc6455#section-7.4.1.

Public Functions inherited from Acl::ISystemControllerInterface

Name
virtual~ISystemControllerInterface() =default
Virtual destructor.

Public Types Documentation

enum ComponentType

EnumeratorValueDescription
kIngest
kPipeline
kControlPanel

Enumeration of component types the component using this SystemControllerConnection can tell the System Controller to be seen as.

Public Functions Documentation

function SystemControllerConnection

SystemControllerConnection()

function ~SystemControllerConnection

~SystemControllerConnection() override

function configure

bool configure(
    const Settings & settings
)

Configure this connection. This method should be called before calling.

Parameters:

  • settings The settings to use when connecting to the server

See: connect.

Return: True if successfully configured, false otherwise

function connect

virtual bool connect() override

Connect to the server using the settings set with the.

See: configure method.

Return: True if connection was successful, false otherwise

Reimplements: Acl::ISystemControllerInterface::connect

function isConnected

virtual bool isConnected() const override

Return: True if this class is connected to the server, false otherwise

Reimplements: Acl::ISystemControllerInterface::isConnected

function getUUID

virtual UUID getUUID() const override

Return: The UUID of this interface to the System controller

Reimplements: Acl::ISystemControllerInterface::getUUID

function sendMessage

virtual std::optional< std::string > sendMessage(
    const std::string & messageTitle,
    const nlohmann::json & parameters
) override

Send a message containing a JSON object to the system controller server.

Parameters:

  • messageTitle The title of the status type or request
  • parameters The parameters part of the JSON message

Return: Optional containing an error message on error, else nullopt in case the message was successfully sent

Reimplements: Acl::ISystemControllerInterface::sendMessage

function disconnect

virtual bool disconnect() override

Disconnect from the server.

Return: True if successfully disconnected, false on internal error

Reimplements: Acl::ISystemControllerInterface::disconnect

function registerRequestCallback

virtual bool registerRequestCallback(
    const Callbacks & callbacks
) override

Register callbacks to call when getting requests from the server or the server connection is lost.

Parameters:

  • callbacks The callbacks to set

Return: True if successfully registered, false if a callback is not set, or if already connected to the server

Reimplements: Acl::ISystemControllerInterface::registerRequestCallback

function SystemControllerConnection

SystemControllerConnection(
    SystemControllerConnection const & 
) =delete

function SystemControllerConnection

SystemControllerConnection(
    SystemControllerConnection && 
) =delete

function operator=

SystemControllerConnection & operator=(
    SystemControllerConnection const & 
) =delete

function operator=

SystemControllerConnection & operator=(
    SystemControllerConnection && 
) =delete

29 - Acl::SystemControllerConnection::Settings

Acl::SystemControllerConnection::Settings Struct Reference

Settings for a SystemControllerConnection.

#include <SystemControllerConnection.h>

Public Attributes

Name
std::stringmSystemControllerIP
uint16_tmSystemControllerPort
std::stringmSystemControllerPostfix
std::stringmPSK
UUIDmUUID
ComponentTypemType
std::stringmName
std::stringmMyIP
std::chrono::millisecondsmConnectTimeout
boolmEnableHTTPS
boolmInsecureHTTPS
std::stringmCustomCaCertFile

Public Attributes Documentation

variable mSystemControllerIP

std::string mSystemControllerIP;

variable mSystemControllerPort

uint16_t mSystemControllerPort;

variable mSystemControllerPostfix

std::string mSystemControllerPostfix;

variable mPSK

std::string mPSK;

variable mUUID

UUID mUUID;

variable mType

ComponentType mType;

variable mName

std::string mName;

variable mMyIP

std::string mMyIP;

variable mConnectTimeout

std::chrono::milliseconds mConnectTimeout {
            3000};

variable mEnableHTTPS

bool mEnableHTTPS;

variable mInsecureHTTPS

bool mInsecureHTTPS;

variable mCustomCaCertFile

std::string mCustomCaCertFile;

30 - Acl::TimeCommon::TAIStatus

Acl::TimeCommon::TAIStatus Struct Reference

Public Attributes

Name
StratumLevelmStratum
boolmHasLock
doublemTimeDiffS

Public Attributes Documentation

variable mStratum

StratumLevel mStratum = StratumLevel::UnknownStratum;

variable mHasLock

bool mHasLock = false;

variable mTimeDiffS

double mTimeDiffS = 0.0;

31 - Acl::TimeCommon::TimeStructure

Acl::TimeCommon::TimeStructure Struct Reference

Public Attributes

Name
uint64_tt1
uint64_tt2
uint64_tt3
uint64_tt4
uint64_ttoken
uint64_tdummy1
uint64_tdummy2
uint64_tdummy3

Public Attributes Documentation

variable t1

uint64_t t1 = 0;

variable t2

uint64_t t2 = 0;

variable t3

uint64_t t3 = 0;

variable t4

uint64_t t4 = 0;

variable token

uint64_t token = 0;

variable dummy1

uint64_t dummy1 = 0;

variable dummy2

uint64_t dummy2 = 0;

variable dummy3

uint64_t dummy3 = 0;

32 - Acl::UUID

Acl::UUID Class Reference

A class holding a UUID, stored as a sequence of bytes. This class only supports version 4 variant 1 of the UUID standard.

#include <UUID.h>

Public Functions

Name
UUID()
Default constructor, returns a nil UUID.
constexprUUID(const std::array< uint8_t, kUUIDSize > & bytes)
Construct a UUID from a sequence of bytes.
std::stringtoString() const
std::stringtoBitString() const
booloperator==(const UUID & other) const
Compare this UUID to another UUID.
booloperator!=(const UUID & other) const
Compare this UUID to another UUID for inequality.
booloperator<(const UUID & other) const
Less than operator implementation.
std::array< uint8_t, kUUIDSize >::const_iteratorbegin() const
std::array< uint8_t, kUUIDSize >::const_iteratorend() const
constexpr size_tsize() const
UUIDgenerateRandom()
Create a new, randomly generated UUID.
std::optional< UUID >fromString(const std::string & uuid)
Parse a UUID from a string.
std::optional< UUID >fromVector(const std::vector< uint8_t >::const_iterator & start, const std::vector< uint8_t >::const_iterator & end)
Read a UUID from a vector of uint8s.
std::optional< UUID >fromPointer(const uint8_t * start, const uint8_t * end)
Read a UUID from a pointer.

Public Attributes

Name
constexpr size_tkUUIDSize
const UUIDkNilUUID
const UUIDkOmniUUID

Public Functions Documentation

function UUID

UUID()

Default constructor, returns a nil UUID.

function UUID

inline explicit constexpr UUID(
    const std::array< uint8_t, kUUIDSize > & bytes
)

Construct a UUID from a sequence of bytes.

Note: This will accept UUIDs that are not valid version 4 UUIDs.

function toString

std::string toString() const

Return: A string representation of the UUID formatted as hex values

function toBitString

std::string toBitString() const

Return: A string representation of the UUID formatted as bits

function operator==

bool operator==(
    const UUID & other
) const

Compare this UUID to another UUID.

Parameters:

  • other The other UUID to compare this UUID to

Return: True if the UUIDs are identical, false otherwise

function operator!=

bool operator!=(
    const UUID & other
) const

Compare this UUID to another UUID for inequality.

Parameters:

  • other The other UUID to compare this UUID to

Return: True if the UUIDs are not equal, false in case they are identical

function operator<

bool operator<(
    const UUID & other
) const

Less than operator implementation.

Parameters:

  • other The other UUID to compare this UUID to

Return: True if this UUID should be sorted before the other UUID

function begin

std::array< uint8_t, kUUIDSize >::const_iterator begin() const

Return: Begin iterator for the UUID byte sequence

function end

std::array< uint8_t, kUUIDSize >::const_iterator end() const

Return: End iterator for the UUID byte sequence

function size

inline constexpr size_t size() const

Return: The size in bytes of the UUID. Will always return 16

function generateRandom

static UUID generateRandom()

Create a new, randomly generated UUID.

Return: A new, randomly generated UUID

function fromString

static std::optional< UUID > fromString(
    const std::string & uuid
)

Parse a UUID from a string.

Parameters:

  • uuid The string representation of the UUID

Return: An optional containing the UUID on success, or nullopt in case the parsing failed

function fromVector

static std::optional< UUID > fromVector(
    const std::vector< uint8_t >::const_iterator & start,
    const std::vector< uint8_t >::const_iterator & end
)

Read a UUID from a vector of uint8s.

Parameters:

  • start Start iterator to read the UUID from
  • end End iterator to read the UUID from, must be 16 bytes after start

Return: An optional containing the UUID on success, or nullopt in case the parsing failed

function fromPointer

static std::optional< UUID > fromPointer(
    const uint8_t * start,
    const uint8_t * end
)

Read a UUID from a pointer.

Parameters:

  • start Start pointer to read the UUID from
  • end End pointer to read the UUID from, must be 16 bytes after start

Return: An optional containing the UUID on success, or nullopt in case the parsing failed

Public Attributes Documentation

variable kUUIDSize

static constexpr size_t kUUIDSize = 16;

variable kNilUUID

static const UUID kNilUUID;

variable kOmniUUID

static const UUID kOmniUUID;

33 - fmt::formatter< Acl::AudioChannelLayout >

fmt::formatter< Acl::AudioChannelLayout > Struct Reference

Inherits from formatter< std::string >

Public Functions

Name
template <typename FormatContext >
auto
format(const Acl::AudioChannelLayout audioChannelLayout, FormatContext & ctx)

Public Functions Documentation

function format

template <typename FormatContext >
inline auto format(
    const Acl::AudioChannelLayout audioChannelLayout,
    FormatContext & ctx
)

34 - fmt::formatter< Acl::ControlDataAddress >

fmt::formatter< Acl::ControlDataAddress > Struct Reference

Inherits from formatter< std::string >

Public Functions

Name
template <typename FormatContext >
auto
format(const Acl::ControlDataAddress & address, FormatContext & ctx)

Public Functions Documentation

function format

template <typename FormatContext >
inline auto format(
    const Acl::ControlDataAddress & address,
    FormatContext & ctx
)

35 - fmt::formatter< Acl::ControlDataCommon::EventType >

fmt::formatter< Acl::ControlDataCommon::EventType > Struct Reference

Inherits from formatter< std::string >

Public Functions

Name
template <typename FormatContext >
auto
format(const Acl::ControlDataCommon::EventType type, FormatContext & ctx)

Public Functions Documentation

function format

template <typename FormatContext >
inline auto format(
    const Acl::ControlDataCommon::EventType type,
    FormatContext & ctx
)

36 - fmt::formatter< Acl::FieldOrder >

fmt::formatter< Acl::FieldOrder > Struct Reference

Inherits from formatter< std::string >

Public Functions

Name
template <typename FormatContext >
auto
format(const Acl::FieldOrder fieldOrder, FormatContext & ctx)

Public Functions Documentation

function format

template <typename FormatContext >
inline auto format(
    const Acl::FieldOrder fieldOrder,
    FormatContext & ctx
)

37 - fmt::formatter< Acl::ISystemControllerInterface::StatusCode >

fmt::formatter< Acl::ISystemControllerInterface::StatusCode > Struct Reference

Inherits from formatter< std::uint32_t >

Public Functions

Name
template <typename FormatContext >
auto
format(Acl::ISystemControllerInterface::StatusCode code, FormatContext & ctx)

Public Functions Documentation

function format

template <typename FormatContext >
inline auto format(
    Acl::ISystemControllerInterface::StatusCode code,
    FormatContext & ctx
)

38 - fmt::formatter< Acl::SystemControllerConnection::ComponentType >

fmt::formatter< Acl::SystemControllerConnection::ComponentType > Struct Reference

Inherits from formatter< std::string >

Public Functions

Name
template <typename FormatContext >
auto
format(Acl::SystemControllerConnection::ComponentType type, FormatContext & ctx)

Public Functions Documentation

function format

template <typename FormatContext >
inline auto format(
    Acl::SystemControllerConnection::ComponentType type,
    FormatContext & ctx
)

39 - fmt::formatter< Acl::UUID >

fmt::formatter< Acl::UUID > Struct Reference

Inherits from formatter< std::string >

Public Functions

Name
template <typename FormatContext >
auto
format(const Acl::UUID & uuid, FormatContext & ctx)

Public Functions Documentation

function format

template <typename FormatContext >
inline auto format(
    const Acl::UUID & uuid,
    FormatContext & ctx
)