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

Evo status #18

Merged
merged 14 commits into from Nov 30, 2018
Merged

Evo status #18

merged 14 commits into from Nov 30, 2018

Conversation

yozik04
Copy link
Collaborator

@yozik04 yozik04 commented Nov 21, 2018

New pull request from a branch in your repo.

I continue to move stuff out of paradox.py.

I have decided to split evo status parsing to separate branch as it touches sp/mg stuff as well. Maybe we need some changes before merging.

@jpbarraca Please take a look.

By the way. What is cfg.BUSES? EVO probably does not have it.
As it does not have REPEATERS and KEYPADS.
I probably need to add MODULES to the config.

jevgenik added 2 commits November 21, 2018 21:23
Evo status requests and detail parsing. No handling yet.
Evo label requests use constrains from the config file.
@jpbarraca
Copy link
Collaborator

cfg.BUSES and so on, refer to the additional BUSES, MODULES, etc... which can be connected and can issue events. They are probably not used in the code yet. The purpose was to ignore some components (like we can ignore zones and partitions).

The paradox.py file should keep common stuff and all the rest should be in the appropriate panel. It may be possible that the panels are very specific and much of the code will be there... This will bring some problems when keeping functionality synchronized.

I will take a look during the next days.

@jpbarraca
Copy link
Collaborator

I think that it could make sense to further split the different EVO panels into separate files, inheriting from a EVOPanel Class.

For the sake of modularity and to keep the code well structure I have nothing against further divisions. I think we should exploit commonalities as much as possible, and the strings and enums used in the messages should follow a similar style. Later we may want to translate them.

@@ -58,18 +61,22 @@ def update_labels(self):
pulse=False)

# Zones
eeprom_zone_ranges = [range(MEM_ZONE_48_START, MEM_ZONE_48_END, 0x10)]
eeprom_zone_addresses = list(range(MEM_ZONE_48_START, MEM_ZONE_48_END, 0x10))
if self.product_id in ['DIGIPLEX_EVO_96', 'DIGIPLEX_EVO_192']:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have conditional logic or create a subclass for each panel?

else:
raise e

def update_labels(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have common things in the different panels, a better approach would be to have a structure with the addresses, and put the common elements in the parent class. At least zones and partition labels will be common.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EVO192 zones are divided in two non continuous address ranges. Will need to add support for an array of ranges.

Partition names are in some structure where each next partition label is after 107 bytes from beginning of previous. But label length is always 16 bytes. Probably size is bad name in mem_map then. It is not size, but shift or offset ?
Same thing for PGMs.

@jpbarraca
Copy link
Collaborator

I started merging both approaches and will update this PR in the next days.
My approach is to create a mem_map for each panel, moving up the update/status logic.

jpbarraca and others added 4 commits November 23, 2018 15:11
Without pauses "update labels" partially fails as it receives events instead of replies.
@yozik04
Copy link
Collaborator Author

yozik04 commented Nov 25, 2018

Would be good to limit amount of zones, users fetched from memory.

@yozik04
Copy link
Collaborator Author

yozik04 commented Nov 25, 2018

On EVO192 it takes 20 seconds to read all labels of zones, partitions, PGMs, users, doors and modules via IP module.

I do not read all users now. Only 256 of 999. No idea where users above 256 users are in memory. So it will take more time in future.

@jpbarraca
Copy link
Collaborator

In a MG5050 it is similar (the time). Can you use the USERS conf parameter to restrict the users loaded? Many places will have less than 10.

Draft state parsing for EVO.
EVO status cache caches memory blocks. Probably cache needs to move to panel class.
Subparsers instead of adapters for Zones and Partitions.
lib, lib64 removed from ignore list.
@jpbarraca
Copy link
Collaborator

Everything is working with MG/SP.

@yozik04 yozik04 merged commit ef785a8 into master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants