diff --git a/src/metadata_manager/MetadataManager.py b/src/metadata_manager/MetadataManager.py index 5376769bff7974412cf8d8f11c1feb097e54bb29..84c7edcc8b0d3084dc460319dc6cc7676d5e52e1 100644 --- a/src/metadata_manager/MetadataManager.py +++ b/src/metadata_manager/MetadataManager.py @@ -683,36 +683,74 @@ class MetadataManager (tango.LatestDeviceImpl): sys.excepthook(*sys.exc_info()) pass - def notifyBeamlineInfo(self, message_with_tags): + # Beamline notifications + def notifyBeamlineInfo(self, message): + self.sendNotification("notification", "info", message) + + def notifyBeamlineDebug(self, message): + self.sendNotification("notification", "debug", message) + + def notifyBeamlineCommand(self, message): + self.sendNotification("notification", "commandLine", message) + + def notifyBeamlineError(self, message): + self.sendNotification("notification", "error", message) + + def userBeamlineComment(self, message): + self.sendNotification("annotation", "comment", message) + + # Beamline notifications with tags + def notifyBeamlineInfoWithTags(self, message_with_tags): self.sendNotification("notification", "info", message_with_tags) - def notifyBeamlineDebug(self, message_with_tags): + def notifyBeamlineDebugWithTags(self, message_with_tags): self.sendNotification("notification", "debug", message_with_tags) - def notifyBeamlineCommand(self, message_with_tags): + def notifyBeamlineCommandWithTags(self, message_with_tags): self.sendNotification("notification", "commandLine", message_with_tags) - def notifyBeamlineError(self, message_with_tags): + def notifyBeamlineErrorWithTags(self, message_with_tags): self.sendNotification("notification", "error", message_with_tags) - def userBeamlineComment(self, message_with_tags): + def userBeamlineCommentWithTags(self, message_with_tags): self.sendNotification("annotation", "comment", message_with_tags) - def notifyInfo(self, message_with_tags): + # This keeps backward compatibility + def notifyInfo(self, message): + self.sendNotification("notification", "info", message, proposal=str(self.get_proposal())) + + def notifyDebug(self, message): + self.sendNotification("notification", "debug", message, proposal=str(self.get_proposal())) + + def notifyCommand(self, message): + self.sendNotification("notification", "commandLine", message, proposal=str(self.get_proposal())) + + def notifyError(self, message): + self.sendNotification("notification", "error", message, proposal=str(self.get_proposal())) + + def userComment(self, message): + self.sendNotification("annotation", "comment", message, proposal=str(self.get_proposal())) + + # This keeps backward compatibility + def notifyInfoWithTags(self, message_with_tags): self.sendNotification("notification", "info", message_with_tags, proposal=str(self.get_proposal())) - def notifyDebug(self, message_with_tags): + def notifyDebugWithTags(self, message_with_tags): self.sendNotification("notification", "debug", message_with_tags, proposal=str(self.get_proposal())) - def notifyCommand(self, message_with_tags): + def notifyCommandWithTags(self, message_with_tags): self.sendNotification("notification", "commandLine", message_with_tags, proposal=str(self.get_proposal())) - def notifyError(self, message_with_tags): + def notifyErrorWithTags(self, message_with_tags): self.sendNotification("notification", "error", message_with_tags, proposal=str(self.get_proposal())) - def userComment(self, message_with_tags): + def userCommentWithTags(self, message_with_tags): self.sendNotification("annotation", "comment", message_with_tags, proposal=str(self.get_proposal())) + + + + def InterruptDataset(self): self.debug_stream("In InterruptDataset()") self.endDate = datetime.now() @@ -1191,36 +1229,72 @@ class MetadataManagerClass(tango.DeviceClass): 'uploadBase64': [[tango.DevString, "Message"], [tango.DevVoid, "none"]], + 'notifyError': - [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [[tango.DevString, "Message"], [tango.DevVoid, "none"]], 'notifyInfo': - [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [[tango.DevString, "Message"], [tango.DevVoid, "none"]], 'notifyDebug': - [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [[tango.DevString, "Message"], [tango.DevVoid, "none"]], 'notifyCommand': - [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [[tango.DevString, "Message"], [tango.DevVoid, "none"]], 'userComment': + [[tango.DevString, "Message"], + [tango.DevVoid, "none"]], + + + 'notifyErrorWithTags': + [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [tango.DevVoid, "none"]], + 'notifyInfoWithTags': [[tango.DevVarStringArray, "Message, optionally followed by tags"], [tango.DevVoid, "none"]], - 'notifyBeamlineError': + 'notifyDebugWithTags': + [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [tango.DevVoid, "none"]], + 'notifyCommandWithTags': + [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [tango.DevVoid, "none"]], + 'userCommentWithTags': + [[tango.DevVarStringArray, "Message, optionally followed by tags"], + [tango.DevVoid, "none"]], + + 'notifyBeamlineErrorWithTags': [[tango.DevVarStringArray, "Message, optionally followed by tags"], [tango.DevVoid, "none"]], - 'notifyBeamlineInfo': + 'notifyBeamlineInfoWithTags': [[tango.DevVarStringArray, "Message, optionally followed by tags"], [tango.DevVoid, "none"]], - 'notifyBeamlineDebug': + 'notifyBeamlineDebugWithTags': [[tango.DevVarStringArray, "Message, optionally followed by tags"], [tango.DevVoid, "none"]], - 'notifyBeamlineCommand': + 'notifyBeamlineCommandWithTags': [[tango.DevVarStringArray, "Message, optionally followed by tags"], [tango.DevVoid, "none"]], - 'userBeamlineComment': + 'userBeamlineCommentWithTags': [[tango.DevVarStringArray, "Message, optionally followed by tags"], [tango.DevVoid, "none"]], + + 'notifyBeamlineError': + [[tango.DevString, "Message"], + [tango.DevVoid, "none"]], + 'notifyBeamlineInfo': + [[tango.DevString, "Message"], + [tango.DevVoid, "none"]], + 'notifyBeamlineDebug': + [[tango.DevString, "Message"], + [tango.DevVoid, "none"]], + 'notifyBeamlineCommand': + [[tango.DevString, "Message"], + [tango.DevVoid, "none"]], + 'userBeamlineComment': + [[tango.DevString, "Message"], + [tango.DevVoid, "none"]], + "SetParameters": [ [tango.DevString, "JSON-representation of a parameter dictionary (overwrites)"], [tango.DevVoid, "none"],