Esempio n. 1
0
def _set_property_for_device(device_id, property_id, value):
    device_id = str(device_id)
    property_id = str(property_id)
    value = str(value)
    mmc.setProperty(device_id, property_id, value)
    mmc.waitForDevice(device_id)
    return mmc.getProperty(device_id, property_id)
Esempio n. 2
0
def _set_binning(binning_value):
    if (_is_camera_available()):
	mmc.setProperty(mmc.getCameraDevice(),
                        MMCorePy.g_Keyword_Binning,
                        binning_value)
	return mmc.getProperty(mmc.getCameraDevice(),
                               MMCorePy.g_Keyword_Binning)
Esempio n. 3
0
def _get_property_for_device(device_id, property_id):
    device_id = str(device_id)
    property_id = str(property_id)
    property_type = mmc.getPropertyType(device_id, property_id)
    property_value = mmc.getProperty(device_id, property_id)

    device_property = MmAnywhere_pb2.MmDeviceProperty()
    device_property.propertyId = property_id
    device_property.propertyLabel = property_id
    device_property.propertyType = mm_util.get_property_type_str(property_type)
    device_property.propertyValue = property_value
    device_property.propertyUrl = url_for('devices.get_device_property',
                                          device_id=device_id,
                                          property_id=property_id)

    return device_property
Esempio n. 4
0
def get_binning():
    return mmc.getProperty(mmc.getCameraDevice(),
                           MMCorePy.g_Keyword_Binning)