Exemplo n.º 1
0
class TestStarting(BaseTestServeDevices):
    DEVICES = [
        device(TestCamera, '127.0.0.1', 8001, {'buffer_length': 0}),
        device(TestFilterWheel, '127.0.0.1', 8003,
               {'filters': [(0, 'GFP', 525), (1, 'RFP'), (2, 'Cy5')]}),
    ]

    def test_standard(self):
        """Simplest case, start and exit, given enough time to start all devices"""
        time.sleep(2)
        self.assertTrue(self.p.is_alive(), "service dies at start")

    def test_immediate_interrupt(self):
        """Check issues on SIGTERM before starting all devices"""
        pass
Exemplo n.º 2
0
class TestClashingArguments(BaseTestServeDevices):
    """Device server and device constructor arguments do not clash"""
    DEVICES = [
        device(DeviceWithPort, '127.0.0.1', 8000, {'port' : 7000}),
    ]
    def test_port_conflict(self):
        time.sleep(2)
        client = microscope.clients.Client('PYRO:[email protected]:8000')
        self.assertEqual(client.port, 7000)
Exemplo n.º 3
0
#!/usr/bin/python
"""Configuratin file for microscope.deviceserver.

Import device classes, then define entries in DEVICES as:
   devices(CLASS, HOST, PORT, other_args)
"""
# Function to create record for each device.
from microscope.devices import device
# Import device modules/classes here.
import microscope.testsuite.devices as testdevices

DEVICES = [
    device(
        testdevices.TestCamera,
        '127.0.0.1',
        8000,
    ),
    device(testdevices.TestLaser, '127.0.0.1', 8001),
]
from microscope.devices import device
from microscope.mirror.alpao import AlpaoDeformableMirror
from microscope.cameras.ximeaCam import XimeaCamera
from microAO.aoDev import AdaptiveOpticsDevice

mirror_args = [AlpaoDeformableMirror, '192.168.1.20', 8007]
camera_args = [XimeaCamera, '192.168.1.20', 8008]

DEVICES = [
    device(*mirror_args, serial_number='BIL103'),
    device(*camera_args),
    device(AdaptiveOpticsDevice,
           '192.168.1.20',
           8009,
           camera_uri=camera_args,
           mirror_uri=mirror_args)
]
from microscope.devices import device
from microscope.mirror.alpao import AlpaoDeformableMirror
from microscope.cameras.pvcam import PVCamera

DEVICES = [
    device(PVCamera, '192.168.1.20', 8009),
    device(XimeaCamera, '192.168.1.20', 8008)
]
from microscope.devices import device
from microscope.mirror.alpao import AlpaoDeformableMirror
from microscope.cameras.ximeaCam import XimeaCamera
from microscope.cameras.pvcam import PVCamera

DEVICES = [
    device(AlpaoDeformableMirror, '192.168.1.20', 8007,
           serial_number='BIL103'),
    device(XimeaCamera, '192.168.1.20', 8008)
    #device(PVCamera, '192.168.1.20', 8009 )
]
Exemplo n.º 7
0
"""Config file for devicebase.

Import device classes, then define entries in DEVICES as:
    devices(CLASS, HOST, PORT, other_args)
"""
# Function to create record for each device.
from microscope.devices import device
# Import device modules/classes here.
from microscope.testsuite.devices import TestCamera
from microscope.testsuite.devices import TestDeformableMirror
from microAO.aoDev import AdaptiveOpticsDevice

DEVICES = [
    device(TestCamera, '127.0.0.1', 8005),
    device(TestDeformableMirror, '127.0.0.1', 8006),
    device(AdaptiveOpticsDevice,
           '127.0.0.1',
           8007,
           camera_uri='PYRO:[email protected]:8005',
           mirror_uri='PYRO:[email protected]:8006')
]
Exemplo n.º 8
0
# Import required device classes
from microscope.cameras.andorsdk3 import AndorSDK3

# host is the IP address (or hostname) from where the device will be
# accessible.  If everything is on the same computer, then host will
# be '127.0.0.1'.  If devices are to be available on the network,
# then it will be the IP address on that network.
host = '10.6.19.30'

# Each element in the DEVICES list identifies a device that will be
# served on the network.  Each device is defined like so:
#
# device(cls, host, port, conf)
#     cls: class of the device that will be served
#     host: ip or hostname where the device will be accessible.
#         This will be the same value for all devices.
#     port: port number where the device will be accessible.
#         Each device must have its own port.
#     conf: a dict with the arguments to construct the device
#         instance.  See the individual class documentation.
#

DEVICES = [
    device(
        AndorSDK3, host, 8001, uid="VSC-01604"
    )  # {'transform': (0, 1, 1)}),  # timeout=1, buffer_length=, index=0,
    # device(TestCamera, host, 8005, otherargs=1,),
    # device(TestCamera, host, 8006, otherargs=1,),
]
from microscope.devices import device
from microscope.mirror.alpao import AlpaoDeformableMirror

DEVICES = [
  device(AlpaoDeformableMirror, '129.67.77.21', 8007, serial_number='BIL103'),
]
Exemplo n.º 10
0
"""Config file for devicebase.

Import device classes, then define entries in DEVICES as:
 devices(CLASS, HOST, PORT, other_args)
"""
## Function to create record for each device.
from microscope.devices import device
## Import device modules/classes here.
from microscope.lights.deepstar import DeepstarLaser
# from microscope.lasers.deepstar import DeepstarLaser
from microscope.lasers.obis import ObisLaser

DEVICES = [
           device(DeepstarLaser, '10.6.19.21', 9011, conf={'com': 'COM9', 'baud': 9600, 'timeout': 0.5}),  # Deepstar 488
           # device(ObisLaser, '10.6.19.21', 9012, conf={'com': 'COM6', 'baud': 115200, 'timeout': 2.0}),  # Obis 561
           # device(ObisLaser, '10.6.19.21', 9013, conf={'com': 'COM7', 'baud': 115200, 'timeout': 2.0}),  # Obis 642
           ]
Exemplo n.º 11
0
#!/usr/bin/python
"""Config file for devicebase.

Import device classes, then define entries in DEVICES as:
   devices(CLASS, HOST, PORT, other_args)
"""
# Function to create record for each device.
from microscope.devices import device
# Import device modules/classes here.
from microscope.cameras import testcamera
from microscope import filterwheel

DEVICES = [
  device(testcamera.TestCamera, '127.0.0.1', 8001, otherargs=1,),
  device(filterwheel.TestFilterwheel, '127.0.0.1', 8003,
         filters=[(0, 'GFP', 525), (1, 'RFP'), (2, 'Cy5')]),
]