epics-base / p4p

Python bindings for the PVAccess network client and server.
BSD 3-Clause "New" or "Revised" License
27 stars 38 forks source link

Add additional callbacks for SharedPV handlers #155

Open Monarda opened 3 months ago

Monarda commented 3 months ago

This PR adds three new callback functions for use by SharedPV (p4p.server.raw) handlers. They are:

The associated changes to the p4p.server.raw.Handler class, additional new decorators, and unit tests (src/p4p/test/test_sharedpv.py) are included. The changes to src/p4p/server/raw.py are relatively minor but the examples and unit tests make this look like a much bigger PR! There was some initial discussion of the idea at #150.

Three examples that make use of the new callback functions are also included:

I believe the example/persist.py file probably makes the strongest case for the kind of new features that these callbacks allow or make easier.

Breaking Changes

I believe these changes may be considered largely backwards compatible. They will only cause compatibility issues:

Monarda commented 1 month ago

It was suggested at a meeting on 9 Oct that I tag @coretl and @AlexanderWells-diamond for attention or review. Apologies if this comes as a surprise!