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

Configure the device to manually push events #141

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kmadisa
Copy link
Contributor

@kmadisa kmadisa commented Jul 27, 2021

TODO...

Screenshots or code snippets (if appropriate):

Definition of Done Checklist

  • Code meets our python style guidelines?
  • Unit tested (coded, passed, included)?
  • Requested at least 2 reviewers?
  • Commented code, particularly in hard-to-understand areas?
  • Made corresponding changes to the documentation (e.g. Python documentation, System Engineering Documentation, version description updates, README file, etc)?

JIRA: JIRA_ISSUE_NUMBER

> DevState can be used differently by developers. It is best that we don't force it on them on how to implement/handle their device state. This resulted in errornous behaviour for developers that expect the device to work fine when DevState is set to OFF.
@kmadisa kmadisa self-assigned this Jul 27, 2021
@kmadisa kmadisa linked an issue Jul 27, 2021 that may be closed by this pull request
@kmadisa
Copy link
Contributor Author

kmadisa commented Jul 29, 2021

  • Update the SimDD json schema file to include a property(ies) that signifies that the device server will push attribute events.
  • Create an example SimDD json file that shows usage of the global option and overriding the global option using the attribute config property.
  • Update the SimDD file parser.
  • Write a simple simulator python class that extends the behaviour of the generated simulator, with command handlers that push events.
  • Write a test(s) that shows that the client can receive the pushed events as specified in the SimDD.json file.

kmadisa added 2 commits March 2, 2022 15:43
This adds the following two properties:
  - push_archive_events
  - push_change_events

that will be used to indicate whether the server should push these events manually. The properties can be set globally to have the server push events
for all attributes, but they can also be set on the attribute to override the global setting.

Signed-off-by: Katleho Madisa <[email protected]>
@kmadisa kmadisa force-pushed the kmadisa/SAR-245/Configure-device-server-to-manually-push-events branch from 5c31439 to ee33829 Compare March 2, 2022 14:31
kmadisa added 2 commits March 3, 2022 15:54
This config file defines a simple test device with 4 attributes. It has the global properties set to true: that is the push_archive_events, and the push_change_events properties.
The global values are overriden in the defined attributes:
    - attribute1 uses the global values for both push archive and change events, respectively.
    - attribute2 uses the global value for the push archive events but overrides the push change events value.
    - attribute3 overrides the global push archive events value, but uses the global value for the push change events.
    - attribute4 overrides the global values for both the push archive and change events, respectively.

I have also added a unit test to check that the SimDD.json files conforms to the SimDD.schema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable the device server push events manually
1 participant