addChannel
Description
Examples
Add and Remove MAVLink Signing Channels
Create a mavlinksigning
object to store MAVLink signing channels.
stream = mavlinksigning;
Load and list the keys from the keys.env
file.
addmavlinkkeys("keys.env");
lsmavlinkkeys
ans = 1x2 string
"Key1" "Key2"
Add channel with a system ID of 1, component ID of 2, link ID of 3.
addChannel(stream,1,2,3,"Key1")
ans = struct with fields:
Stream: [1x1 mavlinksigning]
SystemID: 1
ComponentID: 2
LinkID: 3
Key: "Key1"
Timestamp: 30549430805844
CreationTime: 05-Sep-2024 19:31:48
Remove the same channel.
removeChannel(stream,1,2,3)
Input Arguments
stream
— MAVLink signing stream
mavlinksigning
object
MAVLink signing stream, specified as a mavlinksigning
object.
sysid
— System ID
integer in range [0, 255]
System ID, specified as an integer in the range [0, 255].
compid
— Component ID
integer in range [0, 255]
Component ID, specified as an integer in the range [0, 255].
linkid
— Link ID
integer in range [0, 255]
Link ID, specified as an integer in the range [0, 255].
keyname
— MAVLink key
string scalar
MAVLink key, specified as a string scalar.
Output Arguments
channel
— Added channel
structure
Added channel, returned as a structure containing these fields:
Stream
— Signing stream, specified bystream
.SystemID
— System ID, specified bysysid
.ComponentID
— Component ID, specified bycompid
.LinkID
— Link ID, specified bylinkid
.Key
— Key, specified bykeyname
.Timestamp
— Time passed since2015-01-01 UTC
. Unit is 10 microseconds.CreationTime
— Time of creation, specified as adatetime
array.
Version History
Introduced in R2022a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)