code: def get_cpu_state(self):
          
          state = c_int(0)
          self.library.Cli_GetPlcStatus(self.pointer,byref(state))
          
          try:
              status_string = cpu_statuses[state.value]
          except KeyError:
              status_string = None
          
          if not status_string:
              raise Snap7Exception("The cpu state (%s) is invalid" % state.value)
          
          logger.debug("CPU state is %s" % status_string)
          return status_string
docs: Retrieves CPU state from client