Plugin Call#
- class rb_sdk.rb_sdk_cpp.PluginRouter#
Bases:
pybind11_objectMuscatRouter 어휘(on / subscribe / emit)로 플러그인 외부 endpoint 를 선언한다. plugin_id prefix 는 RBPluginCall 이 붙이므로 여기선 path 만 다룬다.
- emit(self: rb_sdk.rb_sdk_cpp.PluginRouter, topic: str, payload: object = None) None#
- on(path, *, explicit_routes=None)#
- Parameters:
path (str)
explicit_routes (Any)
- Return type:
Any
- subscribe(topic, *, explicit_events=None)#
- Parameters:
topic (str)
explicit_events (Any)
- Return type:
Any
- class rb_sdk.rb_sdk_cpp.RBPluginCall(plugin_id=None)#
Bases:
pybind11_object- call(keyexpr, *, payload=<object object>, timeout=3.0, **kwargs)#
- property connected#
- property data_dir#
Returns this plugin’s persistent data directory, creating it if missing.
Store files the plugin must keep (state, caches, user settings) here. The install directory (the process working directory) is replaced on every plugin update, so anything written there is lost. This directory survives updates and restarts, and is removed when the plugin is deleted.
Resolves to
RB_PLUGIN_DATA_DIR(set by Muscat when it starts the plugin); when unset,/app/data/runtime/plugins/data/{plugin_id}is used.- Returns:
Absolute path of the data directory.
- Raises:
std::filesystem::filesystem_error – If the directory cannot be created.
- property plugin_id#
- publish(topic, payload=None, **_)#
- property router#
- serve(keyexpr, handler=None, **_)#
- subscribe(topic, callback=None, **_)#
- undeclare_queryable(keyexpr=None)#
- unserve(keyexpr=None)#
- unsubscribe(topic=None, callback=None)#
- unsubscribe_topic(topic=None, callback=None)#
- class rb_sdk.rb_sdk_cpp.RBPluginGatewayError#
Bases:
RuntimeError