def get_cpu_state(self):
        """
        Retrieves CPU state from client
        """
        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
Retrieves CPU state from client