Main Page
Namespaces
Namespace List
Namespace Members
All
c
d
e
f
g
l
m
p
r
s
Functions
Variables
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
h
i
j
l
m
n
o
p
r
s
t
u
~
Functions
_
a
b
c
d
e
i
j
m
o
p
r
s
t
u
~
Variables
_
b
c
d
e
f
h
i
j
l
m
n
p
r
s
t
Files
File List
File Members
All
b
c
d
e
g
i
j
l
m
p
r
s
t
v
w
Functions
c
d
g
i
j
l
m
p
r
s
t
w
Typedefs
examples
skyway_for_ros_examples
scripts
utils
plugin.py
Go to the documentation of this file.
1
import
rospy
2
3
4
class
PluginManager
:
5
_plugin_dictionary = {}
6
_connected_plugin_dictionary = {}
7
8
def
__init__
(self):
9
if
not
rospy.has_param(rospy.get_name() +
"/data"
):
10
return
11
12
plugin_list = rospy.get_param(rospy.get_name() +
"/data"
)
13
for
plugin
in
plugin_list:
14
if
"key"
in
plugin:
15
self.
_plugin_dictionary
[plugin[
"key"
]] = plugin
16
17
def
on_connect
(self, data_connection_id, key):
18
if
key
in
self.
_plugin_dictionary
:
19
plugin = self.
_plugin_dictionary
.pop(key)
20
self.
_connected_plugin_dictionary
[data_connection_id] = plugin
21
return
plugin
22
else
:
23
return
None
24
25
def
on_disconnect
(self, key):
26
if
key
in
self.
_connected_plugin_dictionary
:
27
plugin = self.
_connected_plugin_dictionary
.pop(key)
28
self.
_plugin_dictionary
[plugin[
"key"
]] = plugin
utils.plugin.PluginManager.on_connect
def on_connect(self, data_connection_id, key)
Definition:
plugin.py:17
utils.plugin.PluginManager._plugin_dictionary
dictionary _plugin_dictionary
Definition:
plugin.py:5
utils.plugin.PluginManager
Definition:
plugin.py:4
utils.plugin.PluginManager.__init__
def __init__(self)
Definition:
plugin.py:8
utils.plugin.PluginManager.on_disconnect
def on_disconnect(self, key)
Definition:
plugin.py:25
utils.plugin.PluginManager._connected_plugin_dictionary
dictionary _connected_plugin_dictionary
Definition:
plugin.py:6
skyway
Author(s): Toshiya Nakakura
autogenerated on Thu Oct 26 2023 02:42:21