Main Content

lsmavlinkkeys

List MAVLink keys in MATLAB session

Since R2023a

    Description

    example

    keynames = lsmavlinkkeys lists all MAVLink keys in the current MATLAB® session. Use MAVLink keys in signing channels for message signing. See the mavlinksigning object for more details.

    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"])

    Output Arguments

    collapse all

    MAVLink keys in the MATLAB session, returned as a string scalar or string array.

    Version History

    Introduced in R2023a