Main Content

rmmavlinkkeys

Remove MAVLink key from MATLAB session

Since R2023a

    Description

    rmmavlinkkeys(keyname) removes the MAVLink key keyname from the current MATLAB® session. Use MAVLink keys in signing channels for message signing. See the mavlinksigning object for more details.

    example

    Examples

    collapse all

    Check the contents of the keys.env file. The file contains two keys. Key1 is a 32-element uint8 vector and Key2 is a 32-element uint8 vector encoded using base 64 encoding using the matlab.net.base64encode function.

    type keys.env
    Key1 = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32]
    Key2_Base64 = "1xOIT/+tTcjdXaCH794ihyStgzxDll+ZLw3SAzolIu0=" 
    

    Add the MAVLink keys from the file keys.env file to the MATLAB session.

    addmavlinkkeys("keys.env")

    List all of the keys in the current MATLAB session.

    keys = lsmavlinkkeys
    keys = 1x2 string
        "Key1"    "Key2"
    
    

    Remove both the Key and Key_Base64 MAVLink keys.

    rmmavlinkkeys(["Key1","Key2"])

    Input Arguments

    collapse all

    MAVLink key to remove from the MATLAB session, specified as a string scalar, string array, or character vector. Specify a string array to remove multiple keys from the MATLAB session simultaneously.

    Example: rmmavlinkkeys(["Key1","Key2"]) removes the MAVLink keys Key1 and Key2 from the MATLAB session.

    Data Types: string | char

    Version History

    Introduced in R2023a