Commit | Line | Data |
---|---|---|
0235b0db | 1 | # SPDX-License-Identifier: GPL-2.0-only |
7b8c5132 SM |
2 | # |
3 | # Copyright (C) 2019 EfficiOS Inc. | |
4 | # | |
7b8c5132 SM |
5 | |
6 | import bt2 | |
0076e742 | 7 | from cli_params_to_string import to_string |
7b8c5132 SM |
8 | |
9 | ||
10 | @bt2.plugin_component_class | |
11 | class SinkThatPrintsParams(bt2._UserSinkComponent): | |
59225a3e | 12 | def __init__(self, config, params, obj): |
f5567ea8 | 13 | self._add_input_port("in") |
7b8c5132 SM |
14 | print(to_string(params)) |
15 | ||
16 | def _user_consume(self): | |
17 | raise bt2.Stop | |
18 | ||
19 | ||
20 | bt2.register_plugin(__name__, "params") |