Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define methods to obtain properties of the interfaces #44

Open
harlem88 opened this issue Mar 12, 2024 · 1 comment
Open

Define methods to obtain properties of the interfaces #44

harlem88 opened this issue Mar 12, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@harlem88
Copy link
Collaborator

  • property( interface: str, path: str) -> value
  • interface_props( interface: str ) -> [{ value, path }]
  • all_props() -> [{interface, [{ value, path }]}]
@harlem88 harlem88 added the enhancement New feature or request label Mar 12, 2024
@harlem88 harlem88 modified the milestone: v0.6 Mar 12, 2024
@harlem88 harlem88 added this to the v0.8 milestone Dec 2, 2024
@rgallor
Copy link
Collaborator

rgallor commented Dec 4, 2024

Thinking about the new methods, It could be useful to return the interface (major) version and ownership, to simplify further checks on the returned values.

In idea of the possible implementation could be the following:

  • all_props() -> AllProps
  • interface_props( interface: str) -> Interface
  • property( interface: str, path: str) -> AstarteValue

where:

message AllProps {
     map<string, Interface> values = 1;
}

message Interface {
     Ownership ownership = 1;
     int32 version_major = 2;
     repeated StoredProp = 3;
}

message Ownership {
    Device = 1;
    Server = 2;
}

message StoredProp {
     string path = 1;
     AstarteValue value = 2;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants