connector.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #
00003 # License: BSD
00004 #   https://raw.github.com/robotics-in-concert/rocon_devices/license/LICENSE
00005 #
00006 #################################################################################
00007 
00008 from abc import ABCMeta, abstractmethod
00009 
00010 class Connector(object):
00011     """
00012       Abstract base class that defines the API of a iot platform connector.
00013     """
00014     __metaclass__ = ABCMeta
00015 
00016     @abstractmethod
00017     def init(self):
00018         """
00019           Initialises connector.  
00020         """
00021         pass
00022 
00023     @abstractmethod
00024     def close(self):
00025         """
00026         """
00027         pass
00028 
00029     @abstractmethod
00030     def call_get_device_list(self):
00031         """
00032           Request target engine to receive all available device list
00033         
00034           :returns: List of devices
00035           :rtypes: rocon_device_msgs.msg.Devices 
00036         """
00037         pass
00038 
00039     @abstractmethod
00040     def convert_post_to_devices_msg(self, post):
00041         """
00042           It converts te target engine posts device events into ros msg
00043           
00044           :param post: device events
00045 
00046           :returns: ROS formatted device events
00047           :rtypes: rocon_device_msgs.msg.Devices
00048         """
00049         pass
00050 
00051     @abstractmethod
00052     def request_configuration_update(self, config):
00053         """
00054           requests target engine to update its configuration 
00055           :param config: Configuration(e.g server addr and port for device event post) 
00056           :type config: dict
00057 
00058           :returns: Success or fail
00059           :rtype: bool
00060         """
00061         pass


rocon_iot_bridge
Author(s): Dongwook Lee, Jihoon Lee
autogenerated on Thu Jun 6 2019 17:58:46