插件配置端口定义模板,用户可通过重写插件DefineInputPorts和DefineOutputPorts接口来定义输入/输出端口,默认的输入/输出端口相同。
1 2 3 4 5 6 | typedef struct { int portNum = 0; std::vector<std::vector<std::string>> portDesc; PortDirection direction; std::vector<PortTypeDesc> types; } MxpiPortInfo; |
参数名 |
说明 |
---|---|
portNum |
插件的端口数量,默认值为“0”。 |
portDesc |
端口描述,详情请参考表3。 |
direction |
定义端口输入或输出方向,枚举值:INPUT_PORT, OUTPUT_PORT。 |
types |
端口类型PortTypeDesc,当前仅支持STATIC。 |