Skip to content

Support property read based on state machine state #106

@VigneshVSV

Description

@VigneshVSV

We only support property write based on state machine state, not property read. But there is definitely no real harm in providing a possibility for property reads based on state machine state (although mostly I have come across only one use case which is not worth discussing here).

This will be harder to achieve without an operation metadata while specifying the allowed properties or actions in a given state.

Rough steps:

  • Define an API how we should give operation metadata to the state machine per property or action (per state). It should be possible to go back to the simpler API that we have now, where only properties and actions are specified (therefore invokeAction and writeProperty is constrained)
  • Use this operation metadata while executing the operation based on state machine state (in external_call for action & external_set for property) to make the decision
  • add tests and docs

Its better to agree within the comments what this API will look like before implementing this. The current usage of the state machine can be seen in the docs - https://docs.hololinked.dev/beginners-guide/articles/state-machine/ and the code itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersintermediateintermediate level good first issues, might be little harder to complete

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions