<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, message):
 """ Updates the states in the primary AlarmDecoder object based on the LRR message provided. :param message: LRR message object :type message: :py:class:`~alarmdecoder.messages.LRRMessage` """

        # Firmware version < 2.2a.8.6
        if message.version == 1:
            if message.event_type == 'ALARM_PANIC':
                self._alarmdecoder._update_panic_status(True)
                
            elif message.event_type == 'CANCEL':
                self._alarmdecoder._update_panic_status(False)

        # Firmware version >= 2.2a.8.6
        elif message.version == 2:
            source = message.event_source
            if source == LRR_EVENT_TYPE.CID:
                self._handle_cid_message(message)
            elif source == LRR_EVENT_TYPE.DSC:
                self._handle_dsc_message(message)
            elif source == LRR_EVENT_TYPE.ADEMCO:
                self._handle_ademco_message(message)
            elif source == LRR_EVENT_TYPE.ALARMDECODER:
                self._handle_alarmdecoder_message(message)
            elif source == LRR_EVENT_TYPE.UNKNOWN:
                self._handle_unknown_message(message)
            else:
                pass