Source code for ska_oso_oet.event.topics

# Relax pylint in the face of some pypubsub requirements. Pypubsub topics use
# msg_src rather than self, and they define a topic hierarchy rather than a
# class hierarchy where implementation is required.
#
# pylint: disable=no-self-argument,too-few-public-methods


[docs] class request: """ Root topic for events emitted when a user or system component has made a request. """
[docs] class procedure: """ Topic for user requests related to procedures. """
[docs] class create: """ Emitted when a request to create a procedure is received. """
[docs] def msgDataSpec(msg_src, request_id, cmd): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - cmd: PrepareProcessCommand containing request parameters """
[docs] class list: """ Emitted when a request to enumerate all procedures is received. """
[docs] def msgDataSpec(msg_src, request_id, pids=None): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - pids: Procedure IDs to list """
[docs] class start: """ Emitted when a request to start procedure execution is received. """
[docs] def msgDataSpec(msg_src, request_id, cmd): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - cmd: StartProcessCommand containing request parameters """
[docs] class stop: """ Emitted when a request to stop a procedure is received. """
[docs] def msgDataSpec(msg_src, request_id, cmd): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - cmd: StartProcessCommand containing request parameters """
[docs] class activity: """ Topic for user requests related to activities. """
[docs] class run: """ Emitted when a request to run an activity is received. """
[docs] def msgDataSpec(msg_src, request_id, cmd): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - cmd: ActivityCommand containing request parameters """
[docs] class list: """ Emitted when a request to enumerate all activities is received. """
[docs] def msgDataSpec(msg_src, request_id, activity_ids=None): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - activity_ids: Activity IDs to list. """
[docs] class procedure: """ Root topic for events related to procedures. """
[docs] class lifecycle: """ Topic for events related to procedure lifecycle. """
[docs] class statechange: """ Emitted when a procedure status changes. To be amalgamated and rationalised with other lifecycle events to better handle rerunnable scripts. """
[docs] def msgDataSpec(msg_src, new_state): """ - msg_src: component from which the request originated - new_state: new state """
[docs] class stacktrace: """ Announces cause of a Procedure failure. """
[docs] def msgDataSpec(msg_src, stacktrace): """ - msg_src: component from which the request originated - stacktrace: stacktrace as a string """
[docs] class complete: """ Emitted when a Procedure has completed successfully and is no longer available to be called. """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: ID of Procedure that completed """
[docs] class created: """ Emitted when a procedure is created, i.e., a script is loaded and Python interpreter initialised. """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - result: ProcedureSummary characterising the created procedure """
[docs] class started: """ Emitted when any user function in a procedure is running, i.e., script init is called """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - result: ProcedureSummary characterising the created procedure """
[docs] class stopped: """ Emitted when a procedure stops, e.g., script completes or is aborted. """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - result: ProcedureSummary characterising the created procedure """
[docs] class failed: """ Emitted when a procedure fails. """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: component from which the event originated - request_id: unique identifier for this event - result: ProcedureSummary characterising the failed procedure """
[docs] class pool: """ Topic for events on characterisation of the process pool. """
[docs] class list: """ Emitted when current procedures and their status is enumerated. """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - result: list of ProcedureSummary instances characterising procedures and their states. """
[docs] class activity: """ Root topic for events related to activities. """
[docs] class lifecycle: """ Topic for events related to activity lifecycle. """
[docs] class running: """ Emitted when an activity starts running. """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - result: ActivitySummary characterising the running activity """
[docs] class pool: """ Topic for events on characterisation of the activity pool. """
[docs] class list: """ Emitted when current activities and their status is enumerated. """
[docs] def msgDataSpec(msg_src, request_id, result): """ - msg_src: component from which the request originated - request_id: unique identifier for this request - result: list of ActivitySummary instances characterising activites and their states. """
[docs] class user: """ UNDOCUMENTED: created as parent without specification """
[docs] class script: """ UNDOCUMENTED: created as parent without specification """
[docs] class announce: """ UNDOCUMENTED: created without spec """
[docs] def msgDataSpec(msg_src, msg): """ - msg_src: component from which the request originated - msg: user message """
[docs] class sb: """ Root topic for events emitted relating to Scheduling Blocks """
[docs] class lifecycle: """ Topic for events related to Scheduling Block lifecycle """
[docs] class allocated: """ Emitted when resources have been allocated within SB execution """
[docs] def msgDataSpec(msg_src, sb_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID """
[docs] class observation: """ Topic for events related to executing an observation within an SB """
[docs] class started: """ Emitted when an observation is started """
[docs] def msgDataSpec(msg_src, sb_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID """
[docs] class finished: """ Emitted when an observation is finished """
[docs] class succeeded: """ Emitted when an observation is finished successfully """
[docs] def msgDataSpec(msg_src, sb_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID """
[docs] class failed: """ Emitted when an error was encountered during observation execution """
[docs] def msgDataSpec(msg_src, sb_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID """
[docs] class subarray: """ Root topic for events emitted relating to individual Subarray activites """
[docs] class resources: """ Topic for events relating to Subarray resources """
[docs] class allocated: """ Emitted when resources have been allocated to a subarray """
[docs] def msgDataSpec(msg_src, subarray_id): """ - msg_src: component from which the request originated - sb_id: Subarray ID """
[docs] class deallocated: """ Emitted when resources have been deallocated from a subarray """
[docs] def msgDataSpec(msg_src, subarray_id): """ - msg_src: component from which the request originated - sb_id: Subarray ID """
[docs] class configured: """ Emitted when subarray has been configured """
[docs] def msgDataSpec(msg_src, subarray_id): """ - msg_src: component from which the request originated - sb_id: Subarray ID """
[docs] class scan: """ Topic for events emitted when a scan is run on subarray """
[docs] class started: """ Emitted when a scan is started """
[docs] def msgDataSpec(msg_src, subarray_id): """ - msg_src: component from which the request originated - sb_id: Subarray ID """
[docs] class finished: """ Emitted when a scan is finished """
[docs] def msgDataSpec(msg_src, subarray_id): """ - msg_src: component from which the request originated - sb_id: Subarray ID """
[docs] class fault: """ Topic for events emitted when subarray cannot be reached """
[docs] def msgDataSpec(msg_src, subarray_id, error): """ - msg_src: component from which the request originated - sb_id: Subarray ID - error: Error response received from Subarray """
[docs] class scan: """ Root topic for events emitted relating to Scans in the context of SB execution """
[docs] class lifecycle: """ Topic for events related to SB scan lifecycle """
[docs] class configure: """ Emitted when sub-array resources are configured for a scan """
[docs] class started: """ Emitted as scan configuration begins. """
[docs] def msgDataSpec(msg_src, sb_id, scan_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID - scan_id: Scan ID """
[docs] class complete: """ Emitted as scan configuration completes successfully. """
[docs] def msgDataSpec(msg_src, sb_id, scan_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID - scan_id: Scan ID """
[docs] class failed: """ Emitted if scan configuration fails. """
[docs] def msgDataSpec(msg_src, sb_id, scan_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID - scan_id: Scan ID """
[docs] class start: """ Emitted when resources have been allocated within SB execution """
[docs] def msgDataSpec(msg_src, sb_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID - scan_id: Scan ID """
[docs] class end: """ Emitted when a scan finishes """
[docs] class succeeded: """ Emitted when a scan completes successfully """
[docs] def msgDataSpec(msg_src, sb_id, scan_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID - scan_id: Scan ID """
[docs] class failed: """ Emitted when an error was encountered during a scan """
[docs] def msgDataSpec(msg_src, sb_id, scan_id): """ - msg_src: component from which the request originated - sb_id: Scheduling Block ID """