Skip to content

0.11.0a1

Pre-release
Pre-release

Choose a tag to compare

@GDYendell GDYendell released this 30 Oct 16:57
· 45 commits to main since this release
9990065

Summary

  • Updater, Sender and Handler have been replaced with AttributeIO and AttributeIORef
    • This removes the circular dependency of Controller -> Attribute -> Handler -> Controller and simplifies the API for writing drivers
  • TransportOptions and TransportAdapter merged into Transport. Transports are now constructed with options and passed into FastCS directly
  • Backend merged into FastCS
  • SubControllers have been removed. There is now no special handling required for controllers that will be registered as sub controllers - Controller can be registered as a sub controller.
  • Controllers are now attributes of a parent Controller and can be registered and accessed with the dot accessor
  • @put methods have been removed
  • New Controller.disconnect hook added to allow clean up just before the application stops
  • New logging and tracing frameworks
    • Use fastcs.logging.logger for debug, info, warning, error with nice formatting
    • Call fastcs.logging.configure_logging to enable logging (default level info)
    • Use Tracer for trace level logging that can be configured on the console at runtime per object (e.g. attr.enable_tracing()). Some classes (Attribute, AttributeIO, Controller) inherit this, so they have self.log_event for trace messages. For other cases inherit Tracer or add a module level Tracer
    • Call fastcs.logging.configure_logging(LogLevel.TRACE) so that enabled trace logging is displayed
  • Attribute(description=) will now be passed to pvi to use as the label hover text

Breaking Changes

  • Packaging
    • Update fastcs requirement to include the desired transports, e.g. fastcs[epicsca]
  • Handlers
    • Split classes inheriting Updater / Sender / Handler into AttributeIORef with the static properties and AttributeIO with update and send (previously put) methods
    • Remove initialise method
    • Update Controller to create instances of the AttributeIOs required by its attributes. Pass down to any sub controllers that also need them. The connection used by the IO can be passed in at this point (or anything else required) to use in update and send instead of being passed the whole controller
    • Update created attributes to take io_ref=MyAttributeIORef() instead of handler/sender/updater=MyHandler()
  • Attributes
    • Remove SimpleHandler() from attributes - this is now the default behavior if an attribute is not passed io_ref
    • Change attr.set -> attr.update
    • Change attr.process -> attr.put(sync_setpoint=True)
    • Change attr.process_without_display_update -> attr.put
    • Change attr.update_display_without_process -> attr.put
    • Change attr.add_on_set_callback -> attr.add_on_update_callback
    • Change attr.add_write_display_callback -> attr.add_sync_setpoint_callback
    • Change attr.add_process_callback -> attr.add_on_put_callback
  • Transport
    • Update to pass (e.g.) EpicsCATransport instead of EpicsTransportOptions, with the same arguments, to FastCS
    • Remove calls to create_docs and create_gui. If options for these are provided then these methods will be called automatically
  • SubController
    • Update any classes inheriting SubController to inherit Controller
    • Change register_sub_controller -> add_sub_controller or assignment with the dot accessor (self.<sub_controller_name> = <sub_controller>)

What's Changed

New Contributors

Full Changelog: 0.10.1...0.11.0a1