Skip to content

Standardized device properties #258

@henrypinkard

Description

@henrypinkard

Based on discussions @marktsuchida and I have had and related to the camera API upgrade (#243).

We need to come up with a better mechanism for standardized device properties. This issue to is to solicit ideas about how best to do this.

At a high level this is because:

Properties are very useful for capturing certain types of data and functionality, and it creates unnecessary work and the potential to introduce errors when you have to recreate this functionality for property-like device API calls. For example, creating methods GetX(), HasX(), GetXMaxValue() etc. for each X when all this would already exists if making X a property.

However, simply using a property for a required feature of the API doesn't work well as present. It is not clear to device adapter authors or high level code users that certain properties are required as opposed to device specific. Exposure and Binning properties are both required, but inconsistently implemented in part as a result of these shortcomings (see #38 for more info about binning and how to fix it).

Exposure and Binning have both properties and API calls. This seems likely to have resulted from the fact that functions in MM control the generic API for devices, while properties (usually) enable functionality unique to specific devices. This duplicate functionality may have been present so that exposure could be included in config groups, to assist with switching channels etc.

The camera API has also made apparent some shortcomings of the property system. Several features related to camera triggering will be implemented following the GenICam specification as closely as possible. The most natural way to do this will be through standardized properties, and on many cameras this will create 50-70 new properties because of all the combinations of trigger types and settings. For example:

FrameStartTriggerMode: On
FrameStartTriggerSource: Hardware
FrameStartTriggerDelay: 5
ExposureEndTriggerMode: Off
etc...

What needs to be added to properties?

A mechanism to group logically related properties. Ideally in some kind of hierarchy. For example: Triggers//FrameStart//Mode: On. A simple way of achieving this could be to designate a special character or sequence or characters to denote a new level in the hierarchy (e.g. //). This would allow UIs to group properties in a way that would be much easier to work with.

Mechanisms and conventions to discriminate:

  • Required properties with a standard name (and maybe standard values) that every device of a certain type must implement. E.g. exposure for cameras. Implementing this may involve creating virtual properties in MMCore or MMDevice to throw compile-time errors for missing requirements.
  • Standardized properties that a device may or may not implement, but if they do they should have a standardized name (and maybe standard values). A lot of trigger properties will fall under this category because not every camera will support them, but if they do, this standardization is needed for a future acquisition engine to automate hardware triggering
  • Custom properties that lie outside of these standards and are device-specific. These should be disallowed from using names that belong to standardized/required properties.

A possible way to do this is to create functions for creating each type, which will make it clearer to device adapter developers. That is, each required/standard property will have a dedicated function like CreateExposureProperty.

On the user side, maybe also have dedicated functions for querying required properties in the mold of core.getExposure(), or something like getRequiredPropertyLowerLimit()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions