예제 #1
0
 def __init__(self, root_fs="."):
     TargetNode.__init__(self, "file_system")
     # go ahead and include the FileSystem commands
     self.attach(FilesystemPutFile(root_fs))
     self.attach(FilesystemGetFile(root_fs))
     self.attach(FilesystemRemoveFile(root_fs))
     self.attach(FileystemListDirectory(root_fs))
예제 #2
0
 def __init__(self, root_fs="."):
     TargetNode.__init__(self, "file_system")
     # go ahead and include the FileSystem commands
     self.attach(FilesystemPutFile(root_fs))
     self.attach(FilesystemGetFile(root_fs))
     self.attach(FilesystemRemoveFile(root_fs))
     self.attach(FileystemListDirectory(root_fs))
예제 #3
0
파일: zigbee.py 프로젝트: EdCornejo/cp4pc
 def handle_xml(self, xml_tree):
     # only process requests if xbee or zigbee module has been imported by the code.
     #TODO: make sure code doesn't skip this class and access child classes directly
     if xbee_enabled():
         return TargetNode.handle_xml(self, xml_tree)
     else:
         return ''
예제 #4
0
 def handle_xml(self, xml_tree):
     # only process requests if xbee or zigbee module has been imported by the code.
     #TODO: make sure code doesn't skip this class and access child classes directly
     if xbee_enabled():
         return TargetNode.handle_xml(self, xml_tree)
     else:
         return ''
예제 #5
0
 def add_callback(self, name, callback):
     """Add a simple target, descriptor know nothing about children"""
     target_node = self.get(name)
     if target_node is not None:
         raise ValueError("RCI target already registered: %s" % name)
     self.attach(TargetNode(name, '', callback))
     return self  # allow for method chaining
예제 #6
0
파일: zigbee.py 프로젝트: EdCornejo/cp4pc
 def descriptor_xml(self, xml_node):
     # only process requests if xbee or zigbee module has been imported by the code.
     if xbee_enabled():
         return TargetNode.descriptor_xml(self, xml_node)
     else:
         return ''
예제 #7
0
파일: zigbee.py 프로젝트: EdCornejo/cp4pc
 def __init__(self, root_fs="."):
     TargetNode.__init__(self, "zigbee")
     # include the ZigBee commands
     self.attach(Discover())
     self.attach(QuerySetting())
     self.attach(QueryState())
예제 #8
0
 def descriptor_xml(self, xml_node):
     # only process requests if xbee or zigbee module has been imported by the code.
     if xbee_enabled():
         return TargetNode.descriptor_xml(self, xml_node)
     else:
         return ''
예제 #9
0
 def __init__(self, root_fs="."):
     TargetNode.__init__(self, "zigbee")
     # include the ZigBee commands
     self.attach(Discover())
     self.attach(QuerySetting())
     self.attach(QueryState())