MxstMetadataOutput

Function Usage

Defines the buffer and metadata structure received by the stream.

Prototype

struct MxstMetadataOutput {
    APP_ERROR errorCode = APP_ERR_OK;
    std::string errorMsg;
    std::string dataType;
    std::shared_ptr<google::protobuf::Message> dataPtr;
    void *reservedPtr = nullptr;

    MxstMetadataOutput() = default;

    explicit MxstMetadataOutput(const std::string& dataType)
        : dataType(std::move(dataType)) {}

    explicit MxstMetadataOutput(APP_ERROR errorCode, const std::string& errorMsg = "")
        : errorCode(errorCode), errorMsg(std::move(errorMsg)) {}

    void SetErrorInfo(APP_ERROR errorCodeIn, const std::string& errorMsgIn)
    {
        errorCode = errorCodeIn;
        errorMsg = errorMsgIn;
    }
};

Parameter Description

Parameter

Input/Output

Description

errorCode

Input

Error code

errorMsg

Input

Error message

dataType

Input

Metadata type, that is, the message name defined by protobuf

dataPtr

Input

Smart pointer of the output metadata

reservedPtr

Input

Reserved pointer