Agent.py
def state_2(self) -> None:
        """
        at state 2 agent is recording the work process using an IP camera and awaits an
        RFID event which would stop the recording
        """

        # start the recording in the background and send the path to the video
        try:
            passport_id = self.associated_passport.passport_id
        except AttributeError as E:
            logging.error(
                f"Failed to start video recording: error retrieving associated passport ID.\n\
                self.associated_passport = {self.associated_passport}\n{E}")
            return

        # generate a video short link (a dummy for now)
        self.latest_record_short_link = url_generator.generate_short_url(self.config)[1]

        # generate a QR code with the short link
        self.latest_record_qrpic_filename = image_generation.create_qr(
            link=self.latest_record_short_link,
            config=self.config
        )

        # print the QR code onto a sticker if set to do so in the config
        if self.config["print_qr"]["enable"]:
            Printer.Task(
                picname=self.latest_record_qrpic_filename,
                config=self.config
            )

        # print the seal tag onto a sticker if set to do so in the config
        if self.config["print_security_tag"]["enable"]:
            seal_file_path = image_generation.create_seal_tag(self.config)

            Printer.Task(
                picname=seal_file_path,
                config=self.config
            )

        # start recording a video
        self.latest_record_filename = self.associated_camera.start_record(passport_id)

        at state 2 agent is recording the work process using an IP camera and awaits an
        RFID event which would stop the recording
        
at state 2 agent is recording the work process using an IP camera and awaits an
RFID event which would stop the recording
at state 2 agent is recording the work process using an IP camera and awaits an RFID event which would stop the recording
def state_2(self) -> None:
        try:
            passport_id = self.associated_passport.passport_id
        except AttributeError as E:
            logging.error(
                f"Failed to start video recording: error retrieving associated passport ID.\n\
                self.associated_passport = {self.associated_passport}\n{E}")
            return
        self.latest_record_short_link = url_generator.generate_short_url(self.config)[1]
        self.latest_record_qrpic_filename = image_generation.create_qr(
            link=self.latest_record_short_link,
            config=self.config
        )
        if self.config["print_qr"]["enable"]:
            Printer.Task(
                picname=self.latest_record_qrpic_filename,
                config=self.config
            )
        if self.config["print_security_tag"]["enable"]:
            seal_file_path = image_generation.create_seal_tag(self.config)
            Printer.Task(
                picname=seal_file_path,
                config=self.config
            )
        self.latest_record_filename = self.associated_camera.start_record(passport_id)
def state_2 ( self ) -> None : try : passport_id = self . associated_passport . passport_id except AttributeError as E : logging . error ( f"Failed to start video recording: error retrieving associated passport ID.\n\
                self.associated_passport = {self.associated_passport}\n{E}" ) return self . latest_record_short_link = url_generator . generate_short_url ( self . config ) [ 1 ] self . latest_record_qrpic_filename = image_generation . create_qr ( link = self . latest_record_short_link , config = self . config ) if self . config [ "print_qr" ] [ "enable" ] : Printer . Task ( picname = self . latest_record_qrpic_filename , config = self . config ) if self . config [ "print_security_tag" ] [ "enable" ] : seal_file_path = image_generation . create_seal_tag ( self . config ) Printer . Task ( picname = seal_file_path , config = self . config ) self . latest_record_filename = self . associated_camera . start_record ( passport_id )
at state 2 agent is recording the work process using an IP camera and awaits an
RFID event which would stop the recording
at state 2 agent is recording the work process using an IP camera and awaits an RFID event which would stop the recording
"""
        at state 2 agent is recording the work process using an IP camera and awaits an
        RFID event which would stop the recording
        """ # start the recording in the background and send the path to the video # generate a video short link (a dummy for now) # generate a QR code with the short link # print the QR code onto a sticker if set to do so in the config # print the seal tag onto a sticker if set to do so in the config # start recording a video
self