Agent.py
def state_3(self) -> None:
        """
        then the agent receives an RFID event, recording is stopped and published to IPFS.
        Passport is dumped and also published into IPFS, it's checksum is stored in Robonomics.
        A short link is generated for the video and gets encoded in a QR code, which is printed on a sticker.
        When everything is done, background pinning of the files is started, own state is changed to 0.
        """

        # stop recording and save the file
        self.associated_camera.stop_record()

        # publish video into IPFS and pin to Pinata
        # update the short link to point to an actual recording
        ipfs_hash = ipfs.send(
            filename=self.latest_record_filename,
            qrpic=self.latest_record_qrpic_filename,
            config=self.config,
            keyword=self.latest_record_short_link.split('/')[-1]
        )

        # add video IPFS hash to the passport
        self.associated_passport.end_session([ipfs_hash])

        # save the passport into a file
        self.associated_passport.export_yaml()

        # change own state back to 0
        self.state = 0

        then the agent receives an RFID event, recording is stopped and published to IPFS.
        Passport is dumped and also published into IPFS, it's checksum is stored in Robonomics.
        A short link is generated for the video and gets encoded in a QR code, which is printed on a sticker.
        When everything is done, background pinning of the files is started, own state is changed to 0.
        
then the agent receives an RFID event, recording is stopped and published to IPFS.
Passport is dumped and also published into IPFS, it's checksum is stored in Robonomics.
A short link is generated for the video and gets encoded in a QR code, which is printed on a sticker.
When everything is done, background pinning of the files is started, own state is changed to 0.
then the agent receives an RFID event recording is stopped and published to IPFS . Passport is dumped and also published into IPFS it ' s checksum is stored in Robonomics . A short link is generated for the video and gets encoded in a QR code which is printed on a sticker . When everything is done background pinning of the files is started own state is changed to 0 .
def state_3(self) -> None:
        self.associated_camera.stop_record()
        ipfs_hash = ipfs.send(
            filename=self.latest_record_filename,
            qrpic=self.latest_record_qrpic_filename,
            config=self.config,
            keyword=self.latest_record_short_link.split('/')[-1]
        )
        self.associated_passport.end_session([ipfs_hash])
        self.associated_passport.export_yaml()
        self.state = 0
def state_3 ( self ) -> None : self . associated_camera . stop_record ( ) ipfs_hash = ipfs . send ( filename = self . latest_record_filename , qrpic = self . latest_record_qrpic_filename , config = self . config , keyword = self . latest_record_short_link . split ( '/' ) [ - 1 ] ) self . associated_passport . end_session ( [ ipfs_hash ] ) self . associated_passport . export_yaml ( ) self . state = 0
then the agent receives an RFID event, recording is stopped and published to IPFS.
then the agent receives an RFID event recording is stopped and published to IPFS .
"""
        then the agent receives an RFID event, recording is stopped and published to IPFS.
        Passport is dumped and also published into IPFS, it's checksum is stored in Robonomics.
        A short link is generated for the video and gets encoded in a QR code, which is printed on a sticker.
        When everything is done, background pinning of the files is started, own state is changed to 0.
        """ # stop recording and save the file # publish video into IPFS and pin to Pinata # update the short link to point to an actual recording # add video IPFS hash to the passport # save the passport into a file # change own state back to 0
self