Dear all,

I'm currently extending an existing Tango DS, written in Python and originally created with Pogo 6. It overwrites dev_state. Now in the newer Pogo versions, dev_state is in the template by standard. But I absolutely don't understand what was the intention of the stub code:

    def dev_state(self):
        """ This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller.
        :return: State Code
        :rtype: PyTango.CmdArgType.DevState
        """
        self.debug_stream("In dev_state()")
        argout = PyTango.DevState.UNKNOWN
        #—– PROTECTED REGION ID(P11Energy.State) ENABLED START —–#

        #—– PROTECTED REGION END —–#      //      P11Energy.State
        if argout != PyTango.DevState.ALARM:
            PyTango.Device_4Impl.dev_state(self)
        return self.get_state()

Obviously this doesn't work at all. Somebody already stumbled across this here. self.set_state(argout) would render the thing functional, but even then I feel that it performs its task with maximum effort.

Can you change the template in following versions or explain me the idea behind it?

Jan