Пример #1
0
    def __init__(self):
        Device.__init__(self)
        self.uuid = 'c9300b5a-6f40-4875-a457-7e5ab90339d6'

        self.luminositeService = LuminositeService()
        self.tempHumService = TempHumService()
        self.humService = HumService()
        self.pressionService = PressionService()
        self.distanceService = DistanceService()

        self.services = [
            self.luminositeService,
            self.tempHumService,
            self.humService,
            self.pressionService,
            self.distanceService,
        ]

        self.luminositeService.startListening()
        self.tempHumService.startListening()
        self.humService.startListening()
        self.pressionService.startListening()
        self.distanceService.startListening()

        self.icons = [DeviceIcon('image/png', 32, 32, 24, './index.png')]
Пример #2
0
    def dump_device(self):
        """Dump the device XML tree. This adds required additional fields"""
        device = Device.dump_device(self)

        for element in self.extraElements:
            device.append(element)

        return device
Пример #3
0
    def __init__(self):
        Device.__init__(self)
        self.uuid = '2fac1234-31f8-11b4-a222-08002b34c003'
        self.receptionservice = ReceptionService()
        self.envoiservice = EnvoiService()
        self.capteurservice = CapteurService()

        self.services = [
            self.receptionservice, self.envoiservice, self.capteurservice
        ]
        self.receptionservice.startListening()
        self.envoiservice.startListening()
        self.capteurservice.startListening()

        self.icons = [
            DeviceIcon('image/png', 32, 32, 24,
                       'http://172.25.3.103:52323/MediaRenderer_32x32.png')
        ]
Пример #4
0
    def __init__(self):
        Device.__init__(self)
        self.uuid='3a34765e-5e91-4627-b735-1041eaf49740'

        self.detect = DetectionService()
        self.fileM = FileManageService()
        self.servo = ServoService()
	self.cam = CameraService()

        
        self.services = [
            self.detect,
            self.fileM,
            self.servo,
            self.cam,
        ]

        
        self.icons = [DeviceIcon('image/png', 32, 32, 24,'./hiboo.png')]
Пример #5
0
    def __init__(self):
        Device.__init__(self)

        self.uuid = 'c8728b01-6c51-471e-a497-e9447934a25c'

        #Declaration of all service classes
        self.myService = MSAccService()
        self.gpsService = MSGPSService()
        self.heartRateService = MSHeartRateService()
        #Assign services to our device
        self.services = [
            self.myService, self.gpsService, self.heartRateService
        ]

        self.icons = [
            DeviceIcon('image/png', 32, 32, 24,
                       'http://172.25.3.103:52323/MediaRenderer_32x32.png')
        ]

        self.namespaces['dlna'] = 'urn:schemas-dlna-org:device-1-0'
        self.extras['dlna:X_DLNADOC'] = 'DMS-1.50'
Пример #6
0
    def __init__(self):
        Device.__init__(self)

        self.uuid = '2fac1234-31f8-11b4-a222-08002b34c003'

        self.connectionManager = MSConnectionManager()
        self.contentDirectory = MSContentDirectory()
        self.mediaReceiverRegistrar = MSMediaReceiverRegistrar()

        self.services = [
            self.connectionManager, self.contentDirectory,
            self.mediaReceiverRegistrar
        ]

        self.icons = [
            DeviceIcon('image/png', 32, 32, 24,
                       'http://172.25.3.103:52323/MediaRenderer_32x32.png')
        ]

        self.namespaces['dlna'] = 'urn:schemas-dlna-org:device-1-0'
        self.extras['dlna:X_DLNADOC'] = 'DMS-1.50'
Пример #7
0
    def __init__(self):
        Device.__init__(self)

        self.uuid = '2fac1234-31f8-11b4-a222-08002b34c003'

        self.connectionManager = MSConnectionManager()
        self.contentDirectory = MSContentDirectory()
        self.mediaReceiverRegistrar = MSMediaReceiverRegistrar()

        self.services = [
            self.connectionManager,
            self.contentDirectory,
            self.mediaReceiverRegistrar
        ]

        self.icons = [
            DeviceIcon('image/png', 32, 32, 24,
                       'http://172.25.3.103:52323/MediaRenderer_32x32.png')
        ]

        self.namespaces['dlna'] = 'urn:schemas-dlna-org:device-1-0'
        self.extras['dlna:X_DLNADOC'] = 'DMS-1.50'
Пример #8
0
    def __init__(self):
        Device.__init__(self)

        self.uuid = '5df70325-829a-4c85-ba8c-cdb9e9b4aacf'
        # self.connectionManager = MSConnectionManager()

        # self.speechToTextService = MSSpeechToTextService()
        self.sendCommandService = MSSendCommandService()
        self.remoteControlService = MSRemoteControlService()
        self.services = [
            # self.connectionManager,
            self.sendCommandService,
            # self.speechToTextService,
            self.remoteControlService
        ]

        self.icons = [
            DeviceIcon('image/png', 32, 32, 24,
                       'http://172.25.3.103:52323/MediaRenderer_32x32.png')
        ]

        self.namespaces['dlna'] = 'urn:schemas-dlna-org:device-1-0'
        self.extras['dlna:X_DLNADOC'] = 'DMS-1.50'
Пример #9
0
    def __init__(self, address):
        Device.__init__(self)
        #super(Device, self).__init__()

        self.uuid = '2fac1234-31f8-11b4-a222-08002b34c003'

        self.tmApplicationServer = TmApplicationServer()
        self.tmNotificationServer = TmNotificationServer()
        self.tmClientProfile = TmClientProfile()

        self.services = [
            self.tmApplicationServer,
            self.tmNotificationServer,
            self.tmClientProfile,
        ]

        self.icons = [
            DeviceIcon('image/png', 48, 48, 24,
                       'http://{}:8000/icon.png'.format(address))
        ]

        self.namespaces[''] = 'urn:schemas-upnp-org:device-1-0'

        #self.extras['X_Signature'] = 'TODO'      # TODO: Which version?
        #self.extras['X_presentations'] = 'TODO'  # Version 1.2 and forwards

        # Build version info
        linkVersion = et.Element('X_mirrorLinkVersion')
        major = make_element('majorVersion', '1')
        minor = make_element('minorVersion', '0')
        linkVersion.append(major)
        linkVersion.append(minor)

        # TODO: Signature

        # List additional elements
        self.extraElements = [linkVersion]