Skip to content

reduce use of properties for functionality covered by methods #30

@artmeln

Description

@artmeln

I think the relationship between method calls and properties is confusing and can be improved in a future version of MM. Here are two examples that illustrate my point:
- using a minimal (no properties defined) XY stage adapter, there is no way to define position limits. To set limits, one has to create corresponding properties ("PositionX" and "PositionY") but these names are not standard. As a result, any script that looks at position limits may not be fully portable.
- a minimal adapter for a 1D stage device does not allow setting the position of this device from the GUI. To get access to the stage position, I have to create a corresponding property which again can have any name making scripts not portable.

Perhaps, a stricter set of guidelines for implementing a new adapter would be useful, something along the lines of:

  1. Implement all methods (including GetLimitsUm, Move, etc) even if they simply return DEVICE_UNSUPPORTED_COMMAND. [All of these methods should be exposed at the wrapper level]
  2. When implementing a device adapter, avoid creating properties with functionality overlapping with existing method calls (such as PositionX for XYStage);
  3. If properties are created, use names from the list of existing property names whenever possible. Such a list already exists in MMDeviceConstants.h but perhaps it could be formally maintained and made visible to the wrapper layer as well.

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