diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml new file mode 100644 index 000000000..476e73e51 --- /dev/null +++ b/.github/workflows/docs_deploy.yml @@ -0,0 +1,78 @@ +name: Docs + +on: + push: + branches: + - main + - 'v*' + #tags: + # - 'v*' + paths: + - 'docs/**' + pull_request: + paths: + - 'docs/**' + + workflow_dispatch: + +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + # Specify the path to lock file for correct caching + cache-dependency-path: ./docs/yarn.lock + + - name: Install dependencies + run: yarn install --frozen-lockfile --cwd ./docs + + - name: Build with VitePress + working-directory: ./docs + run: | + npm run docs:build + touch .vitepress/dist/.nojekyll + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: mavsdk_docs_build + path: docs/.vitepress/dist/ + retention-days: 1 + + deploy: + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged) }} + needs: build + runs-on: ubuntu-24.04 + + steps: + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: mavsdk_docs_build + path: ~/_book + + - name: Deploy + env: + GIT_USER: ${{ secrets.PX4BUILDBOT_USER }} + GIT_PASS: ${{ secrets.PX4BUILDBOT_PASS }} + run: | + git clone https://${{ secrets.PX4BUILDBOT_USER }}:${{ secrets.PX4BUILDBOT_ACCESSTOKEN }}@github.com/mavlink/mavsdk.mavlink.io.git + rm -rf mavsdk.mavlink.io/${{ env.BRANCH_NAME }} + mkdir -p mavsdk.mavlink.io/${{ env.BRANCH_NAME }} + cp -r ~/_book/* mavsdk.mavlink.io/${{ env.BRANCH_NAME }}/ + cd mavsdk.mavlink.io + git config user.email "bot@px4.io" + git config user.name "PX4BuildBot" + git add ${{ env.BRANCH_NAME }} + git commit -a -m "MAVSDK docs build update `date`" + git push origin master diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c3a0de25..bcdc44d7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,10 +6,14 @@ on: - 'main' tags: - 'v*' + paths-ignore: + - 'docs/**' pull_request: branches: - '*' - + paths-ignore: + - 'docs/**' + - '.github/workflows/docs_deploy.yml' jobs: coverage: diff --git a/.gitignore b/.gitignore index 46ea4c11d..8e8acf4f1 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,9 @@ cmake-build-* # mavlink repo to generate mavlink-headers mavlink mavlink-headers + + +# vitepress - Docs guide +docs/node_modules/ +docs/.vitepress/cache/ +docs/.vitepress/dist/ \ No newline at end of file diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs new file mode 100644 index 000000000..4440ad03f --- /dev/null +++ b/docs/.vitepress/config.mjs @@ -0,0 +1,203 @@ +import { defineConfig } from "vitepress"; +const getSidebar = require("./get_sidebar.js"); + +// Tabs: https://github.com/Red-Asuka/vitepress-plugin-tabs +import tabsPlugin from "@red-asuka/vitepress-plugin-tabs"; + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + title: "MAVSDK Guide", + description: "MAVSDK Guide", + base: process.env.BRANCH_NAME ? "/" + process.env.BRANCH_NAME + "/" : "", + srcExclude: [ + "de/**/*.md", + "ja/**/*.md", + "ru/**/*.md", + "tr/**/*.md", + "ko/**/*.md", + "zh/**/*.md", + "uk/**/*.md", + "**/_*.md", //Remove source docs that start with "_" (included/not rendered) + "README.md", //Remove README.md in root directory + ], + ignoreDeadLinks: true, + markdown: { + math: true, + config: (md) => { + // use more markdown-it plugins! + tabsPlugin(md); //https://github.com/Red-Asuka/vitepress-plugin-tabs + }, + }, + locales: { + en: { + label: "English", + // other locale specific properties... + themeConfig: { + sidebar: getSidebar.sidebar("en"), + + editLink: { + pattern: ({ filePath, frontmatter }) => { + if (frontmatter.newEditLink) { + //newEditLink defines a frontmatter key you can use to append a path to main + return `https://github.com/mavlink/MAVSDK/edit/main/docs/${frontmatter.newEditLink}`; + } else { + return `https://github.com/mavlink/MAVSDK/edit/main/docs/${filePath}`; + } + }, + text: "Edit on GitHub", + }, + }, + }, + + /* + zh: { + label: "中文 (Chinese)", + lang: "zh-CN", // optional, will be added as `lang` attribute on `html` tag + themeConfig: { + sidebar: getSidebar.sidebar("zh"), + }, + // other locale specific properties... + }, + ko: { + label: "한국어 (Korean)", + lang: "ko-KR", // optional, will be added as `lang` attribute on `html` tag + themeConfig: { + sidebar: getSidebar.sidebar("ko"), + }, + + // other locale specific properties... + }, + */ + }, + + // + + themeConfig: { + // https://vitepress.dev/reference/default-theme-config + siteTitle: false, + logo: { + light: "/site/logo_mavsdk_header_lightmode.png", + dark: "/site/logo_mavsdk_header_darkmode.png", + alt: "", + }, + sidebar: getSidebar.sidebar("en"), + externalLinkIcon: true, + + editLink: { + pattern: "https://crowdin.com/project/mavsdk", + text: "Edit translation on Crowdin", + }, + + search: { + provider: "local", + }, + + nav: [ + { + text: "MAVSDK", + items: [ + { + text: "Website", + link: "https://dronecode.org/sdk/", + ariaLabel: "MAVSDK website link", + }, + { + text: "Source Code", + link: "https://github.com/mavlink/MAVSDK", + }, + ], + }, + { + text: "Dronecode", + items: [ + { + text: "PX4", + link: "https://px4.io/", + }, + { + text: "QGroundControl", + link: "http://qgroundcontrol.com/", + }, + { + text: "MAVLINK", + link: "https://mavlink.io/en/", + }, + { + text: "PX4 Guide", + link: "https://docs.px4.io/main/en/index.html", + }, + { + text: "QGroundControl Guide", + link: "https://docs.qgroundcontrol.com/master/en/qgc-user-guide/", + }, + { + text: "Dronecode Camera Manager", + link: "https://camera-manager.dronecode.org/en/", + }, + ], + }, + { + text: "Support", + link: "https://discuss.px4.io/c/mavsdk/19", + }, + { + text: "Version", + items: [ + { + text: "main", + link: "https://mavsdk.mavlink.io/main/en/cpp/api_changes.html", + }, + { + text: "v2", + link: "https://mavsdk.mavlink.io/v2.0/en/cpp/api_changes.html", + }, + { + text: "v1.4", + link: "https://mavsdk.mavlink.io/v1.4/en/cpp/api_changes.html", + }, + ], + }, + ], + + socialLinks: [ + { icon: "github", link: "https://github.com/mavlink/MAVSDK" }, + ], + }, + + head: [ + ["link", { rel: "icon", href: "/en/favicon.ico" }], + [ + "script", + { + async: "", + src: "https://www.googletagmanager.com/gtag/js?id=G-91EWVWRQ93", + }, + ], + [ + "script", + {}, + `window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'G-91EWVWRQ93');`, + ], + ], + + async transformPageData(pageData, { siteConfig }) { + //Logs every page loaded on build. Good way to catch errors not caught by other things. + console.log(pageData.filePath); + + // Global variables as frontmatter + pageData.frontmatter.github_branch ??= process.env.BRANCH_NAME + ? process.env.BRANCH_NAME + : "main"; + }, + + vue: { + template: { + compilerOptions: { + isCustomElement: (tag) => tag === "lite-youtube", + }, + }, + }, +}); diff --git a/docs/.vitepress/get_sidebar.js b/docs/.vitepress/get_sidebar.js new file mode 100644 index 000000000..2115881f8 --- /dev/null +++ b/docs/.vitepress/get_sidebar.js @@ -0,0 +1,267 @@ +// .vuepress/get_sidebar.js + +import path from "path"; +import fs from "fs"; +import readline from "readline"; + +function getEntryArray(parent) { + let returnEntryArray = null; + //console.log("getEntryArray(): parent"); + //console.log(parent); + //Gets returns the child array + //if (parent === "undefined") { + // return []; + //} + + if (Array.isArray(parent)) { + //This parent is an array, so return it (it is the sidebar top level) + returnEntryArray = parent; + //console.log("isArray"); + } + parent.items = parent?.items ? parent.items : []; + //console.log("isNotArray"); + //console.log("returnEntryArray:"); + returnEntryArray = parent.items; + //console.log(returnEntryArray); + return returnEntryArray; +} + +function parseGitbookSidebarToVuepress(sidebarContent, lang) { + const lines = sidebarContent.split("\n"); + + const newSidebar = []; + + let first_iteration = true; + let indent_divider = 0; + + const parents = []; + //console.log("parents - empty after creaton"); + //console.log(parents); + + const topLevelParent = { + title: "DUMMY", + path: "DUMMY", + //level: "0", + //items: [], + }; + topLevelParent.items = []; + //console.log("topLevelParent - empty after creaton"); + //console.log(topLevelParent); + + parents.push(topLevelParent); // So last item is always the sidebar + //console.log("parents after pushing topLevelParent:"); + //console.log(parents); + + let current_parent; + + let lastlevel = 0; + let last_item; + + //let currentSection; + //let currentLevel = 0; + + lines.forEach((line) => { + if (line.startsWith("#") || line.trim() === "") { + // Ignore lines that start with "#" or are empty + // Note, we should perhaps create sections for these. TBD. + return; + } + + //console.log("DEBUG: Line: " + line); + + let regex = /(\s*?)[\*-]\s\[(.*?)\]\((.*?)\)/g; + + let indent_level = ""; + let link_title = ""; + let link_url = ""; + let link_path = ""; + + try { + //console.log(`DEBUG: Lastitem at start: ${JSON.stringify(last_item)}`); + let match = regex.exec(line); + //console.log('0: '+ match[0]) + indent_level = match[1].length; + link_title = match[2]; + link_url = match[3].trim(); + link_path = link_url; + } catch (err) { + //Just skip empty lines that don't match + console.log(err); + console.log("DEBUG: Couldn't match line, skip line using return"); + return; + } + + try { + /* + if (link_url.endsWith("README.md")) { + link_url = link_url.replace("README.md", ""); + } + */ + if (link_url.endsWith(".md")) { + link_url = link_url.replace(".md", ".html"); + //link_path = link_path.replace(".md", ".html"); + } + + if (!link_url.startsWith("http")) { + if (lang) { + link_url = `/${lang}/${link_url}`; + } else { + link_url = `/${link_url}`; + } + } + + //Tidy up some of the title escaping that isn't used by VuePress + link_title = link_title.replace("\\(", "("); + link_title = link_title.replace("\\)", ")"); + link_title = link_title.replace("\\_", "_"); + + //set indent_divider level (easier to think in levels, numbers of zero prefixes) + if ((indent_divider == 0) & (indent_level > 0.0)) { + indent_divider = indent_level; + } + if (indent_divider > 0) { + indent_level = indent_level / indent_divider; + } + + let entry = { + text: link_title, + link: link_url, + //collapsed: true, + //link_path, + //level: indent_level, + //collapsible: true, + }; + //console.log("entry:"); + //console.log(entry); + + //console.log("parents:"); + //console.log(parents); + //console.log("current_parent - before pop"); + //console.log(current_parent); + current_parent = parents.pop(); + //console.log("current_parent - after pop"); + //console.log(current_parent); + + //console.log(`XX ST: indent: ${indent_level} lastlevel: ${lastlevel}`); + if (indent_level == lastlevel) { + //console.log(`XX EQ:`); + //console.log(current_parent); + const parentArray = getEntryArray(current_parent); + parentArray.push(entry); + //console.log("current_parent after pushing last entry"); + //console.log(current_parent); + + //console.log("eq parents before pushing back current parent"); + //console.log(parents); + parents.push(current_parent); + //console.log("EQ parents after pushing current parent"); + //console.log(parents); + + //console.log("XX EQ3"); + } else if (indent_level > lastlevel) { + //console.log("XX NEST"); + //console.log( + // ` DEBUG:NEST: lastlev: ${lastlevel}/indent lev: ${indent_level}` + // ); + // This is a child of the last element added to current parent + + //console.log(current_parent); + //console.log("NEST: current_parent - after pop"); + //console.log("NEST: parents before"); + //console.log(parents); + + const parentArray = getEntryArray(current_parent); + + //console.log( + // "parentArray - we want to add entry to last entry in this array." + //); + //console.log(parentArray); + + //Get the last element + //console.log(`how many elements in array ${parentArray.length}`); + // + const lastElement = parentArray.pop(); + lastElement.collapsed = true; + //console.log(`NEST: last element in array:`); + //console.log(lastElement); + const lastElementArray = getEntryArray(lastElement); + //console.log(`NEST: last element array:`); + lastElementArray.push(entry); + //console.log(`NEST: last element after pushing event:`); + //console.log(lastElement); + // Push the last element back on to the parentArray + parentArray.push(lastElement); + //push current parent onto the parents array + parents.push(current_parent); + // push the element we just edited back onto the array so it can be current parent. + parents.push(lastElement); + //console.log("NEST: parents after"); + //console.log(parents); + } else if (indent_level < lastlevel) { + // gone up a level + //console.log(`XX UP`); + while (indent_level < lastlevel--) { + //console.log(`pop ${lastlevel}`); + //Here we have no item. Group has finished (with a group) + //So add the current parent (finished) to its parent. + //console.log('DEBUG: Gone UP from level: '+ indent_level + ' TO: ' + lastlevel) + + current_parent = parents.pop(); + } + const parentArray = getEntryArray(current_parent); + parentArray.push(entry); + //console.log("current_parent after pushing last entry"); + //console.log(current_parent); + + //console.log("eq parents before pushing back current parent"); + //console.log(parents); + parents.push(current_parent); + } + + //console.log("AFTER ADDING Entry:"); + //console.log("entry:"); + //console.log(entry); + //console.log("parents:"); + //console.log(parents); + } catch (err) { + console.log(err); + console.log(` DEBUG SOME ACTUAL PROBLEMXX2: ${err}`); + } + + //last_item = entry; + + lastlevel = indent_level; //reset + //console.log(`END OF ONE LINE:${indent_level} lastlevel: ${lastlevel}`); + //console.log("PARENTS"); + //console.log(JSON.stringify(parents)); + }); + + //all lines done + //console.log("All lines done parents:"); + //console.log(JSON.stringify(parents)); + + //console.log("topLevelParent"); + //console.log(topLevelParent); + return topLevelParent.items; +} + +module.exports = { + sidebar: function (lang) { + const summaryfile_path = path.resolve(__dirname, "..", lang, "SUMMARY.md"); + //console.log("DEBUG: summaryfile_path: " + summaryfile_path); + let data = ""; + + try { + // read contents of the file + data = fs.readFileSync(summaryfile_path, "UTF-8"); + } catch (err) { + console.log(`DEBUG: ${lang} - SIDEBAR DEFINITION NOT FOUND`); + } + + const module_sidebar = parseGitbookSidebarToVuepress(data, lang); + //console.log(`DEBUG: Before`); + //console.log(`DEBUG: ${JSON.stringify(module_sidebar)}`); + //console.log(`DEBUG: After`); + return module_sidebar; + }, +}; diff --git a/docs/.vitepress/theme/components/Redirect.vue b/docs/.vitepress/theme/components/Redirect.vue new file mode 100644 index 000000000..3b847adc6 --- /dev/null +++ b/docs/.vitepress/theme/components/Redirect.vue @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js new file mode 100644 index 000000000..6747f4a08 --- /dev/null +++ b/docs/.vitepress/theme/index.js @@ -0,0 +1,58 @@ +// https://vitepress.dev/guide/custom-theme +import { h } from "vue"; + +import DefaultTheme from "vitepress/theme"; +import "./style.css"; + +// To support medium-zoom - like setup() +import { onMounted, watch, nextTick } from "vue"; +import { useRoute } from "vitepress"; +import mediumZoom from "medium-zoom"; + +// For https://www.npmjs.com/package/lite-youtube-embed +import { inBrowser } from "vitepress"; +import "lite-youtube-embed/src/lite-yt-embed.css"; +if (inBrowser) { + // @ts-ignore + import("lite-youtube-embed"); +} + +// Support redirect plugin +import Redirect from "./components/Redirect.vue"; + +// Tabs: https://github.com/Red-Asuka/vitepress-plugin-tabs +import { Tab, Tabs } from "vue3-tabs-component"; +import "@red-asuka/vitepress-plugin-tabs/dist/style.css"; + +/** @type {import('vitepress').Theme} */ +export default { + extends: DefaultTheme, + Layout: () => { + return h(DefaultTheme.Layout, null, { + // https://vitepress.dev/guide/extending-default-theme#layout-slots + }); + }, + enhanceApp({ app, router, siteData }) { + app.component("Redirect", Redirect); //Redirect plugin + //Tabs: https://github.com/Red-Asuka/vitepress-plugin-tabs + app.component("Tab", Tab); + app.component("Tabs", Tabs); + }, + + // to support medium zoom: https://github.com/vuejs/vitepress/issues/854 + setup() { + const route = useRoute(); + const initZoom = () => { + //mediumZoom("[data-zoomable]", { background: "var(--vp-c-bg)" }); + mediumZoom(".main img", { background: "var(--vp-c-bg)" }); + }; + onMounted(() => { + initZoom(); + }); + watch( + () => route.path, + () => nextTick(() => initZoom()) + ); + }, + //end to support medium zoom +}; diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css new file mode 100644 index 000000000..5df1208b7 --- /dev/null +++ b/docs/.vitepress/theme/style.css @@ -0,0 +1,213 @@ +/** + * Customize default theme styling by overriding CSS variables: + * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css + */ + +/** + * Colors + * + * Each colors have exact same color scale system with 3 levels of solid + * colors with different brightness, and 1 soft color. + * + * - `XXX-1`: The most solid color used mainly for colored text. It must + * satisfy the contrast ratio against when used on top of `XXX-soft`. + * + * - `XXX-2`: The color used mainly for hover state of the button. + * + * - `XXX-3`: The color for solid background, such as bg color of the button. + * It must satisfy the contrast ratio with pure white (#ffffff) text on + * top of it. + * + * - `XXX-soft`: The color used for subtle background such as custom container + * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors + * on top of it. + * + * The soft color must be semi transparent alpha channel. This is crucial + * because it allows adding multiple "soft" colors on top of each other + * to create a accent, such as when having inline code block inside + * custom containers. + * + * - `default`: The color used purely for subtle indication without any + * special meanings attched to it such as bg color for menu hover state. + * + * - `brand`: Used for primary brand colors, such as link text, button with + * brand theme, etc. + * + * - `tip`: Used to indicate useful information. The default theme uses the + * brand color for this by default. + * + * - `warning`: Used to indicate warning to the users. Used in custom + * container, badges, etc. + * + * - `danger`: Used to show error, or dangerous message to the users. Used + * in custom container, badges, etc. + * -------------------------------------------------------------------------- */ + + + + +:root { + --vp-c-default-1: var(--vp-c-gray-1); + --vp-c-default-2: var(--vp-c-gray-2); + --vp-c-default-3: var(--vp-c-gray-3); + --vp-c-default-soft: var(--vp-c-gray-soft); + + --vp-c-brand-1: var(--vp-c-indigo-1); + --vp-c-brand-2: var(--vp-c-indigo-2); + --vp-c-brand-3: var(--vp-c-indigo-3); + --vp-c-brand-soft: var(--vp-c-indigo-soft); + + --vp-c-tip-1: var(--vp-c-brand-1); + --vp-c-tip-2: var(--vp-c-brand-2); + --vp-c-tip-3: var(--vp-c-brand-3); + --vp-c-tip-soft: var(--vp-c-brand-soft); + + --vp-c-warning-1: var(--vp-c-yellow-1); + --vp-c-warning-2: var(--vp-c-yellow-2); + --vp-c-warning-3: var(--vp-c-yellow-3); + --vp-c-warning-soft: var(--vp-c-yellow-soft); + + --vp-c-danger-1: var(--vp-c-red-1); + --vp-c-danger-2: var(--vp-c-red-2); + --vp-c-danger-3: var(--vp-c-red-3); + --vp-c-danger-soft: var(--vp-c-red-soft); +} + +/** + * Component: Button + * -------------------------------------------------------------------------- */ + +:root { + --vp-button-brand-border: transparent; + --vp-button-brand-text: var(--vp-c-white); + --vp-button-brand-bg: var(--vp-c-brand-3); + --vp-button-brand-hover-border: transparent; + --vp-button-brand-hover-text: var(--vp-c-white); + --vp-button-brand-hover-bg: var(--vp-c-brand-2); + --vp-button-brand-active-border: transparent; + --vp-button-brand-active-text: var(--vp-c-white); + --vp-button-brand-active-bg: var(--vp-c-brand-1); +} + +/** + * Component: Home + * -------------------------------------------------------------------------- */ + +:root { + --vp-home-hero-name-color: transparent; + --vp-home-hero-name-background: -webkit-linear-gradient( + 120deg, + #f46522 30%, + #f46522 + ); + + --vp-home-hero-image-background-image: linear-gradient( + -45deg, + white 50%, + white 50% + ); + --vp-home-hero-image-filter: blur(44px); +} + +@media (min-width: 640px) { + :root { + --vp-home-hero-image-filter: blur(56px); + } +} + +@media (min-width: 960px) { + :root { + --vp-home-hero-image-filter: blur(68px); + } +} + +/** + * Component: Custom Block + * -------------------------------------------------------------------------- */ + +:root { + --vp-custom-block-tip-border: transparent; + --vp-custom-block-tip-text: var(--vp-c-text-1); + --vp-custom-block-tip-bg: var(--vp-c-brand-soft); + --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); +} + +/** + * Component: Algolia + * -------------------------------------------------------------------------- */ + +.DocSearch { + --docsearch-primary-color: var(--vp-c-brand-1) !important; +} + +/** + * Component: Medium Zoom: https://github.com/vuejs/vitepress/issues/854 + * -------------------------------------------------------------------------- */ + +.medium-zoom-overlay { + z-index: 20; +} + +.medium-zoom-image { + z-index: 21; +} + +/** + * Override styles as needed + * -------------------------------------------------------------------------- */ + +.vp-doc img { + display: inline; /* block by default set by vitepress */ +} + +/* Make content area a little wider to improve tables */ +.content-container { + max-width: 100% !important; +} +@media (min-width: 1280px) { + .content { + min-width: 940px !important; + } +} + +/* Make page width larger */ +@media (min-width: 1440px) { + .VPSidebar { + padding-left: 32px !important; + width: var(--vp-sidebar-width) !important; + } + .VPContent.has-sidebar { + padding-left: var(--vp-sidebar-width) !important; + padding-right: 0 !important; + } + + .VPNavBar.has-sidebar .title { + padding-left: 32px !important; + } + + .VPNavBar.has-sidebar .content { + padding-left: var(--vp-sidebar-width) !important; + padding-right: 32px !important; + } + + /* Very hacky */ + .VPNavBar.has-sidebar #local-search { + z-index: 10; + } + +} + + + +/* Make content area a little wider to improve tables +- Disabled version, that is OK but not quite as good as one above */ +/* +.content-container { + max-width: 100% !important; +} +@media (min-width: 1280px) { + .content { + min-width: 940px !important; + } +} +*/ \ No newline at end of file diff --git a/docs/assets/autogen/autogen_overview.png b/docs/assets/autogen/autogen_overview.png new file mode 100644 index 000000000..d689a79a0 Binary files /dev/null and b/docs/assets/autogen/autogen_overview.png differ diff --git a/docs/assets/autogen/mavsdk_overview.png b/docs/assets/autogen/mavsdk_overview.png new file mode 100644 index 000000000..0622ad539 Binary files /dev/null and b/docs/assets/autogen/mavsdk_overview.png differ diff --git a/docs/assets/examples/fly_mission/fly_mission_example_qgc.jpg b/docs/assets/examples/fly_mission/fly_mission_example_qgc.jpg new file mode 100644 index 000000000..1f507680e Binary files /dev/null and b/docs/assets/examples/fly_mission/fly_mission_example_qgc.jpg differ diff --git a/docs/assets/examples/fly_qgc_mission/fly_qgc_plan_mission_example_qgc.jpg b/docs/assets/examples/fly_qgc_mission/fly_qgc_plan_mission_example_qgc.jpg new file mode 100644 index 000000000..fd0843e8e Binary files /dev/null and b/docs/assets/examples/fly_qgc_mission/fly_qgc_plan_mission_example_qgc.jpg differ diff --git a/docs/assets/examples/follow_me/follow_me_example_qgc.jpg b/docs/assets/examples/follow_me/follow_me_example_qgc.jpg new file mode 100644 index 000000000..cc467dd19 Binary files /dev/null and b/docs/assets/examples/follow_me/follow_me_example_qgc.jpg differ diff --git a/docs/assets/examples/offboard_mode/qgc_offboard_velocity.png b/docs/assets/examples/offboard_mode/qgc_offboard_velocity.png new file mode 100644 index 000000000..a2a427514 Binary files /dev/null and b/docs/assets/examples/offboard_mode/qgc_offboard_velocity.png differ diff --git a/docs/assets/examples/transition_vtol_fixed_wing/transition_vtol_fixed_wing_example_qgc.png b/docs/assets/examples/transition_vtol_fixed_wing/transition_vtol_fixed_wing_example_qgc.png new file mode 100644 index 000000000..82cccf5e9 Binary files /dev/null and b/docs/assets/examples/transition_vtol_fixed_wing/transition_vtol_fixed_wing_example_qgc.png differ diff --git a/docs/assets/python/quickstart/jmavsim_takeoff.png b/docs/assets/python/quickstart/jmavsim_takeoff.png new file mode 100644 index 000000000..a9f6e21ec Binary files /dev/null and b/docs/assets/python/quickstart/jmavsim_takeoff.png differ diff --git a/docs/assets/python/quickstart/mavsdk_pycharm.png b/docs/assets/python/quickstart/mavsdk_pycharm.png new file mode 100644 index 000000000..3fd3263eb Binary files /dev/null and b/docs/assets/python/quickstart/mavsdk_pycharm.png differ diff --git a/docs/assets/site/favicon.png b/docs/assets/site/favicon.png new file mode 100644 index 000000000..9b35de16c Binary files /dev/null and b/docs/assets/site/favicon.png differ diff --git a/docs/assets/site/gitbook_toolbar.png b/docs/assets/site/gitbook_toolbar.png new file mode 100644 index 000000000..4451a6a07 Binary files /dev/null and b/docs/assets/site/gitbook_toolbar.png differ diff --git a/docs/assets/site/gitbook_toolbar_bug.png b/docs/assets/site/gitbook_toolbar_bug.png new file mode 100644 index 000000000..73de33614 Binary files /dev/null and b/docs/assets/site/gitbook_toolbar_bug.png differ diff --git a/docs/assets/site/gitbook_toolbar_edit.png b/docs/assets/site/gitbook_toolbar_edit.png new file mode 100644 index 000000000..23b86a8e6 Binary files /dev/null and b/docs/assets/site/gitbook_toolbar_edit.png differ diff --git a/docs/assets/site/github_edit.png b/docs/assets/site/github_edit.png new file mode 100644 index 000000000..7472a61e7 Binary files /dev/null and b/docs/assets/site/github_edit.png differ diff --git a/docs/assets/site/logo_dronecode.png b/docs/assets/site/logo_dronecode.png new file mode 100644 index 000000000..94b6511b3 Binary files /dev/null and b/docs/assets/site/logo_dronecode.png differ diff --git a/docs/assets/site/logo_linux_foundation.png b/docs/assets/site/logo_linux_foundation.png new file mode 100644 index 000000000..5317dd8e4 Binary files /dev/null and b/docs/assets/site/logo_linux_foundation.png differ diff --git a/docs/assets/site/sdk_logo_full.png b/docs/assets/site/sdk_logo_full.png new file mode 100644 index 000000000..62c425f91 Binary files /dev/null and b/docs/assets/site/sdk_logo_full.png differ diff --git a/docs/assets/site/slack.svg b/docs/assets/site/slack.svg new file mode 100644 index 000000000..2b0fbae4a --- /dev/null +++ b/docs/assets/site/slack.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + slack + slack + Join us! + Join us! + + + diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md new file mode 100644 index 000000000..43d27797f --- /dev/null +++ b/docs/en/SUMMARY.md @@ -0,0 +1,220 @@ +# Summary + +* [Introduction](index.md) +* [C++](cpp/index.md) + * [QuickStart](cpp/quickstart.md) + * [Guide](cpp/guide/index.md) + * [Installation](cpp/guide/installation.md) + * [Usage/Paradigms](cpp/guide/general_usage.md) + * [Connecting to Systems (Vehicles)](cpp/guide/connections.md) + * [Managing Systems](cpp/guide/using_plugins.md) + * [System Information](cpp/guide/system_information.md) + * [Telemetry](cpp/guide/telemetry.md) + * [Actions - Take Off, Arm, ...](cpp/guide/taking_off_landing.md) + * [Missions](cpp/guide/missions.md) + * [Offboard Control](cpp/guide/offboard.md) + * [Follow Me](cpp/guide/follow_me.md) + * [VTOL Support](cpp/guide/vtol.md) + * [Building C++ Apps](cpp/guide/toolchain.md) + * [Logging](cpp/guide/logging.md) + * [Plugin/Test Logging](cpp/guide/dev_logging.md) + * [Testing](cpp/guide/test.md) + * [Building library from Source](cpp/guide/build.md) + * [Building mavsdk_server from Source](cpp/guide/build_mavsdk_server.md) + * [Generate API docs from Source](cpp/guide/build_docs.md) + * [Coding Style](cpp/guide/code_style.md) + * [Examples](cpp/examples/index.md) + * [Takeoff and Land](cpp/examples/takeoff_and_land.md) + * [Fly Mission](cpp/examples/fly_mission.md) + * [Offboard Mode - Velocity Control](cpp/examples/offboard_velocity.md) + * [Follow Me Mode](cpp/examples/follow_me.md) + * [VTOL Transitions](cpp/examples/transition_vtol_fixed_wing.md) + * [Autopilot Server](cpp/examples/autopilot_server.md) + * [Server plugins](cpp/server_plugins.md) + * [API Changes](cpp/api_changes.md) + * [API Reference](cpp/api_reference/index.md) + * [class Action](cpp/api_reference/classmavsdk_1_1_action.md) + * [class ActionServer](cpp/api_reference/classmavsdk_1_1_action_server.md) + * [struct AllowableFlightModes](cpp/api_reference/structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md) + * [struct ArmDisarm](cpp/api_reference/structmavsdk_1_1_action_server_1_1_arm_disarm.md) + * [class Calibration](cpp/api_reference/classmavsdk_1_1_calibration.md) + * [struct ProgressData](cpp/api_reference/structmavsdk_1_1_calibration_1_1_progress_data.md) + * [class Camera](cpp/api_reference/classmavsdk_1_1_camera.md) + * [struct Information](cpp/api_reference/structmavsdk_1_1_camera_1_1_information.md) + * [struct CaptureInfo](cpp/api_reference/structmavsdk_1_1_camera_1_1_capture_info.md) + * [struct Position](cpp/api_reference/structmavsdk_1_1_camera_1_1_position.md) + * [struct Quaternion](cpp/api_reference/structmavsdk_1_1_camera_1_1_quaternion.md) + * [struct EulerAngle](cpp/api_reference/structmavsdk_1_1_camera_1_1_euler_angle.md) + * [struct Status](cpp/api_reference/structmavsdk_1_1_camera_1_1_status.md) + * [struct VideoStreamInfo](cpp/api_reference/structmavsdk_1_1_camera_1_1_video_stream_info.md) + * [struct VideoStreamSettings](cpp/api_reference/structmavsdk_1_1_camera_1_1_video_stream_settings.md) + * [struct Option](cpp/api_reference/structmavsdk_1_1_camera_1_1_option.md) + * [struct Setting](cpp/api_reference/structmavsdk_1_1_camera_1_1_setting.md) + * [struct SettingOptions](cpp/api_reference/structmavsdk_1_1_camera_1_1_setting_options.md) + * [class CameraServer](cpp/api_reference/classmavsdk_1_1_camera_server.md) + * [struct CaptureInfo](cpp/api_reference/structmavsdk_1_1_camera_server_1_1_capture_info.md) + * [struct Information](cpp/api_reference/structmavsdk_1_1_camera_server_1_1_information.md) + * [struct Position](cpp/api_reference/structmavsdk_1_1_camera_server_1_1_position.md) + * [struct Quaternion](cpp/api_reference/structmavsdk_1_1_camera_server_1_1_quaternion.md) + * [class ComponentInformation](cpp/api_reference/classmavsdk_1_1_component_information.md) + * [struct FloatParam](cpp/api_reference/structmavsdk_1_1_component_information_1_1_float_param.md) + * [struct FloatParamUpdate](cpp/api_reference/structmavsdk_1_1_component_information_1_1_float_param_update.md) + * [class ComponentInformationServer](cpp/api_reference/classmavsdk_1_1_component_information_server.md) + * [struct FloatParam](cpp/api_reference/structmavsdk_1_1_component_information_server_1_1_float_param.md) + * [struct FloatParamUpdate](cpp/api_reference/structmavsdk_1_1_component_information_server_1_1_float_param_update.md) + * [class Failure](cpp/api_reference/classmavsdk_1_1_failure.md) + * [class FollowMe](cpp/api_reference/classmavsdk_1_1_follow_me.md) + * [struct Config](cpp/api_reference/structmavsdk_1_1_follow_me_1_1_config.md) + * [struct TargetLocation](cpp/api_reference/structmavsdk_1_1_follow_me_1_1_target_location.md) + * [class Ftp](cpp/api_reference/classmavsdk_1_1_ftp.md) + * [class Geofence](cpp/api_reference/classmavsdk_1_1_geofence.md) + * [struct Polygon](cpp/api_reference/structmavsdk_1_1_geofence_1_1_polygon.md) + * [struct Point](cpp/api_reference/structmavsdk_1_1_geofence_1_1_point.md) + * [struct ProgressData](cpp/api_reference/structmavsdk_1_1_ftp_1_1_progress_data.md) + * [class geometry::CoordinateTransformation](cpp/api_reference/classmavsdk_1_1geometry_1_1_coordinate_transformation.md) + * [struct GlobalCoordinate](cpp/api_reference/structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) + * [struct LocalCoordinate](cpp/api_reference/structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_local_coordinate.md) + * [class Gimbal](cpp/api_reference/classmavsdk_1_1_gimbal.md) + * [struct ControlStatus](cpp/api_reference/structmavsdk_1_1_gimbal_1_1_control_status.md) + * [class Info](cpp/api_reference/classmavsdk_1_1_info.md) + * [struct FlightInfo](cpp/api_reference/structmavsdk_1_1_info_1_1_flight_info.md) + * [struct Identification](cpp/api_reference/structmavsdk_1_1_info_1_1_identification.md) + * [struct Product](cpp/api_reference/structmavsdk_1_1_info_1_1_product.md) + * [struct Version](cpp/api_reference/structmavsdk_1_1_info_1_1_version.md) + * [class LogFiles](cpp/api_reference/classmavsdk_1_1_log_files.md) + * [struct Entry](cpp/api_reference/structmavsdk_1_1_log_files_1_1_entry.md) + * [struct ProgressData](cpp/api_reference/structmavsdk_1_1_log_files_1_1_progress_data.md) + * [class ManualControl](cpp/api_reference/classmavsdk_1_1_manual_control.md) + * [class MavlinkPassthrough](cpp/api_reference/classmavsdk_1_1_mavlink_passthrough.md) + * [struct CommandInt](cpp/api_reference/structmavsdk_1_1_mavlink_passthrough_1_1_command_int.md) + * [struct CommandLong](cpp/api_reference/structmavsdk_1_1_mavlink_passthrough_1_1_command_long.md) + * [class Mavsdk](cpp/api_reference/classmavsdk_1_1_mavsdk.md) + * [class Mavsdk::Configuration](cpp/api_reference/classmavsdk_1_1_mavsdk_1_1_configuration.md) + * [class Mission](cpp/api_reference/classmavsdk_1_1_mission.md) + * [struct MissionItem](cpp/api_reference/structmavsdk_1_1_mission_1_1_mission_item.md) + * [struct MissionPlan](cpp/api_reference/structmavsdk_1_1_mission_1_1_mission_plan.md) + * [struct MissionProgress](cpp/api_reference/structmavsdk_1_1_mission_1_1_mission_progress.md) + * [struct ProgressData](cpp/api_reference/structmavsdk_1_1_mission_1_1_progress_data.md) + * [struct ProgressDataOrMission](cpp/api_reference/structmavsdk_1_1_mission_1_1_progress_data_or_mission.md) + * [class MissionRaw](cpp/api_reference/classmavsdk_1_1_mission_raw.md) + * [struct MissionImportData](cpp/api_reference/structmavsdk_1_1_mission_raw_1_1_mission_import_data.md) + * [struct MissionItem](cpp/api_reference/structmavsdk_1_1_mission_raw_1_1_mission_item.md) + * [struct MissionProgress](cpp/api_reference/structmavsdk_1_1_mission_raw_1_1_mission_progress.md) + * [class MissionRawServer](cpp/api_reference/classmavsdk_1_1_mission_raw_server.md) + * [struct MissionItem](cpp/api_reference/structmavsdk_1_1_mission_raw_server_1_1_mission_item.md) + * [struct MissionPlan](cpp/api_reference/structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md) + * [struct MissionProgress](cpp/api_reference/structmavsdk_1_1_mission_raw_server_1_1_mission_progress.md) + * [class Mocap](cpp/api_reference/classmavsdk_1_1_mocap.md) + * [struct AngleBody](cpp/api_reference/structmavsdk_1_1_mocap_1_1_angle_body.md) + * [struct AngularVelocityBody](cpp/api_reference/structmavsdk_1_1_mocap_1_1_angular_velocity_body.md) + * [struct AttitudePositionMocap](cpp/api_reference/structmavsdk_1_1_mocap_1_1_attitude_position_mocap.md) + * [struct Covariance](cpp/api_reference/structmavsdk_1_1_mocap_1_1_covariance.md) + * [struct Odometry](cpp/api_reference/structmavsdk_1_1_mocap_1_1_odometry.md) + * [struct PositionBody](cpp/api_reference/structmavsdk_1_1_mocap_1_1_position_body.md) + * [struct Quaternion](cpp/api_reference/structmavsdk_1_1_mocap_1_1_quaternion.md) + * [struct SpeedBody](cpp/api_reference/structmavsdk_1_1_mocap_1_1_speed_body.md) + * [struct VisionPositionEstimate](cpp/api_reference/structmavsdk_1_1_mocap_1_1_vision_position_estimate.md) + * [class Offboard](cpp/api_reference/classmavsdk_1_1_offboard.md) + * [struct AccelerationNed](cpp/api_reference/structmavsdk_1_1_offboard_1_1_acceleration_ned.md) + * [struct ActuatorControl](cpp/api_reference/structmavsdk_1_1_offboard_1_1_actuator_control.md) + * [struct ActuatorControlGroup](cpp/api_reference/structmavsdk_1_1_offboard_1_1_actuator_control_group.md) + * [struct Attitude](cpp/api_reference/structmavsdk_1_1_offboard_1_1_attitude.md) + * [struct AttitudeRate](cpp/api_reference/structmavsdk_1_1_offboard_1_1_attitude_rate.md) + * [struct VelocityBodyYawspeed](cpp/api_reference/structmavsdk_1_1_offboard_1_1_velocity_body_yawspeed.md) + * [struct VelocityNedYaw](cpp/api_reference/structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) + * [struct PositionNedYaw](cpp/api_reference/structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) + * [struct PositionGlobalYaw](cpp/api_reference/structmavsdk_1_1_offboard_1_1_position_global_yaw.md) + * [class Param](cpp/api_reference/classmavsdk_1_1_param.md) + * [struct AllParams](cpp/api_reference/structmavsdk_1_1_param_1_1_all_params.md) + * [struct CustomParam](cpp/api_reference/structmavsdk_1_1_param_1_1_custom_param.md) + * [struct FloatParam](cpp/api_reference/structmavsdk_1_1_param_1_1_float_param.md) + * [struct IntParam](cpp/api_reference/structmavsdk_1_1_param_1_1_int_param.md) + * [class ParamServer](cpp/api_reference/classmavsdk_1_1_param_server.md) + * [struct AllParams](cpp/api_reference/structmavsdk_1_1_param_server_1_1_all_params.md) + * [struct CustomParam](cpp/api_reference/structmavsdk_1_1_param_server_1_1_custom_param.md) + * [struct FloatParam](cpp/api_reference/structmavsdk_1_1_param_server_1_1_float_param.md) + * [struct IntParam](cpp/api_reference/structmavsdk_1_1_param_server_1_1_int_param.md) + * [class Rtk](cpp/api_reference/classmavsdk_1_1_rtk.md) + * [struct RtcmData](cpp/api_reference/structmavsdk_1_1_rtk_1_1_rtcm_data.md) + * [class ServerUtility](cpp/api_reference/classmavsdk_1_1_server_utility.md) + * [class Shell](cpp/api_reference/classmavsdk_1_1_shell.md) + * [class System](cpp/api_reference/classmavsdk_1_1_system.md) + * [struct AutopilotVersion](cpp/api_reference/structmavsdk_1_1_system_1_1_autopilot_version.md) + * [class Telemetry](cpp/api_reference/classmavsdk_1_1_telemetry.md) + * [struct AccelerationFrd](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_acceleration_frd.md) + * [struct ActuatorControlTarget](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_actuator_control_target.md) + * [struct ActuatorOutputStatus](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_actuator_output_status.md) + * [struct AngularVelocityBody](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md) + * [struct AngularVelocityNed](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_angular_velocity_frd.md) + * [struct Battery](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_battery.md) + * [struct Covariance](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_covariance.md) + * [struct DistanceSensor](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_distance_sensor.md) + * [struct EulerAngle](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_euler_angle.md) + * [struct FixedwingMetrics](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md) + * [struct GpsInfo](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_gps_info.md) + * [struct GpsGlobalOrigin](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_gps_global_origin.md) + * [struct GroundTruth](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_ground_truth.md) + * [struct Heading](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_heading.md) + * [struct Health](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_health.md) + * [struct Imu](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_imu.md) + * [struct MagneticFieldFrd](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_magnetic_field_frd.md) + * [struct Odometry](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_odometry.md) + * [struct Position](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_position.md) + * [struct PositionBody](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_position_body.md) + * [struct PositionNed](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_position_ned.md) + * [struct VelocityNed](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_velocity_ned.md) + * [struct VelocityBody](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_velocity_body.md) + * [struct PositionVelocityNed](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md) + * [struct Quaternion](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_quaternion.md) + * [struct RawGps](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_raw_gps.md) + * [struct RcStatus](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_rc_status.md) + * [struct ScaledPressure](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_scaled_pressure.md) + * [struct StatusText](cpp/api_reference/structmavsdk_1_1_telemetry_1_1_status_text.md) + * [class TelemetryServer](cpp/api_reference/classmavsdk_1_1_telemetry_server.md) + * [struct AccelerationFrd](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_acceleration_frd.md) + * [struct ActuatorControlTarget](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_actuator_control_target.md) + * [struct ActuatorOutputStatus](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_actuator_output_status.md) + * [struct AngularVelocityBody](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_angular_velocity_body.md) + * [struct AngularVelocityFrd](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_angular_velocity_frd.md) + * [struct Battery](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_battery.md) + * [struct Covariance](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_covariance.md) + * [struct DistanceSensor](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_distance_sensor.md) + * [struct EulerAngle](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_euler_angle.md) + * [struct FixedwingMetrics](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_fixedwing_metrics.md) + * [struct GpsInfo](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_gps_info.md) + * [struct GroundTruth](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_ground_truth.md) + * [struct Heading](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_heading.md) + * [struct Imu](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_imu.md) + * [struct MagneticFieldFrd](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_magnetic_field_frd.md) + * [struct Odometry](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_odometry.md) + * [struct Position](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_position.md) + * [struct PositionBody](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_position_body.md) + * [struct PositionNed](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_position_ned.md) + * [struct PositionVelocityNed](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_position_velocity_ned.md) + * [struct Quaternion](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_quaternion.md) + * [struct RawGps](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_raw_gps.md) + * [struct RcStatus](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_rc_status.md) + * [struct ScaledPressure](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_scaled_pressure.md) + * [struct StatusText](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_status_text.md) + * [struct VelocityBody](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_velocity_body.md) + * [struct VelocityNed](cpp/api_reference/structmavsdk_1_1_telemetry_server_1_1_velocity_ned.md) + * [class TrackingServer](cpp/api_reference/classmavsdk_1_1_tracking_server.md) + * [struct Point](cpp/api_reference/structmavsdk_1_1_tracking_server_1_1_track_point.md) + * [struct Rectangle](cpp/api_reference/structmavsdk_1_1_tracking_server_1_1_track_rectangle.md) + * [class Transponder](cpp/api_reference/classmavsdk_1_1_transponder.md) + * [struct AdsbVehicle](cpp/api_reference/structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) + * [class Tune](cpp/api_reference/classmavsdk_1_1_tune.md) + * [struct TuneDescription](cpp/api_reference/structmavsdk_1_1_tune_1_1_tune_description.md) + * [class PluginBase](cpp/api_reference/classmavsdk_1_1_plugin_base.md) + * [class Overloaded](cpp/api_reference/structmavsdk_1_1overloaded.md) + * [namespace mavsdk (globals)](cpp/api_reference/namespacemavsdk.md) + * [Troubleshooting](cpp/troubleshooting.md) + * [Contributing](cpp/contributing/index.md) + * [Autogeneration](cpp/contributing/autogen.md) + * [Writing Plugins](cpp/contributing/plugins.md) + * [Documentation](cpp/contributing/documentation.md) + * [Release process](cpp/contributing/release.md) +* [iOS/Swift](swift/index.md) +* [Python](python/index.md) + * [QuickStart](python/quickstart.md) +* [FAQ](faq.md) diff --git a/docs/en/cpp/api_changes.md b/docs/en/cpp/api_changes.md new file mode 100644 index 000000000..474a0e545 --- /dev/null +++ b/docs/en/cpp/api_changes.md @@ -0,0 +1,181 @@ +# API Changes + +This page tracks changes between versions. + +It covers both breaking (incompatible) and non-breaking changes. + +## Semantic Versioning + +MAVSDK follows [semver/Semantic Versioning](https://semver.org/) conventions where as possible. + +The version number has the format: **major.minor.patch**. +Individual parts of the number are iterated when the: + +- **major**: API is changed, or functionality is removed. +- **minor**: API is extended, functionality is added. +- **patch**: API is not changed, functionality is not changed, but a bug is fixed. + +This means that breaking changes to the API result in a bump of the major version number (e.g. 1.4.3 to 2.0.0). + +> **note**: bumping of the major version is unrelated to the stability of the library. E.g. v2.0.0 is not by definition more stable than v1.4.18. It just means that the API has changed with v2. As development is carried on, stability is likely increasing whenever the minor or patch versions increase as incremental fixes are added. + +## v2 + +### Mavsdk configuration + +The `Mavsdk` class no longer assumes the configuration of a ground station by default but instead a configuration needs to be passed as a constructor argument. + +The configuration argument sets the identification, so the MAVLink `MAV_TYPE` and MAVLink component ID (also called compid) of the Mavsdk instance itself, so the source and not the target that you're connecting to. + +Old instantiation: +``` +Mavsdk mavsdk; +``` + +New instantiation: +``` +Mavsdk mavsdk{Mavsdk::Configuration{Mavsdk::ComponentType::GroundStation}}; +``` + +**Note:** +It is still possible to change the configuration later (although not recommended) using `Mavsdk::set_configuration(...)`. + +**Rationale:** + +The reasons behind this change is to make users aware of this configuration and not assume any default. The problem with a ground station default is that it can be potentially dangerous without the user being aware. We are aware that this makes the API more cumbersome and verbose to use but the goal of Mavsdk is always to erro on the side of safety. + +For instance, in the case where MAVSDK is used on the companion computer, the autopilot would assume that it is connected to a ground station at all time, even if the real ground station was lost. + +Also, having to set the default makes it less likely to misconfigure the overall integration and end up with several components that conflict. + +**Note:** +It is also possible to set the sysid/compid directly, just check out the API of [Mavsdk::Configuration](cpp/api_reference/classmavsdk_1_1_mavsdk_1_1_configuration.md). + + +### Subscription API + +The subscription API (also called async functions) has changed: + +Old: + +``` +// Subscribe +telemetry.subscribe_position([](Telemetry::Position position) { + std::cout << "Altitude: " << position.relative_altitude_m << " m\n"; +}); + +// Unsubscribe again +telemetry.subscribe_position(nullptr); +``` + +New: + +``` +// Subscribe +auto handle = telemetry.subscribe_position([](Telemetry::Position position) { + std::cout << "Altitude: " << position.relative_altitude_m << " m\n"; +}); + +// Unsubscribe again +telemetry.unsubscribe_position(handle); +``` + +**Rationale:** +MAVSDK subscriptions had the drawback that there could only be one subscription per API. So subsequent subscribers would overwrite previous subscribers. With the new API there can be more than one subscriber per API, and each can unsubscribe using their own handle. + + +### Server component plugins + +A lost of work has gone into Mavsdk v2 to support "server" components. These are components that typically run on the drone, e.g. a companion computer or a camera. + +Server component plugins are all plugins that end in `_server`. They don't need a `System` to be instantiated as they are "connected to and don't care who connects to them". + +For instance a camera server plugin can be used as follows: + +``` +Mavsdk mavsdk{Mavsdk::Configuration{Mavsdk::ComponentType::Camera}}; +auto camera_server = mavsdk::CameraServer{mavsdk.server_component()}; +``` + +It's also possible to add more than one MAVLink component to one MAVSDK instance, e.g. a gimbal could be added like this: + + +### Connecting to first autopilot system + +Discovering vehicles/systems required quite a bit of boilerplate code in the past. This has been simplified using a `Mavsdk::first_autopilot(double timeout_s)` method. + +Old discovering of first autopilot: + +``` +std::cout << "Waiting to discover system...\n"; +auto prom = std::promise>{}; +auto fut = prom.get_future(); + +// We wait for new systems to be discovered, once we find one that has an +// autopilot, we decide to use it. +mavsdk.subscribe_on_new_system([&mavsdk, &prom]() { + auto system = mavsdk.systems().back(); + + if (system->has_autopilot()) { + std::cout << "Discovered autopilot\n"; + + // Unsubscribe again as we only want to find one system. + mavsdk.subscribe_on_new_system(nullptr); + prom.set_value(system); + } +}); + +// We usually receive heartbeats at 1Hz, therefore we should find a +// system after around 3 seconds max, surely. +if (fut.wait_for(seconds(3)) == std::future_status::timeout) { + std::cerr << "No autopilot found.\n"; + return {}; +} + +// Get discovered system now. +auto system = fut.get(); +``` + +New simplified way: + +``` +auto system = mavsdk.first_autopilot(3.0); +``` + +## v1 + +### Linking + +With version 1, we introduce bigger changes in the way the MAVSDK library is linked to. Essentially, the library is no longer split up in multiple library files, one for the core (e.g. `mavsdk.so`) and one each for every plugin (e.g. `mavsdk_action.so`) and instead everything is merged into one library file (usually `mavsdk.so`). + +This means that linking in cmake gets easier. + +Previously, this was required: +``` +target_link_libraries(my_executable + MAVSDK::mavsdk_action + MAVSDK::mavsdk_mission + MAVSDK::mavsdk_telemetry + MAVSDK::mavsdk +) +``` + +Now, this is all that is needed: +``` +target_link_libraries(my_executable + MAVSDK::mavsdk +) +``` + +#### Rationale + +**Why were the "plugins" split up in the first place?** + +- The plugins were split because they were supposed to be extendable plugins. However, the last few years have shown that this is not really required, as there were no requests or contributions for it. +- Also, having a real plugin architecture is not always easy. For instance, loading plugins at runtime with `dlopen` [is not possible](https://github.com/bpowers/musl/blob/master/src/ldso/dlopen.c) when the library is compiled with [musl](https://www.musl-libc.org/). (We use musl to compile `mavsdk_server` statically without dependencies, so that it can be shipped with PyPi and runs on any Linux distribution and version as well as cross-compiled on armv6/7/8). + +**What are the advantages of the change?** + +- Having one library to link to is easier and more inline with other libraries. When more functionality is needed, CMakeLists.txt doesn't need to be changed every time. +- Having only one library makes it easier to check for ABI breaks. +- The file overhead for every plugin is actually very small, so the overhead should be negligible. diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_action.md b/docs/en/cpp/api_reference/classmavsdk_1_1_action.md new file mode 100644 index 000000000..ade97af30 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_action.md @@ -0,0 +1,1017 @@ +# mavsdk::Action Class Reference +`#include: action.h` + +---- + + +Enable simple actions such as arming, taking off, and landing. + + +## Public Types + + +Type | Description +--- | --- +enum [OrbitYawBehavior](#classmavsdk_1_1_action_1ad9dd7c5e85dda1ae188df75998375c92) | Yaw behaviour during orbit flight. +enum [Result](#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | Possible results returned for action requests. +std::function< void([Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51))> [ResultCallback](#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) | Callback type for asynchronous [Action](classmavsdk_1_1_action.md) calls. +std::function< void([Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float)> [GetTakeoffAltitudeCallback](#classmavsdk_1_1_action_1ad1ae6edb8ea375a3472ef14313b591e2) | Callback type for get_takeoff_altitude_async. +std::function< void([Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float)> [GetMaximumSpeedCallback](#classmavsdk_1_1_action_1a6993096d3e1424a817ad58ce8217a73c) | Callback type for get_maximum_speed_async. +std::function< void([Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float)> [GetReturnToLaunchAltitudeCallback](#classmavsdk_1_1_action_1af28acf6f7cff11f3c583761edb7d7415) | Callback type for get_return_to_launch_altitude_async. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Action](#classmavsdk_1_1_action_1a5e2a4d65f85d821be691a837453e56ee) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Action](#classmavsdk_1_1_action_1a4359d18e02bca100175cd00fab814550) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Action](#classmavsdk_1_1_action_1a99352fe4e83e4b721d5c5b5942beb76f) () override | Destructor (internal use only). +  | [Action](#classmavsdk_1_1_action_1a99fc1d6fc90af15a93bb270b0279a095) (const [Action](classmavsdk_1_1_action.md) & other) | Copy constructor. +void | [arm_async](#classmavsdk_1_1_action_1a570a3799ca5dbbf8aab30ce465687796) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to arm the drone. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [arm](#classmavsdk_1_1_action_1a3ee123973982842f46a9f8b6cb952566) () const | Send command to arm the drone. +void | [disarm_async](#classmavsdk_1_1_action_1a3107f7f5a2f4a478024667f187f8f2aa) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to disarm the drone. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [disarm](#classmavsdk_1_1_action_1a44c61110965bcdd3dfb90a08d3c6b6b9) () const | Send command to disarm the drone. +void | [takeoff_async](#classmavsdk_1_1_action_1ab658d938970326db41709d83e02b41e6) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to take off and hover. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [takeoff](#classmavsdk_1_1_action_1a0121d39baf922b1d88283230207ab5d0) () const | Send command to take off and hover. +void | [land_async](#classmavsdk_1_1_action_1a89d146a766d49f1c706c66a3e2b9252d) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to land at the current position. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [land](#classmavsdk_1_1_action_1af6429e1bdb2875deebfe98ed53da3d41) () const | Send command to land at the current position. +void | [reboot_async](#classmavsdk_1_1_action_1a32cfcc71a00afc28f43d2a22c319618c) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to reboot the drone components. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [reboot](#classmavsdk_1_1_action_1a7f1e1911ca234e5572b3162a45d83c5d) () const | Send command to reboot the drone components. +void | [shutdown_async](#classmavsdk_1_1_action_1a1658a5499c61c46340428bb819453615) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to shut down the drone components. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [shutdown](#classmavsdk_1_1_action_1a44522a60732d3968831f0cf6097c5360) () const | Send command to shut down the drone components. +void | [terminate_async](#classmavsdk_1_1_action_1a47536c4a4bc8367ccd30a92eb09781c5) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to terminate the drone. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [terminate](#classmavsdk_1_1_action_1a4183edd722a8a60d281c882a90723b99) () const | Send command to terminate the drone. +void | [kill_async](#classmavsdk_1_1_action_1a78c1f15c3b190ba94793045621819e69) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to kill the drone. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [kill](#classmavsdk_1_1_action_1af40fc1ddf588b3796134a9303ebc3667) () const | Send command to kill the drone. +void | [return_to_launch_async](#classmavsdk_1_1_action_1abe5bd426de588b246644ee3ddb12517d) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to return to the launch (takeoff) position and land. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [return_to_launch](#classmavsdk_1_1_action_1afd7c225df0495b0947f00e7d2dd64877) () const | Send command to return to the launch (takeoff) position and land. +void | [goto_location_async](#classmavsdk_1_1_action_1a6fd615e5571d6e7e3c53a79d2160ffc5) (double latitude_deg, double longitude_deg, float absolute_altitude_m, float yaw_deg, const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to move the vehicle to a specific global position. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [goto_location](#classmavsdk_1_1_action_1afb3546fa994357e491816f2032716818) (double latitude_deg, double longitude_deg, float absolute_altitude_m, float yaw_deg)const | Send command to move the vehicle to a specific global position. +void | [do_orbit_async](#classmavsdk_1_1_action_1aac9a2ac57a6e8f734b25c2e6dc0729ba) (float radius_m, float velocity_ms, [OrbitYawBehavior](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1ad9dd7c5e85dda1ae188df75998375c92) yaw_behavior, double latitude_deg, double longitude_deg, double absolute_altitude_m, const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command do orbit to the drone. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [do_orbit](#classmavsdk_1_1_action_1ac7447a86016bee3576643563079288b9) (float radius_m, float velocity_ms, [OrbitYawBehavior](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1ad9dd7c5e85dda1ae188df75998375c92) yaw_behavior, double latitude_deg, double longitude_deg, double absolute_altitude_m)const | Send command do orbit to the drone. +void | [hold_async](#classmavsdk_1_1_action_1aad198c883e7ace1cf4556c3b15bd8ad8) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to hold position (a.k.a. "Loiter"). +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [hold](#classmavsdk_1_1_action_1a3440724492453e88d2399be7bae6e7c4) () const | Send command to hold position (a.k.a. "Loiter"). +void | [set_actuator_async](#classmavsdk_1_1_action_1a2206033eb3469d2ae81b9cf994bfda98) (int32_t index, float value, const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to set the value of an actuator. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [set_actuator](#classmavsdk_1_1_action_1ad30beac27f05c62dcf6a3d0928b86e4c) (int32_t index, float value)const | Send command to set the value of an actuator. +void | [transition_to_fixedwing_async](#classmavsdk_1_1_action_1aa56181441cd64e092a8fb91a38c7c9fd) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to transition the drone to fixedwing. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [transition_to_fixedwing](#classmavsdk_1_1_action_1a8d5cf999a48ea3859ec75db27cf4fbda) () const | Send command to transition the drone to fixedwing. +void | [transition_to_multicopter_async](#classmavsdk_1_1_action_1a8c109076641b5c9aa6dd78ea8b913529) (const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Send command to transition the drone to multicopter. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [transition_to_multicopter](#classmavsdk_1_1_action_1aac94bfb8613a8e9869e3620b3dc9bb8e) () const | Send command to transition the drone to multicopter. +void | [get_takeoff_altitude_async](#classmavsdk_1_1_action_1a0a600e6ef75a69341d8b21243e7b1a71) (const [GetTakeoffAltitudeCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1ad1ae6edb8ea375a3472ef14313b591e2) callback) | Get the takeoff altitude (in meters above ground). +std::pair< [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float > | [get_takeoff_altitude](#classmavsdk_1_1_action_1a85df48432c5ed2c6e23831409139ed39) () const | Get the takeoff altitude (in meters above ground). +void | [set_takeoff_altitude_async](#classmavsdk_1_1_action_1a9027c3e5f9eaf37cdfe8c426727c7693) (float altitude, const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Set takeoff altitude (in meters above ground). +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [set_takeoff_altitude](#classmavsdk_1_1_action_1ace2188fe367b3bb10b17b89c88d1f952) (float altitude)const | Set takeoff altitude (in meters above ground). +void | [get_maximum_speed_async](#classmavsdk_1_1_action_1a30aada232be0f805950a78e2005ade75) (const [GetMaximumSpeedCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a6993096d3e1424a817ad58ce8217a73c) callback) | Get the vehicle maximum speed (in metres/second). +std::pair< [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float > | [get_maximum_speed](#classmavsdk_1_1_action_1a128bf73fe8d0d359f36a3a9a327799ee) () const | Get the vehicle maximum speed (in metres/second). +void | [set_maximum_speed_async](#classmavsdk_1_1_action_1abc99f14481f0d961228c6535da9017a6) (float speed, const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Set vehicle maximum speed (in metres/second). +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [set_maximum_speed](#classmavsdk_1_1_action_1a5fccee1636215bccf8d77d9dca15134e) (float speed)const | Set vehicle maximum speed (in metres/second). +void | [get_return_to_launch_altitude_async](#classmavsdk_1_1_action_1aa19935b55d80f63e06397b3ea4b51c22) (const [GetReturnToLaunchAltitudeCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1af28acf6f7cff11f3c583761edb7d7415) callback) | Get the return to launch minimum return altitude (in meters). +std::pair< [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float > | [get_return_to_launch_altitude](#classmavsdk_1_1_action_1aeffd084ea51c8a784e28b44b859b6586) () const | Get the return to launch minimum return altitude (in meters). +void | [set_return_to_launch_altitude_async](#classmavsdk_1_1_action_1acdc4360c21ec82c57125023c552b3410) (float relative_altitude_m, const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Set the return to launch minimum return altitude (in meters). +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [set_return_to_launch_altitude](#classmavsdk_1_1_action_1a5b05e84d35fad5b0ba2837aae1b3686e) (float relative_altitude_m)const | Set the return to launch minimum return altitude (in meters). +void | [set_current_speed_async](#classmavsdk_1_1_action_1afd210be0eba436c81da79107562a0b6c) (float speed_m_s, const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) callback) | Set current speed. +[Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) | [set_current_speed](#classmavsdk_1_1_action_1af3b74cf3912411d9476b6eeac0984afb) (float speed_m_s)const | Set current speed. +const [Action](classmavsdk_1_1_action.md) & | [operator=](#classmavsdk_1_1_action_1a1ff7e178b7ededc41bd9ccab0ca07457) (const [Action](classmavsdk_1_1_action.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Action() {#classmavsdk_1_1_action_1a5e2a4d65f85d821be691a837453e56ee} +```cpp +mavsdk::Action::Action(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto action = Action(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Action() {#classmavsdk_1_1_action_1a4359d18e02bca100175cd00fab814550} +```cpp +mavsdk::Action::Action(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto action = Action(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Action() {#classmavsdk_1_1_action_1a99352fe4e83e4b721d5c5b5942beb76f} +```cpp +mavsdk::Action::~Action() override +``` + + +Destructor (internal use only). + + +### Action() {#classmavsdk_1_1_action_1a99fc1d6fc90af15a93bb270b0279a095} +```cpp +mavsdk::Action::Action(const Action &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Action](classmavsdk_1_1_action.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd} + +```cpp +using mavsdk::Action::ResultCallback = std::function +``` + + +Callback type for asynchronous [Action](classmavsdk_1_1_action.md) calls. + + +### typedef GetTakeoffAltitudeCallback {#classmavsdk_1_1_action_1ad1ae6edb8ea375a3472ef14313b591e2} + +```cpp +using mavsdk::Action::GetTakeoffAltitudeCallback = std::function +``` + + +Callback type for get_takeoff_altitude_async. + + +### typedef GetMaximumSpeedCallback {#classmavsdk_1_1_action_1a6993096d3e1424a817ad58ce8217a73c} + +```cpp +using mavsdk::Action::GetMaximumSpeedCallback = std::function +``` + + +Callback type for get_maximum_speed_async. + + +### typedef GetReturnToLaunchAltitudeCallback {#classmavsdk_1_1_action_1af28acf6f7cff11f3c583761edb7d7415} + +```cpp +using mavsdk::Action::GetReturnToLaunchAltitudeCallback = std::function +``` + + +Callback type for get_return_to_launch_altitude_async. + + +## Member Enumeration Documentation + + +### enum OrbitYawBehavior {#classmavsdk_1_1_action_1ad9dd7c5e85dda1ae188df75998375c92} + + +Yaw behaviour during orbit flight. + + +Value | Description +--- | --- + `HoldFrontToCircleCenter` | Vehicle front points to the center (default). + `HoldInitialHeading` | Vehicle front holds heading when message received. + `Uncontrolled` | Yaw uncontrolled. + `HoldFrontTangentToCircle` | Vehicle front follows flight path (tangential to circle). + `RcControlled` | Yaw controlled by RC input. + +### enum Result {#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51} + + +Possible results returned for action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request was successful. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command refused by vehicle. + `CommandDeniedLandedStateUnknown` | Command refused because landed state is unknown. + `CommandDeniedNotLanded` | Command refused because vehicle not landed. + `Timeout` | Request timed out. + `VtolTransitionSupportUnknown` | Hybrid/VTOL transition support is unknown. + `NoVtolTransitionSupport` | Vehicle does not support hybrid/VTOL transitions. + `ParameterError` | Error getting or setting parameter. + `Unsupported` | [Action](classmavsdk_1_1_action.md) not supported. + `Failed` | [Action](classmavsdk_1_1_action.md) failed. + +## Member Function Documentation + + +### arm_async() {#classmavsdk_1_1_action_1a570a3799ca5dbbf8aab30ce465687796} +```cpp +void mavsdk::Action::arm_async(const ResultCallback callback) +``` + + +Send command to arm the drone. + +Arming a drone normally causes motors to spin at idle. Before arming take all safety precautions and stand clear of the drone! + + +This function is non-blocking. See 'arm' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### arm() {#classmavsdk_1_1_action_1a3ee123973982842f46a9f8b6cb952566} +```cpp +Result mavsdk::Action::arm() const +``` + + +Send command to arm the drone. + +Arming a drone normally causes motors to spin at idle. Before arming take all safety precautions and stand clear of the drone! + + +This function is blocking. See 'arm_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### disarm_async() {#classmavsdk_1_1_action_1a3107f7f5a2f4a478024667f187f8f2aa} +```cpp +void mavsdk::Action::disarm_async(const ResultCallback callback) +``` + + +Send command to disarm the drone. + +This will disarm a drone that considers itself landed. If flying, the drone should reject the disarm command. Disarming means that all motors will stop. + + +This function is non-blocking. See 'disarm' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### disarm() {#classmavsdk_1_1_action_1a44c61110965bcdd3dfb90a08d3c6b6b9} +```cpp +Result mavsdk::Action::disarm() const +``` + + +Send command to disarm the drone. + +This will disarm a drone that considers itself landed. If flying, the drone should reject the disarm command. Disarming means that all motors will stop. + + +This function is blocking. See 'disarm_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### takeoff_async() {#classmavsdk_1_1_action_1ab658d938970326db41709d83e02b41e6} +```cpp +void mavsdk::Action::takeoff_async(const ResultCallback callback) +``` + + +Send command to take off and hover. + +This switches the drone into position control mode and commands it to take off and hover at the takeoff altitude. + + +Note that the vehicle must be armed before it can take off. + + +This function is non-blocking. See 'takeoff' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### takeoff() {#classmavsdk_1_1_action_1a0121d39baf922b1d88283230207ab5d0} +```cpp +Result mavsdk::Action::takeoff() const +``` + + +Send command to take off and hover. + +This switches the drone into position control mode and commands it to take off and hover at the takeoff altitude. + + +Note that the vehicle must be armed before it can take off. + + +This function is blocking. See 'takeoff_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### land_async() {#classmavsdk_1_1_action_1a89d146a766d49f1c706c66a3e2b9252d} +```cpp +void mavsdk::Action::land_async(const ResultCallback callback) +``` + + +Send command to land at the current position. + +This switches the drone to 'Land' flight mode. + + +This function is non-blocking. See 'land' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### land() {#classmavsdk_1_1_action_1af6429e1bdb2875deebfe98ed53da3d41} +```cpp +Result mavsdk::Action::land() const +``` + + +Send command to land at the current position. + +This switches the drone to 'Land' flight mode. + + +This function is blocking. See 'land_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### reboot_async() {#classmavsdk_1_1_action_1a32cfcc71a00afc28f43d2a22c319618c} +```cpp +void mavsdk::Action::reboot_async(const ResultCallback callback) +``` + + +Send command to reboot the drone components. + +This will reboot the autopilot, companion computer, camera and gimbal. + + +This function is non-blocking. See 'reboot' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### reboot() {#classmavsdk_1_1_action_1a7f1e1911ca234e5572b3162a45d83c5d} +```cpp +Result mavsdk::Action::reboot() const +``` + + +Send command to reboot the drone components. + +This will reboot the autopilot, companion computer, camera and gimbal. + + +This function is blocking. See 'reboot_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### shutdown_async() {#classmavsdk_1_1_action_1a1658a5499c61c46340428bb819453615} +```cpp +void mavsdk::Action::shutdown_async(const ResultCallback callback) +``` + + +Send command to shut down the drone components. + +This will shut down the autopilot, onboard computer, camera and gimbal. This command should only be used when the autopilot is disarmed and autopilots commonly reject it if they are not already ready to shut down. + + +This function is non-blocking. See 'shutdown' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### shutdown() {#classmavsdk_1_1_action_1a44522a60732d3968831f0cf6097c5360} +```cpp +Result mavsdk::Action::shutdown() const +``` + + +Send command to shut down the drone components. + +This will shut down the autopilot, onboard computer, camera and gimbal. This command should only be used when the autopilot is disarmed and autopilots commonly reject it if they are not already ready to shut down. + + +This function is blocking. See 'shutdown_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### terminate_async() {#classmavsdk_1_1_action_1a47536c4a4bc8367ccd30a92eb09781c5} +```cpp +void mavsdk::Action::terminate_async(const ResultCallback callback) +``` + + +Send command to terminate the drone. + +This will run the terminate routine as configured on the drone (e.g. disarm and open the parachute). + + +This function is non-blocking. See 'terminate' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### terminate() {#classmavsdk_1_1_action_1a4183edd722a8a60d281c882a90723b99} +```cpp +Result mavsdk::Action::terminate() const +``` + + +Send command to terminate the drone. + +This will run the terminate routine as configured on the drone (e.g. disarm and open the parachute). + + +This function is blocking. See 'terminate_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### kill_async() {#classmavsdk_1_1_action_1a78c1f15c3b190ba94793045621819e69} +```cpp +void mavsdk::Action::kill_async(const ResultCallback callback) +``` + + +Send command to kill the drone. + +This will disarm a drone irrespective of whether it is landed or flying. Note that the drone will fall out of the sky if this command is used while flying. + + +This function is non-blocking. See 'kill' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### kill() {#classmavsdk_1_1_action_1af40fc1ddf588b3796134a9303ebc3667} +```cpp +Result mavsdk::Action::kill() const +``` + + +Send command to kill the drone. + +This will disarm a drone irrespective of whether it is landed or flying. Note that the drone will fall out of the sky if this command is used while flying. + + +This function is blocking. See 'kill_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### return_to_launch_async() {#classmavsdk_1_1_action_1abe5bd426de588b246644ee3ddb12517d} +```cpp +void mavsdk::Action::return_to_launch_async(const ResultCallback callback) +``` + + +Send command to return to the launch (takeoff) position and land. + +This switches the drone into [Return mode](https://docs.px4.io/master/en/flight_modes/return.html) which generally means it will rise up to a certain altitude to clear any obstacles before heading back to the launch (takeoff) position and land there. + + +This function is non-blocking. See 'return_to_launch' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### return_to_launch() {#classmavsdk_1_1_action_1afd7c225df0495b0947f00e7d2dd64877} +```cpp +Result mavsdk::Action::return_to_launch() const +``` + + +Send command to return to the launch (takeoff) position and land. + +This switches the drone into [Return mode](https://docs.px4.io/master/en/flight_modes/return.html) which generally means it will rise up to a certain altitude to clear any obstacles before heading back to the launch (takeoff) position and land there. + + +This function is blocking. See 'return_to_launch_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### goto_location_async() {#classmavsdk_1_1_action_1a6fd615e5571d6e7e3c53a79d2160ffc5} +```cpp +void mavsdk::Action::goto_location_async(double latitude_deg, double longitude_deg, float absolute_altitude_m, float yaw_deg, const ResultCallback callback) +``` + + +Send command to move the vehicle to a specific global position. + +The latitude and longitude are given in degrees (WGS84 frame) and the altitude in meters AMSL (above mean sea level). + + +The yaw angle is in degrees (frame is NED, 0 is North, positive is clockwise). + + +This function is non-blocking. See 'goto_location' for the blocking counterpart. + +**Parameters** + +* double **latitude_deg** - +* double **longitude_deg** - +* float **absolute_altitude_m** - +* float **yaw_deg** - +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### goto_location() {#classmavsdk_1_1_action_1afb3546fa994357e491816f2032716818} +```cpp +Result mavsdk::Action::goto_location(double latitude_deg, double longitude_deg, float absolute_altitude_m, float yaw_deg) const +``` + + +Send command to move the vehicle to a specific global position. + +The latitude and longitude are given in degrees (WGS84 frame) and the altitude in meters AMSL (above mean sea level). + + +The yaw angle is in degrees (frame is NED, 0 is North, positive is clockwise). + + +This function is blocking. See 'goto_location_async' for the non-blocking counterpart. + +**Parameters** + +* double **latitude_deg** - +* double **longitude_deg** - +* float **absolute_altitude_m** - +* float **yaw_deg** - + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### do_orbit_async() {#classmavsdk_1_1_action_1aac9a2ac57a6e8f734b25c2e6dc0729ba} +```cpp +void mavsdk::Action::do_orbit_async(float radius_m, float velocity_ms, OrbitYawBehavior yaw_behavior, double latitude_deg, double longitude_deg, double absolute_altitude_m, const ResultCallback callback) +``` + + +Send command do orbit to the drone. + +This will run the orbit routine with the given parameters. + + +This function is non-blocking. See 'do_orbit' for the blocking counterpart. + +**Parameters** + +* float **radius_m** - +* float **velocity_ms** - +* [OrbitYawBehavior](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1ad9dd7c5e85dda1ae188df75998375c92) **yaw_behavior** - +* double **latitude_deg** - +* double **longitude_deg** - +* double **absolute_altitude_m** - +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### do_orbit() {#classmavsdk_1_1_action_1ac7447a86016bee3576643563079288b9} +```cpp +Result mavsdk::Action::do_orbit(float radius_m, float velocity_ms, OrbitYawBehavior yaw_behavior, double latitude_deg, double longitude_deg, double absolute_altitude_m) const +``` + + +Send command do orbit to the drone. + +This will run the orbit routine with the given parameters. + + +This function is blocking. See 'do_orbit_async' for the non-blocking counterpart. + +**Parameters** + +* float **radius_m** - +* float **velocity_ms** - +* [OrbitYawBehavior](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1ad9dd7c5e85dda1ae188df75998375c92) **yaw_behavior** - +* double **latitude_deg** - +* double **longitude_deg** - +* double **absolute_altitude_m** - + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### hold_async() {#classmavsdk_1_1_action_1aad198c883e7ace1cf4556c3b15bd8ad8} +```cpp +void mavsdk::Action::hold_async(const ResultCallback callback) +``` + + +Send command to hold position (a.k.a. "Loiter"). + +Sends a command to drone to change to Hold flight mode, causing the vehicle to stop and maintain its current GPS position and altitude. + + +Note: this command is specific to the PX4 Autopilot flight stack as it implies a change to a PX4-specific mode. + + +This function is non-blocking. See 'hold' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### hold() {#classmavsdk_1_1_action_1a3440724492453e88d2399be7bae6e7c4} +```cpp +Result mavsdk::Action::hold() const +``` + + +Send command to hold position (a.k.a. "Loiter"). + +Sends a command to drone to change to Hold flight mode, causing the vehicle to stop and maintain its current GPS position and altitude. + + +Note: this command is specific to the PX4 Autopilot flight stack as it implies a change to a PX4-specific mode. + + +This function is blocking. See 'hold_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### set_actuator_async() {#classmavsdk_1_1_action_1a2206033eb3469d2ae81b9cf994bfda98} +```cpp +void mavsdk::Action::set_actuator_async(int32_t index, float value, const ResultCallback callback) +``` + + +Send command to set the value of an actuator. + +This function is non-blocking. See 'set_actuator' for the blocking counterpart. + +**Parameters** + +* int32_t **index** - +* float **value** - +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### set_actuator() {#classmavsdk_1_1_action_1ad30beac27f05c62dcf6a3d0928b86e4c} +```cpp +Result mavsdk::Action::set_actuator(int32_t index, float value) const +``` + + +Send command to set the value of an actuator. + +This function is blocking. See 'set_actuator_async' for the non-blocking counterpart. + +**Parameters** + +* int32_t **index** - +* float **value** - + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### transition_to_fixedwing_async() {#classmavsdk_1_1_action_1aa56181441cd64e092a8fb91a38c7c9fd} +```cpp +void mavsdk::Action::transition_to_fixedwing_async(const ResultCallback callback) +``` + + +Send command to transition the drone to fixedwing. + +The associated action will only be executed for VTOL vehicles (on other vehicle types the command will fail). The command will succeed if called when the vehicle is already in fixedwing mode. + + +This function is non-blocking. See 'transition_to_fixedwing' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### transition_to_fixedwing() {#classmavsdk_1_1_action_1a8d5cf999a48ea3859ec75db27cf4fbda} +```cpp +Result mavsdk::Action::transition_to_fixedwing() const +``` + + +Send command to transition the drone to fixedwing. + +The associated action will only be executed for VTOL vehicles (on other vehicle types the command will fail). The command will succeed if called when the vehicle is already in fixedwing mode. + + +This function is blocking. See 'transition_to_fixedwing_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### transition_to_multicopter_async() {#classmavsdk_1_1_action_1a8c109076641b5c9aa6dd78ea8b913529} +```cpp +void mavsdk::Action::transition_to_multicopter_async(const ResultCallback callback) +``` + + +Send command to transition the drone to multicopter. + +The associated action will only be executed for VTOL vehicles (on other vehicle types the command will fail). The command will succeed if called when the vehicle is already in multicopter mode. + + +This function is non-blocking. See 'transition_to_multicopter' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### transition_to_multicopter() {#classmavsdk_1_1_action_1aac94bfb8613a8e9869e3620b3dc9bb8e} +```cpp +Result mavsdk::Action::transition_to_multicopter() const +``` + + +Send command to transition the drone to multicopter. + +The associated action will only be executed for VTOL vehicles (on other vehicle types the command will fail). The command will succeed if called when the vehicle is already in multicopter mode. + + +This function is blocking. See 'transition_to_multicopter_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### get_takeoff_altitude_async() {#classmavsdk_1_1_action_1a0a600e6ef75a69341d8b21243e7b1a71} +```cpp +void mavsdk::Action::get_takeoff_altitude_async(const GetTakeoffAltitudeCallback callback) +``` + + +Get the takeoff altitude (in meters above ground). + +This function is non-blocking. See 'get_takeoff_altitude' for the blocking counterpart. + +**Parameters** + +* const [GetTakeoffAltitudeCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1ad1ae6edb8ea375a3472ef14313b591e2) **callback** - + +### get_takeoff_altitude() {#classmavsdk_1_1_action_1a85df48432c5ed2c6e23831409139ed39} +```cpp +std::pair mavsdk::Action::get_takeoff_altitude() const +``` + + +Get the takeoff altitude (in meters above ground). + +This function is blocking. See 'get_takeoff_altitude_async' for the non-blocking counterpart. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float > - Result of request. + +### set_takeoff_altitude_async() {#classmavsdk_1_1_action_1a9027c3e5f9eaf37cdfe8c426727c7693} +```cpp +void mavsdk::Action::set_takeoff_altitude_async(float altitude, const ResultCallback callback) +``` + + +Set takeoff altitude (in meters above ground). + +This function is non-blocking. See 'set_takeoff_altitude' for the blocking counterpart. + +**Parameters** + +* float **altitude** - +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### set_takeoff_altitude() {#classmavsdk_1_1_action_1ace2188fe367b3bb10b17b89c88d1f952} +```cpp +Result mavsdk::Action::set_takeoff_altitude(float altitude) const +``` + + +Set takeoff altitude (in meters above ground). + +This function is blocking. See 'set_takeoff_altitude_async' for the non-blocking counterpart. + +**Parameters** + +* float **altitude** - + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### get_maximum_speed_async() {#classmavsdk_1_1_action_1a30aada232be0f805950a78e2005ade75} +```cpp +void mavsdk::Action::get_maximum_speed_async(const GetMaximumSpeedCallback callback) +``` + + +Get the vehicle maximum speed (in metres/second). + +This function is non-blocking. See 'get_maximum_speed' for the blocking counterpart. + +**Parameters** + +* const [GetMaximumSpeedCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a6993096d3e1424a817ad58ce8217a73c) **callback** - + +### get_maximum_speed() {#classmavsdk_1_1_action_1a128bf73fe8d0d359f36a3a9a327799ee} +```cpp +std::pair mavsdk::Action::get_maximum_speed() const +``` + + +Get the vehicle maximum speed (in metres/second). + +This function is blocking. See 'get_maximum_speed_async' for the non-blocking counterpart. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float > - Result of request. + +### set_maximum_speed_async() {#classmavsdk_1_1_action_1abc99f14481f0d961228c6535da9017a6} +```cpp +void mavsdk::Action::set_maximum_speed_async(float speed, const ResultCallback callback) +``` + + +Set vehicle maximum speed (in metres/second). + +This function is non-blocking. See 'set_maximum_speed' for the blocking counterpart. + +**Parameters** + +* float **speed** - +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### set_maximum_speed() {#classmavsdk_1_1_action_1a5fccee1636215bccf8d77d9dca15134e} +```cpp +Result mavsdk::Action::set_maximum_speed(float speed) const +``` + + +Set vehicle maximum speed (in metres/second). + +This function is blocking. See 'set_maximum_speed_async' for the non-blocking counterpart. + +**Parameters** + +* float **speed** - + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### get_return_to_launch_altitude_async() {#classmavsdk_1_1_action_1aa19935b55d80f63e06397b3ea4b51c22} +```cpp +void mavsdk::Action::get_return_to_launch_altitude_async(const GetReturnToLaunchAltitudeCallback callback) +``` + + +Get the return to launch minimum return altitude (in meters). + +This function is non-blocking. See 'get_return_to_launch_altitude' for the blocking counterpart. + +**Parameters** + +* const [GetReturnToLaunchAltitudeCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1af28acf6f7cff11f3c583761edb7d7415) **callback** - + +### get_return_to_launch_altitude() {#classmavsdk_1_1_action_1aeffd084ea51c8a784e28b44b859b6586} +```cpp +std::pair mavsdk::Action::get_return_to_launch_altitude() const +``` + + +Get the return to launch minimum return altitude (in meters). + +This function is blocking. See 'get_return_to_launch_altitude_async' for the non-blocking counterpart. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51), float > - Result of request. + +### set_return_to_launch_altitude_async() {#classmavsdk_1_1_action_1acdc4360c21ec82c57125023c552b3410} +```cpp +void mavsdk::Action::set_return_to_launch_altitude_async(float relative_altitude_m, const ResultCallback callback) +``` + + +Set the return to launch minimum return altitude (in meters). + +This function is non-blocking. See 'set_return_to_launch_altitude' for the blocking counterpart. + +**Parameters** + +* float **relative_altitude_m** - +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### set_return_to_launch_altitude() {#classmavsdk_1_1_action_1a5b05e84d35fad5b0ba2837aae1b3686e} +```cpp +Result mavsdk::Action::set_return_to_launch_altitude(float relative_altitude_m) const +``` + + +Set the return to launch minimum return altitude (in meters). + +This function is blocking. See 'set_return_to_launch_altitude_async' for the non-blocking counterpart. + +**Parameters** + +* float **relative_altitude_m** - + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### set_current_speed_async() {#classmavsdk_1_1_action_1afd210be0eba436c81da79107562a0b6c} +```cpp +void mavsdk::Action::set_current_speed_async(float speed_m_s, const ResultCallback callback) +``` + + +Set current speed. + +This will set the speed during a mission, reposition, and similar. It is ephemeral, so not stored on the drone and does not survive a reboot. + + +This function is non-blocking. See 'set_current_speed' for the blocking counterpart. + +**Parameters** + +* float **speed_m_s** - +* const [ResultCallback](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1a70a7b6e742d0c86728dc2e1827dacccd) **callback** - + +### set_current_speed() {#classmavsdk_1_1_action_1af3b74cf3912411d9476b6eeac0984afb} +```cpp +Result mavsdk::Action::set_current_speed(float speed_m_s) const +``` + + +Set current speed. + +This will set the speed during a mission, reposition, and similar. It is ephemeral, so not stored on the drone and does not survive a reboot. + + +This function is blocking. See 'set_current_speed_async' for the non-blocking counterpart. + +**Parameters** + +* float **speed_m_s** - + +**Returns** + + [Result](classmavsdk_1_1_action.md#classmavsdk_1_1_action_1adc2e13257ef13de0e7610cf879a0ec51) - Result of request. + +### operator=() {#classmavsdk_1_1_action_1a1ff7e178b7ededc41bd9ccab0ca07457} +```cpp +const Action& mavsdk::Action::operator=(const Action &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Action](classmavsdk_1_1_action.md)& - + +**Returns** + + const [Action](classmavsdk_1_1_action.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_action_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_action_server.md new file mode 100644 index 000000000..91a56963f --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_action_server.md @@ -0,0 +1,631 @@ +# mavsdk::ActionServer Class Reference +`#include: action_server.h` + +---- + + +Provide vehicle actions (as a server) such as arming, taking off, and landing. + + +## Data Structures + + +struct [AllowableFlightModes](structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md) + +struct [ArmDisarm](structmavsdk_1_1_action_server_1_1_arm_disarm.md) + +## Public Types + + +Type | Description +--- | --- +enum [FlightMode](#classmavsdk_1_1_action_server_1aee12027f5d9380f2c13fa7813c6ae1d8) | Flight modes. +enum [Result](#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) | Possible results returned for action requests. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8))> [ResultCallback](#classmavsdk_1_1_action_server_1affc7fcdc5f60e367bb9032b938223b95) | Callback type for asynchronous [ActionServer](classmavsdk_1_1_action_server.md) calls. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), [ArmDisarm](structmavsdk_1_1_action_server_1_1_arm_disarm.md))> [ArmDisarmCallback](#classmavsdk_1_1_action_server_1a8ef1c6ec94f6bf5173d208be15b14910) | Callback type for subscribe_arm_disarm. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), [ArmDisarm](structmavsdk_1_1_action_server_1_1_arm_disarm.md) > [ArmDisarmHandle](#classmavsdk_1_1_action_server_1a5974c4b3e20da3418f9ca2b9de92157b) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_arm_disarm. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), [FlightMode](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aee12027f5d9380f2c13fa7813c6ae1d8))> [FlightModeChangeCallback](#classmavsdk_1_1_action_server_1a58a1284a240908bf4d9dd998d5939f6f) | Callback type for subscribe_flight_mode_change. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), [FlightMode](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aee12027f5d9380f2c13fa7813c6ae1d8) > [FlightModeChangeHandle](#classmavsdk_1_1_action_server_1aa9746c14f9f1d65ee548ab97b433da2f) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_flight_mode_change. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool)> [TakeoffCallback](#classmavsdk_1_1_action_server_1a23074d52d687eff2c4fc0184ac1b61fd) | Callback type for subscribe_takeoff. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool > [TakeoffHandle](#classmavsdk_1_1_action_server_1aea7eff252335602cd3785a6551c6ba64) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_takeoff. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool)> [LandCallback](#classmavsdk_1_1_action_server_1af2eb6d32c9f903a6e9f773ddf2acf4a0) | Callback type for subscribe_land. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool > [LandHandle](#classmavsdk_1_1_action_server_1ae7c1a7d2a06cc045c9e0f29422f16278) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_land. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool)> [RebootCallback](#classmavsdk_1_1_action_server_1a8b2ad3a5fc6a5ac256e21b60043093bd) | Callback type for subscribe_reboot. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool > [RebootHandle](#classmavsdk_1_1_action_server_1ab1544cd3b8ae97dcb37af0ff7320f29a) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_reboot. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool)> [ShutdownCallback](#classmavsdk_1_1_action_server_1aaa5057d10ec2b242c4a35fec46e5602a) | Callback type for subscribe_shutdown. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool > [ShutdownHandle](#classmavsdk_1_1_action_server_1a7604a04e4ccf230a321593aaec209375) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_shutdown. +std::function< void([Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool)> [TerminateCallback](#classmavsdk_1_1_action_server_1a5eb879b36b5efc4f14bed82ed7655384) | Callback type for subscribe_terminate. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8), bool > [TerminateHandle](#classmavsdk_1_1_action_server_1a5ee91dbf03cfc2f19b0cdd3aee6e4214) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_terminate. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [ActionServer](#classmavsdk_1_1_action_server_1aa7a3da260716d5dc7857b26b40d45299) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~ActionServer](#classmavsdk_1_1_action_server_1a1ddccf377314e9fffee6ab56edaf2b17) () override | Destructor (internal use only). +  | [ActionServer](#classmavsdk_1_1_action_server_1a42228e948d6a50b42ac8e506dc9d094c) (const [ActionServer](classmavsdk_1_1_action_server.md) & other) | Copy constructor. +[ArmDisarmHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5974c4b3e20da3418f9ca2b9de92157b) | [subscribe_arm_disarm](#classmavsdk_1_1_action_server_1a898cccbbf0fbb8e50c2d7ec75dd12164) (const [ArmDisarmCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a8ef1c6ec94f6bf5173d208be15b14910) & callback) | Subscribe to ARM/DISARM commands. +void | [unsubscribe_arm_disarm](#classmavsdk_1_1_action_server_1adef1a0b5964278a9188ffaf17d7cc1ed) ([ArmDisarmHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5974c4b3e20da3418f9ca2b9de92157b) handle) | Unsubscribe from subscribe_arm_disarm. +[FlightModeChangeHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aa9746c14f9f1d65ee548ab97b433da2f) | [subscribe_flight_mode_change](#classmavsdk_1_1_action_server_1a4f66d83144feb3657bc50316339f1a63) (const [FlightModeChangeCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a58a1284a240908bf4d9dd998d5939f6f) & callback) | Subscribe to DO_SET_MODE. +void | [unsubscribe_flight_mode_change](#classmavsdk_1_1_action_server_1acafa3948ad27afc697926f267a5a92d4) ([FlightModeChangeHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aa9746c14f9f1d65ee548ab97b433da2f) handle) | Unsubscribe from subscribe_flight_mode_change. +[TakeoffHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aea7eff252335602cd3785a6551c6ba64) | [subscribe_takeoff](#classmavsdk_1_1_action_server_1ab289bc925bf87ecc67a16ae0f4356015) (const [TakeoffCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a23074d52d687eff2c4fc0184ac1b61fd) & callback) | Subscribe to takeoff command. +void | [unsubscribe_takeoff](#classmavsdk_1_1_action_server_1ace083efcfa2323f3fa19bc65e373ff6f) ([TakeoffHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aea7eff252335602cd3785a6551c6ba64) handle) | Unsubscribe from subscribe_takeoff. +[LandHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ae7c1a7d2a06cc045c9e0f29422f16278) | [subscribe_land](#classmavsdk_1_1_action_server_1ac3d8a43058e281f49e2352dad9faf44a) (const [LandCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1af2eb6d32c9f903a6e9f773ddf2acf4a0) & callback) | Subscribe to land command. +void | [unsubscribe_land](#classmavsdk_1_1_action_server_1aecda6dc238780a1ae269b4f60815acf0) ([LandHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ae7c1a7d2a06cc045c9e0f29422f16278) handle) | Unsubscribe from subscribe_land. +[RebootHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ab1544cd3b8ae97dcb37af0ff7320f29a) | [subscribe_reboot](#classmavsdk_1_1_action_server_1ae4ea60fe031763a284e596bb3b805d97) (const [RebootCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a8b2ad3a5fc6a5ac256e21b60043093bd) & callback) | Subscribe to reboot command. +void | [unsubscribe_reboot](#classmavsdk_1_1_action_server_1a57fe5c92cb5448e6982ae6f62c13d2ba) ([RebootHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ab1544cd3b8ae97dcb37af0ff7320f29a) handle) | Unsubscribe from subscribe_reboot. +[ShutdownHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a7604a04e4ccf230a321593aaec209375) | [subscribe_shutdown](#classmavsdk_1_1_action_server_1ad30e10cb343d65e52efa2bfb71a52abf) (const [ShutdownCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aaa5057d10ec2b242c4a35fec46e5602a) & callback) | Subscribe to shutdown command. +void | [unsubscribe_shutdown](#classmavsdk_1_1_action_server_1a87dfe8c81f23f5e183f15bdbaf2645d2) ([ShutdownHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a7604a04e4ccf230a321593aaec209375) handle) | Unsubscribe from subscribe_shutdown. +[TerminateHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5ee91dbf03cfc2f19b0cdd3aee6e4214) | [subscribe_terminate](#classmavsdk_1_1_action_server_1ac332d0380be93c58208c8be626d6d797) (const [TerminateCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5eb879b36b5efc4f14bed82ed7655384) & callback) | Subscribe to terminate command. +void | [unsubscribe_terminate](#classmavsdk_1_1_action_server_1a3e236694f1f0beae030021b1b1d42633) ([TerminateHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5ee91dbf03cfc2f19b0cdd3aee6e4214) handle) | Unsubscribe from subscribe_terminate. +[Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) | [set_allow_takeoff](#classmavsdk_1_1_action_server_1a250a8a8d1aed87d7c4125c6cfe797250) (bool allow_takeoff)const | Can the vehicle takeoff. +[Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) | [set_armable](#classmavsdk_1_1_action_server_1ab5b21457f69f9f315d54dbc06e745a7a) (bool armable, bool force_armable)const | Can the vehicle arm when requested. +[Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) | [set_disarmable](#classmavsdk_1_1_action_server_1afae1336100d7a91a4f4521cee56a1ecb) (bool disarmable, bool force_disarmable)const | Can the vehicle disarm when requested. +[Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) | [set_allowable_flight_modes](#classmavsdk_1_1_action_server_1a3041d1b923a3b01021433ad43ab93b3a) ([AllowableFlightModes](structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md) flight_modes)const | Set which modes the vehicle can transition to (Manual always allowed) +[ActionServer::AllowableFlightModes](structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md) | [get_allowable_flight_modes](#classmavsdk_1_1_action_server_1a0960a6ec243823729a418a3c68feaf2a) () const | Get which modes the vehicle can transition to (Manual always allowed) +const [ActionServer](classmavsdk_1_1_action_server.md) & | [operator=](#classmavsdk_1_1_action_server_1a86d8bb24723ad8222669aec1f5c523ca) (const [ActionServer](classmavsdk_1_1_action_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ActionServer() {#classmavsdk_1_1_action_server_1aa7a3da260716d5dc7857b26b40d45299} +```cpp +mavsdk::ActionServer::ActionServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto action_server = ActionServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~ActionServer() {#classmavsdk_1_1_action_server_1a1ddccf377314e9fffee6ab56edaf2b17} +```cpp +mavsdk::ActionServer::~ActionServer() override +``` + + +Destructor (internal use only). + + +### ActionServer() {#classmavsdk_1_1_action_server_1a42228e948d6a50b42ac8e506dc9d094c} +```cpp +mavsdk::ActionServer::ActionServer(const ActionServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [ActionServer](classmavsdk_1_1_action_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_action_server_1affc7fcdc5f60e367bb9032b938223b95} + +```cpp +using mavsdk::ActionServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [ActionServer](classmavsdk_1_1_action_server.md) calls. + + +### typedef ArmDisarmCallback {#classmavsdk_1_1_action_server_1a8ef1c6ec94f6bf5173d208be15b14910} + +```cpp +using mavsdk::ActionServer::ArmDisarmCallback = std::function +``` + + +Callback type for subscribe_arm_disarm. + + +### typedef ArmDisarmHandle {#classmavsdk_1_1_action_server_1a5974c4b3e20da3418f9ca2b9de92157b} + +```cpp +using mavsdk::ActionServer::ArmDisarmHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_arm_disarm. + + +### typedef FlightModeChangeCallback {#classmavsdk_1_1_action_server_1a58a1284a240908bf4d9dd998d5939f6f} + +```cpp +using mavsdk::ActionServer::FlightModeChangeCallback = std::function +``` + + +Callback type for subscribe_flight_mode_change. + + +### typedef FlightModeChangeHandle {#classmavsdk_1_1_action_server_1aa9746c14f9f1d65ee548ab97b433da2f} + +```cpp +using mavsdk::ActionServer::FlightModeChangeHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_flight_mode_change. + + +### typedef TakeoffCallback {#classmavsdk_1_1_action_server_1a23074d52d687eff2c4fc0184ac1b61fd} + +```cpp +using mavsdk::ActionServer::TakeoffCallback = std::function +``` + + +Callback type for subscribe_takeoff. + + +### typedef TakeoffHandle {#classmavsdk_1_1_action_server_1aea7eff252335602cd3785a6551c6ba64} + +```cpp +using mavsdk::ActionServer::TakeoffHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_takeoff. + + +### typedef LandCallback {#classmavsdk_1_1_action_server_1af2eb6d32c9f903a6e9f773ddf2acf4a0} + +```cpp +using mavsdk::ActionServer::LandCallback = std::function +``` + + +Callback type for subscribe_land. + + +### typedef LandHandle {#classmavsdk_1_1_action_server_1ae7c1a7d2a06cc045c9e0f29422f16278} + +```cpp +using mavsdk::ActionServer::LandHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_land. + + +### typedef RebootCallback {#classmavsdk_1_1_action_server_1a8b2ad3a5fc6a5ac256e21b60043093bd} + +```cpp +using mavsdk::ActionServer::RebootCallback = std::function +``` + + +Callback type for subscribe_reboot. + + +### typedef RebootHandle {#classmavsdk_1_1_action_server_1ab1544cd3b8ae97dcb37af0ff7320f29a} + +```cpp +using mavsdk::ActionServer::RebootHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_reboot. + + +### typedef ShutdownCallback {#classmavsdk_1_1_action_server_1aaa5057d10ec2b242c4a35fec46e5602a} + +```cpp +using mavsdk::ActionServer::ShutdownCallback = std::function +``` + + +Callback type for subscribe_shutdown. + + +### typedef ShutdownHandle {#classmavsdk_1_1_action_server_1a7604a04e4ccf230a321593aaec209375} + +```cpp +using mavsdk::ActionServer::ShutdownHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_shutdown. + + +### typedef TerminateCallback {#classmavsdk_1_1_action_server_1a5eb879b36b5efc4f14bed82ed7655384} + +```cpp +using mavsdk::ActionServer::TerminateCallback = std::function +``` + + +Callback type for subscribe_terminate. + + +### typedef TerminateHandle {#classmavsdk_1_1_action_server_1a5ee91dbf03cfc2f19b0cdd3aee6e4214} + +```cpp +using mavsdk::ActionServer::TerminateHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_terminate. + + +## Member Enumeration Documentation + + +### enum FlightMode {#classmavsdk_1_1_action_server_1aee12027f5d9380f2c13fa7813c6ae1d8} + + +Flight modes. + +For more information about flight modes, check out [https://docs.px4.io/master/en/config/flight_mode.html](https://docs.px4.io/master/en/config/flight_mode.html). + +Value | Description +--- | --- + `Unknown` | Mode not known. + `Ready` | Armed and ready to take off. + `Takeoff` | Taking off. + `Hold` | Holding (hovering in place (or circling for fixed-wing vehicles). + `Mission` | In mission. + `ReturnToLaunch` | Returning to launch position (then landing). + `Land` | Landing. + `Offboard` | In 'offboard' mode. + `FollowMe` | In 'follow-me' mode. + `Manual` | In 'Manual' mode. + `Altctl` | In 'Altitude Control' mode. + `Posctl` | In 'Position Control' mode. + `Acro` | In 'Acro' mode. + `Stabilized` | In 'Stabilize' mode. + +### enum Result {#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8} + + +Possible results returned for action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request was successful. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command refused by vehicle. + `CommandDeniedLandedStateUnknown` | Command refused because landed state is unknown. + `CommandDeniedNotLanded` | Command refused because vehicle not landed. + `Timeout` | Request timed out. + `VtolTransitionSupportUnknown` | Hybrid/VTOL transition support is unknown. + `NoVtolTransitionSupport` | Vehicle does not support hybrid/VTOL transitions. + `ParameterError` | Error getting or setting parameter. + `Next` | Intermediate message showing progress or instructions on the next steps. + +## Member Function Documentation + + +### subscribe_arm_disarm() {#classmavsdk_1_1_action_server_1a898cccbbf0fbb8e50c2d7ec75dd12164} +```cpp +ArmDisarmHandle mavsdk::ActionServer::subscribe_arm_disarm(const ArmDisarmCallback &callback) +``` + + +Subscribe to ARM/DISARM commands. + + +**Parameters** + +* const [ArmDisarmCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a8ef1c6ec94f6bf5173d208be15b14910)& **callback** - + +**Returns** + + [ArmDisarmHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5974c4b3e20da3418f9ca2b9de92157b) - + +### unsubscribe_arm_disarm() {#classmavsdk_1_1_action_server_1adef1a0b5964278a9188ffaf17d7cc1ed} +```cpp +void mavsdk::ActionServer::unsubscribe_arm_disarm(ArmDisarmHandle handle) +``` + + +Unsubscribe from subscribe_arm_disarm. + + +**Parameters** + +* [ArmDisarmHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5974c4b3e20da3418f9ca2b9de92157b) **handle** - + +### subscribe_flight_mode_change() {#classmavsdk_1_1_action_server_1a4f66d83144feb3657bc50316339f1a63} +```cpp +FlightModeChangeHandle mavsdk::ActionServer::subscribe_flight_mode_change(const FlightModeChangeCallback &callback) +``` + + +Subscribe to DO_SET_MODE. + + +**Parameters** + +* const [FlightModeChangeCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a58a1284a240908bf4d9dd998d5939f6f)& **callback** - + +**Returns** + + [FlightModeChangeHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aa9746c14f9f1d65ee548ab97b433da2f) - + +### unsubscribe_flight_mode_change() {#classmavsdk_1_1_action_server_1acafa3948ad27afc697926f267a5a92d4} +```cpp +void mavsdk::ActionServer::unsubscribe_flight_mode_change(FlightModeChangeHandle handle) +``` + + +Unsubscribe from subscribe_flight_mode_change. + + +**Parameters** + +* [FlightModeChangeHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aa9746c14f9f1d65ee548ab97b433da2f) **handle** - + +### subscribe_takeoff() {#classmavsdk_1_1_action_server_1ab289bc925bf87ecc67a16ae0f4356015} +```cpp +TakeoffHandle mavsdk::ActionServer::subscribe_takeoff(const TakeoffCallback &callback) +``` + + +Subscribe to takeoff command. + + +**Parameters** + +* const [TakeoffCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a23074d52d687eff2c4fc0184ac1b61fd)& **callback** - + +**Returns** + + [TakeoffHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aea7eff252335602cd3785a6551c6ba64) - + +### unsubscribe_takeoff() {#classmavsdk_1_1_action_server_1ace083efcfa2323f3fa19bc65e373ff6f} +```cpp +void mavsdk::ActionServer::unsubscribe_takeoff(TakeoffHandle handle) +``` + + +Unsubscribe from subscribe_takeoff. + + +**Parameters** + +* [TakeoffHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aea7eff252335602cd3785a6551c6ba64) **handle** - + +### subscribe_land() {#classmavsdk_1_1_action_server_1ac3d8a43058e281f49e2352dad9faf44a} +```cpp +LandHandle mavsdk::ActionServer::subscribe_land(const LandCallback &callback) +``` + + +Subscribe to land command. + + +**Parameters** + +* const [LandCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1af2eb6d32c9f903a6e9f773ddf2acf4a0)& **callback** - + +**Returns** + + [LandHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ae7c1a7d2a06cc045c9e0f29422f16278) - + +### unsubscribe_land() {#classmavsdk_1_1_action_server_1aecda6dc238780a1ae269b4f60815acf0} +```cpp +void mavsdk::ActionServer::unsubscribe_land(LandHandle handle) +``` + + +Unsubscribe from subscribe_land. + + +**Parameters** + +* [LandHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ae7c1a7d2a06cc045c9e0f29422f16278) **handle** - + +### subscribe_reboot() {#classmavsdk_1_1_action_server_1ae4ea60fe031763a284e596bb3b805d97} +```cpp +RebootHandle mavsdk::ActionServer::subscribe_reboot(const RebootCallback &callback) +``` + + +Subscribe to reboot command. + + +**Parameters** + +* const [RebootCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a8b2ad3a5fc6a5ac256e21b60043093bd)& **callback** - + +**Returns** + + [RebootHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ab1544cd3b8ae97dcb37af0ff7320f29a) - + +### unsubscribe_reboot() {#classmavsdk_1_1_action_server_1a57fe5c92cb5448e6982ae6f62c13d2ba} +```cpp +void mavsdk::ActionServer::unsubscribe_reboot(RebootHandle handle) +``` + + +Unsubscribe from subscribe_reboot. + + +**Parameters** + +* [RebootHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1ab1544cd3b8ae97dcb37af0ff7320f29a) **handle** - + +### subscribe_shutdown() {#classmavsdk_1_1_action_server_1ad30e10cb343d65e52efa2bfb71a52abf} +```cpp +ShutdownHandle mavsdk::ActionServer::subscribe_shutdown(const ShutdownCallback &callback) +``` + + +Subscribe to shutdown command. + + +**Parameters** + +* const [ShutdownCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1aaa5057d10ec2b242c4a35fec46e5602a)& **callback** - + +**Returns** + + [ShutdownHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a7604a04e4ccf230a321593aaec209375) - + +### unsubscribe_shutdown() {#classmavsdk_1_1_action_server_1a87dfe8c81f23f5e183f15bdbaf2645d2} +```cpp +void mavsdk::ActionServer::unsubscribe_shutdown(ShutdownHandle handle) +``` + + +Unsubscribe from subscribe_shutdown. + + +**Parameters** + +* [ShutdownHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a7604a04e4ccf230a321593aaec209375) **handle** - + +### subscribe_terminate() {#classmavsdk_1_1_action_server_1ac332d0380be93c58208c8be626d6d797} +```cpp +TerminateHandle mavsdk::ActionServer::subscribe_terminate(const TerminateCallback &callback) +``` + + +Subscribe to terminate command. + + +**Parameters** + +* const [TerminateCallback](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5eb879b36b5efc4f14bed82ed7655384)& **callback** - + +**Returns** + + [TerminateHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5ee91dbf03cfc2f19b0cdd3aee6e4214) - + +### unsubscribe_terminate() {#classmavsdk_1_1_action_server_1a3e236694f1f0beae030021b1b1d42633} +```cpp +void mavsdk::ActionServer::unsubscribe_terminate(TerminateHandle handle) +``` + + +Unsubscribe from subscribe_terminate. + + +**Parameters** + +* [TerminateHandle](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a5ee91dbf03cfc2f19b0cdd3aee6e4214) **handle** - + +### set_allow_takeoff() {#classmavsdk_1_1_action_server_1a250a8a8d1aed87d7c4125c6cfe797250} +```cpp +Result mavsdk::ActionServer::set_allow_takeoff(bool allow_takeoff) const +``` + + +Can the vehicle takeoff. + +This function is blocking. + +**Parameters** + +* bool **allow_takeoff** - + +**Returns** + + [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) - Result of request. + +### set_armable() {#classmavsdk_1_1_action_server_1ab5b21457f69f9f315d54dbc06e745a7a} +```cpp +Result mavsdk::ActionServer::set_armable(bool armable, bool force_armable) const +``` + + +Can the vehicle arm when requested. + +This function is blocking. + +**Parameters** + +* bool **armable** - +* bool **force_armable** - + +**Returns** + + [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) - Result of request. + +### set_disarmable() {#classmavsdk_1_1_action_server_1afae1336100d7a91a4f4521cee56a1ecb} +```cpp +Result mavsdk::ActionServer::set_disarmable(bool disarmable, bool force_disarmable) const +``` + + +Can the vehicle disarm when requested. + +This function is blocking. + +**Parameters** + +* bool **disarmable** - +* bool **force_disarmable** - + +**Returns** + + [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) - Result of request. + +### set_allowable_flight_modes() {#classmavsdk_1_1_action_server_1a3041d1b923a3b01021433ad43ab93b3a} +```cpp +Result mavsdk::ActionServer::set_allowable_flight_modes(AllowableFlightModes flight_modes) const +``` + + +Set which modes the vehicle can transition to (Manual always allowed) + +This function is blocking. + +**Parameters** + +* [AllowableFlightModes](structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md) **flight_modes** - + +**Returns** + + [Result](classmavsdk_1_1_action_server.md#classmavsdk_1_1_action_server_1a4a8eb4fe9d098a5b7891232fc5bf32f8) - Result of request. + +### get_allowable_flight_modes() {#classmavsdk_1_1_action_server_1a0960a6ec243823729a418a3c68feaf2a} +```cpp +ActionServer::AllowableFlightModes mavsdk::ActionServer::get_allowable_flight_modes() const +``` + + +Get which modes the vehicle can transition to (Manual always allowed) + +This function is blocking. + +**Returns** + + [ActionServer::AllowableFlightModes](structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md) - Result of request. + +### operator=() {#classmavsdk_1_1_action_server_1a86d8bb24723ad8222669aec1f5c523ca} +```cpp +const ActionServer& mavsdk::ActionServer::operator=(const ActionServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [ActionServer](classmavsdk_1_1_action_server.md)& - + +**Returns** + + const [ActionServer](classmavsdk_1_1_action_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_calibration.md b/docs/en/cpp/api_reference/classmavsdk_1_1_calibration.md new file mode 100644 index 000000000..9b349c323 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_calibration.md @@ -0,0 +1,291 @@ +# mavsdk::Calibration Class Reference +`#include: calibration.h` + +---- + + +Enable to calibrate sensors of a drone such as gyro, accelerometer, and magnetometer. + + +## Data Structures + + +struct [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1) | Possible results returned for calibration commands. +std::function< void([Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1))> [ResultCallback](#classmavsdk_1_1_calibration_1a566676d5803020cfda7a4a9d9f4a0161) | Callback type for asynchronous [Calibration](classmavsdk_1_1_calibration.md) calls. +std::function< void([Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1), [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md))> [CalibrateGyroCallback](#classmavsdk_1_1_calibration_1a79bbabba5b60188b0afd8b3667c182b8) | Callback type for calibrate_gyro_async. +std::function< void([Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1), [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md))> [CalibrateAccelerometerCallback](#classmavsdk_1_1_calibration_1a46f81dd310e70251240c619b5299d026) | Callback type for calibrate_accelerometer_async. +std::function< void([Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1), [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md))> [CalibrateMagnetometerCallback](#classmavsdk_1_1_calibration_1a0b61d29092a8fc8407b0c0c13c825438) | Callback type for calibrate_magnetometer_async. +std::function< void([Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1), [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md))> [CalibrateLevelHorizonCallback](#classmavsdk_1_1_calibration_1a397475f5df5fd0e1a181437d4e146aa4) | Callback type for calibrate_level_horizon_async. +std::function< void([Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1), [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md))> [CalibrateGimbalAccelerometerCallback](#classmavsdk_1_1_calibration_1aa254e3a18042794e182fc7f3685aad01) | Callback type for calibrate_gimbal_accelerometer_async. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Calibration](#classmavsdk_1_1_calibration_1ac86c794a9ca1043e21b501218346f2b1) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Calibration](#classmavsdk_1_1_calibration_1a22b833023e256511495918cf9e78cb87) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Calibration](#classmavsdk_1_1_calibration_1a10bc64254ae667f563484020ed5f7861) () override | Destructor (internal use only). +  | [Calibration](#classmavsdk_1_1_calibration_1a90c300742cbb2e29594c294b2ca6ef0e) (const [Calibration](classmavsdk_1_1_calibration.md) & other) | Copy constructor. +void | [calibrate_gyro_async](#classmavsdk_1_1_calibration_1aa270d72a3dd0126b9c712f2467d105cb) (const [CalibrateGyroCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a79bbabba5b60188b0afd8b3667c182b8) & callback) | Perform gyro calibration. +void | [calibrate_accelerometer_async](#classmavsdk_1_1_calibration_1a45fb6549dc486110359b532177c9bddc) (const [CalibrateAccelerometerCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a46f81dd310e70251240c619b5299d026) & callback) | Perform accelerometer calibration. +void | [calibrate_magnetometer_async](#classmavsdk_1_1_calibration_1aa8a04e0f687a9d2aa7fe9a2346a233fa) (const [CalibrateMagnetometerCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a0b61d29092a8fc8407b0c0c13c825438) & callback) | Perform magnetometer calibration. +void | [calibrate_level_horizon_async](#classmavsdk_1_1_calibration_1a77dd4e73da90801d63da973e1736628d) (const [CalibrateLevelHorizonCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a397475f5df5fd0e1a181437d4e146aa4) & callback) | Perform board level horizon calibration. +void | [calibrate_gimbal_accelerometer_async](#classmavsdk_1_1_calibration_1a9b95e383527253c17cd0990653682cd6) (const [CalibrateGimbalAccelerometerCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1aa254e3a18042794e182fc7f3685aad01) & callback) | Perform gimbal accelerometer calibration. +[Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1) | [cancel](#classmavsdk_1_1_calibration_1ae26f45164d36576d56a186ee69e32ffb) () const | Cancel ongoing calibration process. +const [Calibration](classmavsdk_1_1_calibration.md) & | [operator=](#classmavsdk_1_1_calibration_1ada12d974bb516745ea67f94c72abf59b) (const [Calibration](classmavsdk_1_1_calibration.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Calibration() {#classmavsdk_1_1_calibration_1ac86c794a9ca1043e21b501218346f2b1} +```cpp +mavsdk::Calibration::Calibration(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto calibration = Calibration(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Calibration() {#classmavsdk_1_1_calibration_1a22b833023e256511495918cf9e78cb87} +```cpp +mavsdk::Calibration::Calibration(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto calibration = Calibration(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Calibration() {#classmavsdk_1_1_calibration_1a10bc64254ae667f563484020ed5f7861} +```cpp +mavsdk::Calibration::~Calibration() override +``` + + +Destructor (internal use only). + + +### Calibration() {#classmavsdk_1_1_calibration_1a90c300742cbb2e29594c294b2ca6ef0e} +```cpp +mavsdk::Calibration::Calibration(const Calibration &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Calibration](classmavsdk_1_1_calibration.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_calibration_1a566676d5803020cfda7a4a9d9f4a0161} + +```cpp +using mavsdk::Calibration::ResultCallback = std::function +``` + + +Callback type for asynchronous [Calibration](classmavsdk_1_1_calibration.md) calls. + + +### typedef CalibrateGyroCallback {#classmavsdk_1_1_calibration_1a79bbabba5b60188b0afd8b3667c182b8} + +```cpp +using mavsdk::Calibration::CalibrateGyroCallback = std::function +``` + + +Callback type for calibrate_gyro_async. + + +### typedef CalibrateAccelerometerCallback {#classmavsdk_1_1_calibration_1a46f81dd310e70251240c619b5299d026} + +```cpp +using mavsdk::Calibration::CalibrateAccelerometerCallback = std::function +``` + + +Callback type for calibrate_accelerometer_async. + + +### typedef CalibrateMagnetometerCallback {#classmavsdk_1_1_calibration_1a0b61d29092a8fc8407b0c0c13c825438} + +```cpp +using mavsdk::Calibration::CalibrateMagnetometerCallback = std::function +``` + + +Callback type for calibrate_magnetometer_async. + + +### typedef CalibrateLevelHorizonCallback {#classmavsdk_1_1_calibration_1a397475f5df5fd0e1a181437d4e146aa4} + +```cpp +using mavsdk::Calibration::CalibrateLevelHorizonCallback = std::function +``` + + +Callback type for calibrate_level_horizon_async. + + +### typedef CalibrateGimbalAccelerometerCallback {#classmavsdk_1_1_calibration_1aa254e3a18042794e182fc7f3685aad01} + +```cpp +using mavsdk::Calibration::CalibrateGimbalAccelerometerCallback = std::function +``` + + +Callback type for calibrate_gimbal_accelerometer_async. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1} + + +Possible results returned for calibration commands. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | The calibration succeeded. + `Next` | Intermediate message showing progress or instructions on the next steps. + `Failed` | [Calibration](classmavsdk_1_1_calibration.md) failed. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command refused by vehicle. + `Timeout` | Command timed out. + `Cancelled` | [Calibration](classmavsdk_1_1_calibration.md) process was cancelled. + `FailedArmed` | [Calibration](classmavsdk_1_1_calibration.md) process failed since the vehicle is armed. + `Unsupported` | Functionality not supported. + +## Member Function Documentation + + +### calibrate_gyro_async() {#classmavsdk_1_1_calibration_1aa270d72a3dd0126b9c712f2467d105cb} +```cpp +void mavsdk::Calibration::calibrate_gyro_async(const CalibrateGyroCallback &callback) +``` + + +Perform gyro calibration. + + +**Parameters** + +* const [CalibrateGyroCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a79bbabba5b60188b0afd8b3667c182b8)& **callback** - + +### calibrate_accelerometer_async() {#classmavsdk_1_1_calibration_1a45fb6549dc486110359b532177c9bddc} +```cpp +void mavsdk::Calibration::calibrate_accelerometer_async(const CalibrateAccelerometerCallback &callback) +``` + + +Perform accelerometer calibration. + + +**Parameters** + +* const [CalibrateAccelerometerCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a46f81dd310e70251240c619b5299d026)& **callback** - + +### calibrate_magnetometer_async() {#classmavsdk_1_1_calibration_1aa8a04e0f687a9d2aa7fe9a2346a233fa} +```cpp +void mavsdk::Calibration::calibrate_magnetometer_async(const CalibrateMagnetometerCallback &callback) +``` + + +Perform magnetometer calibration. + + +**Parameters** + +* const [CalibrateMagnetometerCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a0b61d29092a8fc8407b0c0c13c825438)& **callback** - + +### calibrate_level_horizon_async() {#classmavsdk_1_1_calibration_1a77dd4e73da90801d63da973e1736628d} +```cpp +void mavsdk::Calibration::calibrate_level_horizon_async(const CalibrateLevelHorizonCallback &callback) +``` + + +Perform board level horizon calibration. + + +**Parameters** + +* const [CalibrateLevelHorizonCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a397475f5df5fd0e1a181437d4e146aa4)& **callback** - + +### calibrate_gimbal_accelerometer_async() {#classmavsdk_1_1_calibration_1a9b95e383527253c17cd0990653682cd6} +```cpp +void mavsdk::Calibration::calibrate_gimbal_accelerometer_async(const CalibrateGimbalAccelerometerCallback &callback) +``` + + +Perform gimbal accelerometer calibration. + + +**Parameters** + +* const [CalibrateGimbalAccelerometerCallback](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1aa254e3a18042794e182fc7f3685aad01)& **callback** - + +### cancel() {#classmavsdk_1_1_calibration_1ae26f45164d36576d56a186ee69e32ffb} +```cpp +Result mavsdk::Calibration::cancel() const +``` + + +Cancel ongoing calibration process. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_calibration.md#classmavsdk_1_1_calibration_1a6e1ce7a3a07eb098edc06821d23a8ec1) - Result of request. + +### operator=() {#classmavsdk_1_1_calibration_1ada12d974bb516745ea67f94c72abf59b} +```cpp +const Calibration& mavsdk::Calibration::operator=(const Calibration &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Calibration](classmavsdk_1_1_calibration.md)& - + +**Returns** + + const [Calibration](classmavsdk_1_1_calibration.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_callback_list.md b/docs/en/cpp/api_reference/classmavsdk_1_1_callback_list.md new file mode 100644 index 000000000..4bb6abfe7 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_callback_list.md @@ -0,0 +1,5 @@ +# mavsdk::CallbackList Class Reference +`#include: UNKNOWN` + +---- + diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_callback_list_impl.md b/docs/en/cpp/api_reference/classmavsdk_1_1_callback_list_impl.md new file mode 100644 index 000000000..f08af866f --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_callback_list_impl.md @@ -0,0 +1,5 @@ +# mavsdk::CallbackListImpl Class Reference +`#include: UNKNOWN` + +---- + diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_camera.md b/docs/en/cpp/api_reference/classmavsdk_1_1_camera.md new file mode 100644 index 000000000..32db3fc53 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_camera.md @@ -0,0 +1,1141 @@ +# mavsdk::Camera Class Reference +`#include: camera.h` + +---- + + +Can be used to manage cameras that implement the MAVLink [Camera](classmavsdk_1_1_camera.md) Protocol: [https://mavlink.io/en/protocol/camera.html](https://mavlink.io/en/protocol/camera.html). + + +Currently only a single camera is supported. When multiple cameras are supported the plugin will need to be instantiated separately for every camera and the camera selected using `select_camera`. + + +## Data Structures + + +struct [CaptureInfo](structmavsdk_1_1_camera_1_1_capture_info.md) + +struct [EulerAngle](structmavsdk_1_1_camera_1_1_euler_angle.md) + +struct [Information](structmavsdk_1_1_camera_1_1_information.md) + +struct [Option](structmavsdk_1_1_camera_1_1_option.md) + +struct [Position](structmavsdk_1_1_camera_1_1_position.md) + +struct [Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) + +struct [Setting](structmavsdk_1_1_camera_1_1_setting.md) + +struct [SettingOptions](structmavsdk_1_1_camera_1_1_setting_options.md) + +struct [Status](structmavsdk_1_1_camera_1_1_status.md) + +struct [VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md) + +struct [VideoStreamSettings](structmavsdk_1_1_camera_1_1_video_stream_settings.md) + +## Public Types + + +Type | Description +--- | --- +enum [Mode](#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) | [Camera](classmavsdk_1_1_camera.md) mode type. +enum [PhotosRange](#classmavsdk_1_1_camera_1a1211ea6664aa9c1d4ef4aede363c7c22) | Photos range type. +enum [Result](#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | Possible results returned for camera commands. +std::function< void([Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf))> [ResultCallback](#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) | Callback type for asynchronous [Camera](classmavsdk_1_1_camera.md) calls. +std::function< void([Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf), std::vector< [CaptureInfo](structmavsdk_1_1_camera_1_1_capture_info.md) >)> [ListPhotosCallback](#classmavsdk_1_1_camera_1a23240233586f7673c3a1b48f07623fe4) | Callback type for list_photos_async. +std::function< void([Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65))> [ModeCallback](#classmavsdk_1_1_camera_1a33a7257ab95d9277b786e6de86604931) | Callback type for subscribe_mode. +[Handle](classmavsdk_1_1_handle.md)< [Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) > [ModeHandle](#classmavsdk_1_1_camera_1ac6759725ac9696f9572b05524fde2354) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_mode. +std::function< void([Information](structmavsdk_1_1_camera_1_1_information.md))> [InformationCallback](#classmavsdk_1_1_camera_1af13455249eebaf152a71d59e32fcbf65) | Callback type for subscribe_information. +[Handle](classmavsdk_1_1_handle.md)< [Information](structmavsdk_1_1_camera_1_1_information.md) > [InformationHandle](#classmavsdk_1_1_camera_1a0dcacb795da7de566fb6dce091ca4605) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_information. +std::function< void([VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md))> [VideoStreamInfoCallback](#classmavsdk_1_1_camera_1acd9baf073b816e46c22dbd6b599ece66) | Callback type for subscribe_video_stream_info. +[Handle](classmavsdk_1_1_handle.md)< [VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md) > [VideoStreamInfoHandle](#classmavsdk_1_1_camera_1aebf91f740cc85682c6b7a0955635f848) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_video_stream_info. +std::function< void([CaptureInfo](structmavsdk_1_1_camera_1_1_capture_info.md))> [CaptureInfoCallback](#classmavsdk_1_1_camera_1a9bf5c20ea0b03ab019057829d1a3441e) | Callback type for subscribe_capture_info. +[Handle](classmavsdk_1_1_handle.md)< [CaptureInfo](structmavsdk_1_1_camera_1_1_capture_info.md) > [CaptureInfoHandle](#classmavsdk_1_1_camera_1a789f1fccde8eb44bc07694751b3a1b40) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_capture_info. +std::function< void([Status](structmavsdk_1_1_camera_1_1_status.md))> [StatusCallback](#classmavsdk_1_1_camera_1aea925914ce854b81b67e3213840c97ad) | Callback type for subscribe_status. +[Handle](classmavsdk_1_1_handle.md)< [Status](structmavsdk_1_1_camera_1_1_status.md) > [StatusHandle](#classmavsdk_1_1_camera_1a902bc3a824040a37714bb2c1c41a9601) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_status. +std::function< void(std::vector< [Setting](structmavsdk_1_1_camera_1_1_setting.md) >)> [CurrentSettingsCallback](#classmavsdk_1_1_camera_1a77484487381b2579460c36d97d367fe6) | Callback type for subscribe_current_settings. +[Handle](classmavsdk_1_1_handle.md)< std::vector< [Setting](structmavsdk_1_1_camera_1_1_setting.md) > > [CurrentSettingsHandle](#classmavsdk_1_1_camera_1a19960e47f1c2b3fb5117ba2f7f3cfbe6) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_current_settings. +std::function< void(std::vector< [SettingOptions](structmavsdk_1_1_camera_1_1_setting_options.md) >)> [PossibleSettingOptionsCallback](#classmavsdk_1_1_camera_1a78e25614c29cd8bc1bbf26adcf417c2a) | Callback type for subscribe_possible_setting_options. +[Handle](classmavsdk_1_1_handle.md)< std::vector< [SettingOptions](structmavsdk_1_1_camera_1_1_setting_options.md) > > [PossibleSettingOptionsHandle](#classmavsdk_1_1_camera_1a1144be14cd9f15724397ad6b5253b8a9) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_possible_setting_options. +std::function< void([Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf), [Setting](structmavsdk_1_1_camera_1_1_setting.md))> [GetSettingCallback](#classmavsdk_1_1_camera_1ac233f5688f0b7f1e712bb31dfaeadd85) | Callback type for get_setting_async. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Camera](#classmavsdk_1_1_camera_1a186a2853440c879b99ed7e4a726969e9) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Camera](#classmavsdk_1_1_camera_1aecd55dc849bbb967a6b9dcfd36cc075e) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Camera](#classmavsdk_1_1_camera_1afc23a58baf97868b1d9a9b983d7c2087) () override | Destructor (internal use only). +  | [Camera](#classmavsdk_1_1_camera_1a1b83c38c360d70b56222a94999d862fd) (const [Camera](classmavsdk_1_1_camera.md) & other) | Copy constructor. +void | [prepare_async](#classmavsdk_1_1_camera_1aba33f1f8302259a7d51a09b60ea29cbf) (const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Prepare the camera plugin (e.g. download the camera definition, etc). +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [prepare](#classmavsdk_1_1_camera_1af263d3ea4e24da262f935c56fb578444) () const | Prepare the camera plugin (e.g. download the camera definition, etc). +void | [take_photo_async](#classmavsdk_1_1_camera_1a343217bf38cc71cd258c7e81626dccb5) (const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Take one photo. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [take_photo](#classmavsdk_1_1_camera_1a44b86cfda6262652a1796661e595003c) () const | Take one photo. +void | [start_photo_interval_async](#classmavsdk_1_1_camera_1ae583f83e163e2b33a8dc4a6fcfebbac6) (float interval_s, const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Start photo timelapse with a given interval. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [start_photo_interval](#classmavsdk_1_1_camera_1adfa32eb338aabf19675a1218fc28d8bc) (float interval_s)const | Start photo timelapse with a given interval. +void | [stop_photo_interval_async](#classmavsdk_1_1_camera_1a540d94eb58efe02fdd3659994c778203) (const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Stop a running photo timelapse. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [stop_photo_interval](#classmavsdk_1_1_camera_1a287fa0fd3fcda1dee2cf40ad041d524a) () const | Stop a running photo timelapse. +void | [start_video_async](#classmavsdk_1_1_camera_1a2d5dff782ea3f8346bc53560be368531) (const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Start a video recording. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [start_video](#classmavsdk_1_1_camera_1ac64e77dee9f5ff9b5c84100d8f007670) () const | Start a video recording. +void | [stop_video_async](#classmavsdk_1_1_camera_1a77d1b1a201164023c5eef3c91cdd4e54) (const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Stop a running video recording. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [stop_video](#classmavsdk_1_1_camera_1a6062ac1907bd10944d2ddb9655943ddc) () const | Stop a running video recording. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [start_video_streaming](#classmavsdk_1_1_camera_1a6e062242a02389e2fc839f5e9ec03d7d) (int32_t stream_id)const | Start video streaming. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [stop_video_streaming](#classmavsdk_1_1_camera_1ae495e8c52984ad76b27b72fc58987d9d) (int32_t stream_id)const | Stop current video streaming. +void | [set_mode_async](#classmavsdk_1_1_camera_1a76d98d04885d38d0438da7c8696ef6ab) ([Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) mode, const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Set camera mode. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [set_mode](#classmavsdk_1_1_camera_1a249755db2eaa8fd3d202ac01ca52448d) ([Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) mode)const | Set camera mode. +void | [list_photos_async](#classmavsdk_1_1_camera_1aec1edfe505476d437d45ec2f0deec924) ([PhotosRange](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1211ea6664aa9c1d4ef4aede363c7c22) photos_range, const [ListPhotosCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a23240233586f7673c3a1b48f07623fe4) callback) | List photos available on the camera. +std::pair< [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf), std::vector< [Camera::CaptureInfo](structmavsdk_1_1_camera_1_1_capture_info.md) > > | [list_photos](#classmavsdk_1_1_camera_1a49dc17b74047049c386d88cd365de868) ([PhotosRange](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1211ea6664aa9c1d4ef4aede363c7c22) photos_range)const | List photos available on the camera. +[ModeHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1ac6759725ac9696f9572b05524fde2354) | [subscribe_mode](#classmavsdk_1_1_camera_1a1963bfcfcc8c9e96451648f96fd618cd) (const [ModeCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a33a7257ab95d9277b786e6de86604931) & callback) | Subscribe to camera mode updates. +void | [unsubscribe_mode](#classmavsdk_1_1_camera_1ab9437b41565d8957050e09cf4143f5d1) ([ModeHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1ac6759725ac9696f9572b05524fde2354) handle) | Unsubscribe from subscribe_mode. +[Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) | [mode](#classmavsdk_1_1_camera_1a222bce91e70d1ca53bcf5d885bacd418) () const | Poll for 'Mode' (blocking). +[InformationHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a0dcacb795da7de566fb6dce091ca4605) | [subscribe_information](#classmavsdk_1_1_camera_1af4b5c713813df8c407a09963295c33a2) (const [InformationCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1af13455249eebaf152a71d59e32fcbf65) & callback) | Subscribe to camera information updates. +void | [unsubscribe_information](#classmavsdk_1_1_camera_1a90b70deaf25dff027714afb856653ea5) ([InformationHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a0dcacb795da7de566fb6dce091ca4605) handle) | Unsubscribe from subscribe_information. +[Information](structmavsdk_1_1_camera_1_1_information.md) | [information](#classmavsdk_1_1_camera_1a7feb16f3d913b91d05efc803ce4e396b) () const | Poll for '[Information](structmavsdk_1_1_camera_1_1_information.md)' (blocking). +[VideoStreamInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1aebf91f740cc85682c6b7a0955635f848) | [subscribe_video_stream_info](#classmavsdk_1_1_camera_1a4dcf0ebeb1f9f5e5b2b71f59c9b7eeb9) (const [VideoStreamInfoCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1acd9baf073b816e46c22dbd6b599ece66) & callback) | Subscribe to video stream info updates. +void | [unsubscribe_video_stream_info](#classmavsdk_1_1_camera_1abc370783800fb90dda20d2843f990036) ([VideoStreamInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1aebf91f740cc85682c6b7a0955635f848) handle) | Unsubscribe from subscribe_video_stream_info. +[VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md) | [video_stream_info](#classmavsdk_1_1_camera_1ad466621feff2d4f0f11124a36dda656c) () const | Poll for '[VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md)' (blocking). +[CaptureInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a789f1fccde8eb44bc07694751b3a1b40) | [subscribe_capture_info](#classmavsdk_1_1_camera_1a8822ab1d802984a1acc9b53cd9810e8f) (const [CaptureInfoCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a9bf5c20ea0b03ab019057829d1a3441e) & callback) | Subscribe to capture info updates. +void | [unsubscribe_capture_info](#classmavsdk_1_1_camera_1a9b7f729dfa30a6cb0d041533bd272793) ([CaptureInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a789f1fccde8eb44bc07694751b3a1b40) handle) | Unsubscribe from subscribe_capture_info. +[StatusHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a902bc3a824040a37714bb2c1c41a9601) | [subscribe_status](#classmavsdk_1_1_camera_1a1bf71cdb27a9b8d3fefe15463c9b9bf1) (const [StatusCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1aea925914ce854b81b67e3213840c97ad) & callback) | Subscribe to camera status updates. +void | [unsubscribe_status](#classmavsdk_1_1_camera_1a402cf21219f9b303fca0a269dab15b63) ([StatusHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a902bc3a824040a37714bb2c1c41a9601) handle) | Unsubscribe from subscribe_status. +[Status](structmavsdk_1_1_camera_1_1_status.md) | [status](#classmavsdk_1_1_camera_1a0bb78c2b665c28b314f00f11a0f676b1) () const | Poll for '[Status](structmavsdk_1_1_camera_1_1_status.md)' (blocking). +[CurrentSettingsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a19960e47f1c2b3fb5117ba2f7f3cfbe6) | [subscribe_current_settings](#classmavsdk_1_1_camera_1a906c431b63dde866b691ab4c839858ff) (const [CurrentSettingsCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a77484487381b2579460c36d97d367fe6) & callback) | Get the list of current camera settings. +void | [unsubscribe_current_settings](#classmavsdk_1_1_camera_1a117e76672b39c9cd751fa64a42741c17) ([CurrentSettingsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a19960e47f1c2b3fb5117ba2f7f3cfbe6) handle) | Unsubscribe from subscribe_current_settings. +[PossibleSettingOptionsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1144be14cd9f15724397ad6b5253b8a9) | [subscribe_possible_setting_options](#classmavsdk_1_1_camera_1aef7c545aaa05e36b212255120557967b) (const [PossibleSettingOptionsCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a78e25614c29cd8bc1bbf26adcf417c2a) & callback) | Get the list of settings that can be changed. +void | [unsubscribe_possible_setting_options](#classmavsdk_1_1_camera_1a191cc00bb6b1c834fc93b19f4bff1c29) ([PossibleSettingOptionsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1144be14cd9f15724397ad6b5253b8a9) handle) | Unsubscribe from subscribe_possible_setting_options. +std::vector< [SettingOptions](structmavsdk_1_1_camera_1_1_setting_options.md) > | [possible_setting_options](#classmavsdk_1_1_camera_1a5416dc30ec436707420db715ee56ce08) () const | Poll for 'std::vector< SettingOptions >' (blocking). +void | [set_setting_async](#classmavsdk_1_1_camera_1aace1d6ffd86a6fdf30b3466c8522feba) ([Setting](structmavsdk_1_1_camera_1_1_setting.md) setting, const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Set a setting to some value. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [set_setting](#classmavsdk_1_1_camera_1aa4b1293d8c6332293cccde87ec79f64a) ([Setting](structmavsdk_1_1_camera_1_1_setting.md) setting)const | Set a setting to some value. +void | [get_setting_async](#classmavsdk_1_1_camera_1a6b2e4e9b5b304aff313e4f988aa6ba86) ([Setting](structmavsdk_1_1_camera_1_1_setting.md) setting, const [GetSettingCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1ac233f5688f0b7f1e712bb31dfaeadd85) callback) | Get a setting. +std::pair< [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf), [Camera::Setting](structmavsdk_1_1_camera_1_1_setting.md) > | [get_setting](#classmavsdk_1_1_camera_1ae88917857b666dc7cfd0d84b3ad29d9c) ([Setting](structmavsdk_1_1_camera_1_1_setting.md) setting)const | Get a setting. +void | [format_storage_async](#classmavsdk_1_1_camera_1afd1074b185776167e7355438ac69d955) (int32_t storage_id, const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Format storage (e.g. SD card) in camera. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [format_storage](#classmavsdk_1_1_camera_1a942f9bad2e2bede982d404ce552090a5) (int32_t storage_id)const | Format storage (e.g. SD card) in camera. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [select_camera](#classmavsdk_1_1_camera_1ab3348f98003f71f2399dd15505effae3) (int32_t camera_id)const | Select current camera . +void | [reset_settings_async](#classmavsdk_1_1_camera_1ab2316e20104a5efa94bf2719dc3dd994) (const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) callback) | Reset all settings in camera. +[Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) | [reset_settings](#classmavsdk_1_1_camera_1a49c84f20f1100848e3951f5e14b569dc) () const | Reset all settings in camera. +const [Camera](classmavsdk_1_1_camera.md) & | [operator=](#classmavsdk_1_1_camera_1aeff295155b6a665f5c942e473f1fe894) (const [Camera](classmavsdk_1_1_camera.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Camera() {#classmavsdk_1_1_camera_1a186a2853440c879b99ed7e4a726969e9} +```cpp +mavsdk::Camera::Camera(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto camera = Camera(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Camera() {#classmavsdk_1_1_camera_1aecd55dc849bbb967a6b9dcfd36cc075e} +```cpp +mavsdk::Camera::Camera(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto camera = Camera(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Camera() {#classmavsdk_1_1_camera_1afc23a58baf97868b1d9a9b983d7c2087} +```cpp +mavsdk::Camera::~Camera() override +``` + + +Destructor (internal use only). + + +### Camera() {#classmavsdk_1_1_camera_1a1b83c38c360d70b56222a94999d862fd} +```cpp +mavsdk::Camera::Camera(const Camera &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Camera](classmavsdk_1_1_camera.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f} + +```cpp +using mavsdk::Camera::ResultCallback = std::function +``` + + +Callback type for asynchronous [Camera](classmavsdk_1_1_camera.md) calls. + + +### typedef ListPhotosCallback {#classmavsdk_1_1_camera_1a23240233586f7673c3a1b48f07623fe4} + +```cpp +using mavsdk::Camera::ListPhotosCallback = std::function)> +``` + + +Callback type for list_photos_async. + + +### typedef ModeCallback {#classmavsdk_1_1_camera_1a33a7257ab95d9277b786e6de86604931} + +```cpp +using mavsdk::Camera::ModeCallback = std::function +``` + + +Callback type for subscribe_mode. + + +### typedef ModeHandle {#classmavsdk_1_1_camera_1ac6759725ac9696f9572b05524fde2354} + +```cpp +using mavsdk::Camera::ModeHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_mode. + + +### typedef InformationCallback {#classmavsdk_1_1_camera_1af13455249eebaf152a71d59e32fcbf65} + +```cpp +using mavsdk::Camera::InformationCallback = std::function +``` + + +Callback type for subscribe_information. + + +### typedef InformationHandle {#classmavsdk_1_1_camera_1a0dcacb795da7de566fb6dce091ca4605} + +```cpp +using mavsdk::Camera::InformationHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_information. + + +### typedef VideoStreamInfoCallback {#classmavsdk_1_1_camera_1acd9baf073b816e46c22dbd6b599ece66} + +```cpp +using mavsdk::Camera::VideoStreamInfoCallback = std::function +``` + + +Callback type for subscribe_video_stream_info. + + +### typedef VideoStreamInfoHandle {#classmavsdk_1_1_camera_1aebf91f740cc85682c6b7a0955635f848} + +```cpp +using mavsdk::Camera::VideoStreamInfoHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_video_stream_info. + + +### typedef CaptureInfoCallback {#classmavsdk_1_1_camera_1a9bf5c20ea0b03ab019057829d1a3441e} + +```cpp +using mavsdk::Camera::CaptureInfoCallback = std::function +``` + + +Callback type for subscribe_capture_info. + + +### typedef CaptureInfoHandle {#classmavsdk_1_1_camera_1a789f1fccde8eb44bc07694751b3a1b40} + +```cpp +using mavsdk::Camera::CaptureInfoHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_capture_info. + + +### typedef StatusCallback {#classmavsdk_1_1_camera_1aea925914ce854b81b67e3213840c97ad} + +```cpp +using mavsdk::Camera::StatusCallback = std::function +``` + + +Callback type for subscribe_status. + + +### typedef StatusHandle {#classmavsdk_1_1_camera_1a902bc3a824040a37714bb2c1c41a9601} + +```cpp +using mavsdk::Camera::StatusHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_status. + + +### typedef CurrentSettingsCallback {#classmavsdk_1_1_camera_1a77484487381b2579460c36d97d367fe6} + +```cpp +using mavsdk::Camera::CurrentSettingsCallback = std::function)> +``` + + +Callback type for subscribe_current_settings. + + +### typedef CurrentSettingsHandle {#classmavsdk_1_1_camera_1a19960e47f1c2b3fb5117ba2f7f3cfbe6} + +```cpp +using mavsdk::Camera::CurrentSettingsHandle = Handle > +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_current_settings. + + +### typedef PossibleSettingOptionsCallback {#classmavsdk_1_1_camera_1a78e25614c29cd8bc1bbf26adcf417c2a} + +```cpp +using mavsdk::Camera::PossibleSettingOptionsCallback = std::function)> +``` + + +Callback type for subscribe_possible_setting_options. + + +### typedef PossibleSettingOptionsHandle {#classmavsdk_1_1_camera_1a1144be14cd9f15724397ad6b5253b8a9} + +```cpp +using mavsdk::Camera::PossibleSettingOptionsHandle = Handle > +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_possible_setting_options. + + +### typedef GetSettingCallback {#classmavsdk_1_1_camera_1ac233f5688f0b7f1e712bb31dfaeadd85} + +```cpp +using mavsdk::Camera::GetSettingCallback = std::function +``` + + +Callback type for get_setting_async. + + +## Member Enumeration Documentation + + +### enum Mode {#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65} + + +[Camera](classmavsdk_1_1_camera.md) mode type. + + +Value | Description +--- | --- + `Unknown` | Unknown. + `Photo` | Photo mode. + `Video` | Video mode. + +### enum PhotosRange {#classmavsdk_1_1_camera_1a1211ea6664aa9c1d4ef4aede363c7c22} + + +Photos range type. + + +Value | Description +--- | --- + `All` | All the photos present on the camera. + `SinceConnection` | Photos taken since MAVSDK got connected. + +### enum Result {#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf} + + +Possible results returned for camera commands. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Command executed successfully. + `InProgress` | Command in progress. + `Busy` | [Camera](classmavsdk_1_1_camera.md) is busy and rejected command. + `Denied` | [Camera](classmavsdk_1_1_camera.md) denied the command. + `Error` | An error has occurred while executing the command. + `Timeout` | Command timed out. + `WrongArgument` | Command has wrong argument(s). + `NoSystem` | No system connected. + `ProtocolUnsupported` | Definition file protocol not supported. + +## Member Function Documentation + + +### prepare_async() {#classmavsdk_1_1_camera_1aba33f1f8302259a7d51a09b60ea29cbf} +```cpp +void mavsdk::Camera::prepare_async(const ResultCallback callback) +``` + + +Prepare the camera plugin (e.g. download the camera definition, etc). + +This function is non-blocking. See 'prepare' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### prepare() {#classmavsdk_1_1_camera_1af263d3ea4e24da262f935c56fb578444} +```cpp +Result mavsdk::Camera::prepare() const +``` + + +Prepare the camera plugin (e.g. download the camera definition, etc). + +This function is blocking. See 'prepare_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### take_photo_async() {#classmavsdk_1_1_camera_1a343217bf38cc71cd258c7e81626dccb5} +```cpp +void mavsdk::Camera::take_photo_async(const ResultCallback callback) +``` + + +Take one photo. + +This function is non-blocking. See 'take_photo' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### take_photo() {#classmavsdk_1_1_camera_1a44b86cfda6262652a1796661e595003c} +```cpp +Result mavsdk::Camera::take_photo() const +``` + + +Take one photo. + +This function is blocking. See 'take_photo_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### start_photo_interval_async() {#classmavsdk_1_1_camera_1ae583f83e163e2b33a8dc4a6fcfebbac6} +```cpp +void mavsdk::Camera::start_photo_interval_async(float interval_s, const ResultCallback callback) +``` + + +Start photo timelapse with a given interval. + +This function is non-blocking. See 'start_photo_interval' for the blocking counterpart. + +**Parameters** + +* float **interval_s** - +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### start_photo_interval() {#classmavsdk_1_1_camera_1adfa32eb338aabf19675a1218fc28d8bc} +```cpp +Result mavsdk::Camera::start_photo_interval(float interval_s) const +``` + + +Start photo timelapse with a given interval. + +This function is blocking. See 'start_photo_interval_async' for the non-blocking counterpart. + +**Parameters** + +* float **interval_s** - + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### stop_photo_interval_async() {#classmavsdk_1_1_camera_1a540d94eb58efe02fdd3659994c778203} +```cpp +void mavsdk::Camera::stop_photo_interval_async(const ResultCallback callback) +``` + + +Stop a running photo timelapse. + +This function is non-blocking. See 'stop_photo_interval' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### stop_photo_interval() {#classmavsdk_1_1_camera_1a287fa0fd3fcda1dee2cf40ad041d524a} +```cpp +Result mavsdk::Camera::stop_photo_interval() const +``` + + +Stop a running photo timelapse. + +This function is blocking. See 'stop_photo_interval_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### start_video_async() {#classmavsdk_1_1_camera_1a2d5dff782ea3f8346bc53560be368531} +```cpp +void mavsdk::Camera::start_video_async(const ResultCallback callback) +``` + + +Start a video recording. + +This function is non-blocking. See 'start_video' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### start_video() {#classmavsdk_1_1_camera_1ac64e77dee9f5ff9b5c84100d8f007670} +```cpp +Result mavsdk::Camera::start_video() const +``` + + +Start a video recording. + +This function is blocking. See 'start_video_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### stop_video_async() {#classmavsdk_1_1_camera_1a77d1b1a201164023c5eef3c91cdd4e54} +```cpp +void mavsdk::Camera::stop_video_async(const ResultCallback callback) +``` + + +Stop a running video recording. + +This function is non-blocking. See 'stop_video' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### stop_video() {#classmavsdk_1_1_camera_1a6062ac1907bd10944d2ddb9655943ddc} +```cpp +Result mavsdk::Camera::stop_video() const +``` + + +Stop a running video recording. + +This function is blocking. See 'stop_video_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### start_video_streaming() {#classmavsdk_1_1_camera_1a6e062242a02389e2fc839f5e9ec03d7d} +```cpp +Result mavsdk::Camera::start_video_streaming(int32_t stream_id) const +``` + + +Start video streaming. + +This function is blocking. + +**Parameters** + +* int32_t **stream_id** - + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### stop_video_streaming() {#classmavsdk_1_1_camera_1ae495e8c52984ad76b27b72fc58987d9d} +```cpp +Result mavsdk::Camera::stop_video_streaming(int32_t stream_id) const +``` + + +Stop current video streaming. + +This function is blocking. + +**Parameters** + +* int32_t **stream_id** - + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### set_mode_async() {#classmavsdk_1_1_camera_1a76d98d04885d38d0438da7c8696ef6ab} +```cpp +void mavsdk::Camera::set_mode_async(Mode mode, const ResultCallback callback) +``` + + +Set camera mode. + +This function is non-blocking. See 'set_mode' for the blocking counterpart. + +**Parameters** + +* [Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) **mode** - +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### set_mode() {#classmavsdk_1_1_camera_1a249755db2eaa8fd3d202ac01ca52448d} +```cpp +Result mavsdk::Camera::set_mode(Mode mode) const +``` + + +Set camera mode. + +This function is blocking. See 'set_mode_async' for the non-blocking counterpart. + +**Parameters** + +* [Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) **mode** - + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### list_photos_async() {#classmavsdk_1_1_camera_1aec1edfe505476d437d45ec2f0deec924} +```cpp +void mavsdk::Camera::list_photos_async(PhotosRange photos_range, const ListPhotosCallback callback) +``` + + +List photos available on the camera. + +This function is non-blocking. See 'list_photos' for the blocking counterpart. + +**Parameters** + +* [PhotosRange](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1211ea6664aa9c1d4ef4aede363c7c22) **photos_range** - +* const [ListPhotosCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a23240233586f7673c3a1b48f07623fe4) **callback** - + +### list_photos() {#classmavsdk_1_1_camera_1a49dc17b74047049c386d88cd365de868} +```cpp +std::pair > mavsdk::Camera::list_photos(PhotosRange photos_range) const +``` + + +List photos available on the camera. + +This function is blocking. See 'list_photos_async' for the non-blocking counterpart. + +**Parameters** + +* [PhotosRange](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1211ea6664aa9c1d4ef4aede363c7c22) **photos_range** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf), std::vector< [Camera::CaptureInfo](structmavsdk_1_1_camera_1_1_capture_info.md) > > - Result of request. + +### subscribe_mode() {#classmavsdk_1_1_camera_1a1963bfcfcc8c9e96451648f96fd618cd} +```cpp +ModeHandle mavsdk::Camera::subscribe_mode(const ModeCallback &callback) +``` + + +Subscribe to camera mode updates. + + +**Parameters** + +* const [ModeCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a33a7257ab95d9277b786e6de86604931)& **callback** - + +**Returns** + + [ModeHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1ac6759725ac9696f9572b05524fde2354) - + +### unsubscribe_mode() {#classmavsdk_1_1_camera_1ab9437b41565d8957050e09cf4143f5d1} +```cpp +void mavsdk::Camera::unsubscribe_mode(ModeHandle handle) +``` + + +Unsubscribe from subscribe_mode. + + +**Parameters** + +* [ModeHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1ac6759725ac9696f9572b05524fde2354) **handle** - + +### mode() {#classmavsdk_1_1_camera_1a222bce91e70d1ca53bcf5d885bacd418} +```cpp +Mode mavsdk::Camera::mode() const +``` + + +Poll for 'Mode' (blocking). + + +**Returns** + + [Mode](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a02bb5ce37d125ba4c65d43f172cc2d65) - One Mode update. + +### subscribe_information() {#classmavsdk_1_1_camera_1af4b5c713813df8c407a09963295c33a2} +```cpp +InformationHandle mavsdk::Camera::subscribe_information(const InformationCallback &callback) +``` + + +Subscribe to camera information updates. + + +**Parameters** + +* const [InformationCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1af13455249eebaf152a71d59e32fcbf65)& **callback** - + +**Returns** + + [InformationHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a0dcacb795da7de566fb6dce091ca4605) - + +### unsubscribe_information() {#classmavsdk_1_1_camera_1a90b70deaf25dff027714afb856653ea5} +```cpp +void mavsdk::Camera::unsubscribe_information(InformationHandle handle) +``` + + +Unsubscribe from subscribe_information. + + +**Parameters** + +* [InformationHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a0dcacb795da7de566fb6dce091ca4605) **handle** - + +### information() {#classmavsdk_1_1_camera_1a7feb16f3d913b91d05efc803ce4e396b} +```cpp +Information mavsdk::Camera::information() const +``` + + +Poll for '[Information](structmavsdk_1_1_camera_1_1_information.md)' (blocking). + + +**Returns** + + [Information](structmavsdk_1_1_camera_1_1_information.md) - One [Information](structmavsdk_1_1_camera_1_1_information.md) update. + +### subscribe_video_stream_info() {#classmavsdk_1_1_camera_1a4dcf0ebeb1f9f5e5b2b71f59c9b7eeb9} +```cpp +VideoStreamInfoHandle mavsdk::Camera::subscribe_video_stream_info(const VideoStreamInfoCallback &callback) +``` + + +Subscribe to video stream info updates. + + +**Parameters** + +* const [VideoStreamInfoCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1acd9baf073b816e46c22dbd6b599ece66)& **callback** - + +**Returns** + + [VideoStreamInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1aebf91f740cc85682c6b7a0955635f848) - + +### unsubscribe_video_stream_info() {#classmavsdk_1_1_camera_1abc370783800fb90dda20d2843f990036} +```cpp +void mavsdk::Camera::unsubscribe_video_stream_info(VideoStreamInfoHandle handle) +``` + + +Unsubscribe from subscribe_video_stream_info. + + +**Parameters** + +* [VideoStreamInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1aebf91f740cc85682c6b7a0955635f848) **handle** - + +### video_stream_info() {#classmavsdk_1_1_camera_1ad466621feff2d4f0f11124a36dda656c} +```cpp +VideoStreamInfo mavsdk::Camera::video_stream_info() const +``` + + +Poll for '[VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md)' (blocking). + + +**Returns** + + [VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md) - One [VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md) update. + +### subscribe_capture_info() {#classmavsdk_1_1_camera_1a8822ab1d802984a1acc9b53cd9810e8f} +```cpp +CaptureInfoHandle mavsdk::Camera::subscribe_capture_info(const CaptureInfoCallback &callback) +``` + + +Subscribe to capture info updates. + + +**Parameters** + +* const [CaptureInfoCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a9bf5c20ea0b03ab019057829d1a3441e)& **callback** - + +**Returns** + + [CaptureInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a789f1fccde8eb44bc07694751b3a1b40) - + +### unsubscribe_capture_info() {#classmavsdk_1_1_camera_1a9b7f729dfa30a6cb0d041533bd272793} +```cpp +void mavsdk::Camera::unsubscribe_capture_info(CaptureInfoHandle handle) +``` + + +Unsubscribe from subscribe_capture_info. + + +**Parameters** + +* [CaptureInfoHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a789f1fccde8eb44bc07694751b3a1b40) **handle** - + +### subscribe_status() {#classmavsdk_1_1_camera_1a1bf71cdb27a9b8d3fefe15463c9b9bf1} +```cpp +StatusHandle mavsdk::Camera::subscribe_status(const StatusCallback &callback) +``` + + +Subscribe to camera status updates. + + +**Parameters** + +* const [StatusCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1aea925914ce854b81b67e3213840c97ad)& **callback** - + +**Returns** + + [StatusHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a902bc3a824040a37714bb2c1c41a9601) - + +### unsubscribe_status() {#classmavsdk_1_1_camera_1a402cf21219f9b303fca0a269dab15b63} +```cpp +void mavsdk::Camera::unsubscribe_status(StatusHandle handle) +``` + + +Unsubscribe from subscribe_status. + + +**Parameters** + +* [StatusHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a902bc3a824040a37714bb2c1c41a9601) **handle** - + +### status() {#classmavsdk_1_1_camera_1a0bb78c2b665c28b314f00f11a0f676b1} +```cpp +Status mavsdk::Camera::status() const +``` + + +Poll for '[Status](structmavsdk_1_1_camera_1_1_status.md)' (blocking). + + +**Returns** + + [Status](structmavsdk_1_1_camera_1_1_status.md) - One [Status](structmavsdk_1_1_camera_1_1_status.md) update. + +### subscribe_current_settings() {#classmavsdk_1_1_camera_1a906c431b63dde866b691ab4c839858ff} +```cpp +CurrentSettingsHandle mavsdk::Camera::subscribe_current_settings(const CurrentSettingsCallback &callback) +``` + + +Get the list of current camera settings. + + +**Parameters** + +* const [CurrentSettingsCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a77484487381b2579460c36d97d367fe6)& **callback** - + +**Returns** + + [CurrentSettingsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a19960e47f1c2b3fb5117ba2f7f3cfbe6) - + +### unsubscribe_current_settings() {#classmavsdk_1_1_camera_1a117e76672b39c9cd751fa64a42741c17} +```cpp +void mavsdk::Camera::unsubscribe_current_settings(CurrentSettingsHandle handle) +``` + + +Unsubscribe from subscribe_current_settings. + + +**Parameters** + +* [CurrentSettingsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a19960e47f1c2b3fb5117ba2f7f3cfbe6) **handle** - + +### subscribe_possible_setting_options() {#classmavsdk_1_1_camera_1aef7c545aaa05e36b212255120557967b} +```cpp +PossibleSettingOptionsHandle mavsdk::Camera::subscribe_possible_setting_options(const PossibleSettingOptionsCallback &callback) +``` + + +Get the list of settings that can be changed. + + +**Parameters** + +* const [PossibleSettingOptionsCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a78e25614c29cd8bc1bbf26adcf417c2a)& **callback** - + +**Returns** + + [PossibleSettingOptionsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1144be14cd9f15724397ad6b5253b8a9) - + +### unsubscribe_possible_setting_options() {#classmavsdk_1_1_camera_1a191cc00bb6b1c834fc93b19f4bff1c29} +```cpp +void mavsdk::Camera::unsubscribe_possible_setting_options(PossibleSettingOptionsHandle handle) +``` + + +Unsubscribe from subscribe_possible_setting_options. + + +**Parameters** + +* [PossibleSettingOptionsHandle](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a1144be14cd9f15724397ad6b5253b8a9) **handle** - + +### possible_setting_options() {#classmavsdk_1_1_camera_1a5416dc30ec436707420db715ee56ce08} +```cpp +std::vector mavsdk::Camera::possible_setting_options() const +``` + + +Poll for 'std::vector< SettingOptions >' (blocking). + + +**Returns** + + std::vector< [SettingOptions](structmavsdk_1_1_camera_1_1_setting_options.md) > - One std::vector< SettingOptions > update. + +### set_setting_async() {#classmavsdk_1_1_camera_1aace1d6ffd86a6fdf30b3466c8522feba} +```cpp +void mavsdk::Camera::set_setting_async(Setting setting, const ResultCallback callback) +``` + + +Set a setting to some value. + +Only setting_id of setting and option_id of option needs to be set. + + +This function is non-blocking. See 'set_setting' for the blocking counterpart. + +**Parameters** + +* [Setting](structmavsdk_1_1_camera_1_1_setting.md) **setting** - +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### set_setting() {#classmavsdk_1_1_camera_1aa4b1293d8c6332293cccde87ec79f64a} +```cpp +Result mavsdk::Camera::set_setting(Setting setting) const +``` + + +Set a setting to some value. + +Only setting_id of setting and option_id of option needs to be set. + + +This function is blocking. See 'set_setting_async' for the non-blocking counterpart. + +**Parameters** + +* [Setting](structmavsdk_1_1_camera_1_1_setting.md) **setting** - + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### get_setting_async() {#classmavsdk_1_1_camera_1a6b2e4e9b5b304aff313e4f988aa6ba86} +```cpp +void mavsdk::Camera::get_setting_async(Setting setting, const GetSettingCallback callback) +``` + + +Get a setting. + +Only setting_id of setting needs to be set. + + +This function is non-blocking. See 'get_setting' for the blocking counterpart. + +**Parameters** + +* [Setting](structmavsdk_1_1_camera_1_1_setting.md) **setting** - +* const [GetSettingCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1ac233f5688f0b7f1e712bb31dfaeadd85) **callback** - + +### get_setting() {#classmavsdk_1_1_camera_1ae88917857b666dc7cfd0d84b3ad29d9c} +```cpp +std::pair mavsdk::Camera::get_setting(Setting setting) const +``` + + +Get a setting. + +Only setting_id of setting needs to be set. + + +This function is blocking. See 'get_setting_async' for the non-blocking counterpart. + +**Parameters** + +* [Setting](structmavsdk_1_1_camera_1_1_setting.md) **setting** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf), [Camera::Setting](structmavsdk_1_1_camera_1_1_setting.md) > - Result of request. + +### format_storage_async() {#classmavsdk_1_1_camera_1afd1074b185776167e7355438ac69d955} +```cpp +void mavsdk::Camera::format_storage_async(int32_t storage_id, const ResultCallback callback) +``` + + +Format storage (e.g. SD card) in camera. + +This will delete all content of the camera storage! + + +This function is non-blocking. See 'format_storage' for the blocking counterpart. + +**Parameters** + +* int32_t **storage_id** - +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### format_storage() {#classmavsdk_1_1_camera_1a942f9bad2e2bede982d404ce552090a5} +```cpp +Result mavsdk::Camera::format_storage(int32_t storage_id) const +``` + + +Format storage (e.g. SD card) in camera. + +This will delete all content of the camera storage! + + +This function is blocking. See 'format_storage_async' for the non-blocking counterpart. + +**Parameters** + +* int32_t **storage_id** - + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### select_camera() {#classmavsdk_1_1_camera_1ab3348f98003f71f2399dd15505effae3} +```cpp +Result mavsdk::Camera::select_camera(int32_t camera_id) const +``` + + +Select current camera . + +Bind the plugin instance to a specific camera_id + + +This function is blocking. + +**Parameters** + +* int32_t **camera_id** - + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### reset_settings_async() {#classmavsdk_1_1_camera_1ab2316e20104a5efa94bf2719dc3dd994} +```cpp +void mavsdk::Camera::reset_settings_async(const ResultCallback callback) +``` + + +Reset all settings in camera. + +This will reset all camera settings to default value + + +This function is non-blocking. See 'reset_settings' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a8d6d59cd8d0a3584ef60b16255b6301f) **callback** - + +### reset_settings() {#classmavsdk_1_1_camera_1a49c84f20f1100848e3951f5e14b569dc} +```cpp +Result mavsdk::Camera::reset_settings() const +``` + + +Reset all settings in camera. + +This will reset all camera settings to default value + + +This function is blocking. See 'reset_settings_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_camera.md#classmavsdk_1_1_camera_1a2a84df3938372f4f302576227b308bcf) - Result of request. + +### operator=() {#classmavsdk_1_1_camera_1aeff295155b6a665f5c942e473f1fe894} +```cpp +const Camera& mavsdk::Camera::operator=(const Camera &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Camera](classmavsdk_1_1_camera.md)& - + +**Returns** + + const [Camera](classmavsdk_1_1_camera.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_camera_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_camera_server.md new file mode 100644 index 000000000..f6c943481 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_camera_server.md @@ -0,0 +1,958 @@ +# mavsdk::CameraServer Class Reference +`#include: camera_server.h` + +---- + + +Provides handling of camera trigger commands. + + +## Data Structures + + +struct [CaptureInfo](structmavsdk_1_1_camera_server_1_1_capture_info.md) + +struct [CaptureStatus](structmavsdk_1_1_camera_server_1_1_capture_status.md) + +struct [Information](structmavsdk_1_1_camera_server_1_1_information.md) + +struct [Position](structmavsdk_1_1_camera_server_1_1_position.md) + +struct [Quaternion](structmavsdk_1_1_camera_server_1_1_quaternion.md) + +struct [StorageInformation](structmavsdk_1_1_camera_server_1_1_storage_information.md) + +struct [VideoStreaming](structmavsdk_1_1_camera_server_1_1_video_streaming.md) + +## Public Types + + +Type | Description +--- | --- +enum [CameraFeedback](#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) | Possible feedback results for camera respond command. +enum [Mode](#classmavsdk_1_1_camera_server_1acf066a6b06ea67f66e59263a15869155) | [Camera](classmavsdk_1_1_camera.md) mode type. +enum [Result](#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | Possible results returned for action requests. +std::function< void([Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d))> [ResultCallback](#classmavsdk_1_1_camera_server_1a06aae7383f055f54a659cfce45432207) | Callback type for asynchronous [CameraServer](classmavsdk_1_1_camera_server.md) calls. +std::function< void(int32_t)> [TakePhotoCallback](#classmavsdk_1_1_camera_server_1a947529ac03c8dfac60c7c798db60a2d0) | Callback type for subscribe_take_photo. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [TakePhotoHandle](#classmavsdk_1_1_camera_server_1a2c79367a301d3b3093963222ac2cccbe) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_take_photo. +std::function< void(int32_t)> [StartVideoCallback](#classmavsdk_1_1_camera_server_1a01810f7bdc3ab4a59c633c7e11d02d0f) | Callback type for subscribe_start_video. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [StartVideoHandle](#classmavsdk_1_1_camera_server_1a2ec6dce94dfca9b5d102306df53072a1) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_start_video. +std::function< void(int32_t)> [StopVideoCallback](#classmavsdk_1_1_camera_server_1a37a4bd54432b5ffa866edd6cd9310c7f) | Callback type for subscribe_stop_video. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [StopVideoHandle](#classmavsdk_1_1_camera_server_1a7ca737d29d078f98770b7e2de6a93e8c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_stop_video. +std::function< void(int32_t)> [StartVideoStreamingCallback](#classmavsdk_1_1_camera_server_1ae67fa13502562dea8c3e955213cd14b9) | Callback type for subscribe_start_video_streaming. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [StartVideoStreamingHandle](#classmavsdk_1_1_camera_server_1ae6c608c1345fa1e1111c7bb2ed56cb85) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_start_video_streaming. +std::function< void(int32_t)> [StopVideoStreamingCallback](#classmavsdk_1_1_camera_server_1a111ed05ec69596127b9ac197c8fa2940) | Callback type for subscribe_stop_video_streaming. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [StopVideoStreamingHandle](#classmavsdk_1_1_camera_server_1a2b1a56ba4c349a59c3c62fccc5d249ea) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_stop_video_streaming. +std::function< void([Mode](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1acf066a6b06ea67f66e59263a15869155))> [SetModeCallback](#classmavsdk_1_1_camera_server_1a0e023e2c618adcb2ad75527353dc8acd) | Callback type for subscribe_set_mode. +[Handle](classmavsdk_1_1_handle.md)< [Mode](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1acf066a6b06ea67f66e59263a15869155) > [SetModeHandle](#classmavsdk_1_1_camera_server_1ae73af6f5c0e21e1ad89b75706f2d782c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_set_mode. +std::function< void(int32_t)> [StorageInformationCallback](#classmavsdk_1_1_camera_server_1ac5ad2dd65155ce1e7a6c0ebd2f0d20cf) | Callback type for subscribe_storage_information. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [StorageInformationHandle](#classmavsdk_1_1_camera_server_1a20edc2d4386999873dcbf74eafba6966) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_storage_information. +std::function< void(int32_t)> [CaptureStatusCallback](#classmavsdk_1_1_camera_server_1af288de066938d13c02b4f1364cd66403) | Callback type for subscribe_capture_status. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [CaptureStatusHandle](#classmavsdk_1_1_camera_server_1af67bf159a7f2173364182bff2cdd56bd) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_capture_status. +std::function< void(int32_t)> [FormatStorageCallback](#classmavsdk_1_1_camera_server_1a6242b427d4f29202ef931e8c6a7bdc46) | Callback type for subscribe_format_storage. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [FormatStorageHandle](#classmavsdk_1_1_camera_server_1a71b5531c91f7fba1c74296e55ecd3f45) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_format_storage. +std::function< void(int32_t)> [ResetSettingsCallback](#classmavsdk_1_1_camera_server_1ac88b7c640c76e5ff2bdc9afb243ceac2) | Callback type for subscribe_reset_settings. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [ResetSettingsHandle](#classmavsdk_1_1_camera_server_1aec973cf0e67863272e63e12902094f25) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_reset_settings. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [CameraServer](#classmavsdk_1_1_camera_server_1ac8575ed408d1c5f317aeec458402ccc3) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~CameraServer](#classmavsdk_1_1_camera_server_1a6e387b798274d5e4dadb01499d91daff) () override | Destructor (internal use only). +  | [CameraServer](#classmavsdk_1_1_camera_server_1acf1f1fcd248cf4942cd061a2345c89b9) (const [CameraServer](classmavsdk_1_1_camera_server.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [set_information](#classmavsdk_1_1_camera_server_1a81b6b957f11cc8764ea5bddfae88fc64) ([Information](structmavsdk_1_1_camera_server_1_1_information.md) information)const | Sets the camera information. This must be called as soon as the camera server is created. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [set_video_streaming](#classmavsdk_1_1_camera_server_1a8de695275fc2bee579005b4638250bb1) ([VideoStreaming](structmavsdk_1_1_camera_server_1_1_video_streaming.md) video_streaming)const | Sets video streaming settings. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [set_in_progress](#classmavsdk_1_1_camera_server_1a9f4c5012412b889017c9f47d01044651) (bool in_progress)const | Sets image capture in progress status flags. This should be set to true when the camera is busy taking a photo and false when it is done. +[TakePhotoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2c79367a301d3b3093963222ac2cccbe) | [subscribe_take_photo](#classmavsdk_1_1_camera_server_1a8a982fbf278d1521f6f80a7527f5f85c) (const [TakePhotoCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a947529ac03c8dfac60c7c798db60a2d0) & callback) | Subscribe to image capture requests. Each request received should respond to using RespondTakePhoto. +void | [unsubscribe_take_photo](#classmavsdk_1_1_camera_server_1a9b6c0b59f8990b4259b9a2fa134228c9) ([TakePhotoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2c79367a301d3b3093963222ac2cccbe) handle) | Unsubscribe from subscribe_take_photo. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_take_photo](#classmavsdk_1_1_camera_server_1aef1d7b26221a1e98b9d6ff099a6f1299) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) take_photo_feedback, [CaptureInfo](structmavsdk_1_1_camera_server_1_1_capture_info.md) capture_info)const | Respond to an image capture request from SubscribeTakePhoto. +[StartVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2ec6dce94dfca9b5d102306df53072a1) | [subscribe_start_video](#classmavsdk_1_1_camera_server_1a11e48131fac66f1f54a7f433a18cb000) (const [StartVideoCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a01810f7bdc3ab4a59c633c7e11d02d0f) & callback) | Subscribe to start video requests. Each request received should respond to using RespondStartVideo. +void | [unsubscribe_start_video](#classmavsdk_1_1_camera_server_1a408195cfa869e1146c054320c8bf74c2) ([StartVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2ec6dce94dfca9b5d102306df53072a1) handle) | Unsubscribe from subscribe_start_video. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_start_video](#classmavsdk_1_1_camera_server_1aae8ca562aed415a803e5cf116d3860ab) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) start_video_feedback)const | Subscribe to stop video requests. Each request received should respond using StopVideoResponse. +[StopVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a7ca737d29d078f98770b7e2de6a93e8c) | [subscribe_stop_video](#classmavsdk_1_1_camera_server_1a1f9bf41790c13bfac00e83a07a0aabc2) (const [StopVideoCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a37a4bd54432b5ffa866edd6cd9310c7f) & callback) | Subscribe to stop video requests. Each request received should response to using RespondStopVideo. +void | [unsubscribe_stop_video](#classmavsdk_1_1_camera_server_1a46087c9b9131d5b56c937a7a0f9b82cd) ([StopVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a7ca737d29d078f98770b7e2de6a93e8c) handle) | Unsubscribe from subscribe_stop_video. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_stop_video](#classmavsdk_1_1_camera_server_1a72504e0a97587dbd4e92cbdf2aedd36f) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) stop_video_feedback)const | Respond to stop video request from SubscribeStopVideo. +[StartVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae6c608c1345fa1e1111c7bb2ed56cb85) | [subscribe_start_video_streaming](#classmavsdk_1_1_camera_server_1a7528dfe116272cdef1584c0709e9d554) (const [StartVideoStreamingCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae67fa13502562dea8c3e955213cd14b9) & callback) | Subscribe to start video streaming requests. Each request received should response to using RespondStartVideoStreaming. +void | [unsubscribe_start_video_streaming](#classmavsdk_1_1_camera_server_1a0e85bc6405cb04be6d14e385b5c9b6f0) ([StartVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae6c608c1345fa1e1111c7bb2ed56cb85) handle) | Unsubscribe from subscribe_start_video_streaming. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_start_video_streaming](#classmavsdk_1_1_camera_server_1a32bf585f316c0990fd3c792930eb430c) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) start_video_streaming_feedback)const | Respond to start video streaming from SubscribeStartVideoStreaming. +[StopVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2b1a56ba4c349a59c3c62fccc5d249ea) | [subscribe_stop_video_streaming](#classmavsdk_1_1_camera_server_1aed9dd6e4e5d4b9aa24254933cfdb68d6) (const [StopVideoStreamingCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a111ed05ec69596127b9ac197c8fa2940) & callback) | Subscribe to stop video streaming requests. Each request received should response to using RespondStopVideoStreaming. +void | [unsubscribe_stop_video_streaming](#classmavsdk_1_1_camera_server_1a0ae66e34730d2a9ebea39bff190b432c) ([StopVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2b1a56ba4c349a59c3c62fccc5d249ea) handle) | Unsubscribe from subscribe_stop_video_streaming. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_stop_video_streaming](#classmavsdk_1_1_camera_server_1a8a452852fd4ba6a97ab7613dfbe3d3d5) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) stop_video_streaming_feedback)const | Respond to stop video streaming from SubscribeStopVideoStreaming. +[SetModeHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae73af6f5c0e21e1ad89b75706f2d782c) | [subscribe_set_mode](#classmavsdk_1_1_camera_server_1a7aefc230a1c9688c6ffce0563970363d) (const [SetModeCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a0e023e2c618adcb2ad75527353dc8acd) & callback) | Subscribe to set camera mode requests. Each request received should response to using RespondSetMode. +void | [unsubscribe_set_mode](#classmavsdk_1_1_camera_server_1a4ebe9158300707532374492e664911b7) ([SetModeHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae73af6f5c0e21e1ad89b75706f2d782c) handle) | Unsubscribe from subscribe_set_mode. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_set_mode](#classmavsdk_1_1_camera_server_1add075055b138c38ef17502ef049b2508) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) set_mode_feedback)const | Respond to set camera mode from SubscribeSetMode. +[StorageInformationHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a20edc2d4386999873dcbf74eafba6966) | [subscribe_storage_information](#classmavsdk_1_1_camera_server_1a05fbd42c88962fccad1b2a31810dade7) (const [StorageInformationCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ac5ad2dd65155ce1e7a6c0ebd2f0d20cf) & callback) | Subscribe to camera storage information requests. Each request received should response to using RespondStorageInformation. +void | [unsubscribe_storage_information](#classmavsdk_1_1_camera_server_1afe6fbc5c8f5f39f204c2d6c57ac5161d) ([StorageInformationHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a20edc2d4386999873dcbf74eafba6966) handle) | Unsubscribe from subscribe_storage_information. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_storage_information](#classmavsdk_1_1_camera_server_1a6dee290ca68414ee8ff9744e261b5ac3) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) storage_information_feedback, [StorageInformation](structmavsdk_1_1_camera_server_1_1_storage_information.md) storage_information)const | Respond to camera storage information from SubscribeStorageInformation. +[CaptureStatusHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1af67bf159a7f2173364182bff2cdd56bd) | [subscribe_capture_status](#classmavsdk_1_1_camera_server_1a783ac1e37cf9be240e660fe3ba4eced9) (const [CaptureStatusCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1af288de066938d13c02b4f1364cd66403) & callback) | Subscribe to camera capture status requests. Each request received should response to using RespondCaptureStatus. +void | [unsubscribe_capture_status](#classmavsdk_1_1_camera_server_1af26523420d48b629f1758da304c9d156) ([CaptureStatusHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1af67bf159a7f2173364182bff2cdd56bd) handle) | Unsubscribe from subscribe_capture_status. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_capture_status](#classmavsdk_1_1_camera_server_1ae091608e278807026e114d257d25407a) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) capture_status_feedback, [CaptureStatus](structmavsdk_1_1_camera_server_1_1_capture_status.md) capture_status)const | Respond to camera capture status from SubscribeCaptureStatus. +[FormatStorageHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a71b5531c91f7fba1c74296e55ecd3f45) | [subscribe_format_storage](#classmavsdk_1_1_camera_server_1ab788a20175966f8d5ddab973f176a3b4) (const [FormatStorageCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a6242b427d4f29202ef931e8c6a7bdc46) & callback) | Subscribe to format storage requests. Each request received should response to using RespondFormatStorage. +void | [unsubscribe_format_storage](#classmavsdk_1_1_camera_server_1a9b51f14ffa8c65518d59a5fed406be0c) ([FormatStorageHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a71b5531c91f7fba1c74296e55ecd3f45) handle) | Unsubscribe from subscribe_format_storage. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_format_storage](#classmavsdk_1_1_camera_server_1a18bb9a800df91f74efa0a35eb5218a14) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) format_storage_feedback)const | Respond to format storage from SubscribeFormatStorage. +[ResetSettingsHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aec973cf0e67863272e63e12902094f25) | [subscribe_reset_settings](#classmavsdk_1_1_camera_server_1ab1022684bc503e1d6294495de8c68165) (const [ResetSettingsCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ac88b7c640c76e5ff2bdc9afb243ceac2) & callback) | Subscribe to reset settings requests. Each request received should response to using RespondResetSettings. +void | [unsubscribe_reset_settings](#classmavsdk_1_1_camera_server_1a09c70966fa6f98215c11d8257d1b9608) ([ResetSettingsHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aec973cf0e67863272e63e12902094f25) handle) | Unsubscribe from subscribe_reset_settings. +[Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) | [respond_reset_settings](#classmavsdk_1_1_camera_server_1a1d7b2793d899c9052038f4e9569eb32b) ([CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) reset_settings_feedback)const | Respond to reset settings from SubscribeResetSettings. +const [CameraServer](classmavsdk_1_1_camera_server.md) & | [operator=](#classmavsdk_1_1_camera_server_1a08a928060071a9a9e4d321403f7d446a) (const [CameraServer](classmavsdk_1_1_camera_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### CameraServer() {#classmavsdk_1_1_camera_server_1ac8575ed408d1c5f317aeec458402ccc3} +```cpp +mavsdk::CameraServer::CameraServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto camera_server = CameraServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~CameraServer() {#classmavsdk_1_1_camera_server_1a6e387b798274d5e4dadb01499d91daff} +```cpp +mavsdk::CameraServer::~CameraServer() override +``` + + +Destructor (internal use only). + + +### CameraServer() {#classmavsdk_1_1_camera_server_1acf1f1fcd248cf4942cd061a2345c89b9} +```cpp +mavsdk::CameraServer::CameraServer(const CameraServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [CameraServer](classmavsdk_1_1_camera_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_camera_server_1a06aae7383f055f54a659cfce45432207} + +```cpp +using mavsdk::CameraServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [CameraServer](classmavsdk_1_1_camera_server.md) calls. + + +### typedef TakePhotoCallback {#classmavsdk_1_1_camera_server_1a947529ac03c8dfac60c7c798db60a2d0} + +```cpp +using mavsdk::CameraServer::TakePhotoCallback = std::function +``` + + +Callback type for subscribe_take_photo. + + +### typedef TakePhotoHandle {#classmavsdk_1_1_camera_server_1a2c79367a301d3b3093963222ac2cccbe} + +```cpp +using mavsdk::CameraServer::TakePhotoHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_take_photo. + + +### typedef StartVideoCallback {#classmavsdk_1_1_camera_server_1a01810f7bdc3ab4a59c633c7e11d02d0f} + +```cpp +using mavsdk::CameraServer::StartVideoCallback = std::function +``` + + +Callback type for subscribe_start_video. + + +### typedef StartVideoHandle {#classmavsdk_1_1_camera_server_1a2ec6dce94dfca9b5d102306df53072a1} + +```cpp +using mavsdk::CameraServer::StartVideoHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_start_video. + + +### typedef StopVideoCallback {#classmavsdk_1_1_camera_server_1a37a4bd54432b5ffa866edd6cd9310c7f} + +```cpp +using mavsdk::CameraServer::StopVideoCallback = std::function +``` + + +Callback type for subscribe_stop_video. + + +### typedef StopVideoHandle {#classmavsdk_1_1_camera_server_1a7ca737d29d078f98770b7e2de6a93e8c} + +```cpp +using mavsdk::CameraServer::StopVideoHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_stop_video. + + +### typedef StartVideoStreamingCallback {#classmavsdk_1_1_camera_server_1ae67fa13502562dea8c3e955213cd14b9} + +```cpp +using mavsdk::CameraServer::StartVideoStreamingCallback = std::function +``` + + +Callback type for subscribe_start_video_streaming. + + +### typedef StartVideoStreamingHandle {#classmavsdk_1_1_camera_server_1ae6c608c1345fa1e1111c7bb2ed56cb85} + +```cpp +using mavsdk::CameraServer::StartVideoStreamingHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_start_video_streaming. + + +### typedef StopVideoStreamingCallback {#classmavsdk_1_1_camera_server_1a111ed05ec69596127b9ac197c8fa2940} + +```cpp +using mavsdk::CameraServer::StopVideoStreamingCallback = std::function +``` + + +Callback type for subscribe_stop_video_streaming. + + +### typedef StopVideoStreamingHandle {#classmavsdk_1_1_camera_server_1a2b1a56ba4c349a59c3c62fccc5d249ea} + +```cpp +using mavsdk::CameraServer::StopVideoStreamingHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_stop_video_streaming. + + +### typedef SetModeCallback {#classmavsdk_1_1_camera_server_1a0e023e2c618adcb2ad75527353dc8acd} + +```cpp +using mavsdk::CameraServer::SetModeCallback = std::function +``` + + +Callback type for subscribe_set_mode. + + +### typedef SetModeHandle {#classmavsdk_1_1_camera_server_1ae73af6f5c0e21e1ad89b75706f2d782c} + +```cpp +using mavsdk::CameraServer::SetModeHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_set_mode. + + +### typedef StorageInformationCallback {#classmavsdk_1_1_camera_server_1ac5ad2dd65155ce1e7a6c0ebd2f0d20cf} + +```cpp +using mavsdk::CameraServer::StorageInformationCallback = std::function +``` + + +Callback type for subscribe_storage_information. + + +### typedef StorageInformationHandle {#classmavsdk_1_1_camera_server_1a20edc2d4386999873dcbf74eafba6966} + +```cpp +using mavsdk::CameraServer::StorageInformationHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_storage_information. + + +### typedef CaptureStatusCallback {#classmavsdk_1_1_camera_server_1af288de066938d13c02b4f1364cd66403} + +```cpp +using mavsdk::CameraServer::CaptureStatusCallback = std::function +``` + + +Callback type for subscribe_capture_status. + + +### typedef CaptureStatusHandle {#classmavsdk_1_1_camera_server_1af67bf159a7f2173364182bff2cdd56bd} + +```cpp +using mavsdk::CameraServer::CaptureStatusHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_capture_status. + + +### typedef FormatStorageCallback {#classmavsdk_1_1_camera_server_1a6242b427d4f29202ef931e8c6a7bdc46} + +```cpp +using mavsdk::CameraServer::FormatStorageCallback = std::function +``` + + +Callback type for subscribe_format_storage. + + +### typedef FormatStorageHandle {#classmavsdk_1_1_camera_server_1a71b5531c91f7fba1c74296e55ecd3f45} + +```cpp +using mavsdk::CameraServer::FormatStorageHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_format_storage. + + +### typedef ResetSettingsCallback {#classmavsdk_1_1_camera_server_1ac88b7c640c76e5ff2bdc9afb243ceac2} + +```cpp +using mavsdk::CameraServer::ResetSettingsCallback = std::function +``` + + +Callback type for subscribe_reset_settings. + + +### typedef ResetSettingsHandle {#classmavsdk_1_1_camera_server_1aec973cf0e67863272e63e12902094f25} + +```cpp +using mavsdk::CameraServer::ResetSettingsHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_reset_settings. + + +## Member Enumeration Documentation + + +### enum CameraFeedback {#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72} + + +Possible feedback results for camera respond command. + + +Value | Description +--- | --- + `Unknown` | Unknown. + `Ok` | Ok. + `Busy` | Busy. + `Failed` | Failed. + +### enum Mode {#classmavsdk_1_1_camera_server_1acf066a6b06ea67f66e59263a15869155} + + +[Camera](classmavsdk_1_1_camera.md) mode type. + + +Value | Description +--- | --- + `Unknown` | Unknown mode. + `Photo` | Photo mode. + `Video` | Video mode. + +### enum Result {#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d} + + +Possible results returned for action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Command executed successfully. + `InProgress` | Command in progress. + `Busy` | [Camera](classmavsdk_1_1_camera.md) is busy and rejected command. + `Denied` | [Camera](classmavsdk_1_1_camera.md) denied the command. + `Error` | An error has occurred while executing the command. + `Timeout` | Command timed out. + `WrongArgument` | Command has wrong argument(s). + `NoSystem` | No system connected. + +## Member Function Documentation + + +### set_information() {#classmavsdk_1_1_camera_server_1a81b6b957f11cc8764ea5bddfae88fc64} +```cpp +Result mavsdk::CameraServer::set_information(Information information) const +``` + + +Sets the camera information. This must be called as soon as the camera server is created. + +This function is blocking. + +**Parameters** + +* [Information](structmavsdk_1_1_camera_server_1_1_information.md) **information** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### set_video_streaming() {#classmavsdk_1_1_camera_server_1a8de695275fc2bee579005b4638250bb1} +```cpp +Result mavsdk::CameraServer::set_video_streaming(VideoStreaming video_streaming) const +``` + + +Sets video streaming settings. + +This function is blocking. + +**Parameters** + +* [VideoStreaming](structmavsdk_1_1_camera_server_1_1_video_streaming.md) **video_streaming** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### set_in_progress() {#classmavsdk_1_1_camera_server_1a9f4c5012412b889017c9f47d01044651} +```cpp +Result mavsdk::CameraServer::set_in_progress(bool in_progress) const +``` + + +Sets image capture in progress status flags. This should be set to true when the camera is busy taking a photo and false when it is done. + +This function is blocking. + +**Parameters** + +* bool **in_progress** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_take_photo() {#classmavsdk_1_1_camera_server_1a8a982fbf278d1521f6f80a7527f5f85c} +```cpp +TakePhotoHandle mavsdk::CameraServer::subscribe_take_photo(const TakePhotoCallback &callback) +``` + + +Subscribe to image capture requests. Each request received should respond to using RespondTakePhoto. + + +**Parameters** + +* const [TakePhotoCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a947529ac03c8dfac60c7c798db60a2d0)& **callback** - + +**Returns** + + [TakePhotoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2c79367a301d3b3093963222ac2cccbe) - + +### unsubscribe_take_photo() {#classmavsdk_1_1_camera_server_1a9b6c0b59f8990b4259b9a2fa134228c9} +```cpp +void mavsdk::CameraServer::unsubscribe_take_photo(TakePhotoHandle handle) +``` + + +Unsubscribe from subscribe_take_photo. + + +**Parameters** + +* [TakePhotoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2c79367a301d3b3093963222ac2cccbe) **handle** - + +### respond_take_photo() {#classmavsdk_1_1_camera_server_1aef1d7b26221a1e98b9d6ff099a6f1299} +```cpp +Result mavsdk::CameraServer::respond_take_photo(CameraFeedback take_photo_feedback, CaptureInfo capture_info) const +``` + + +Respond to an image capture request from SubscribeTakePhoto. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **take_photo_feedback** - +* [CaptureInfo](structmavsdk_1_1_camera_server_1_1_capture_info.md) **capture_info** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_start_video() {#classmavsdk_1_1_camera_server_1a11e48131fac66f1f54a7f433a18cb000} +```cpp +StartVideoHandle mavsdk::CameraServer::subscribe_start_video(const StartVideoCallback &callback) +``` + + +Subscribe to start video requests. Each request received should respond to using RespondStartVideo. + + +**Parameters** + +* const [StartVideoCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a01810f7bdc3ab4a59c633c7e11d02d0f)& **callback** - + +**Returns** + + [StartVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2ec6dce94dfca9b5d102306df53072a1) - + +### unsubscribe_start_video() {#classmavsdk_1_1_camera_server_1a408195cfa869e1146c054320c8bf74c2} +```cpp +void mavsdk::CameraServer::unsubscribe_start_video(StartVideoHandle handle) +``` + + +Unsubscribe from subscribe_start_video. + + +**Parameters** + +* [StartVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2ec6dce94dfca9b5d102306df53072a1) **handle** - + +### respond_start_video() {#classmavsdk_1_1_camera_server_1aae8ca562aed415a803e5cf116d3860ab} +```cpp +Result mavsdk::CameraServer::respond_start_video(CameraFeedback start_video_feedback) const +``` + + +Subscribe to stop video requests. Each request received should respond using StopVideoResponse. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **start_video_feedback** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_stop_video() {#classmavsdk_1_1_camera_server_1a1f9bf41790c13bfac00e83a07a0aabc2} +```cpp +StopVideoHandle mavsdk::CameraServer::subscribe_stop_video(const StopVideoCallback &callback) +``` + + +Subscribe to stop video requests. Each request received should response to using RespondStopVideo. + + +**Parameters** + +* const [StopVideoCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a37a4bd54432b5ffa866edd6cd9310c7f)& **callback** - + +**Returns** + + [StopVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a7ca737d29d078f98770b7e2de6a93e8c) - + +### unsubscribe_stop_video() {#classmavsdk_1_1_camera_server_1a46087c9b9131d5b56c937a7a0f9b82cd} +```cpp +void mavsdk::CameraServer::unsubscribe_stop_video(StopVideoHandle handle) +``` + + +Unsubscribe from subscribe_stop_video. + + +**Parameters** + +* [StopVideoHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a7ca737d29d078f98770b7e2de6a93e8c) **handle** - + +### respond_stop_video() {#classmavsdk_1_1_camera_server_1a72504e0a97587dbd4e92cbdf2aedd36f} +```cpp +Result mavsdk::CameraServer::respond_stop_video(CameraFeedback stop_video_feedback) const +``` + + +Respond to stop video request from SubscribeStopVideo. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **stop_video_feedback** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_start_video_streaming() {#classmavsdk_1_1_camera_server_1a7528dfe116272cdef1584c0709e9d554} +```cpp +StartVideoStreamingHandle mavsdk::CameraServer::subscribe_start_video_streaming(const StartVideoStreamingCallback &callback) +``` + + +Subscribe to start video streaming requests. Each request received should response to using RespondStartVideoStreaming. + + +**Parameters** + +* const [StartVideoStreamingCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae67fa13502562dea8c3e955213cd14b9)& **callback** - + +**Returns** + + [StartVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae6c608c1345fa1e1111c7bb2ed56cb85) - + +### unsubscribe_start_video_streaming() {#classmavsdk_1_1_camera_server_1a0e85bc6405cb04be6d14e385b5c9b6f0} +```cpp +void mavsdk::CameraServer::unsubscribe_start_video_streaming(StartVideoStreamingHandle handle) +``` + + +Unsubscribe from subscribe_start_video_streaming. + + +**Parameters** + +* [StartVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae6c608c1345fa1e1111c7bb2ed56cb85) **handle** - + +### respond_start_video_streaming() {#classmavsdk_1_1_camera_server_1a32bf585f316c0990fd3c792930eb430c} +```cpp +Result mavsdk::CameraServer::respond_start_video_streaming(CameraFeedback start_video_streaming_feedback) const +``` + + +Respond to start video streaming from SubscribeStartVideoStreaming. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **start_video_streaming_feedback** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_stop_video_streaming() {#classmavsdk_1_1_camera_server_1aed9dd6e4e5d4b9aa24254933cfdb68d6} +```cpp +StopVideoStreamingHandle mavsdk::CameraServer::subscribe_stop_video_streaming(const StopVideoStreamingCallback &callback) +``` + + +Subscribe to stop video streaming requests. Each request received should response to using RespondStopVideoStreaming. + + +**Parameters** + +* const [StopVideoStreamingCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a111ed05ec69596127b9ac197c8fa2940)& **callback** - + +**Returns** + + [StopVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2b1a56ba4c349a59c3c62fccc5d249ea) - + +### unsubscribe_stop_video_streaming() {#classmavsdk_1_1_camera_server_1a0ae66e34730d2a9ebea39bff190b432c} +```cpp +void mavsdk::CameraServer::unsubscribe_stop_video_streaming(StopVideoStreamingHandle handle) +``` + + +Unsubscribe from subscribe_stop_video_streaming. + + +**Parameters** + +* [StopVideoStreamingHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a2b1a56ba4c349a59c3c62fccc5d249ea) **handle** - + +### respond_stop_video_streaming() {#classmavsdk_1_1_camera_server_1a8a452852fd4ba6a97ab7613dfbe3d3d5} +```cpp +Result mavsdk::CameraServer::respond_stop_video_streaming(CameraFeedback stop_video_streaming_feedback) const +``` + + +Respond to stop video streaming from SubscribeStopVideoStreaming. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **stop_video_streaming_feedback** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_set_mode() {#classmavsdk_1_1_camera_server_1a7aefc230a1c9688c6ffce0563970363d} +```cpp +SetModeHandle mavsdk::CameraServer::subscribe_set_mode(const SetModeCallback &callback) +``` + + +Subscribe to set camera mode requests. Each request received should response to using RespondSetMode. + + +**Parameters** + +* const [SetModeCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a0e023e2c618adcb2ad75527353dc8acd)& **callback** - + +**Returns** + + [SetModeHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae73af6f5c0e21e1ad89b75706f2d782c) - + +### unsubscribe_set_mode() {#classmavsdk_1_1_camera_server_1a4ebe9158300707532374492e664911b7} +```cpp +void mavsdk::CameraServer::unsubscribe_set_mode(SetModeHandle handle) +``` + + +Unsubscribe from subscribe_set_mode. + + +**Parameters** + +* [SetModeHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ae73af6f5c0e21e1ad89b75706f2d782c) **handle** - + +### respond_set_mode() {#classmavsdk_1_1_camera_server_1add075055b138c38ef17502ef049b2508} +```cpp +Result mavsdk::CameraServer::respond_set_mode(CameraFeedback set_mode_feedback) const +``` + + +Respond to set camera mode from SubscribeSetMode. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **set_mode_feedback** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_storage_information() {#classmavsdk_1_1_camera_server_1a05fbd42c88962fccad1b2a31810dade7} +```cpp +StorageInformationHandle mavsdk::CameraServer::subscribe_storage_information(const StorageInformationCallback &callback) +``` + + +Subscribe to camera storage information requests. Each request received should response to using RespondStorageInformation. + + +**Parameters** + +* const [StorageInformationCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ac5ad2dd65155ce1e7a6c0ebd2f0d20cf)& **callback** - + +**Returns** + + [StorageInformationHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a20edc2d4386999873dcbf74eafba6966) - + +### unsubscribe_storage_information() {#classmavsdk_1_1_camera_server_1afe6fbc5c8f5f39f204c2d6c57ac5161d} +```cpp +void mavsdk::CameraServer::unsubscribe_storage_information(StorageInformationHandle handle) +``` + + +Unsubscribe from subscribe_storage_information. + + +**Parameters** + +* [StorageInformationHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a20edc2d4386999873dcbf74eafba6966) **handle** - + +### respond_storage_information() {#classmavsdk_1_1_camera_server_1a6dee290ca68414ee8ff9744e261b5ac3} +```cpp +Result mavsdk::CameraServer::respond_storage_information(CameraFeedback storage_information_feedback, StorageInformation storage_information) const +``` + + +Respond to camera storage information from SubscribeStorageInformation. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **storage_information_feedback** - +* [StorageInformation](structmavsdk_1_1_camera_server_1_1_storage_information.md) **storage_information** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_capture_status() {#classmavsdk_1_1_camera_server_1a783ac1e37cf9be240e660fe3ba4eced9} +```cpp +CaptureStatusHandle mavsdk::CameraServer::subscribe_capture_status(const CaptureStatusCallback &callback) +``` + + +Subscribe to camera capture status requests. Each request received should response to using RespondCaptureStatus. + + +**Parameters** + +* const [CaptureStatusCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1af288de066938d13c02b4f1364cd66403)& **callback** - + +**Returns** + + [CaptureStatusHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1af67bf159a7f2173364182bff2cdd56bd) - + +### unsubscribe_capture_status() {#classmavsdk_1_1_camera_server_1af26523420d48b629f1758da304c9d156} +```cpp +void mavsdk::CameraServer::unsubscribe_capture_status(CaptureStatusHandle handle) +``` + + +Unsubscribe from subscribe_capture_status. + + +**Parameters** + +* [CaptureStatusHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1af67bf159a7f2173364182bff2cdd56bd) **handle** - + +### respond_capture_status() {#classmavsdk_1_1_camera_server_1ae091608e278807026e114d257d25407a} +```cpp +Result mavsdk::CameraServer::respond_capture_status(CameraFeedback capture_status_feedback, CaptureStatus capture_status) const +``` + + +Respond to camera capture status from SubscribeCaptureStatus. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **capture_status_feedback** - +* [CaptureStatus](structmavsdk_1_1_camera_server_1_1_capture_status.md) **capture_status** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_format_storage() {#classmavsdk_1_1_camera_server_1ab788a20175966f8d5ddab973f176a3b4} +```cpp +FormatStorageHandle mavsdk::CameraServer::subscribe_format_storage(const FormatStorageCallback &callback) +``` + + +Subscribe to format storage requests. Each request received should response to using RespondFormatStorage. + + +**Parameters** + +* const [FormatStorageCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a6242b427d4f29202ef931e8c6a7bdc46)& **callback** - + +**Returns** + + [FormatStorageHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a71b5531c91f7fba1c74296e55ecd3f45) - + +### unsubscribe_format_storage() {#classmavsdk_1_1_camera_server_1a9b51f14ffa8c65518d59a5fed406be0c} +```cpp +void mavsdk::CameraServer::unsubscribe_format_storage(FormatStorageHandle handle) +``` + + +Unsubscribe from subscribe_format_storage. + + +**Parameters** + +* [FormatStorageHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a71b5531c91f7fba1c74296e55ecd3f45) **handle** - + +### respond_format_storage() {#classmavsdk_1_1_camera_server_1a18bb9a800df91f74efa0a35eb5218a14} +```cpp +Result mavsdk::CameraServer::respond_format_storage(CameraFeedback format_storage_feedback) const +``` + + +Respond to format storage from SubscribeFormatStorage. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **format_storage_feedback** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### subscribe_reset_settings() {#classmavsdk_1_1_camera_server_1ab1022684bc503e1d6294495de8c68165} +```cpp +ResetSettingsHandle mavsdk::CameraServer::subscribe_reset_settings(const ResetSettingsCallback &callback) +``` + + +Subscribe to reset settings requests. Each request received should response to using RespondResetSettings. + + +**Parameters** + +* const [ResetSettingsCallback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1ac88b7c640c76e5ff2bdc9afb243ceac2)& **callback** - + +**Returns** + + [ResetSettingsHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aec973cf0e67863272e63e12902094f25) - + +### unsubscribe_reset_settings() {#classmavsdk_1_1_camera_server_1a09c70966fa6f98215c11d8257d1b9608} +```cpp +void mavsdk::CameraServer::unsubscribe_reset_settings(ResetSettingsHandle handle) +``` + + +Unsubscribe from subscribe_reset_settings. + + +**Parameters** + +* [ResetSettingsHandle](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aec973cf0e67863272e63e12902094f25) **handle** - + +### respond_reset_settings() {#classmavsdk_1_1_camera_server_1a1d7b2793d899c9052038f4e9569eb32b} +```cpp +Result mavsdk::CameraServer::respond_reset_settings(CameraFeedback reset_settings_feedback) const +``` + + +Respond to reset settings from SubscribeResetSettings. + +This function is blocking. + +**Parameters** + +* [CameraFeedback](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1a088cdcd9da37b84f075d20d5b7458a72) **reset_settings_feedback** - + +**Returns** + + [Result](classmavsdk_1_1_camera_server.md#classmavsdk_1_1_camera_server_1aa625af622ca91165c737cffebfe57f8d) - Result of request. + +### operator=() {#classmavsdk_1_1_camera_server_1a08a928060071a9a9e4d321403f7d446a} +```cpp +const CameraServer& mavsdk::CameraServer::operator=(const CameraServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [CameraServer](classmavsdk_1_1_camera_server.md)& - + +**Returns** + + const [CameraServer](classmavsdk_1_1_camera_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_component_information.md b/docs/en/cpp/api_reference/classmavsdk_1_1_component_information.md new file mode 100644 index 000000000..f83858eef --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_component_information.md @@ -0,0 +1,213 @@ +# mavsdk::ComponentInformation Class Reference +`#include: component_information.h` + +---- + + +Access component information such as parameters. + + +## Data Structures + + +struct [FloatParam](structmavsdk_1_1_component_information_1_1_float_param.md) + +struct [FloatParamUpdate](structmavsdk_1_1_component_information_1_1_float_param_update.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_component_information_1aa91c6fe2a0335b2b86a140e37359341f) | Possible results returned for param requests. +std::function< void([Result](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1aa91c6fe2a0335b2b86a140e37359341f))> [ResultCallback](#classmavsdk_1_1_component_information_1a37506981d2b48162f3304947e5520ea8) | Callback type for asynchronous [ComponentInformation](classmavsdk_1_1_component_information.md) calls. +std::function< void([FloatParamUpdate](structmavsdk_1_1_component_information_1_1_float_param_update.md))> [FloatParamCallback](#classmavsdk_1_1_component_information_1a346dfd9dc8de60f6cdeca0a4ddb20f78) | Callback type for subscribe_float_param. +[Handle](classmavsdk_1_1_handle.md)< [FloatParamUpdate](structmavsdk_1_1_component_information_1_1_float_param_update.md) > [FloatParamHandle](#classmavsdk_1_1_component_information_1ab22a0bb9704930d17c2e2c82ffa9a977) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_float_param. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [ComponentInformation](#classmavsdk_1_1_component_information_1afd3a1f8282548a895ff3bf3f08da20ac) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [ComponentInformation](#classmavsdk_1_1_component_information_1a3c6bc3ad6d571a944407e148e2496f13) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~ComponentInformation](#classmavsdk_1_1_component_information_1adc9f86087470dcf0b1eb888c236918ec) () override | Destructor (internal use only). +  | [ComponentInformation](#classmavsdk_1_1_component_information_1a146e2a8d181c75ae1c7c98501c4b205a) (const [ComponentInformation](classmavsdk_1_1_component_information.md) & other) | Copy constructor. +std::pair< [Result](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1aa91c6fe2a0335b2b86a140e37359341f), std::vector< [ComponentInformation::FloatParam](structmavsdk_1_1_component_information_1_1_float_param.md) > > | [access_float_params](#classmavsdk_1_1_component_information_1ababf4e7ff24e6fabfd3ee52b58e66002) () const | List available float params. +[FloatParamHandle](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1ab22a0bb9704930d17c2e2c82ffa9a977) | [subscribe_float_param](#classmavsdk_1_1_component_information_1a41df5c7f9340d3e01b24a96d3215754d) (const [FloatParamCallback](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1a346dfd9dc8de60f6cdeca0a4ddb20f78) & callback) | Subscribe to float param changes/updates. +void | [unsubscribe_float_param](#classmavsdk_1_1_component_information_1a877d2a620d6646bf4063863297c0b666) ([FloatParamHandle](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1ab22a0bb9704930d17c2e2c82ffa9a977) handle) | Unsubscribe from subscribe_float_param. +const [ComponentInformation](classmavsdk_1_1_component_information.md) & | [operator=](#classmavsdk_1_1_component_information_1ada12fb6199ef988219281900ad2d9b79) (const [ComponentInformation](classmavsdk_1_1_component_information.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ComponentInformation() {#classmavsdk_1_1_component_information_1afd3a1f8282548a895ff3bf3f08da20ac} +```cpp +mavsdk::ComponentInformation::ComponentInformation(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto component_information = ComponentInformation(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### ComponentInformation() {#classmavsdk_1_1_component_information_1a3c6bc3ad6d571a944407e148e2496f13} +```cpp +mavsdk::ComponentInformation::ComponentInformation(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto component_information = ComponentInformation(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~ComponentInformation() {#classmavsdk_1_1_component_information_1adc9f86087470dcf0b1eb888c236918ec} +```cpp +mavsdk::ComponentInformation::~ComponentInformation() override +``` + + +Destructor (internal use only). + + +### ComponentInformation() {#classmavsdk_1_1_component_information_1a146e2a8d181c75ae1c7c98501c4b205a} +```cpp +mavsdk::ComponentInformation::ComponentInformation(const ComponentInformation &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [ComponentInformation](classmavsdk_1_1_component_information.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_component_information_1a37506981d2b48162f3304947e5520ea8} + +```cpp +using mavsdk::ComponentInformation::ResultCallback = std::function +``` + + +Callback type for asynchronous [ComponentInformation](classmavsdk_1_1_component_information.md) calls. + + +### typedef FloatParamCallback {#classmavsdk_1_1_component_information_1a346dfd9dc8de60f6cdeca0a4ddb20f78} + +```cpp +using mavsdk::ComponentInformation::FloatParamCallback = std::function +``` + + +Callback type for subscribe_float_param. + + +### typedef FloatParamHandle {#classmavsdk_1_1_component_information_1ab22a0bb9704930d17c2e2c82ffa9a977} + +```cpp +using mavsdk::ComponentInformation::FloatParamHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_float_param. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_component_information_1aa91c6fe2a0335b2b86a140e37359341f} + + +Possible results returned for param requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NoSystem` | No system is connected. + +## Member Function Documentation + + +### access_float_params() {#classmavsdk_1_1_component_information_1ababf4e7ff24e6fabfd3ee52b58e66002} +```cpp +std::pair > mavsdk::ComponentInformation::access_float_params() const +``` + + +List available float params. + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1aa91c6fe2a0335b2b86a140e37359341f), std::vector< [ComponentInformation::FloatParam](structmavsdk_1_1_component_information_1_1_float_param.md) > > - Result of request. + +### subscribe_float_param() {#classmavsdk_1_1_component_information_1a41df5c7f9340d3e01b24a96d3215754d} +```cpp +FloatParamHandle mavsdk::ComponentInformation::subscribe_float_param(const FloatParamCallback &callback) +``` + + +Subscribe to float param changes/updates. + + +**Parameters** + +* const [FloatParamCallback](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1a346dfd9dc8de60f6cdeca0a4ddb20f78)& **callback** - + +**Returns** + + [FloatParamHandle](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1ab22a0bb9704930d17c2e2c82ffa9a977) - + +### unsubscribe_float_param() {#classmavsdk_1_1_component_information_1a877d2a620d6646bf4063863297c0b666} +```cpp +void mavsdk::ComponentInformation::unsubscribe_float_param(FloatParamHandle handle) +``` + + +Unsubscribe from subscribe_float_param. + + +**Parameters** + +* [FloatParamHandle](classmavsdk_1_1_component_information.md#classmavsdk_1_1_component_information_1ab22a0bb9704930d17c2e2c82ffa9a977) **handle** - + +### operator=() {#classmavsdk_1_1_component_information_1ada12fb6199ef988219281900ad2d9b79} +```cpp +const ComponentInformation& mavsdk::ComponentInformation::operator=(const ComponentInformation &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [ComponentInformation](classmavsdk_1_1_component_information.md)& - + +**Returns** + + const [ComponentInformation](classmavsdk_1_1_component_information.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_component_information_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_component_information_server.md new file mode 100644 index 000000000..fd534493f --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_component_information_server.md @@ -0,0 +1,202 @@ +# mavsdk::ComponentInformationServer Class Reference +`#include: component_information_server.h` + +---- + + +Provide component information such as parameters. + + +## Data Structures + + +struct [FloatParam](structmavsdk_1_1_component_information_server_1_1_float_param.md) + +struct [FloatParamUpdate](structmavsdk_1_1_component_information_server_1_1_float_param_update.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_component_information_server_1aca86e47230e256d3f812269dcbaa5cad) | Possible results returned for param requests. +std::function< void([Result](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1aca86e47230e256d3f812269dcbaa5cad))> [ResultCallback](#classmavsdk_1_1_component_information_server_1a5f65b34949a1954c85f3f02e64dec35f) | Callback type for asynchronous [ComponentInformationServer](classmavsdk_1_1_component_information_server.md) calls. +std::function< void([FloatParamUpdate](structmavsdk_1_1_component_information_server_1_1_float_param_update.md))> [FloatParamCallback](#classmavsdk_1_1_component_information_server_1a6174e3eebb5a10c619c57723623696cf) | Callback type for subscribe_float_param. +[Handle](classmavsdk_1_1_handle.md)< [FloatParamUpdate](structmavsdk_1_1_component_information_server_1_1_float_param_update.md) > [FloatParamHandle](#classmavsdk_1_1_component_information_server_1a0843521587e27f0d630280309712bddb) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_float_param. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [ComponentInformationServer](#classmavsdk_1_1_component_information_server_1a89266c1e143f0cffb6596897b92f7b62) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~ComponentInformationServer](#classmavsdk_1_1_component_information_server_1a64a224210755136e130b349db3a8fd10) () override | Destructor (internal use only). +  | [ComponentInformationServer](#classmavsdk_1_1_component_information_server_1a7f8fc33e21e00a390da14596465c800d) (const [ComponentInformationServer](classmavsdk_1_1_component_information_server.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1aca86e47230e256d3f812269dcbaa5cad) | [provide_float_param](#classmavsdk_1_1_component_information_server_1ac4f9a480ef052b792e65b82c3c08b225) ([FloatParam](structmavsdk_1_1_component_information_server_1_1_float_param.md) param)const | Provide a param of type float. +[FloatParamHandle](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1a0843521587e27f0d630280309712bddb) | [subscribe_float_param](#classmavsdk_1_1_component_information_server_1afb87c280501c677a8f4eaa33394d24e7) (const [FloatParamCallback](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1a6174e3eebb5a10c619c57723623696cf) & callback) | Subscribe to float param updates. +void | [unsubscribe_float_param](#classmavsdk_1_1_component_information_server_1a56650131d743e441232c5edf844acaeb) ([FloatParamHandle](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1a0843521587e27f0d630280309712bddb) handle) | Unsubscribe from subscribe_float_param. +const [ComponentInformationServer](classmavsdk_1_1_component_information_server.md) & | [operator=](#classmavsdk_1_1_component_information_server_1a850a10c9d195da5f52807984e72d21fa) (const [ComponentInformationServer](classmavsdk_1_1_component_information_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ComponentInformationServer() {#classmavsdk_1_1_component_information_server_1a89266c1e143f0cffb6596897b92f7b62} +```cpp +mavsdk::ComponentInformationServer::ComponentInformationServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto component_information_server = ComponentInformationServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~ComponentInformationServer() {#classmavsdk_1_1_component_information_server_1a64a224210755136e130b349db3a8fd10} +```cpp +mavsdk::ComponentInformationServer::~ComponentInformationServer() override +``` + + +Destructor (internal use only). + + +### ComponentInformationServer() {#classmavsdk_1_1_component_information_server_1a7f8fc33e21e00a390da14596465c800d} +```cpp +mavsdk::ComponentInformationServer::ComponentInformationServer(const ComponentInformationServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [ComponentInformationServer](classmavsdk_1_1_component_information_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_component_information_server_1a5f65b34949a1954c85f3f02e64dec35f} + +```cpp +using mavsdk::ComponentInformationServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [ComponentInformationServer](classmavsdk_1_1_component_information_server.md) calls. + + +### typedef FloatParamCallback {#classmavsdk_1_1_component_information_server_1a6174e3eebb5a10c619c57723623696cf} + +```cpp +using mavsdk::ComponentInformationServer::FloatParamCallback = std::function +``` + + +Callback type for subscribe_float_param. + + +### typedef FloatParamHandle {#classmavsdk_1_1_component_information_server_1a0843521587e27f0d630280309712bddb} + +```cpp +using mavsdk::ComponentInformationServer::FloatParamHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_float_param. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_component_information_server_1aca86e47230e256d3f812269dcbaa5cad} + + +Possible results returned for param requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `DuplicateParam` | Duplicate param. + `InvalidParamStartValue` | Invalid start param value. + `InvalidParamDefaultValue` | Invalid default param value. + `InvalidParamName` | Invalid param name. + `NoSystem` | No system is connected. + +## Member Function Documentation + + +### provide_float_param() {#classmavsdk_1_1_component_information_server_1ac4f9a480ef052b792e65b82c3c08b225} +```cpp +Result mavsdk::ComponentInformationServer::provide_float_param(FloatParam param) const +``` + + +Provide a param of type float. + +This function is blocking. + +**Parameters** + +* [FloatParam](structmavsdk_1_1_component_information_server_1_1_float_param.md) **param** - + +**Returns** + + [Result](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1aca86e47230e256d3f812269dcbaa5cad) - Result of request. + +### subscribe_float_param() {#classmavsdk_1_1_component_information_server_1afb87c280501c677a8f4eaa33394d24e7} +```cpp +FloatParamHandle mavsdk::ComponentInformationServer::subscribe_float_param(const FloatParamCallback &callback) +``` + + +Subscribe to float param updates. + + +**Parameters** + +* const [FloatParamCallback](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1a6174e3eebb5a10c619c57723623696cf)& **callback** - + +**Returns** + + [FloatParamHandle](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1a0843521587e27f0d630280309712bddb) - + +### unsubscribe_float_param() {#classmavsdk_1_1_component_information_server_1a56650131d743e441232c5edf844acaeb} +```cpp +void mavsdk::ComponentInformationServer::unsubscribe_float_param(FloatParamHandle handle) +``` + + +Unsubscribe from subscribe_float_param. + + +**Parameters** + +* [FloatParamHandle](classmavsdk_1_1_component_information_server.md#classmavsdk_1_1_component_information_server_1a0843521587e27f0d630280309712bddb) **handle** - + +### operator=() {#classmavsdk_1_1_component_information_server_1a850a10c9d195da5f52807984e72d21fa} +```cpp +const ComponentInformationServer& mavsdk::ComponentInformationServer::operator=(const ComponentInformationServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [ComponentInformationServer](classmavsdk_1_1_component_information_server.md)& - + +**Returns** + + const [ComponentInformationServer](classmavsdk_1_1_component_information_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_failure.md b/docs/en/cpp/api_reference/classmavsdk_1_1_failure.md new file mode 100644 index 000000000..f5020ce47 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_failure.md @@ -0,0 +1,206 @@ +# mavsdk::Failure Class Reference +`#include: failure.h` + +---- + + +Inject failures into system to test failsafes. + + +## Public Types + + +Type | Description +--- | --- +enum [FailureUnit](#classmavsdk_1_1_failure_1a471f93c1fbff2124ebdea7fb681e23f1) | A failure unit. +enum [FailureType](#classmavsdk_1_1_failure_1ade0813be29826ae35e6692f506e8ab72) | A failure type. +enum [Result](#classmavsdk_1_1_failure_1a6dcdd665b49a7ddf48c76b41475022f1) | Possible results returned for failure requests. +std::function< void([Result](classmavsdk_1_1_failure.md#classmavsdk_1_1_failure_1a6dcdd665b49a7ddf48c76b41475022f1))> [ResultCallback](#classmavsdk_1_1_failure_1afe3469d737d8fe07a4325b85c79b62e6) | Callback type for asynchronous [Failure](classmavsdk_1_1_failure.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Failure](#classmavsdk_1_1_failure_1a7fd948954e053597be4223a5507e7f77) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Failure](#classmavsdk_1_1_failure_1abb4693ce8ebfac246d489bbab438be04) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Failure](#classmavsdk_1_1_failure_1a1358a71e00d96af5415236183c6508cd) () override | Destructor (internal use only). +  | [Failure](#classmavsdk_1_1_failure_1ae12162366b96624fa85d345a7166749c) (const [Failure](classmavsdk_1_1_failure.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_failure.md#classmavsdk_1_1_failure_1a6dcdd665b49a7ddf48c76b41475022f1) | [inject](#classmavsdk_1_1_failure_1ae937d22216ecae38f4c763f503cbbd88) ([FailureUnit](classmavsdk_1_1_failure.md#classmavsdk_1_1_failure_1a471f93c1fbff2124ebdea7fb681e23f1) failure_unit, [FailureType](classmavsdk_1_1_failure.md#classmavsdk_1_1_failure_1ade0813be29826ae35e6692f506e8ab72) failure_type, int32_t instance)const | Injects a failure. +const [Failure](classmavsdk_1_1_failure.md) & | [operator=](#classmavsdk_1_1_failure_1a255209f9df74ffde1f63b707f17bdb72) (const [Failure](classmavsdk_1_1_failure.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Failure() {#classmavsdk_1_1_failure_1a7fd948954e053597be4223a5507e7f77} +```cpp +mavsdk::Failure::Failure(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto failure = Failure(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Failure() {#classmavsdk_1_1_failure_1abb4693ce8ebfac246d489bbab438be04} +```cpp +mavsdk::Failure::Failure(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto failure = Failure(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Failure() {#classmavsdk_1_1_failure_1a1358a71e00d96af5415236183c6508cd} +```cpp +mavsdk::Failure::~Failure() override +``` + + +Destructor (internal use only). + + +### Failure() {#classmavsdk_1_1_failure_1ae12162366b96624fa85d345a7166749c} +```cpp +mavsdk::Failure::Failure(const Failure &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Failure](classmavsdk_1_1_failure.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_failure_1afe3469d737d8fe07a4325b85c79b62e6} + +```cpp +using mavsdk::Failure::ResultCallback = std::function +``` + + +Callback type for asynchronous [Failure](classmavsdk_1_1_failure.md) calls. + + +## Member Enumeration Documentation + + +### enum FailureUnit {#classmavsdk_1_1_failure_1a471f93c1fbff2124ebdea7fb681e23f1} + + +A failure unit. + + +Value | Description +--- | --- + `SensorGyro` | Gyro. + `SensorAccel` | Accelerometer. + `SensorMag` | Magnetometer. + `SensorBaro` | Barometer. + `SensorGps` | GPS. + `SensorOpticalFlow` | Optical flow. + `SensorVio` | Visual inertial odometry. + `SensorDistanceSensor` | Distance sensor. + `SensorAirspeed` | Airspeed. + `SystemBattery` | Battery. + `SystemMotor` | Motor. + `SystemServo` | Servo. + `SystemAvoidance` | Avoidance. + `SystemRcSignal` | RC signal. + `SystemMavlinkSignal` | MAVLink signal. + +### enum FailureType {#classmavsdk_1_1_failure_1ade0813be29826ae35e6692f506e8ab72} + + +A failure type. + + +Value | Description +--- | --- + `Ok` | No failure injected, used to reset a previous failure. + `Off` | Sets unit off, so completely non-responsive. + `Stuck` | Unit is stuck e.g. keeps reporting the same value. + `Garbage` | Unit is reporting complete garbage. + `Wrong` | Unit is consistently wrong. + `Slow` | Unit is slow, so e.g. reporting at slower than expected rate. + `Delayed` | Data of unit is delayed in time. + `Intermittent` | Unit is sometimes working, sometimes not. + +### enum Result {#classmavsdk_1_1_failure_1a6dcdd665b49a7ddf48c76b41475022f1} + + +Possible results returned for failure requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `Unsupported` | [Failure](classmavsdk_1_1_failure.md) not supported. + `Denied` | [Failure](classmavsdk_1_1_failure.md) injection denied. + `Disabled` | [Failure](classmavsdk_1_1_failure.md) injection is disabled. + `Timeout` | Request timed out. + +## Member Function Documentation + + +### inject() {#classmavsdk_1_1_failure_1ae937d22216ecae38f4c763f503cbbd88} +```cpp +Result mavsdk::Failure::inject(FailureUnit failure_unit, FailureType failure_type, int32_t instance) const +``` + + +Injects a failure. + +This function is blocking. + +**Parameters** + +* [FailureUnit](classmavsdk_1_1_failure.md#classmavsdk_1_1_failure_1a471f93c1fbff2124ebdea7fb681e23f1) **failure_unit** - +* [FailureType](classmavsdk_1_1_failure.md#classmavsdk_1_1_failure_1ade0813be29826ae35e6692f506e8ab72) **failure_type** - +* int32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_failure.md#classmavsdk_1_1_failure_1a6dcdd665b49a7ddf48c76b41475022f1) - Result of request. + +### operator=() {#classmavsdk_1_1_failure_1a255209f9df74ffde1f63b707f17bdb72} +```cpp +const Failure& mavsdk::Failure::operator=(const Failure &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Failure](classmavsdk_1_1_failure.md)& - + +**Returns** + + const [Failure](classmavsdk_1_1_failure.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_fake_handle.md b/docs/en/cpp/api_reference/classmavsdk_1_1_fake_handle.md new file mode 100644 index 000000000..16479c5b9 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_fake_handle.md @@ -0,0 +1,5 @@ +# mavsdk::FakeHandle Class Reference +`#include: UNKNOWN` + +---- + diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_follow_me.md b/docs/en/cpp/api_reference/classmavsdk_1_1_follow_me.md new file mode 100644 index 000000000..cbd397efe --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_follow_me.md @@ -0,0 +1,263 @@ +# mavsdk::FollowMe Class Reference +`#include: follow_me.h` + +---- + + +Allow users to command the vehicle to follow a specific target. The target is provided as a GPS coordinate and altitude. + + +## Data Structures + + +struct [Config](structmavsdk_1_1_follow_me_1_1_config.md) + +struct [TargetLocation](structmavsdk_1_1_follow_me_1_1_target_location.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) | Possible results returned for followme operations. +std::function< void([Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8))> [ResultCallback](#classmavsdk_1_1_follow_me_1a6e02ca57a63131594f0bf5fb5689309e) | Callback type for asynchronous [FollowMe](classmavsdk_1_1_follow_me.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [FollowMe](#classmavsdk_1_1_follow_me_1ab85b27fcd899f4861cd2e99c08083b9e) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [FollowMe](#classmavsdk_1_1_follow_me_1a422ef7ca182c92052b0da32d789b0c14) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~FollowMe](#classmavsdk_1_1_follow_me_1a51cc272f759657eb583830cbde2785cf) () override | Destructor (internal use only). +  | [FollowMe](#classmavsdk_1_1_follow_me_1a204548d586c8355ab60991be4b63c7aa) (const [FollowMe](classmavsdk_1_1_follow_me.md) & other) | Copy constructor. +[FollowMe::Config](structmavsdk_1_1_follow_me_1_1_config.md) | [get_config](#classmavsdk_1_1_follow_me_1aca2e599cd6fb889b9f80dc7a9da57ee9) () const | Get current configuration. +[Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) | [set_config](#classmavsdk_1_1_follow_me_1aa76aab9a21bc3ae475bee6a55c0e4d30) ([Config](structmavsdk_1_1_follow_me_1_1_config.md) config)const | Apply configuration by sending it to the system. +bool | [is_active](#classmavsdk_1_1_follow_me_1a48ab77939257e52159bd9ed19335a7de) () const | Check if [FollowMe](classmavsdk_1_1_follow_me.md) is active. +[Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) | [set_target_location](#classmavsdk_1_1_follow_me_1a1a99e282472235f726bfde430873ffd5) ([TargetLocation](structmavsdk_1_1_follow_me_1_1_target_location.md) location)const | Set location of the moving target. +[FollowMe::TargetLocation](structmavsdk_1_1_follow_me_1_1_target_location.md) | [get_last_location](#classmavsdk_1_1_follow_me_1af2a1af346ee2fa7761b58b406e9e6e0c) () const | Get the last location of the target. +[Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) | [start](#classmavsdk_1_1_follow_me_1a4b6ae3ec1ff07d8b3a79038e04992003) () const | Start [FollowMe](classmavsdk_1_1_follow_me.md) mode. +[Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) | [stop](#classmavsdk_1_1_follow_me_1a202a7b9edf56d9b883c974a09c14ba7d) () const | Stop [FollowMe](classmavsdk_1_1_follow_me.md) mode. +const [FollowMe](classmavsdk_1_1_follow_me.md) & | [operator=](#classmavsdk_1_1_follow_me_1a6292f6dd2c91cedde0e3b82952d83510) (const [FollowMe](classmavsdk_1_1_follow_me.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### FollowMe() {#classmavsdk_1_1_follow_me_1ab85b27fcd899f4861cd2e99c08083b9e} +```cpp +mavsdk::FollowMe::FollowMe(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto follow_me = FollowMe(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### FollowMe() {#classmavsdk_1_1_follow_me_1a422ef7ca182c92052b0da32d789b0c14} +```cpp +mavsdk::FollowMe::FollowMe(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto follow_me = FollowMe(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~FollowMe() {#classmavsdk_1_1_follow_me_1a51cc272f759657eb583830cbde2785cf} +```cpp +mavsdk::FollowMe::~FollowMe() override +``` + + +Destructor (internal use only). + + +### FollowMe() {#classmavsdk_1_1_follow_me_1a204548d586c8355ab60991be4b63c7aa} +```cpp +mavsdk::FollowMe::FollowMe(const FollowMe &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [FollowMe](classmavsdk_1_1_follow_me.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_follow_me_1a6e02ca57a63131594f0bf5fb5689309e} + +```cpp +using mavsdk::FollowMe::ResultCallback = std::function +``` + + +Callback type for asynchronous [FollowMe](classmavsdk_1_1_follow_me.md) calls. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8} + + +Possible results returned for followme operations. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NoSystem` | No system connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command denied. + `Timeout` | Request timed out. + `NotActive` | [FollowMe](classmavsdk_1_1_follow_me.md) is not active. + `SetConfigFailed` | Failed to set [FollowMe](classmavsdk_1_1_follow_me.md) configuration. + +## Member Function Documentation + + +### get_config() {#classmavsdk_1_1_follow_me_1aca2e599cd6fb889b9f80dc7a9da57ee9} +```cpp +FollowMe::Config mavsdk::FollowMe::get_config() const +``` + + +Get current configuration. + +This function is blocking. + +**Returns** + + [FollowMe::Config](structmavsdk_1_1_follow_me_1_1_config.md) - Result of request. + +### set_config() {#classmavsdk_1_1_follow_me_1aa76aab9a21bc3ae475bee6a55c0e4d30} +```cpp +Result mavsdk::FollowMe::set_config(Config config) const +``` + + +Apply configuration by sending it to the system. + +This function is blocking. + +**Parameters** + +* [Config](structmavsdk_1_1_follow_me_1_1_config.md) **config** - + +**Returns** + + [Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) - Result of request. + +### is_active() {#classmavsdk_1_1_follow_me_1a48ab77939257e52159bd9ed19335a7de} +```cpp +bool mavsdk::FollowMe::is_active() const +``` + + +Check if [FollowMe](classmavsdk_1_1_follow_me.md) is active. + +This function is blocking. + +**Returns** + + bool - Result of request. + +### set_target_location() {#classmavsdk_1_1_follow_me_1a1a99e282472235f726bfde430873ffd5} +```cpp +Result mavsdk::FollowMe::set_target_location(TargetLocation location) const +``` + + +Set location of the moving target. + +This function is blocking. + +**Parameters** + +* [TargetLocation](structmavsdk_1_1_follow_me_1_1_target_location.md) **location** - + +**Returns** + + [Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) - Result of request. + +### get_last_location() {#classmavsdk_1_1_follow_me_1af2a1af346ee2fa7761b58b406e9e6e0c} +```cpp +FollowMe::TargetLocation mavsdk::FollowMe::get_last_location() const +``` + + +Get the last location of the target. + +This function is blocking. + +**Returns** + + [FollowMe::TargetLocation](structmavsdk_1_1_follow_me_1_1_target_location.md) - Result of request. + +### start() {#classmavsdk_1_1_follow_me_1a4b6ae3ec1ff07d8b3a79038e04992003} +```cpp +Result mavsdk::FollowMe::start() const +``` + + +Start [FollowMe](classmavsdk_1_1_follow_me.md) mode. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) - Result of request. + +### stop() {#classmavsdk_1_1_follow_me_1a202a7b9edf56d9b883c974a09c14ba7d} +```cpp +Result mavsdk::FollowMe::stop() const +``` + + +Stop [FollowMe](classmavsdk_1_1_follow_me.md) mode. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a2b3f334ea72fd84d9e925fb3756451d8) - Result of request. + +### operator=() {#classmavsdk_1_1_follow_me_1a6292f6dd2c91cedde0e3b82952d83510} +```cpp +const FollowMe& mavsdk::FollowMe::operator=(const FollowMe &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [FollowMe](classmavsdk_1_1_follow_me.md)& - + +**Returns** + + const [FollowMe](classmavsdk_1_1_follow_me.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_ftp.md b/docs/en/cpp/api_reference/classmavsdk_1_1_ftp.md new file mode 100644 index 000000000..827da4011 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_ftp.md @@ -0,0 +1,462 @@ +# mavsdk::Ftp Class Reference +`#include: ftp.h` + +---- + + +Implements file transfer functionality using MAVLink FTP. + + +## Data Structures + + +struct [ProgressData](structmavsdk_1_1_ftp_1_1_progress_data.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) | Possible results returned for FTP commands. +std::function< void([Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4))> [ResultCallback](#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) | Callback type for asynchronous [Ftp](classmavsdk_1_1_ftp.md) calls. +std::function< void([Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), [ProgressData](structmavsdk_1_1_ftp_1_1_progress_data.md))> [DownloadCallback](#classmavsdk_1_1_ftp_1a7c8e0377726e349a8a4e12495db42c75) | Callback type for download_async. +std::function< void([Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), [ProgressData](structmavsdk_1_1_ftp_1_1_progress_data.md))> [UploadCallback](#classmavsdk_1_1_ftp_1a50ffb77f0730267f499656d40291f5a3) | Callback type for upload_async. +std::function< void([Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), std::vector< std::string >)> [ListDirectoryCallback](#classmavsdk_1_1_ftp_1a87a77c4e013a8665017504a550d876b7) | Callback type for list_directory_async. +std::function< void([Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), bool)> [AreFilesIdenticalCallback](#classmavsdk_1_1_ftp_1abe24e99f7141a234206f8952d2f61318) | Callback type for are_files_identical_async. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Ftp](#classmavsdk_1_1_ftp_1ad0b5909e631746c1dd5e2151c727e67f) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Ftp](#classmavsdk_1_1_ftp_1a88cabb7b13f63e8285e7701292dac302) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Ftp](#classmavsdk_1_1_ftp_1a9a2492d3b79cde5cd3f5a09eadbc40a3) () override | Destructor (internal use only). +  | [Ftp](#classmavsdk_1_1_ftp_1a7b7486356a7b04fb231c430e090c673e) (const [Ftp](classmavsdk_1_1_ftp.md) & other) | Copy constructor. +void | [download_async](#classmavsdk_1_1_ftp_1a0845245b8e1d0e74ed8961c90c96d1d3) (std::string remote_file_path, std::string local_dir, bool use_burst, const [DownloadCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a7c8e0377726e349a8a4e12495db42c75) & callback) | Downloads a file to local directory. +void | [upload_async](#classmavsdk_1_1_ftp_1affe86a8b0a035109e7df9bd85c99f442) (std::string local_file_path, std::string remote_dir, const [UploadCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a50ffb77f0730267f499656d40291f5a3) & callback) | Uploads local file to remote directory. +void | [list_directory_async](#classmavsdk_1_1_ftp_1abf5d83104a7293413b62e7a8ba1a0f2c) (std::string remote_dir, const [ListDirectoryCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a87a77c4e013a8665017504a550d876b7) callback) | Lists items from a remote directory. +std::pair< [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), std::vector< std::string > > | [list_directory](#classmavsdk_1_1_ftp_1a2301aba586be9dd4569d984a58967ccc) (std::string remote_dir)const | Lists items from a remote directory. +void | [create_directory_async](#classmavsdk_1_1_ftp_1aa53fdd5c005bd4da3e0cb29d448689d3) (std::string remote_dir, const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) callback) | Creates a remote directory. +[Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) | [create_directory](#classmavsdk_1_1_ftp_1ac6edf64fe63d5934b892c95778e1c548) (std::string remote_dir)const | Creates a remote directory. +void | [remove_directory_async](#classmavsdk_1_1_ftp_1a25823c7298dc2d081532dd094d013b8a) (std::string remote_dir, const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) callback) | Removes a remote directory. +[Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) | [remove_directory](#classmavsdk_1_1_ftp_1a585e0877f7c129b15aed66771a31a446) (std::string remote_dir)const | Removes a remote directory. +void | [remove_file_async](#classmavsdk_1_1_ftp_1a3ecda69288fb860a8da1f8fad25af31c) (std::string remote_file_path, const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) callback) | Removes a remote file. +[Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) | [remove_file](#classmavsdk_1_1_ftp_1a2700a813ec54b115cb9a349ba486d6bd) (std::string remote_file_path)const | Removes a remote file. +void | [rename_async](#classmavsdk_1_1_ftp_1afea8b15ad7b5748b0b5f68fd7103514a) (std::string remote_from_path, std::string remote_to_path, const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) callback) | Renames a remote file or remote directory. +[Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) | [rename](#classmavsdk_1_1_ftp_1ac7411b38ea31f84f4f679b6b85313032) (std::string remote_from_path, std::string remote_to_path)const | Renames a remote file or remote directory. +void | [are_files_identical_async](#classmavsdk_1_1_ftp_1abddebf1a103b2853116e68f5f870e4a7) (std::string local_file_path, std::string remote_file_path, const [AreFilesIdenticalCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1abe24e99f7141a234206f8952d2f61318) callback) | Compares a local file to a remote file using a CRC32 checksum. +std::pair< [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), bool > | [are_files_identical](#classmavsdk_1_1_ftp_1a1ace427243aedef4b0988a055fc414bf) (std::string local_file_path, std::string remote_file_path)const | Compares a local file to a remote file using a CRC32 checksum. +[Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) | [set_target_compid](#classmavsdk_1_1_ftp_1ad93744cd25a89beffe0d72a090748229) (uint32_t compid)const | Set target component ID. By default it is the autopilot. +const [Ftp](classmavsdk_1_1_ftp.md) & | [operator=](#classmavsdk_1_1_ftp_1a01dc5f41d1e684a667d31c213728b376) (const [Ftp](classmavsdk_1_1_ftp.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Ftp() {#classmavsdk_1_1_ftp_1ad0b5909e631746c1dd5e2151c727e67f} +```cpp +mavsdk::Ftp::Ftp(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto ftp = Ftp(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Ftp() {#classmavsdk_1_1_ftp_1a88cabb7b13f63e8285e7701292dac302} +```cpp +mavsdk::Ftp::Ftp(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto ftp = Ftp(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Ftp() {#classmavsdk_1_1_ftp_1a9a2492d3b79cde5cd3f5a09eadbc40a3} +```cpp +mavsdk::Ftp::~Ftp() override +``` + + +Destructor (internal use only). + + +### Ftp() {#classmavsdk_1_1_ftp_1a7b7486356a7b04fb231c430e090c673e} +```cpp +mavsdk::Ftp::Ftp(const Ftp &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Ftp](classmavsdk_1_1_ftp.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0} + +```cpp +using mavsdk::Ftp::ResultCallback = std::function +``` + + +Callback type for asynchronous [Ftp](classmavsdk_1_1_ftp.md) calls. + + +### typedef DownloadCallback {#classmavsdk_1_1_ftp_1a7c8e0377726e349a8a4e12495db42c75} + +```cpp +using mavsdk::Ftp::DownloadCallback = std::function +``` + + +Callback type for download_async. + + +### typedef UploadCallback {#classmavsdk_1_1_ftp_1a50ffb77f0730267f499656d40291f5a3} + +```cpp +using mavsdk::Ftp::UploadCallback = std::function +``` + + +Callback type for upload_async. + + +### typedef ListDirectoryCallback {#classmavsdk_1_1_ftp_1a87a77c4e013a8665017504a550d876b7} + +```cpp +using mavsdk::Ftp::ListDirectoryCallback = std::function)> +``` + + +Callback type for list_directory_async. + + +### typedef AreFilesIdenticalCallback {#classmavsdk_1_1_ftp_1abe24e99f7141a234206f8952d2f61318} + +```cpp +using mavsdk::Ftp::AreFilesIdenticalCallback = std::function +``` + + +Callback type for are_files_identical_async. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4} + + +Possible results returned for FTP commands. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Success. + `Next` | Intermediate message showing progress. + `Timeout` | Timeout. + `Busy` | Operation is already in progress. + `FileIoError` | File IO operation error. + `FileExists` | File exists already. + `FileDoesNotExist` | File does not exist. + `FileProtected` | File is write protected. + `InvalidParameter` | Invalid parameter. + `Unsupported` | Unsupported command. + `ProtocolError` | General protocol error. + `NoSystem` | No system connected. + +## Member Function Documentation + + +### download_async() {#classmavsdk_1_1_ftp_1a0845245b8e1d0e74ed8961c90c96d1d3} +```cpp +void mavsdk::Ftp::download_async(std::string remote_file_path, std::string local_dir, bool use_burst, const DownloadCallback &callback) +``` + + +Downloads a file to local directory. + + +**Parameters** + +* std::string **remote_file_path** - +* std::string **local_dir** - +* bool **use_burst** - +* const [DownloadCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a7c8e0377726e349a8a4e12495db42c75)& **callback** - + +### upload_async() {#classmavsdk_1_1_ftp_1affe86a8b0a035109e7df9bd85c99f442} +```cpp +void mavsdk::Ftp::upload_async(std::string local_file_path, std::string remote_dir, const UploadCallback &callback) +``` + + +Uploads local file to remote directory. + + +**Parameters** + +* std::string **local_file_path** - +* std::string **remote_dir** - +* const [UploadCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a50ffb77f0730267f499656d40291f5a3)& **callback** - + +### list_directory_async() {#classmavsdk_1_1_ftp_1abf5d83104a7293413b62e7a8ba1a0f2c} +```cpp +void mavsdk::Ftp::list_directory_async(std::string remote_dir, const ListDirectoryCallback callback) +``` + + +Lists items from a remote directory. + +This function is non-blocking. See 'list_directory' for the blocking counterpart. + +**Parameters** + +* std::string **remote_dir** - +* const [ListDirectoryCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a87a77c4e013a8665017504a550d876b7) **callback** - + +### list_directory() {#classmavsdk_1_1_ftp_1a2301aba586be9dd4569d984a58967ccc} +```cpp +std::pair > mavsdk::Ftp::list_directory(std::string remote_dir) const +``` + + +Lists items from a remote directory. + +This function is blocking. See 'list_directory_async' for the non-blocking counterpart. + +**Parameters** + +* std::string **remote_dir** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), std::vector< std::string > > - Result of request. + +### create_directory_async() {#classmavsdk_1_1_ftp_1aa53fdd5c005bd4da3e0cb29d448689d3} +```cpp +void mavsdk::Ftp::create_directory_async(std::string remote_dir, const ResultCallback callback) +``` + + +Creates a remote directory. + +This function is non-blocking. See 'create_directory' for the blocking counterpart. + +**Parameters** + +* std::string **remote_dir** - +* const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) **callback** - + +### create_directory() {#classmavsdk_1_1_ftp_1ac6edf64fe63d5934b892c95778e1c548} +```cpp +Result mavsdk::Ftp::create_directory(std::string remote_dir) const +``` + + +Creates a remote directory. + +This function is blocking. See 'create_directory_async' for the non-blocking counterpart. + +**Parameters** + +* std::string **remote_dir** - + +**Returns** + + [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) - Result of request. + +### remove_directory_async() {#classmavsdk_1_1_ftp_1a25823c7298dc2d081532dd094d013b8a} +```cpp +void mavsdk::Ftp::remove_directory_async(std::string remote_dir, const ResultCallback callback) +``` + + +Removes a remote directory. + +This function is non-blocking. See 'remove_directory' for the blocking counterpart. + +**Parameters** + +* std::string **remote_dir** - +* const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) **callback** - + +### remove_directory() {#classmavsdk_1_1_ftp_1a585e0877f7c129b15aed66771a31a446} +```cpp +Result mavsdk::Ftp::remove_directory(std::string remote_dir) const +``` + + +Removes a remote directory. + +This function is blocking. See 'remove_directory_async' for the non-blocking counterpart. + +**Parameters** + +* std::string **remote_dir** - + +**Returns** + + [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) - Result of request. + +### remove_file_async() {#classmavsdk_1_1_ftp_1a3ecda69288fb860a8da1f8fad25af31c} +```cpp +void mavsdk::Ftp::remove_file_async(std::string remote_file_path, const ResultCallback callback) +``` + + +Removes a remote file. + +This function is non-blocking. See 'remove_file' for the blocking counterpart. + +**Parameters** + +* std::string **remote_file_path** - +* const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) **callback** - + +### remove_file() {#classmavsdk_1_1_ftp_1a2700a813ec54b115cb9a349ba486d6bd} +```cpp +Result mavsdk::Ftp::remove_file(std::string remote_file_path) const +``` + + +Removes a remote file. + +This function is blocking. See 'remove_file_async' for the non-blocking counterpart. + +**Parameters** + +* std::string **remote_file_path** - + +**Returns** + + [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) - Result of request. + +### rename_async() {#classmavsdk_1_1_ftp_1afea8b15ad7b5748b0b5f68fd7103514a} +```cpp +void mavsdk::Ftp::rename_async(std::string remote_from_path, std::string remote_to_path, const ResultCallback callback) +``` + + +Renames a remote file or remote directory. + +This function is non-blocking. See 'rename' for the blocking counterpart. + +**Parameters** + +* std::string **remote_from_path** - +* std::string **remote_to_path** - +* const [ResultCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a04a12a1ab954b24a54570300f89486b0) **callback** - + +### rename() {#classmavsdk_1_1_ftp_1ac7411b38ea31f84f4f679b6b85313032} +```cpp +Result mavsdk::Ftp::rename(std::string remote_from_path, std::string remote_to_path) const +``` + + +Renames a remote file or remote directory. + +This function is blocking. See 'rename_async' for the non-blocking counterpart. + +**Parameters** + +* std::string **remote_from_path** - +* std::string **remote_to_path** - + +**Returns** + + [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) - Result of request. + +### are_files_identical_async() {#classmavsdk_1_1_ftp_1abddebf1a103b2853116e68f5f870e4a7} +```cpp +void mavsdk::Ftp::are_files_identical_async(std::string local_file_path, std::string remote_file_path, const AreFilesIdenticalCallback callback) +``` + + +Compares a local file to a remote file using a CRC32 checksum. + +This function is non-blocking. See 'are_files_identical' for the blocking counterpart. + +**Parameters** + +* std::string **local_file_path** - +* std::string **remote_file_path** - +* const [AreFilesIdenticalCallback](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1abe24e99f7141a234206f8952d2f61318) **callback** - + +### are_files_identical() {#classmavsdk_1_1_ftp_1a1ace427243aedef4b0988a055fc414bf} +```cpp +std::pair mavsdk::Ftp::are_files_identical(std::string local_file_path, std::string remote_file_path) const +``` + + +Compares a local file to a remote file using a CRC32 checksum. + +This function is blocking. See 'are_files_identical_async' for the non-blocking counterpart. + +**Parameters** + +* std::string **local_file_path** - +* std::string **remote_file_path** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4), bool > - Result of request. + +### set_target_compid() {#classmavsdk_1_1_ftp_1ad93744cd25a89beffe0d72a090748229} +```cpp +Result mavsdk::Ftp::set_target_compid(uint32_t compid) const +``` + + +Set target component ID. By default it is the autopilot. + +This function is blocking. + +**Parameters** + +* uint32_t **compid** - + +**Returns** + + [Result](classmavsdk_1_1_ftp.md#classmavsdk_1_1_ftp_1a4cc4f42a3ef6d63403d811e594b946e4) - Result of request. + +### operator=() {#classmavsdk_1_1_ftp_1a01dc5f41d1e684a667d31c213728b376} +```cpp +const Ftp& mavsdk::Ftp::operator=(const Ftp &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Ftp](classmavsdk_1_1_ftp.md)& - + +**Returns** + + const [Ftp](classmavsdk_1_1_ftp.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_ftp_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_ftp_server.md new file mode 100644 index 000000000..f8fb61961 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_ftp_server.md @@ -0,0 +1,141 @@ +# mavsdk::FtpServer Class Reference +`#include: ftp_server.h` + +---- + + +Provide files or directories to transfer. + + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_ftp_server_1a24027b6ade1f681dd191a81c25653763) | Possible results returned for FTP server requests. +std::function< void([Result](classmavsdk_1_1_ftp_server.md#classmavsdk_1_1_ftp_server_1a24027b6ade1f681dd191a81c25653763))> [ResultCallback](#classmavsdk_1_1_ftp_server_1a8de8a273470df377e1a665c3b14c866a) | Callback type for asynchronous [FtpServer](classmavsdk_1_1_ftp_server.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [FtpServer](#classmavsdk_1_1_ftp_server_1aa22c68e2fe9a3ac22c4ef55f2636ddd3) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~FtpServer](#classmavsdk_1_1_ftp_server_1a685d6499b3fbc7d8b4fac6f8031e7e99) () override | Destructor (internal use only). +  | [FtpServer](#classmavsdk_1_1_ftp_server_1afed6d9c192b299e27d5e0014e63c275f) (const [FtpServer](classmavsdk_1_1_ftp_server.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_ftp_server.md#classmavsdk_1_1_ftp_server_1a24027b6ade1f681dd191a81c25653763) | [set_root_dir](#classmavsdk_1_1_ftp_server_1aa79196f0d3cd0bc178a57711252ed8f3) (std::string path)const | Set root directory. +const [FtpServer](classmavsdk_1_1_ftp_server.md) & | [operator=](#classmavsdk_1_1_ftp_server_1aa3822f6508adad0b930cbca3be4fd5c5) (const [FtpServer](classmavsdk_1_1_ftp_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### FtpServer() {#classmavsdk_1_1_ftp_server_1aa22c68e2fe9a3ac22c4ef55f2636ddd3} +```cpp +mavsdk::FtpServer::FtpServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto ftp_server = FtpServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~FtpServer() {#classmavsdk_1_1_ftp_server_1a685d6499b3fbc7d8b4fac6f8031e7e99} +```cpp +mavsdk::FtpServer::~FtpServer() override +``` + + +Destructor (internal use only). + + +### FtpServer() {#classmavsdk_1_1_ftp_server_1afed6d9c192b299e27d5e0014e63c275f} +```cpp +mavsdk::FtpServer::FtpServer(const FtpServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [FtpServer](classmavsdk_1_1_ftp_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_ftp_server_1a8de8a273470df377e1a665c3b14c866a} + +```cpp +using mavsdk::FtpServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [FtpServer](classmavsdk_1_1_ftp_server.md) calls. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_ftp_server_1a24027b6ade1f681dd191a81c25653763} + + +Possible results returned for FTP server requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `DoesNotExist` | Directory does not exist. + `Busy` | Operations in progress. + +## Member Function Documentation + + +### set_root_dir() {#classmavsdk_1_1_ftp_server_1aa79196f0d3cd0bc178a57711252ed8f3} +```cpp +Result mavsdk::FtpServer::set_root_dir(std::string path) const +``` + + +Set root directory. + +This is the directory that can then be accessed by a client. The directory needs to exist when this is called. The permissions are the same as the file permission for the user running the server. The root directory can't be changed while an FTP process is in progress. + + +This function is blocking. + +**Parameters** + +* std::string **path** - + +**Returns** + + [Result](classmavsdk_1_1_ftp_server.md#classmavsdk_1_1_ftp_server_1a24027b6ade1f681dd191a81c25653763) - Result of request. + +### operator=() {#classmavsdk_1_1_ftp_server_1aa3822f6508adad0b930cbca3be4fd5c5} +```cpp +const FtpServer& mavsdk::FtpServer::operator=(const FtpServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [FtpServer](classmavsdk_1_1_ftp_server.md)& - + +**Returns** + + const [FtpServer](classmavsdk_1_1_ftp_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_geofence.md b/docs/en/cpp/api_reference/classmavsdk_1_1_geofence.md new file mode 100644 index 000000000..175259a49 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_geofence.md @@ -0,0 +1,236 @@ +# mavsdk::Geofence Class Reference +`#include: geofence.h` + +---- + + +Enable setting a geofence. + + +## Data Structures + + +struct [Circle](structmavsdk_1_1_geofence_1_1_circle.md) + +struct [GeofenceData](structmavsdk_1_1_geofence_1_1_geofence_data.md) + +struct [Point](structmavsdk_1_1_geofence_1_1_point.md) + +struct [Polygon](structmavsdk_1_1_geofence_1_1_polygon.md) + +## Public Types + + +Type | Description +--- | --- +enum [FenceType](#classmavsdk_1_1_geofence_1a51196ded958aa9d4b3f25cde95da48e5) | [Geofence](classmavsdk_1_1_geofence.md) types. +enum [Result](#classmavsdk_1_1_geofence_1ab64d6e3b9aeb9b6d5e45ae8a843a2642) | Possible results returned for geofence requests. +std::function< void([Result](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1ab64d6e3b9aeb9b6d5e45ae8a843a2642))> [ResultCallback](#classmavsdk_1_1_geofence_1af9662e645781e4e64ed8b7c65d3d9309) | Callback type for asynchronous [Geofence](classmavsdk_1_1_geofence.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Geofence](#classmavsdk_1_1_geofence_1a115762872a12894270e758af250549f0) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Geofence](#classmavsdk_1_1_geofence_1a7e921625517d772df4125b22841b78da) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Geofence](#classmavsdk_1_1_geofence_1aa8362d021d182c807ddb5e95e40a9cbe) () override | Destructor (internal use only). +  | [Geofence](#classmavsdk_1_1_geofence_1a60e1f1a3123050c73980cba61b4b4009) (const [Geofence](classmavsdk_1_1_geofence.md) & other) | Copy constructor. +void | [upload_geofence_async](#classmavsdk_1_1_geofence_1a1f0c6431b86b77c29f19eafb4e55dcdb) ([GeofenceData](structmavsdk_1_1_geofence_1_1_geofence_data.md) geofence_data, const [ResultCallback](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1af9662e645781e4e64ed8b7c65d3d9309) callback) | Upload geofences. +[Result](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1ab64d6e3b9aeb9b6d5e45ae8a843a2642) | [upload_geofence](#classmavsdk_1_1_geofence_1ab2e825f0955e7a320117a21d649bab09) ([GeofenceData](structmavsdk_1_1_geofence_1_1_geofence_data.md) geofence_data)const | Upload geofences. +void | [clear_geofence_async](#classmavsdk_1_1_geofence_1a6947151765b621a93d35885599812752) (const [ResultCallback](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1af9662e645781e4e64ed8b7c65d3d9309) callback) | Clear all geofences saved on the vehicle. +[Result](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1ab64d6e3b9aeb9b6d5e45ae8a843a2642) | [clear_geofence](#classmavsdk_1_1_geofence_1a54b2a696e8aebae6916116adb92c03c3) () const | Clear all geofences saved on the vehicle. +const [Geofence](classmavsdk_1_1_geofence.md) & | [operator=](#classmavsdk_1_1_geofence_1a2e8a69dddfa9b4937df117060fa2e0d7) (const [Geofence](classmavsdk_1_1_geofence.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Geofence() {#classmavsdk_1_1_geofence_1a115762872a12894270e758af250549f0} +```cpp +mavsdk::Geofence::Geofence(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto geofence = Geofence(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Geofence() {#classmavsdk_1_1_geofence_1a7e921625517d772df4125b22841b78da} +```cpp +mavsdk::Geofence::Geofence(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto geofence = Geofence(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Geofence() {#classmavsdk_1_1_geofence_1aa8362d021d182c807ddb5e95e40a9cbe} +```cpp +mavsdk::Geofence::~Geofence() override +``` + + +Destructor (internal use only). + + +### Geofence() {#classmavsdk_1_1_geofence_1a60e1f1a3123050c73980cba61b4b4009} +```cpp +mavsdk::Geofence::Geofence(const Geofence &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Geofence](classmavsdk_1_1_geofence.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_geofence_1af9662e645781e4e64ed8b7c65d3d9309} + +```cpp +using mavsdk::Geofence::ResultCallback = std::function +``` + + +Callback type for asynchronous [Geofence](classmavsdk_1_1_geofence.md) calls. + + +## Member Enumeration Documentation + + +### enum FenceType {#classmavsdk_1_1_geofence_1a51196ded958aa9d4b3f25cde95da48e5} + + +[Geofence](classmavsdk_1_1_geofence.md) types. + + +Value | Description +--- | --- + `Inclusion` | Type representing an inclusion fence. + `Exclusion` | Type representing an exclusion fence. + +### enum Result {#classmavsdk_1_1_geofence_1ab64d6e3b9aeb9b6d5e45ae8a843a2642} + + +Possible results returned for geofence requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `Error` | Error. + `TooManyGeofenceItems` | Too many objects in the geofence. + `Busy` | Vehicle is busy. + `Timeout` | Request timed out. + `InvalidArgument` | Invalid argument. + `NoSystem` | No system connected. + +## Member Function Documentation + + +### upload_geofence_async() {#classmavsdk_1_1_geofence_1a1f0c6431b86b77c29f19eafb4e55dcdb} +```cpp +void mavsdk::Geofence::upload_geofence_async(GeofenceData geofence_data, const ResultCallback callback) +``` + + +Upload geofences. + +[Polygon](structmavsdk_1_1_geofence_1_1_polygon.md) and Circular geofences are uploaded to a drone. Once uploaded, the geofence will remain on the drone even if a connection is lost. + + +This function is non-blocking. See 'upload_geofence' for the blocking counterpart. + +**Parameters** + +* [GeofenceData](structmavsdk_1_1_geofence_1_1_geofence_data.md) **geofence_data** - +* const [ResultCallback](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1af9662e645781e4e64ed8b7c65d3d9309) **callback** - + +### upload_geofence() {#classmavsdk_1_1_geofence_1ab2e825f0955e7a320117a21d649bab09} +```cpp +Result mavsdk::Geofence::upload_geofence(GeofenceData geofence_data) const +``` + + +Upload geofences. + +[Polygon](structmavsdk_1_1_geofence_1_1_polygon.md) and Circular geofences are uploaded to a drone. Once uploaded, the geofence will remain on the drone even if a connection is lost. + + +This function is blocking. See 'upload_geofence_async' for the non-blocking counterpart. + +**Parameters** + +* [GeofenceData](structmavsdk_1_1_geofence_1_1_geofence_data.md) **geofence_data** - + +**Returns** + + [Result](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1ab64d6e3b9aeb9b6d5e45ae8a843a2642) - Result of request. + +### clear_geofence_async() {#classmavsdk_1_1_geofence_1a6947151765b621a93d35885599812752} +```cpp +void mavsdk::Geofence::clear_geofence_async(const ResultCallback callback) +``` + + +Clear all geofences saved on the vehicle. + +This function is non-blocking. See 'clear_geofence' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1af9662e645781e4e64ed8b7c65d3d9309) **callback** - + +### clear_geofence() {#classmavsdk_1_1_geofence_1a54b2a696e8aebae6916116adb92c03c3} +```cpp +Result mavsdk::Geofence::clear_geofence() const +``` + + +Clear all geofences saved on the vehicle. + +This function is blocking. See 'clear_geofence_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_geofence.md#classmavsdk_1_1_geofence_1ab64d6e3b9aeb9b6d5e45ae8a843a2642) - Result of request. + +### operator=() {#classmavsdk_1_1_geofence_1a2e8a69dddfa9b4937df117060fa2e0d7} +```cpp +const Geofence& mavsdk::Geofence::operator=(const Geofence &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Geofence](classmavsdk_1_1_geofence.md)& - + +**Returns** + + const [Geofence](classmavsdk_1_1_geofence.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_gimbal.md b/docs/en/cpp/api_reference/classmavsdk_1_1_gimbal.md new file mode 100644 index 000000000..ec98cdb59 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_gimbal.md @@ -0,0 +1,494 @@ +# mavsdk::Gimbal Class Reference +`#include: gimbal.h` + +---- + + +Provide control over a gimbal. + + +## Data Structures + + +struct [ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md) + +## Public Types + + +Type | Description +--- | --- +enum [GimbalMode](#classmavsdk_1_1_gimbal_1afb92614c5d5915d3960bcea51bec2dca) | [Gimbal](classmavsdk_1_1_gimbal.md) mode type. +enum [ControlMode](#classmavsdk_1_1_gimbal_1a01b721086d7de6089aefdeb0fda4cff3) | Control mode. +enum [Result](#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) | Possible results returned for gimbal commands. +std::function< void([Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac))> [ResultCallback](#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) | Callback type for asynchronous [Gimbal](classmavsdk_1_1_gimbal.md) calls. +std::function< void([ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md))> [ControlCallback](#classmavsdk_1_1_gimbal_1a1645ab20c41161e6c47620b7352eef62) | Callback type for subscribe_control. +[Handle](classmavsdk_1_1_handle.md)< [ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md) > [ControlHandle](#classmavsdk_1_1_gimbal_1accab76c321008685a455ccff45811397) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_control. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Gimbal](#classmavsdk_1_1_gimbal_1aa33f4df704c7f09698884083c379f787) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Gimbal](#classmavsdk_1_1_gimbal_1aa3cb6e1e37a2f275ab5cc8ed4dd71d93) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Gimbal](#classmavsdk_1_1_gimbal_1a3b86d8209172a578f238928b9f5bfdd6) () override | Destructor (internal use only). +  | [Gimbal](#classmavsdk_1_1_gimbal_1ae69df278ca37deaee22fb13053fd4f2d) (const [Gimbal](classmavsdk_1_1_gimbal.md) & other) | Copy constructor. +void | [set_pitch_and_yaw_async](#classmavsdk_1_1_gimbal_1a325a49cc256359013cbc917b3576f292) (float pitch_deg, float yaw_deg, const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) callback) | Set gimbal pitch and yaw angles. +[Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) | [set_pitch_and_yaw](#classmavsdk_1_1_gimbal_1ad65ba3258833fe78f2939b9b72dc3b88) (float pitch_deg, float yaw_deg)const | Set gimbal pitch and yaw angles. +void | [set_pitch_rate_and_yaw_rate_async](#classmavsdk_1_1_gimbal_1a161b3f85cd9fa30439774ef47a10c51d) (float pitch_rate_deg_s, float yaw_rate_deg_s, const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) callback) | Set gimbal angular rates around pitch and yaw axes. +[Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) | [set_pitch_rate_and_yaw_rate](#classmavsdk_1_1_gimbal_1a2ad12582d192d8594d7da315e2729129) (float pitch_rate_deg_s, float yaw_rate_deg_s)const | Set gimbal angular rates around pitch and yaw axes. +void | [set_mode_async](#classmavsdk_1_1_gimbal_1ad69853994c134b0e88d0f94744254066) ([GimbalMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1afb92614c5d5915d3960bcea51bec2dca) gimbal_mode, const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) callback) | Set gimbal mode. +[Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) | [set_mode](#classmavsdk_1_1_gimbal_1a037285883ceba14e0df9c7f8c19f4423) ([GimbalMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1afb92614c5d5915d3960bcea51bec2dca) gimbal_mode)const | Set gimbal mode. +void | [set_roi_location_async](#classmavsdk_1_1_gimbal_1ab3c42a7042231e48dfab881030fe30c0) (double latitude_deg, double longitude_deg, float altitude_m, const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) callback) | Set gimbal region of interest (ROI). +[Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) | [set_roi_location](#classmavsdk_1_1_gimbal_1a035ddc270efce19a9be54b98add57919) (double latitude_deg, double longitude_deg, float altitude_m)const | Set gimbal region of interest (ROI). +void | [take_control_async](#classmavsdk_1_1_gimbal_1a331139df593e8ccef0f8ca7652f2d2bc) ([ControlMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a01b721086d7de6089aefdeb0fda4cff3) control_mode, const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) callback) | Take control. +[Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) | [take_control](#classmavsdk_1_1_gimbal_1a7dabe20d1bceb7031440fefba59cd707) ([ControlMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a01b721086d7de6089aefdeb0fda4cff3) control_mode)const | Take control. +void | [release_control_async](#classmavsdk_1_1_gimbal_1aa58402c4e2d9506dbe9839ef8cbfb920) (const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) callback) | Release control. +[Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) | [release_control](#classmavsdk_1_1_gimbal_1ab994d4130b2956e2d33613ffb2127335) () const | Release control. +[ControlHandle](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1accab76c321008685a455ccff45811397) | [subscribe_control](#classmavsdk_1_1_gimbal_1aafd016582be5b63d9b378d414f2faf30) (const [ControlCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a1645ab20c41161e6c47620b7352eef62) & callback) | Subscribe to control status updates. +void | [unsubscribe_control](#classmavsdk_1_1_gimbal_1a899b442fafac1d83b9450bd219f6975e) ([ControlHandle](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1accab76c321008685a455ccff45811397) handle) | Unsubscribe from subscribe_control. +[ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md) | [control](#classmavsdk_1_1_gimbal_1aae172788140e37d6125b224f5e79829e) () const | Poll for '[ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md)' (blocking). +const [Gimbal](classmavsdk_1_1_gimbal.md) & | [operator=](#classmavsdk_1_1_gimbal_1ac9a6e1936f58ce8f957be7c6bcc0d134) (const [Gimbal](classmavsdk_1_1_gimbal.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Gimbal() {#classmavsdk_1_1_gimbal_1aa33f4df704c7f09698884083c379f787} +```cpp +mavsdk::Gimbal::Gimbal(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto gimbal = Gimbal(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Gimbal() {#classmavsdk_1_1_gimbal_1aa3cb6e1e37a2f275ab5cc8ed4dd71d93} +```cpp +mavsdk::Gimbal::Gimbal(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto gimbal = Gimbal(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Gimbal() {#classmavsdk_1_1_gimbal_1a3b86d8209172a578f238928b9f5bfdd6} +```cpp +mavsdk::Gimbal::~Gimbal() override +``` + + +Destructor (internal use only). + + +### Gimbal() {#classmavsdk_1_1_gimbal_1ae69df278ca37deaee22fb13053fd4f2d} +```cpp +mavsdk::Gimbal::Gimbal(const Gimbal &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Gimbal](classmavsdk_1_1_gimbal.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197} + +```cpp +using mavsdk::Gimbal::ResultCallback = std::function +``` + + +Callback type for asynchronous [Gimbal](classmavsdk_1_1_gimbal.md) calls. + + +### typedef ControlCallback {#classmavsdk_1_1_gimbal_1a1645ab20c41161e6c47620b7352eef62} + +```cpp +using mavsdk::Gimbal::ControlCallback = std::function +``` + + +Callback type for subscribe_control. + + +### typedef ControlHandle {#classmavsdk_1_1_gimbal_1accab76c321008685a455ccff45811397} + +```cpp +using mavsdk::Gimbal::ControlHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_control. + + +## Member Enumeration Documentation + + +### enum GimbalMode {#classmavsdk_1_1_gimbal_1afb92614c5d5915d3960bcea51bec2dca} + + +[Gimbal](classmavsdk_1_1_gimbal.md) mode type. + + +Value | Description +--- | --- + `YawFollow` | Yaw follow will point the gimbal to the vehicle heading. + `YawLock` | Yaw lock will fix the gimbal pointing to an absolute direction. + +### enum ControlMode {#classmavsdk_1_1_gimbal_1a01b721086d7de6089aefdeb0fda4cff3} + + +Control mode. + + +Value | Description +--- | --- + `None` | Indicates that the component does not have control over the gimbal. + `Primary` | To take primary control over the gimbal. + `Secondary` | To take secondary control over the gimbal. + +### enum Result {#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac} + + +Possible results returned for gimbal commands. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Command was accepted. + `Error` | Error occurred sending the command. + `Timeout` | Command timed out. + `Unsupported` | Functionality not supported. + `NoSystem` | No system connected. + +## Member Function Documentation + + +### set_pitch_and_yaw_async() {#classmavsdk_1_1_gimbal_1a325a49cc256359013cbc917b3576f292} +```cpp +void mavsdk::Gimbal::set_pitch_and_yaw_async(float pitch_deg, float yaw_deg, const ResultCallback callback) +``` + + +Set gimbal pitch and yaw angles. + +This sets the desired pitch and yaw angles of a gimbal. Will return when the command is accepted, however, it might take the gimbal longer to actually be set to the new angles. + + +This function is non-blocking. See 'set_pitch_and_yaw' for the blocking counterpart. + +**Parameters** + +* float **pitch_deg** - +* float **yaw_deg** - +* const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) **callback** - + +### set_pitch_and_yaw() {#classmavsdk_1_1_gimbal_1ad65ba3258833fe78f2939b9b72dc3b88} +```cpp +Result mavsdk::Gimbal::set_pitch_and_yaw(float pitch_deg, float yaw_deg) const +``` + + +Set gimbal pitch and yaw angles. + +This sets the desired pitch and yaw angles of a gimbal. Will return when the command is accepted, however, it might take the gimbal longer to actually be set to the new angles. + + +This function is blocking. See 'set_pitch_and_yaw_async' for the non-blocking counterpart. + +**Parameters** + +* float **pitch_deg** - +* float **yaw_deg** - + +**Returns** + + [Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) - Result of request. + +### set_pitch_rate_and_yaw_rate_async() {#classmavsdk_1_1_gimbal_1a161b3f85cd9fa30439774ef47a10c51d} +```cpp +void mavsdk::Gimbal::set_pitch_rate_and_yaw_rate_async(float pitch_rate_deg_s, float yaw_rate_deg_s, const ResultCallback callback) +``` + + +Set gimbal angular rates around pitch and yaw axes. + +This sets the desired angular rates around pitch and yaw axes of a gimbal. Will return when the command is accepted, however, it might take the gimbal longer to actually reach the angular rate. + + +This function is non-blocking. See 'set_pitch_rate_and_yaw_rate' for the blocking counterpart. + +**Parameters** + +* float **pitch_rate_deg_s** - +* float **yaw_rate_deg_s** - +* const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) **callback** - + +### set_pitch_rate_and_yaw_rate() {#classmavsdk_1_1_gimbal_1a2ad12582d192d8594d7da315e2729129} +```cpp +Result mavsdk::Gimbal::set_pitch_rate_and_yaw_rate(float pitch_rate_deg_s, float yaw_rate_deg_s) const +``` + + +Set gimbal angular rates around pitch and yaw axes. + +This sets the desired angular rates around pitch and yaw axes of a gimbal. Will return when the command is accepted, however, it might take the gimbal longer to actually reach the angular rate. + + +This function is blocking. See 'set_pitch_rate_and_yaw_rate_async' for the non-blocking counterpart. + +**Parameters** + +* float **pitch_rate_deg_s** - +* float **yaw_rate_deg_s** - + +**Returns** + + [Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) - Result of request. + +### set_mode_async() {#classmavsdk_1_1_gimbal_1ad69853994c134b0e88d0f94744254066} +```cpp +void mavsdk::Gimbal::set_mode_async(GimbalMode gimbal_mode, const ResultCallback callback) +``` + + +Set gimbal mode. + +This sets the desired yaw mode of a gimbal. Will return when the command is accepted. However, it might take the gimbal longer to actually be set to the new angles. + + +This function is non-blocking. See 'set_mode' for the blocking counterpart. + +**Parameters** + +* [GimbalMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1afb92614c5d5915d3960bcea51bec2dca) **gimbal_mode** - +* const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) **callback** - + +### set_mode() {#classmavsdk_1_1_gimbal_1a037285883ceba14e0df9c7f8c19f4423} +```cpp +Result mavsdk::Gimbal::set_mode(GimbalMode gimbal_mode) const +``` + + +Set gimbal mode. + +This sets the desired yaw mode of a gimbal. Will return when the command is accepted. However, it might take the gimbal longer to actually be set to the new angles. + + +This function is blocking. See 'set_mode_async' for the non-blocking counterpart. + +**Parameters** + +* [GimbalMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1afb92614c5d5915d3960bcea51bec2dca) **gimbal_mode** - + +**Returns** + + [Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) - Result of request. + +### set_roi_location_async() {#classmavsdk_1_1_gimbal_1ab3c42a7042231e48dfab881030fe30c0} +```cpp +void mavsdk::Gimbal::set_roi_location_async(double latitude_deg, double longitude_deg, float altitude_m, const ResultCallback callback) +``` + + +Set gimbal region of interest (ROI). + +This sets a region of interest that the gimbal will point to. The gimbal will continue to point to the specified region until it receives a new command. The function will return when the command is accepted, however, it might take the gimbal longer to actually rotate to the ROI. + + +This function is non-blocking. See 'set_roi_location' for the blocking counterpart. + +**Parameters** + +* double **latitude_deg** - +* double **longitude_deg** - +* float **altitude_m** - +* const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) **callback** - + +### set_roi_location() {#classmavsdk_1_1_gimbal_1a035ddc270efce19a9be54b98add57919} +```cpp +Result mavsdk::Gimbal::set_roi_location(double latitude_deg, double longitude_deg, float altitude_m) const +``` + + +Set gimbal region of interest (ROI). + +This sets a region of interest that the gimbal will point to. The gimbal will continue to point to the specified region until it receives a new command. The function will return when the command is accepted, however, it might take the gimbal longer to actually rotate to the ROI. + + +This function is blocking. See 'set_roi_location_async' for the non-blocking counterpart. + +**Parameters** + +* double **latitude_deg** - +* double **longitude_deg** - +* float **altitude_m** - + +**Returns** + + [Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) - Result of request. + +### take_control_async() {#classmavsdk_1_1_gimbal_1a331139df593e8ccef0f8ca7652f2d2bc} +```cpp +void mavsdk::Gimbal::take_control_async(ControlMode control_mode, const ResultCallback callback) +``` + + +Take control. + +There can be only two components in control of a gimbal at any given time. One with "primary" control, and one with "secondary" control. The way the secondary control is implemented is not specified and hence depends on the vehicle. + + +Components are expected to be cooperative, which means that they can override each other and should therefore do it carefully. + + +This function is non-blocking. See 'take_control' for the blocking counterpart. + +**Parameters** + +* [ControlMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a01b721086d7de6089aefdeb0fda4cff3) **control_mode** - +* const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) **callback** - + +### take_control() {#classmavsdk_1_1_gimbal_1a7dabe20d1bceb7031440fefba59cd707} +```cpp +Result mavsdk::Gimbal::take_control(ControlMode control_mode) const +``` + + +Take control. + +There can be only two components in control of a gimbal at any given time. One with "primary" control, and one with "secondary" control. The way the secondary control is implemented is not specified and hence depends on the vehicle. + + +Components are expected to be cooperative, which means that they can override each other and should therefore do it carefully. + + +This function is blocking. See 'take_control_async' for the non-blocking counterpart. + +**Parameters** + +* [ControlMode](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a01b721086d7de6089aefdeb0fda4cff3) **control_mode** - + +**Returns** + + [Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) - Result of request. + +### release_control_async() {#classmavsdk_1_1_gimbal_1aa58402c4e2d9506dbe9839ef8cbfb920} +```cpp +void mavsdk::Gimbal::release_control_async(const ResultCallback callback) +``` + + +Release control. + +Release control, such that other components can control the gimbal. + + +This function is non-blocking. See 'release_control' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a88ee7dd17821fb9b12c44b2a3630c197) **callback** - + +### release_control() {#classmavsdk_1_1_gimbal_1ab994d4130b2956e2d33613ffb2127335} +```cpp +Result mavsdk::Gimbal::release_control() const +``` + + +Release control. + +Release control, such that other components can control the gimbal. + + +This function is blocking. See 'release_control_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1aa732ec0bd49ac03b7910199d635f76ac) - Result of request. + +### subscribe_control() {#classmavsdk_1_1_gimbal_1aafd016582be5b63d9b378d414f2faf30} +```cpp +ControlHandle mavsdk::Gimbal::subscribe_control(const ControlCallback &callback) +``` + + +Subscribe to control status updates. + +This allows a component to know if it has primary, secondary or no control over the gimbal. Also, it gives the system and component ids of the other components in control (if any). + +**Parameters** + +* const [ControlCallback](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1a1645ab20c41161e6c47620b7352eef62)& **callback** - + +**Returns** + + [ControlHandle](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1accab76c321008685a455ccff45811397) - + +### unsubscribe_control() {#classmavsdk_1_1_gimbal_1a899b442fafac1d83b9450bd219f6975e} +```cpp +void mavsdk::Gimbal::unsubscribe_control(ControlHandle handle) +``` + + +Unsubscribe from subscribe_control. + + +**Parameters** + +* [ControlHandle](classmavsdk_1_1_gimbal.md#classmavsdk_1_1_gimbal_1accab76c321008685a455ccff45811397) **handle** - + +### control() {#classmavsdk_1_1_gimbal_1aae172788140e37d6125b224f5e79829e} +```cpp +ControlStatus mavsdk::Gimbal::control() const +``` + + +Poll for '[ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md)' (blocking). + + +**Returns** + + [ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md) - One [ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md) update. + +### operator=() {#classmavsdk_1_1_gimbal_1ac9a6e1936f58ce8f957be7c6bcc0d134} +```cpp +const Gimbal& mavsdk::Gimbal::operator=(const Gimbal &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Gimbal](classmavsdk_1_1_gimbal.md)& - + +**Returns** + + const [Gimbal](classmavsdk_1_1_gimbal.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_gripper.md b/docs/en/cpp/api_reference/classmavsdk_1_1_gripper.md new file mode 100644 index 000000000..3ab13634e --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_gripper.md @@ -0,0 +1,224 @@ +# mavsdk::Gripper Class Reference +`#include: gripper.h` + +---- + + +Allows users to send gripper actions. + + +## Public Types + + +Type | Description +--- | --- +enum [GripperAction](#classmavsdk_1_1_gripper_1a2088ab8cdb0f343fa576a54af41cf36f) | [Gripper](classmavsdk_1_1_gripper.md) Actions. +enum [Result](#classmavsdk_1_1_gripper_1a82c5d2dec9badc2fad436ae56962b534) | Possible results returned for gripper action requests. +std::function< void([Result](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1a82c5d2dec9badc2fad436ae56962b534))> [ResultCallback](#classmavsdk_1_1_gripper_1ac8cce161ab7fe573125f4915de0a993f) | Callback type for asynchronous [Gripper](classmavsdk_1_1_gripper.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Gripper](#classmavsdk_1_1_gripper_1a566993706ef599eae17761f4b0810c4b) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Gripper](#classmavsdk_1_1_gripper_1a83a53647a8fb1bf1ef463fd3ddd14726) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Gripper](#classmavsdk_1_1_gripper_1a90b0ea53617492b3f3fa6406430a08e8) () override | Destructor (internal use only). +  | [Gripper](#classmavsdk_1_1_gripper_1a3d5e59b3647fd93c8cf43910cdf01468) (const [Gripper](classmavsdk_1_1_gripper.md) & other) | Copy constructor. +void | [grab_async](#classmavsdk_1_1_gripper_1a90c5ebf377fa1691a045a3ae70d885fa) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1ac8cce161ab7fe573125f4915de0a993f) callback) | [Gripper](classmavsdk_1_1_gripper.md) grab cargo. +[Result](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1a82c5d2dec9badc2fad436ae56962b534) | [grab](#classmavsdk_1_1_gripper_1abba980736acaf541721c7e23a9f2f8b1) (uint32_t instance)const | [Gripper](classmavsdk_1_1_gripper.md) grab cargo. +void | [release_async](#classmavsdk_1_1_gripper_1acb9a3f03a7c67f1a5c066aa2380a5e34) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1ac8cce161ab7fe573125f4915de0a993f) callback) | [Gripper](classmavsdk_1_1_gripper.md) release cargo. +[Result](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1a82c5d2dec9badc2fad436ae56962b534) | [release](#classmavsdk_1_1_gripper_1a7b0d151d7a596d3977f2da9861204d8c) (uint32_t instance)const | [Gripper](classmavsdk_1_1_gripper.md) release cargo. +const [Gripper](classmavsdk_1_1_gripper.md) & | [operator=](#classmavsdk_1_1_gripper_1a6b26bd1ca3f795dce56b5a14717b9c40) (const [Gripper](classmavsdk_1_1_gripper.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Gripper() {#classmavsdk_1_1_gripper_1a566993706ef599eae17761f4b0810c4b} +```cpp +mavsdk::Gripper::Gripper(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto gripper = Gripper(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Gripper() {#classmavsdk_1_1_gripper_1a83a53647a8fb1bf1ef463fd3ddd14726} +```cpp +mavsdk::Gripper::Gripper(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto gripper = Gripper(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Gripper() {#classmavsdk_1_1_gripper_1a90b0ea53617492b3f3fa6406430a08e8} +```cpp +mavsdk::Gripper::~Gripper() override +``` + + +Destructor (internal use only). + + +### Gripper() {#classmavsdk_1_1_gripper_1a3d5e59b3647fd93c8cf43910cdf01468} +```cpp +mavsdk::Gripper::Gripper(const Gripper &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Gripper](classmavsdk_1_1_gripper.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_gripper_1ac8cce161ab7fe573125f4915de0a993f} + +```cpp +using mavsdk::Gripper::ResultCallback = std::function +``` + + +Callback type for asynchronous [Gripper](classmavsdk_1_1_gripper.md) calls. + + +## Member Enumeration Documentation + + +### enum GripperAction {#classmavsdk_1_1_gripper_1a2088ab8cdb0f343fa576a54af41cf36f} + + +[Gripper](classmavsdk_1_1_gripper.md) Actions. + +Available gripper actions are defined in mavlink under [https://mavlink.io/en/messages/common.html#GRIPPER_ACTIONS](https://mavlink.io/en/messages/common.html#GRIPPER_ACTIONS) + +Value | Description +--- | --- + `Release` | Open the gripper to release the cargo. + `Grab` | Close the gripper and grab onto cargo. + +### enum Result {#classmavsdk_1_1_gripper_1a82c5d2dec9badc2fad436ae56962b534} + + +Possible results returned for gripper action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request was successful. + `NoSystem` | No system is connected. + `Busy` | Temporarily rejected. + `Timeout` | Request timed out. + `Unsupported` | [Action](classmavsdk_1_1_action.md) not supported. + `Failed` | [Action](classmavsdk_1_1_action.md) failed. + +## Member Function Documentation + + +### grab_async() {#classmavsdk_1_1_gripper_1a90c5ebf377fa1691a045a3ae70d885fa} +```cpp +void mavsdk::Gripper::grab_async(uint32_t instance, const ResultCallback callback) +``` + + +[Gripper](classmavsdk_1_1_gripper.md) grab cargo. + +This function is non-blocking. See 'grab' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1ac8cce161ab7fe573125f4915de0a993f) **callback** - + +### grab() {#classmavsdk_1_1_gripper_1abba980736acaf541721c7e23a9f2f8b1} +```cpp +Result mavsdk::Gripper::grab(uint32_t instance) const +``` + + +[Gripper](classmavsdk_1_1_gripper.md) grab cargo. + +This function is blocking. See 'grab_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1a82c5d2dec9badc2fad436ae56962b534) - Result of request. + +### release_async() {#classmavsdk_1_1_gripper_1acb9a3f03a7c67f1a5c066aa2380a5e34} +```cpp +void mavsdk::Gripper::release_async(uint32_t instance, const ResultCallback callback) +``` + + +[Gripper](classmavsdk_1_1_gripper.md) release cargo. + +This function is non-blocking. See 'release' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1ac8cce161ab7fe573125f4915de0a993f) **callback** - + +### release() {#classmavsdk_1_1_gripper_1a7b0d151d7a596d3977f2da9861204d8c} +```cpp +Result mavsdk::Gripper::release(uint32_t instance) const +``` + + +[Gripper](classmavsdk_1_1_gripper.md) release cargo. + +This function is blocking. See 'release_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_gripper.md#classmavsdk_1_1_gripper_1a82c5d2dec9badc2fad436ae56962b534) - Result of request. + +### operator=() {#classmavsdk_1_1_gripper_1a6b26bd1ca3f795dce56b5a14717b9c40} +```cpp +const Gripper& mavsdk::Gripper::operator=(const Gripper &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Gripper](classmavsdk_1_1_gripper.md)& - + +**Returns** + + const [Gripper](classmavsdk_1_1_gripper.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_handle.md b/docs/en/cpp/api_reference/classmavsdk_1_1_handle.md new file mode 100644 index 000000000..2bbeef54d --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_handle.md @@ -0,0 +1,32 @@ +# mavsdk::Handle Class Reference +`#include: handle.h` + +---- + + +A handle returned from subscribe which allows to unsubscribe again. + + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Handle](#classmavsdk_1_1_handle_1a4dde9be588a605aa7a7fa77cc4ed98f2) ()=default | +  | [~Handle](#classmavsdk_1_1_handle_1a986e2ba72802e6cc5bdc5f06f27f6acb) ()=default | + + +## Constructor & Destructor Documentation + + +### Handle() {#classmavsdk_1_1_handle_1a4dde9be588a605aa7a7fa77cc4ed98f2} +```cpp +mavsdk::Handle< Args >::Handle()=default +``` + + +### ~Handle() {#classmavsdk_1_1_handle_1a986e2ba72802e6cc5bdc5f06f27f6acb} +```cpp +mavsdk::Handle< Args >::~Handle()=default +``` + diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_info.md b/docs/en/cpp/api_reference/classmavsdk_1_1_info.md new file mode 100644 index 000000000..379a14313 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_info.md @@ -0,0 +1,224 @@ +# mavsdk::Info Class Reference +`#include: info.h` + +---- + + +Provide information about the hardware and/or software of a system. + + +## Data Structures + + +struct [FlightInfo](structmavsdk_1_1_info_1_1_flight_info.md) + +struct [Identification](structmavsdk_1_1_info_1_1_identification.md) + +struct [Product](structmavsdk_1_1_info_1_1_product.md) + +struct [Version](structmavsdk_1_1_info_1_1_version.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a) | Possible results returned for info requests. +std::function< void([Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a))> [ResultCallback](#classmavsdk_1_1_info_1a649bf4a0936dea3168d40eb9b9dcdd57) | Callback type for asynchronous [Info](classmavsdk_1_1_info.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Info](#classmavsdk_1_1_info_1a01a29a579c8ecb75ea73d48f8f6adf17) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Info](#classmavsdk_1_1_info_1ae67e006f16f1e1aa12efe94120ef83ec) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Info](#classmavsdk_1_1_info_1abbf48bc4b9aa5b9fdbdb54ec3e398f65) () override | Destructor (internal use only). +  | [Info](#classmavsdk_1_1_info_1a0f6e0851757046c540fe7ce920eb3fa2) (const [Info](classmavsdk_1_1_info.md) & other) | Copy constructor. +std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::FlightInfo](structmavsdk_1_1_info_1_1_flight_info.md) > | [get_flight_information](#classmavsdk_1_1_info_1a915e0833d8c3c61fed9b9ad687caef77) () const | Get flight information of the system. +std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::Identification](structmavsdk_1_1_info_1_1_identification.md) > | [get_identification](#classmavsdk_1_1_info_1a812ed66265b7427bc781faec3f0fa89e) () const | Get the identification of the system. +std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::Product](structmavsdk_1_1_info_1_1_product.md) > | [get_product](#classmavsdk_1_1_info_1ae60d71a6dcd7546d1bdc06a9c26e629f) () const | Get product information of the system. +std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::Version](structmavsdk_1_1_info_1_1_version.md) > | [get_version](#classmavsdk_1_1_info_1a2403b975a73b2b52a455b96cdc899af3) () const | Get the version information of the system. +std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), double > | [get_speed_factor](#classmavsdk_1_1_info_1a3b372b3f6e4b167cb272ae68d3d172c6) () const | Get the speed factor of a simulation (with lockstep a simulation can run faster or slower than realtime). +const [Info](classmavsdk_1_1_info.md) & | [operator=](#classmavsdk_1_1_info_1a586eb91fd65d602bad1d016dca42b435) (const [Info](classmavsdk_1_1_info.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Info() {#classmavsdk_1_1_info_1a01a29a579c8ecb75ea73d48f8f6adf17} +```cpp +mavsdk::Info::Info(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto info = Info(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Info() {#classmavsdk_1_1_info_1ae67e006f16f1e1aa12efe94120ef83ec} +```cpp +mavsdk::Info::Info(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto info = Info(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Info() {#classmavsdk_1_1_info_1abbf48bc4b9aa5b9fdbdb54ec3e398f65} +```cpp +mavsdk::Info::~Info() override +``` + + +Destructor (internal use only). + + +### Info() {#classmavsdk_1_1_info_1a0f6e0851757046c540fe7ce920eb3fa2} +```cpp +mavsdk::Info::Info(const Info &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Info](classmavsdk_1_1_info.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_info_1a649bf4a0936dea3168d40eb9b9dcdd57} + +```cpp +using mavsdk::Info::ResultCallback = std::function +``` + + +Callback type for asynchronous [Info](classmavsdk_1_1_info.md) calls. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a} + + +Possible results returned for info requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `InformationNotReceivedYet` | Information has not been received yet. + `NoSystem` | No system is connected. + +## Member Function Documentation + + +### get_flight_information() {#classmavsdk_1_1_info_1a915e0833d8c3c61fed9b9ad687caef77} +```cpp +std::pair mavsdk::Info::get_flight_information() const +``` + + +Get flight information of the system. + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::FlightInfo](structmavsdk_1_1_info_1_1_flight_info.md) > - Result of request. + +### get_identification() {#classmavsdk_1_1_info_1a812ed66265b7427bc781faec3f0fa89e} +```cpp +std::pair mavsdk::Info::get_identification() const +``` + + +Get the identification of the system. + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::Identification](structmavsdk_1_1_info_1_1_identification.md) > - Result of request. + +### get_product() {#classmavsdk_1_1_info_1ae60d71a6dcd7546d1bdc06a9c26e629f} +```cpp +std::pair mavsdk::Info::get_product() const +``` + + +Get product information of the system. + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::Product](structmavsdk_1_1_info_1_1_product.md) > - Result of request. + +### get_version() {#classmavsdk_1_1_info_1a2403b975a73b2b52a455b96cdc899af3} +```cpp +std::pair mavsdk::Info::get_version() const +``` + + +Get the version information of the system. + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), [Info::Version](structmavsdk_1_1_info_1_1_version.md) > - Result of request. + +### get_speed_factor() {#classmavsdk_1_1_info_1a3b372b3f6e4b167cb272ae68d3d172c6} +```cpp +std::pair mavsdk::Info::get_speed_factor() const +``` + + +Get the speed factor of a simulation (with lockstep a simulation can run faster or slower than realtime). + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_info.md#classmavsdk_1_1_info_1ab1798ed39271915800b25aaa05d1d45a), double > - Result of request. + +### operator=() {#classmavsdk_1_1_info_1a586eb91fd65d602bad1d016dca42b435} +```cpp +const Info& mavsdk::Info::operator=(const Info &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Info](classmavsdk_1_1_info.md)& - + +**Returns** + + const [Info](classmavsdk_1_1_info.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_log_files.md b/docs/en/cpp/api_reference/classmavsdk_1_1_log_files.md new file mode 100644 index 000000000..605e00273 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_log_files.md @@ -0,0 +1,232 @@ +# mavsdk::LogFiles Class Reference +`#include: log_files.h` + +---- + + +Allow to download log files from the vehicle after a flight is complete. For log streaming during flight check the logging plugin. + + +## Data Structures + + +struct [Entry](structmavsdk_1_1_log_files_1_1_entry.md) + +struct [ProgressData](structmavsdk_1_1_log_files_1_1_progress_data.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd) | Possible results returned for calibration commands. +std::function< void([Result](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd))> [ResultCallback](#classmavsdk_1_1_log_files_1a64cd003ea9110b4a11eb08753a360a59) | Callback type for asynchronous [LogFiles](classmavsdk_1_1_log_files.md) calls. +std::function< void([Result](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd), std::vector< [Entry](structmavsdk_1_1_log_files_1_1_entry.md) >)> [GetEntriesCallback](#classmavsdk_1_1_log_files_1a0bb101777daba9e87cb33baf55389403) | Callback type for get_entries_async. +std::function< void([Result](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd), [ProgressData](structmavsdk_1_1_log_files_1_1_progress_data.md))> [DownloadLogFileCallback](#classmavsdk_1_1_log_files_1af62400ee1e20bfbe948e1ec98255d236) | Callback type for download_log_file_async. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [LogFiles](#classmavsdk_1_1_log_files_1a4a487863501b7ef30db5179bebc45a3a) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [LogFiles](#classmavsdk_1_1_log_files_1ad42b07d8ef2f70f63ded5e5e3825f837) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~LogFiles](#classmavsdk_1_1_log_files_1a313ea62b9c45927c4140fb784578a5b9) () override | Destructor (internal use only). +  | [LogFiles](#classmavsdk_1_1_log_files_1ae09021cd080dc45f63019ea76968801f) (const [LogFiles](classmavsdk_1_1_log_files.md) & other) | Copy constructor. +void | [get_entries_async](#classmavsdk_1_1_log_files_1a6a922097850fb43fbb9d3348fe0b3bb7) (const [GetEntriesCallback](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a0bb101777daba9e87cb33baf55389403) callback) | Get List of log files. +std::pair< [Result](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd), std::vector< [LogFiles::Entry](structmavsdk_1_1_log_files_1_1_entry.md) > > | [get_entries](#classmavsdk_1_1_log_files_1ab06a17009589c57aa90ac31a24aa9064) () const | Get List of log files. +void | [download_log_file_async](#classmavsdk_1_1_log_files_1a2d5eca47cfa3de13a317915cd261d642) ([Entry](structmavsdk_1_1_log_files_1_1_entry.md) entry, std::string path, const [DownloadLogFileCallback](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1af62400ee1e20bfbe948e1ec98255d236) & callback) | Download log file. +[Result](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd) | [erase_all_log_files](#classmavsdk_1_1_log_files_1a31cc0db36046c8211763a829b8f62414) () const | Erase all log files. +const [LogFiles](classmavsdk_1_1_log_files.md) & | [operator=](#classmavsdk_1_1_log_files_1a2ba9f188f7644a647f5dcdadb034e300) (const [LogFiles](classmavsdk_1_1_log_files.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### LogFiles() {#classmavsdk_1_1_log_files_1a4a487863501b7ef30db5179bebc45a3a} +```cpp +mavsdk::LogFiles::LogFiles(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto log_files = LogFiles(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### LogFiles() {#classmavsdk_1_1_log_files_1ad42b07d8ef2f70f63ded5e5e3825f837} +```cpp +mavsdk::LogFiles::LogFiles(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto log_files = LogFiles(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~LogFiles() {#classmavsdk_1_1_log_files_1a313ea62b9c45927c4140fb784578a5b9} +```cpp +mavsdk::LogFiles::~LogFiles() override +``` + + +Destructor (internal use only). + + +### LogFiles() {#classmavsdk_1_1_log_files_1ae09021cd080dc45f63019ea76968801f} +```cpp +mavsdk::LogFiles::LogFiles(const LogFiles &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [LogFiles](classmavsdk_1_1_log_files.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_log_files_1a64cd003ea9110b4a11eb08753a360a59} + +```cpp +using mavsdk::LogFiles::ResultCallback = std::function +``` + + +Callback type for asynchronous [LogFiles](classmavsdk_1_1_log_files.md) calls. + + +### typedef GetEntriesCallback {#classmavsdk_1_1_log_files_1a0bb101777daba9e87cb33baf55389403} + +```cpp +using mavsdk::LogFiles::GetEntriesCallback = std::function)> +``` + + +Callback type for get_entries_async. + + +### typedef DownloadLogFileCallback {#classmavsdk_1_1_log_files_1af62400ee1e20bfbe948e1ec98255d236} + +```cpp +using mavsdk::LogFiles::DownloadLogFileCallback = std::function +``` + + +Callback type for download_log_file_async. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd} + + +Possible results returned for calibration commands. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `Next` | Progress update. + `NoLogfiles` | No log files found. + `Timeout` | A timeout happened. + `InvalidArgument` | Invalid argument. + `FileOpenFailed` | File open failed. + `NoSystem` | No system is connected. + +## Member Function Documentation + + +### get_entries_async() {#classmavsdk_1_1_log_files_1a6a922097850fb43fbb9d3348fe0b3bb7} +```cpp +void mavsdk::LogFiles::get_entries_async(const GetEntriesCallback callback) +``` + + +Get List of log files. + +This function is non-blocking. See 'get_entries' for the blocking counterpart. + +**Parameters** + +* const [GetEntriesCallback](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a0bb101777daba9e87cb33baf55389403) **callback** - + +### get_entries() {#classmavsdk_1_1_log_files_1ab06a17009589c57aa90ac31a24aa9064} +```cpp +std::pair > mavsdk::LogFiles::get_entries() const +``` + + +Get List of log files. + +This function is blocking. See 'get_entries_async' for the non-blocking counterpart. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd), std::vector< [LogFiles::Entry](structmavsdk_1_1_log_files_1_1_entry.md) > > - Result of request. + +### download_log_file_async() {#classmavsdk_1_1_log_files_1a2d5eca47cfa3de13a317915cd261d642} +```cpp +void mavsdk::LogFiles::download_log_file_async(Entry entry, std::string path, const DownloadLogFileCallback &callback) +``` + + +Download log file. + + +**Parameters** + +* [Entry](structmavsdk_1_1_log_files_1_1_entry.md) **entry** - +* std::string **path** - +* const [DownloadLogFileCallback](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1af62400ee1e20bfbe948e1ec98255d236)& **callback** - + +### erase_all_log_files() {#classmavsdk_1_1_log_files_1a31cc0db36046c8211763a829b8f62414} +```cpp +Result mavsdk::LogFiles::erase_all_log_files() const +``` + + +Erase all log files. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_log_files.md#classmavsdk_1_1_log_files_1a43e5425f17cd8a6830ff6fd952a724cd) - Result of request. + +### operator=() {#classmavsdk_1_1_log_files_1a2ba9f188f7644a647f5dcdadb034e300} +```cpp +const LogFiles& mavsdk::LogFiles::operator=(const LogFiles &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [LogFiles](classmavsdk_1_1_log_files.md)& - + +**Returns** + + const [LogFiles](classmavsdk_1_1_log_files.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_manual_control.md b/docs/en/cpp/api_reference/classmavsdk_1_1_manual_control.md new file mode 100644 index 000000000..aa0bda5f4 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_manual_control.md @@ -0,0 +1,240 @@ +# mavsdk::ManualControl Class Reference +`#include: manual_control.h` + +---- + + +Enable manual control using e.g. a joystick or gamepad. + + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799) | Possible results returned for manual control requests. +std::function< void([Result](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799))> [ResultCallback](#classmavsdk_1_1_manual_control_1a08b010bafdf770d3e4ea6060f56a0f3b) | Callback type for asynchronous [ManualControl](classmavsdk_1_1_manual_control.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [ManualControl](#classmavsdk_1_1_manual_control_1af89d947dd2c843cc41f2ea183ad17b03) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [ManualControl](#classmavsdk_1_1_manual_control_1acf87299c9d9b632dbbc0975244c537e9) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~ManualControl](#classmavsdk_1_1_manual_control_1a7e1bfb49a11b98c541b88fdef8fe76f7) () override | Destructor (internal use only). +  | [ManualControl](#classmavsdk_1_1_manual_control_1a8253b8063d4cd4832d84acd2afa26775) (const [ManualControl](classmavsdk_1_1_manual_control.md) & other) | Copy constructor. +void | [start_position_control_async](#classmavsdk_1_1_manual_control_1a2a3352c11c56dd14d55537b3a6413792) (const [ResultCallback](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a08b010bafdf770d3e4ea6060f56a0f3b) callback) | Start position control using e.g. joystick input. +[Result](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799) | [start_position_control](#classmavsdk_1_1_manual_control_1a570c7e78fc9c5083d9a2f9570c32caaa) () const | Start position control using e.g. joystick input. +void | [start_altitude_control_async](#classmavsdk_1_1_manual_control_1abf7659d98949c01b634e421a9c2df079) (const [ResultCallback](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a08b010bafdf770d3e4ea6060f56a0f3b) callback) | Start altitude control. +[Result](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799) | [start_altitude_control](#classmavsdk_1_1_manual_control_1a67609e46bafb34309d5b5d943a29f23c) () const | Start altitude control. +[Result](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799) | [set_manual_control_input](#classmavsdk_1_1_manual_control_1a1b4b34db391d7238e33b821614fc1f29) (float x, float y, float z, float r)const | Set manual control input. +const [ManualControl](classmavsdk_1_1_manual_control.md) & | [operator=](#classmavsdk_1_1_manual_control_1aca51fff98c33fbd5201495101ddf1368) (const [ManualControl](classmavsdk_1_1_manual_control.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ManualControl() {#classmavsdk_1_1_manual_control_1af89d947dd2c843cc41f2ea183ad17b03} +```cpp +mavsdk::ManualControl::ManualControl(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto manual_control = ManualControl(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### ManualControl() {#classmavsdk_1_1_manual_control_1acf87299c9d9b632dbbc0975244c537e9} +```cpp +mavsdk::ManualControl::ManualControl(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto manual_control = ManualControl(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~ManualControl() {#classmavsdk_1_1_manual_control_1a7e1bfb49a11b98c541b88fdef8fe76f7} +```cpp +mavsdk::ManualControl::~ManualControl() override +``` + + +Destructor (internal use only). + + +### ManualControl() {#classmavsdk_1_1_manual_control_1a8253b8063d4cd4832d84acd2afa26775} +```cpp +mavsdk::ManualControl::ManualControl(const ManualControl &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [ManualControl](classmavsdk_1_1_manual_control.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_manual_control_1a08b010bafdf770d3e4ea6060f56a0f3b} + +```cpp +using mavsdk::ManualControl::ResultCallback = std::function +``` + + +Callback type for asynchronous [ManualControl](classmavsdk_1_1_manual_control.md) calls. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799} + + +Possible results returned for manual control requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request was successful. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command refused by vehicle. + `Timeout` | Request timed out. + `InputOutOfRange` | Input out of range. + `InputNotSet` | No Input set. + +## Member Function Documentation + + +### start_position_control_async() {#classmavsdk_1_1_manual_control_1a2a3352c11c56dd14d55537b3a6413792} +```cpp +void mavsdk::ManualControl::start_position_control_async(const ResultCallback callback) +``` + + +Start position control using e.g. joystick input. + +Requires manual control input to be sent regularly already. Requires a valid position using e.g. GPS, external vision, or optical flow. + + +This function is non-blocking. See 'start_position_control' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a08b010bafdf770d3e4ea6060f56a0f3b) **callback** - + +### start_position_control() {#classmavsdk_1_1_manual_control_1a570c7e78fc9c5083d9a2f9570c32caaa} +```cpp +Result mavsdk::ManualControl::start_position_control() const +``` + + +Start position control using e.g. joystick input. + +Requires manual control input to be sent regularly already. Requires a valid position using e.g. GPS, external vision, or optical flow. + + +This function is blocking. See 'start_position_control_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799) - Result of request. + +### start_altitude_control_async() {#classmavsdk_1_1_manual_control_1abf7659d98949c01b634e421a9c2df079} +```cpp +void mavsdk::ManualControl::start_altitude_control_async(const ResultCallback callback) +``` + + +Start altitude control. + +Requires manual control input to be sent regularly already. Does not require a valid position e.g. GPS. + + +This function is non-blocking. See 'start_altitude_control' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a08b010bafdf770d3e4ea6060f56a0f3b) **callback** - + +### start_altitude_control() {#classmavsdk_1_1_manual_control_1a67609e46bafb34309d5b5d943a29f23c} +```cpp +Result mavsdk::ManualControl::start_altitude_control() const +``` + + +Start altitude control. + +Requires manual control input to be sent regularly already. Does not require a valid position e.g. GPS. + + +This function is blocking. See 'start_altitude_control_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799) - Result of request. + +### set_manual_control_input() {#classmavsdk_1_1_manual_control_1a1b4b34db391d7238e33b821614fc1f29} +```cpp +Result mavsdk::ManualControl::set_manual_control_input(float x, float y, float z, float r) const +``` + + +Set manual control input. + +The manual control input needs to be sent at a rate high enough to prevent triggering of RC loss, a good minimum rate is 10 Hz. + + +This function is blocking. + +**Parameters** + +* float **x** - +* float **y** - +* float **z** - +* float **r** - + +**Returns** + + [Result](classmavsdk_1_1_manual_control.md#classmavsdk_1_1_manual_control_1a6c7dbd25e051b6e1369a65fd05a22799) - Result of request. + +### operator=() {#classmavsdk_1_1_manual_control_1aca51fff98c33fbd5201495101ddf1368} +```cpp +const ManualControl& mavsdk::ManualControl::operator=(const ManualControl &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [ManualControl](classmavsdk_1_1_manual_control.md)& - + +**Returns** + + const [ManualControl](classmavsdk_1_1_manual_control.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_mavlink_passthrough.md b/docs/en/cpp/api_reference/classmavsdk_1_1_mavlink_passthrough.md new file mode 100644 index 000000000..405e5c00e --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_mavlink_passthrough.md @@ -0,0 +1,399 @@ +# mavsdk::MavlinkPassthrough Class Reference +`#include: mavlink_passthrough.h` + +---- + + +The [MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md) class provides direct MAVLink access. + + +"With great power comes great responsibility." - This plugin allows you to send and receive MAVLink messages. There is no checking or safe-guards, you're on your own, and you have been warned. + + +## Data Structures + + +struct [CommandInt](structmavsdk_1_1_mavlink_passthrough_1_1_command_int.md) + +struct [CommandLong](structmavsdk_1_1_mavlink_passthrough_1_1_command_long.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) | Possible results returned for requests. +std::function< void(const mavlink_message_t &)> [MessageCallback](#classmavsdk_1_1_mavlink_passthrough_1a97f94c54e84fcce94d922fd7f4e3d231) | Callback type for message subscriptions. +[Handle](classmavsdk_1_1_handle.md)< const mavlink_message_t & > [MessageHandle](#classmavsdk_1_1_mavlink_passthrough_1a2e283239c4429eaeb33deb5821833066) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_message_async. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [MavlinkPassthrough](#classmavsdk_1_1_mavlink_passthrough_1ad17fc20d2b7c5c6996e0841aaabccb56) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [MavlinkPassthrough](#classmavsdk_1_1_mavlink_passthrough_1a9d1fdd3c4aeab8e221ac59612944c299) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~MavlinkPassthrough](#classmavsdk_1_1_mavlink_passthrough_1a890faef9ad80c3e79e0b785fd07106c8) () | Destructor (internal use only). +  | [MavlinkPassthrough](#classmavsdk_1_1_mavlink_passthrough_1ae4b30f9c2c5e938ab965729e27f50ce5) (const [MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md) &)=delete | Copy Constructor (object is not copyable). +DEPRECATED [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) | [send_message](#classmavsdk_1_1_mavlink_passthrough_1a9bbd09d34f7ae1b6e27bcd5c3d4ba667) (mavlink_message_t & message) | Send message (deprecated). +[Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) | [queue_message](#classmavsdk_1_1_mavlink_passthrough_1aa95592bc4da7d56d444b8b5cb5bce814) (std::function< mavlink_message_t([MavlinkAddress](struct_mavlink_address.md) mavlink_address, uint8_t channel)> fun) | Send message by queueing it. +[Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) | [send_command_long](#classmavsdk_1_1_mavlink_passthrough_1a7e258aa16b92195e5329e861fb18f8e9) (const [CommandLong](structmavsdk_1_1_mavlink_passthrough_1_1_command_long.md) & command) | Send a MAVLink command_long. +[Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) | [send_command_int](#classmavsdk_1_1_mavlink_passthrough_1a654d67a3b136509c76e2ac804a656ada) (const [CommandInt](structmavsdk_1_1_mavlink_passthrough_1_1_command_int.md) & command) | Send a MAVLink command_long. +mavlink_message_t | [make_command_ack_message](#classmavsdk_1_1_mavlink_passthrough_1aa08cb5d2f9aed795367cf7e05d58bdcc) (const uint8_t target_sysid, const uint8_t target_compid, const uint16_t command, MAV_RESULT result) | Create a command_ack. +std::pair< [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793), int32_t > | [get_param_int](#classmavsdk_1_1_mavlink_passthrough_1a19887d34580a7f1f9ef4bbea6cd3441b) (const std::string & name, std::optional< uint8_t > maybe_component_id, bool extended) | Request param (int). +std::pair< [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793), float > | [get_param_float](#classmavsdk_1_1_mavlink_passthrough_1aa91c943be90e319d01b75d2cd0aa39ab) (const std::string & name, std::optional< uint8_t > maybe_component_id, bool extended) | Request param (float). +[MessageHandle](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a2e283239c4429eaeb33deb5821833066) | [subscribe_message](#classmavsdk_1_1_mavlink_passthrough_1ae2ab2426bc0d844e931c266aa26c3607) (uint16_t message_id, const [MessageCallback](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a97f94c54e84fcce94d922fd7f4e3d231) & callback) | Subscribe to messages using message ID. +void | [unsubscribe_message](#classmavsdk_1_1_mavlink_passthrough_1af4e722ae613e799b60020c30193656be) (uint16_t message_id, [MessageHandle](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a2e283239c4429eaeb33deb5821833066) handle) | Unsubscribe from subscribe_message. +uint8_t | [get_our_sysid](#classmavsdk_1_1_mavlink_passthrough_1a985b269c1b78ec3e4e9d9468e46e19be) () const | Get our own system ID. +uint8_t | [get_our_compid](#classmavsdk_1_1_mavlink_passthrough_1a85ddd016ab35d5f3f487b1362723d3cf) () const | Get our own component ID. +uint8_t | [get_target_sysid](#classmavsdk_1_1_mavlink_passthrough_1a2867d1f37649d62e757bbac0a73b3ebd) () const | Get system ID of target. +uint8_t | [get_target_compid](#classmavsdk_1_1_mavlink_passthrough_1a22ecab3905237a2f227f77bbab9afd17) () const | Get target component ID. +const [MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md) & | [operator=](#classmavsdk_1_1_mavlink_passthrough_1aa7f49a131a8facf4d05449ec03ce3643) (const [MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### MavlinkPassthrough() {#classmavsdk_1_1_mavlink_passthrough_1ad17fc20d2b7c5c6996e0841aaabccb56} +```cpp +mavsdk::MavlinkPassthrough::MavlinkPassthrough(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mavlink_passthrough = MavlinkPassthrough(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### MavlinkPassthrough() {#classmavsdk_1_1_mavlink_passthrough_1a9d1fdd3c4aeab8e221ac59612944c299} +```cpp +mavsdk::MavlinkPassthrough::MavlinkPassthrough(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mavlink_passthrough = MavlinkPassthrough(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~MavlinkPassthrough() {#classmavsdk_1_1_mavlink_passthrough_1a890faef9ad80c3e79e0b785fd07106c8} +```cpp +mavsdk::MavlinkPassthrough::~MavlinkPassthrough() +``` + + +Destructor (internal use only). + + +### MavlinkPassthrough() {#classmavsdk_1_1_mavlink_passthrough_1ae4b30f9c2c5e938ab965729e27f50ce5} +```cpp +mavsdk::MavlinkPassthrough::MavlinkPassthrough(const MavlinkPassthrough &)=delete +``` + + +Copy Constructor (object is not copyable). + + +**Parameters** + +* const [MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md)& - + +## Member Typdef Documentation + + +### typedef MessageCallback {#classmavsdk_1_1_mavlink_passthrough_1a97f94c54e84fcce94d922fd7f4e3d231} + +```cpp +using mavsdk::MavlinkPassthrough::MessageCallback = std::function +``` + + +Callback type for message subscriptions. + + +### typedef MessageHandle {#classmavsdk_1_1_mavlink_passthrough_1a2e283239c4429eaeb33deb5821833066} + +```cpp +using mavsdk::MavlinkPassthrough::MessageHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_message_async. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793} + + +Possible results returned for requests. + + +Value | Description +--- | --- + `Unknown` | Unknown error. + `Success` | Success. + `ConnectionError` | Connection error. + `CommandNoSystem` | [System](classmavsdk_1_1_system.md) not available. + `CommandBusy` | [System](classmavsdk_1_1_system.md) is busy. + `CommandDenied` | Command has been denied. + `CommandUnsupported` | Command is not supported. + `CommandTimeout` | A timeout happened. + `CommandTemporarilyRejected` | Command has been rejected for now. + `CommandFailed` | Command has failed. + `ParamWrongType` | Wrong type for requested param. + `ParamNameTooLong` | [Param](classmavsdk_1_1_param.md) name too long. + `ParamValueTooLong` | [Param](classmavsdk_1_1_param.md) value too long. + `ParamNotFound` | [Param](classmavsdk_1_1_param.md) not found. + `ParamValueUnsupported` | [Param](classmavsdk_1_1_param.md) value unsupported. + +## Member Function Documentation + + +### send_message() {#classmavsdk_1_1_mavlink_passthrough_1a9bbd09d34f7ae1b6e27bcd5c3d4ba667} +```cpp +DEPRECATED Result mavsdk::MavlinkPassthrough::send_message(mavlink_message_t &message) +``` + + +Send message (deprecated). + +> **Note** This interface is deprecated. Instead the method [queue_message()](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1aa95592bc4da7d56d444b8b5cb5bce814) should be used. + +**Parameters** + +* mavlink_message_t& **message** - + +**Returns** + + DEPRECATED [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) - result of the request. + +### queue_message() {#classmavsdk_1_1_mavlink_passthrough_1aa95592bc4da7d56d444b8b5cb5bce814} +```cpp +Result mavsdk::MavlinkPassthrough::queue_message(std::function< mavlink_message_t(MavlinkAddress mavlink_address, uint8_t channel)> fun) +``` + + +Send message by queueing it. + +> **Note** This interface replaces the previous send_message method. + +The interface changed in order to prevent accessing the internal MAVLink status from different threads and to make sure the seq numbers are not unique to[Mavsdk](classmavsdk_1_1_mavsdk.md) instances and server components. + +**Parameters** + +* std::function< mavlink_message_t([MavlinkAddress](struct_mavlink_address.md) mavlink_address, uint8_t channel)> **fun** - Function which is (immediately) executed to send a message. It is passed the mavlink_address and channel, both data required to send a message using mavlink_message_xx_pack_chan(). + +**Returns** + + [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) - result of request + +### send_command_long() {#classmavsdk_1_1_mavlink_passthrough_1a7e258aa16b92195e5329e861fb18f8e9} +```cpp +Result mavsdk::MavlinkPassthrough::send_command_long(const CommandLong &command) +``` + + +Send a MAVLink command_long. + + +**Parameters** + +* const [CommandLong](structmavsdk_1_1_mavlink_passthrough_1_1_command_long.md)& **command** - Command to send. + +**Returns** + + [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) - result of the request. + +### send_command_int() {#classmavsdk_1_1_mavlink_passthrough_1a654d67a3b136509c76e2ac804a656ada} +```cpp +Result mavsdk::MavlinkPassthrough::send_command_int(const CommandInt &command) +``` + + +Send a MAVLink command_long. + + +**Parameters** + +* const [CommandInt](structmavsdk_1_1_mavlink_passthrough_1_1_command_int.md)& **command** - Command to send. + +**Returns** + + [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793) - result of the request. + +### make_command_ack_message() {#classmavsdk_1_1_mavlink_passthrough_1aa08cb5d2f9aed795367cf7e05d58bdcc} +```cpp +mavlink_message_t mavsdk::MavlinkPassthrough::make_command_ack_message(const uint8_t target_sysid, const uint8_t target_compid, const uint16_t command, MAV_RESULT result) +``` + + +Create a command_ack. + + +**Parameters** + +* const uint8_t **target_sysid** - Target system ID where to send command_ack to. +* const uint8_t **target_compid** - Target component ID where to send command_ack to. +* const uint16_t **command** - Command to respond to. +* MAV_RESULT **result** - Result of command. + +**Returns** + + mavlink_message_t - message to send. + +### get_param_int() {#classmavsdk_1_1_mavlink_passthrough_1a19887d34580a7f1f9ef4bbea6cd3441b} +```cpp +std::pair mavsdk::MavlinkPassthrough::get_param_int(const std::string &name, std::optional< uint8_t > maybe_component_id, bool extended) +``` + + +Request param (int). + + +**Parameters** + +* const std::string& **name** - +* std::optional< uint8_t > **maybe_component_id** - +* bool **extended** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793), int32_t > - + +### get_param_float() {#classmavsdk_1_1_mavlink_passthrough_1aa91c943be90e319d01b75d2cd0aa39ab} +```cpp +std::pair mavsdk::MavlinkPassthrough::get_param_float(const std::string &name, std::optional< uint8_t > maybe_component_id, bool extended) +``` + + +Request param (float). + + +**Parameters** + +* const std::string& **name** - +* std::optional< uint8_t > **maybe_component_id** - +* bool **extended** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a265eacaeea064a31de3fe16d1e357793), float > - + +### subscribe_message() {#classmavsdk_1_1_mavlink_passthrough_1ae2ab2426bc0d844e931c266aa26c3607} +```cpp +MessageHandle mavsdk::MavlinkPassthrough::subscribe_message(uint16_t message_id, const MessageCallback &callback) +``` + + +Subscribe to messages using message ID. + +This means that all future messages being received will trigger the callback to be called. To stop the subscription, call this method with `nullptr` as the argument. + +**Parameters** + +* uint16_t **message_id** - The MAVLink message ID. +* const [MessageCallback](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a97f94c54e84fcce94d922fd7f4e3d231)& **callback** - Callback to be called for message subscription. + +**Returns** + + [MessageHandle](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a2e283239c4429eaeb33deb5821833066) - + +### unsubscribe_message() {#classmavsdk_1_1_mavlink_passthrough_1af4e722ae613e799b60020c30193656be} +```cpp +void mavsdk::MavlinkPassthrough::unsubscribe_message(uint16_t message_id, MessageHandle handle) +``` + + +Unsubscribe from subscribe_message. + + +**Parameters** + +* uint16_t **message_id** - The MAVLink message ID. +* [MessageHandle](classmavsdk_1_1_mavlink_passthrough.md#classmavsdk_1_1_mavlink_passthrough_1a2e283239c4429eaeb33deb5821833066) **handle** - The handle returned from subscribe_message. + +### get_our_sysid() {#classmavsdk_1_1_mavlink_passthrough_1a985b269c1b78ec3e4e9d9468e46e19be} +```cpp +uint8_t mavsdk::MavlinkPassthrough::get_our_sysid() const +``` + + +Get our own system ID. + + +**Returns** + + uint8_t - our own system ID. + +### get_our_compid() {#classmavsdk_1_1_mavlink_passthrough_1a85ddd016ab35d5f3f487b1362723d3cf} +```cpp +uint8_t mavsdk::MavlinkPassthrough::get_our_compid() const +``` + + +Get our own component ID. + + +**Returns** + + uint8_t - our own component ID. + +### get_target_sysid() {#classmavsdk_1_1_mavlink_passthrough_1a2867d1f37649d62e757bbac0a73b3ebd} +```cpp +uint8_t mavsdk::MavlinkPassthrough::get_target_sysid() const +``` + + +Get system ID of target. + + +**Returns** + + uint8_t - system ID of target. + +### get_target_compid() {#classmavsdk_1_1_mavlink_passthrough_1a22ecab3905237a2f227f77bbab9afd17} +```cpp +uint8_t mavsdk::MavlinkPassthrough::get_target_compid() const +``` + + +Get target component ID. + +This defaults to the component ID of the autopilot (1) if available and otherwise to all components (0). + +**Returns** + + uint8_t - component ID of target. + +### operator=() {#classmavsdk_1_1_mavlink_passthrough_1aa7f49a131a8facf4d05449ec03ce3643} +```cpp +const MavlinkPassthrough& mavsdk::MavlinkPassthrough::operator=(const MavlinkPassthrough &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md)& - + +**Returns** + + const [MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_mavsdk.md b/docs/en/cpp/api_reference/classmavsdk_1_1_mavsdk.md new file mode 100644 index 000000000..0381ee205 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_mavsdk.md @@ -0,0 +1,619 @@ +# mavsdk::Mavsdk Class Reference +`#include: mavsdk.h` + +---- + + +This is the main class of MAVSDK (a MAVLink API Library). + + +It is used to discover vehicles and manage active connections. + + +An instance of this class must be created (first) in order to use the library. The instance must be destroyed after use in order to break connections and release all resources. + + +## Data Structures + + +struct [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) + +## Public Types + + +Type | Description +--- | --- +enum [ComponentType](#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) | ComponentType of configurations, used for automatic ID setting. +[Handle](classmavsdk_1_1_handle.md)<> [ConnectionHandle](#classmavsdk_1_1_mavsdk_1a1b16edeae47af0815b3267c9075f6a8f) | [Handle](classmavsdk_1_1_handle.md) type to remove a connection. +std::function< void()> [NewSystemCallback](#classmavsdk_1_1_mavsdk_1a7a283c6a75e852a56be4c5862f8a3fab) | Callback type discover and timeout notifications. +[Handle](classmavsdk_1_1_handle.md)<> [NewSystemHandle](#classmavsdk_1_1_mavsdk_1ae0727f2bed9cbf276d161ada0a432b8c) | [Handle](classmavsdk_1_1_handle.md) type to unsubscribe from subscribe_on_new_system. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Mavsdk](#classmavsdk_1_1_mavsdk_1ab10a870a7b8d1f8dae5c53c23c3fc596) ()=delete | Default constructor without configuration, no longer recommended. +  | [Mavsdk](#classmavsdk_1_1_mavsdk_1a02b160aa2717f7064d2517e00065e6ac) ([Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) configuration) | Constructor with configuration. +  | [~Mavsdk](#classmavsdk_1_1_mavsdk_1ac1549f715d6857711b9b9e364a4ca351) () | Destructor. +std::string | [version](#classmavsdk_1_1_mavsdk_1a8fdb97695762d06fd2bccfc6309943fa) () const | Returns the version of MAVSDK. +[ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) | [add_any_connection](#classmavsdk_1_1_mavsdk_1a405041a5043c610c86540de090626d97) (const std::string & connection_url, [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) forwarding_option=ForwardingOption::ForwardingOff) | Adds Connection via URL. +std::pair< [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992), [ConnectionHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a1b16edeae47af0815b3267c9075f6a8f) > | [add_any_connection_with_handle](#classmavsdk_1_1_mavsdk_1ad1dc8afaafea8f7e900c990552e6fdfb) (const std::string & connection_url, [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) forwarding_option=ForwardingOption::ForwardingOff) | Adds Connection via URL Additionally returns a handle to remove the connection later. +[ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) | [add_udp_connection](#classmavsdk_1_1_mavsdk_1aa43dfb00d5118d26ae5aabd0f9ba56b2) (int local_port=[DEFAULT_UDP_PORT](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1affddcc7c7849ed86a0c7dab1166e657a), [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) forwarding_option=ForwardingOption::ForwardingOff) | Adds a UDP connection to the specified port number. +[ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) | [add_udp_connection](#classmavsdk_1_1_mavsdk_1a98fd1c01bd366b27084810875a1b94c1) (const std::string & local_ip, int local_port=[DEFAULT_UDP_PORT](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1affddcc7c7849ed86a0c7dab1166e657a), [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) forwarding_option=ForwardingOption::ForwardingOff) | Adds a UDP connection to the specified port number and local interface. +[ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) | [setup_udp_remote](#classmavsdk_1_1_mavsdk_1adb2a69282a5d3766fd6251662c28616d) (const std::string & remote_ip, int remote_port, [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) forwarding_option=ForwardingOption::ForwardingOff) | Sets up instance to send heartbeats to the specified remote interface and port number. +[ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) | [add_tcp_connection](#classmavsdk_1_1_mavsdk_1a50ecebb9ee710b9a044d2d5eb57645e4) (const std::string & remote_ip, int remote_port=[DEFAULT_TCP_REMOTE_PORT](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a52a6a9e0acd6c0ade566208d253427bd), [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) forwarding_option=ForwardingOption::ForwardingOff) | Adds a TCP connection with a specific IP address and port number. +[ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) | [add_serial_connection](#classmavsdk_1_1_mavsdk_1a669ddeec7af571fdbde9f31e343d50ac) (const std::string & dev_path, int baudrate=[DEFAULT_SERIAL_BAUDRATE](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a870d15142914f1db564c12f385d5489b), bool flow_control=false, [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) forwarding_option=ForwardingOption::ForwardingOff) | Adds a serial connection with a specific port (COM or UART dev node) and baudrate as specified. +void | [remove_connection](#classmavsdk_1_1_mavsdk_1a23cf630bb123aa53b0e99c6bd83ad013) ([ConnectionHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a1b16edeae47af0815b3267c9075f6a8f) handle) | +std::vector< std::shared_ptr< [System](classmavsdk_1_1_system.md) > > | [systems](#classmavsdk_1_1_mavsdk_1a0d0bc4cdab14d96877b52baec5113fa8) () const | Get a vector of systems which have been discovered or set-up. +std::optional< std::shared_ptr< [System](classmavsdk_1_1_system.md) > > | [first_autopilot](#classmavsdk_1_1_mavsdk_1a30b5c588643d19f1cfa9a7be47acb52c) (double timeout_s)const | Get the first autopilot that has been discovered. +void | [set_configuration](#classmavsdk_1_1_mavsdk_1acaeea86253493dc15b6540d2100a1b86) ([Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) configuration) | Set [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) of SDK. +void | [set_timeout_s](#classmavsdk_1_1_mavsdk_1a765f37b61462addcfd961e720585d2c6) (double timeout_s) | Set timeout of MAVLink transfers. +void | [set_system_status](#classmavsdk_1_1_mavsdk_1a693eac9fce2e9a330a3b9213ac9faae4) (uint8_t system_status) | Set system status of this MAVLink entity. +[NewSystemHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ae0727f2bed9cbf276d161ada0a432b8c) | [subscribe_on_new_system](#classmavsdk_1_1_mavsdk_1a5b7c958ad2e4529dc7b950ab26618575) (const [NewSystemCallback](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a7a283c6a75e852a56be4c5862f8a3fab) & callback) | Get notification about a change in systems. +void | [unsubscribe_on_new_system](#classmavsdk_1_1_mavsdk_1ad7f77f1295a700ee73cccc345019c1ff) ([NewSystemHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ae0727f2bed9cbf276d161ada0a432b8c) handle) | unsubscribe from subscribe_on_new_system. +std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > | [server_component](#classmavsdk_1_1_mavsdk_1a5ad97e4af7de0f253cca8af7e76b68b6) (unsigned instance=0) | Get server component with default type of [Mavsdk](classmavsdk_1_1_mavsdk.md) instance. +std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > | [server_component_by_type](#classmavsdk_1_1_mavsdk_1a669a7ec5ed40dec9fde7e7a080fa7f2d) ([ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) component_type, unsigned instance=0) | Get server component by a high level type. +std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > | [server_component_by_id](#classmavsdk_1_1_mavsdk_1a117e6dc31b9124b6d535aa363283f8d7) (uint8_t component_id) | Get server component by the low MAVLink component ID. +void | [intercept_incoming_messages_async](#classmavsdk_1_1_mavsdk_1ac80c8909958533131cbdbc61d061794f) (std::function< bool(mavlink_message_t &)> callback) | Intercept incoming messages. +void | [intercept_outgoing_messages_async](#classmavsdk_1_1_mavsdk_1a040ee5c1d41e71c0d63cf8f76d2db275) (std::function< bool(mavlink_message_t &)> callback) | Intercept outgoing messages. + +## Static Public Attributes + + +static constexpr auto [DEFAULT_UDP_BIND_IP](#classmavsdk_1_1_mavsdk_1ac46b2c27d9c428ec46092f10774482fa) = "0.0.0.0" - Default UDP bind IP (accepts any incoming connections). + + +static constexpr int [DEFAULT_UDP_PORT](#classmavsdk_1_1_mavsdk_1affddcc7c7849ed86a0c7dab1166e657a) = 14540 - Default UDP bind port (same port as used by MAVROS). + + +static constexpr auto [DEFAULT_TCP_REMOTE_IP](#classmavsdk_1_1_mavsdk_1a0154aac9d933fa212a50dc687816fbad) = "127.0.0.1" - Default TCP remote IP (localhost). + + +static constexpr int [DEFAULT_TCP_REMOTE_PORT](#classmavsdk_1_1_mavsdk_1a52a6a9e0acd6c0ade566208d253427bd) = 5760 - Default TCP remote port. + + +static constexpr int [DEFAULT_SERIAL_BAUDRATE](#classmavsdk_1_1_mavsdk_1a870d15142914f1db564c12f385d5489b) = 57600 - Default serial baudrate. + + +static constexpr double [DEFAULT_TIMEOUT_S](#classmavsdk_1_1_mavsdk_1a74f7b4d32d9551bb9c11ce8668f634a6) = 0.5 - Default internal timeout in seconds. + + +## Constructor & Destructor Documentation + + +### Mavsdk() {#classmavsdk_1_1_mavsdk_1ab10a870a7b8d1f8dae5c53c23c3fc596} +```cpp +mavsdk::Mavsdk::Mavsdk()=delete +``` + + +Default constructor without configuration, no longer recommended. + +> **Note** This has been removed because MAVSDK used to identify itself as a ground station by default which isn't always the safest choice. For instance, when MAVSDK is used on a companion computer (set as a ground station) it means that the appropriate failsafe doesn't trigger. + +### Mavsdk() {#classmavsdk_1_1_mavsdk_1a02b160aa2717f7064d2517e00065e6ac} +```cpp +mavsdk::Mavsdk::Mavsdk(Configuration configuration) +``` + + +Constructor with configuration. + + +**Parameters** + +* [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) **configuration** - [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) to use in MAVSDK instance. + +### ~Mavsdk() {#classmavsdk_1_1_mavsdk_1ac1549f715d6857711b9b9e364a4ca351} +```cpp +mavsdk::Mavsdk::~Mavsdk() +``` + + +Destructor. + +Disconnects all connected vehicles and releases all resources. + +## Member Typdef Documentation + + +### typedef ConnectionHandle {#classmavsdk_1_1_mavsdk_1a1b16edeae47af0815b3267c9075f6a8f} + +```cpp +using mavsdk::Mavsdk::ConnectionHandle = Handle<> +``` + + +[Handle](classmavsdk_1_1_handle.md) type to remove a connection. + + +### typedef NewSystemCallback {#classmavsdk_1_1_mavsdk_1a7a283c6a75e852a56be4c5862f8a3fab} + +```cpp +using mavsdk::Mavsdk::NewSystemCallback = std::function +``` + + +Callback type discover and timeout notifications. + + +### typedef NewSystemHandle {#classmavsdk_1_1_mavsdk_1ae0727f2bed9cbf276d161ada0a432b8c} + +```cpp +using mavsdk::Mavsdk::NewSystemHandle = Handle<> +``` + + +[Handle](classmavsdk_1_1_handle.md) type to unsubscribe from subscribe_on_new_system. + + +## Member Enumeration Documentation + + +### enum ComponentType {#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746} + + +ComponentType of configurations, used for automatic ID setting. + + +Value | Description +--- | --- + `Autopilot` | SDK is used as an autopilot. + `GroundStation` | SDK is used as a ground station. + `CompanionComputer` | SDK is used as a companion computer on board the MAV. + `Camera` | SDK is used as a camera. + `Custom` | SDK is used in a custom configuration, no automatic ID will be provided. + +## Member Function Documentation + + +### version() {#classmavsdk_1_1_mavsdk_1a8fdb97695762d06fd2bccfc6309943fa} +```cpp +std::string mavsdk::Mavsdk::version() const +``` + + +Returns the version of MAVSDK. + +Note, you're not supposed to request the version too many times. + +**Returns** + + std::string - A string containing the version. + +### add_any_connection() {#classmavsdk_1_1_mavsdk_1a405041a5043c610c86540de090626d97} +```cpp +ConnectionResult mavsdk::Mavsdk::add_any_connection(const std::string &connection_url, ForwardingOption forwarding_option=ForwardingOption::ForwardingOff) +``` + + +Adds Connection via URL. + +Supports connection: Serial, TCP or UDP. Connection URL format should be: +
    +
  • UDP: udp://[host][:bind_port]

    +
  • +
  • TCP: tcp://[host][:remote_port]

    +
  • +
  • Serial: serial://dev_node[:baudrate]

    +
  • +
+ + +For UDP, the host can be set to either: +
    +
  • zero IP: 0.0.0.0 -> behave like a server and listen for heartbeats.

    +
  • +
  • some IP: 192.168.1.12 -> behave like a client, initiate connection and start sending heartbeats.

    +
  • +
+ +**Parameters** + +* const std::string& **connection_url** - connection URL string. +* [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) **forwarding_option** - message forwarding option (when multiple interfaces are used). + +**Returns** + + [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) - The result of adding the connection. + +### add_any_connection_with_handle() {#classmavsdk_1_1_mavsdk_1ad1dc8afaafea8f7e900c990552e6fdfb} +```cpp +std::pair mavsdk::Mavsdk::add_any_connection_with_handle(const std::string &connection_url, ForwardingOption forwarding_option=ForwardingOption::ForwardingOff) +``` + + +Adds Connection via URL Additionally returns a handle to remove the connection later. + +Supports connection: Serial, TCP or UDP. Connection URL format should be: +
    +
  • UDP: udp://[host][:bind_port]

    +
  • +
  • TCP: tcp://[host][:remote_port]

    +
  • +
  • Serial: serial://dev_node[:baudrate]

    +
  • +
+ + +For UDP, the host can be set to either: +
    +
  • zero IP: 0.0.0.0 -> behave like a server and listen for heartbeats.

    +
  • +
  • some IP: 192.168.1.12 -> behave like a client, initiate connection and start sending heartbeats.

    +
  • +
+ +**Parameters** + +* const std::string& **connection_url** - connection URL string. +* [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) **forwarding_option** - message forwarding option (when multiple interfaces are used). + +**Returns** + + std::pair< [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992), [ConnectionHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a1b16edeae47af0815b3267c9075f6a8f) > - A pair containing the result of adding the connection as well as a handle to remove it later. + +### add_udp_connection() {#classmavsdk_1_1_mavsdk_1aa43dfb00d5118d26ae5aabd0f9ba56b2} +```cpp +ConnectionResult mavsdk::Mavsdk::add_udp_connection(int local_port=DEFAULT_UDP_PORT, ForwardingOption forwarding_option=ForwardingOption::ForwardingOff) +``` + + +Adds a UDP connection to the specified port number. + +Any incoming connections are accepted (0.0.0.0). + +**Parameters** + +* int **local_port** - The local UDP port to listen to (defaults to 14540, the same as MAVROS). +* [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) **forwarding_option** - message forwarding option (when multiple interfaces are used). + +**Returns** + + [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) - The result of adding the connection. + +### add_udp_connection() {#classmavsdk_1_1_mavsdk_1a98fd1c01bd366b27084810875a1b94c1} +```cpp +ConnectionResult mavsdk::Mavsdk::add_udp_connection(const std::string &local_ip, int local_port=DEFAULT_UDP_PORT, ForwardingOption forwarding_option=ForwardingOption::ForwardingOff) +``` + + +Adds a UDP connection to the specified port number and local interface. + +To accept only local connections of the machine, use 127.0.0.1. For any incoming connections, use 0.0.0.0. + +**Parameters** + +* const std::string& **local_ip** - The local UDP IP address to listen to. +* int **local_port** - The local UDP port to listen to (defaults to 14540, the same as MAVROS). +* [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) **forwarding_option** - message forwarding option (when multiple interfaces are used). + +**Returns** + + [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) - The result of adding the connection. + +### setup_udp_remote() {#classmavsdk_1_1_mavsdk_1adb2a69282a5d3766fd6251662c28616d} +```cpp +ConnectionResult mavsdk::Mavsdk::setup_udp_remote(const std::string &remote_ip, int remote_port, ForwardingOption forwarding_option=ForwardingOption::ForwardingOff) +``` + + +Sets up instance to send heartbeats to the specified remote interface and port number. + + +**Parameters** + +* const std::string& **remote_ip** - The remote UDP IP address to report to. +* int **remote_port** - The local UDP port to report to. +* [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) **forwarding_option** - message forwarding option (when multiple interfaces are used). + +**Returns** + + [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) - The result of operation. + +### add_tcp_connection() {#classmavsdk_1_1_mavsdk_1a50ecebb9ee710b9a044d2d5eb57645e4} +```cpp +ConnectionResult mavsdk::Mavsdk::add_tcp_connection(const std::string &remote_ip, int remote_port=DEFAULT_TCP_REMOTE_PORT, ForwardingOption forwarding_option=ForwardingOption::ForwardingOff) +``` + + +Adds a TCP connection with a specific IP address and port number. + + +**Parameters** + +* const std::string& **remote_ip** - Remote IP address to connect to. +* int **remote_port** - The TCP port to connect to (defaults to 5760). +* [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) **forwarding_option** - message forwarding option (when multiple interfaces are used). + +**Returns** + + [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) - The result of adding the connection. + +### add_serial_connection() {#classmavsdk_1_1_mavsdk_1a669ddeec7af571fdbde9f31e343d50ac} +```cpp +ConnectionResult mavsdk::Mavsdk::add_serial_connection(const std::string &dev_path, int baudrate=DEFAULT_SERIAL_BAUDRATE, bool flow_control=false, ForwardingOption forwarding_option=ForwardingOption::ForwardingOff) +``` + + +Adds a serial connection with a specific port (COM or UART dev node) and baudrate as specified. + + +**Parameters** + +* const std::string& **dev_path** - COM or UART dev node name/path (e.g. "/dev/ttyS0", or "COM3" on Windows). +* int **baudrate** - Baudrate of the serial port (defaults to 57600). +* bool **flow_control** - enable/disable flow control. +* [ForwardingOption](namespacemavsdk.md#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) **forwarding_option** - message forwarding option (when multiple interfaces are used). + +**Returns** + + [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) - The result of adding the connection. + +### remove_connection() {#classmavsdk_1_1_mavsdk_1a23cf630bb123aa53b0e99c6bd83ad013} +```cpp +void mavsdk::Mavsdk::remove_connection(ConnectionHandle handle) +``` + + +Remove connection again. + +**Parameters** + +* [ConnectionHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a1b16edeae47af0815b3267c9075f6a8f) **handle** - [Handle](classmavsdk_1_1_handle.md) returned when connection was added. + +### systems() {#classmavsdk_1_1_mavsdk_1a0d0bc4cdab14d96877b52baec5113fa8} +```cpp +std::vector > mavsdk::Mavsdk::systems() const +``` + + +Get a vector of systems which have been discovered or set-up. + + +**Returns** + + std::vector< std::shared_ptr< [System](classmavsdk_1_1_system.md) > > - The vector of systems which are available. + +### first_autopilot() {#classmavsdk_1_1_mavsdk_1a30b5c588643d19f1cfa9a7be47acb52c} +```cpp +std::optional > mavsdk::Mavsdk::first_autopilot(double timeout_s) const +``` + + +Get the first autopilot that has been discovered. + +> **Note** This requires a MAVLink component with component ID 1 sending heartbeats. + +**Parameters** + +* double **timeout_s** - A timeout in seconds. A timeout of 0 will not wait and return immediately. A negative timeout will wait forever. + +**Returns** + + std::optional< std::shared_ptr< [System](classmavsdk_1_1_system.md) > > - A system or nothing if nothing was discovered within the timeout. + +### set_configuration() {#classmavsdk_1_1_mavsdk_1acaeea86253493dc15b6540d2100a1b86} +```cpp +void mavsdk::Mavsdk::set_configuration(Configuration configuration) +``` + + +Set [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) of SDK. + +The default configuration is `Configuration::GroundStation` The configuration is used in order to set the MAVLink system ID, the component ID, as well as the MAV_TYPE accordingly. + +**Parameters** + +* [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) **configuration** - [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) chosen. + +### set_timeout_s() {#classmavsdk_1_1_mavsdk_1a765f37b61462addcfd961e720585d2c6} +```cpp +void mavsdk::Mavsdk::set_timeout_s(double timeout_s) +``` + + +Set timeout of MAVLink transfers. + +The default timeout used is generally DEFAULT_SERIAL_BAUDRATE (0.5 seconds) seconds. If MAVSDK is used on the same host this timeout can be reduced, while if MAVSDK has to communicate over links with high latency it might need to be increased to prevent timeouts. + +**Parameters** + +* double **timeout_s** - + +### set_system_status() {#classmavsdk_1_1_mavsdk_1a693eac9fce2e9a330a3b9213ac9faae4} +```cpp +void mavsdk::Mavsdk::set_system_status(uint8_t system_status) +``` + + +Set system status of this MAVLink entity. + +The default system status is MAV_STATE_UNINIT. + +**Parameters** + +* uint8_t **system_status** - system status. + +### subscribe_on_new_system() {#classmavsdk_1_1_mavsdk_1a5b7c958ad2e4529dc7b950ab26618575} +```cpp +NewSystemHandle mavsdk::Mavsdk::subscribe_on_new_system(const NewSystemCallback &callback) +``` + + +Get notification about a change in systems. + +This gets called whenever a system is added. + +**Parameters** + +* const [NewSystemCallback](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1a7a283c6a75e852a56be4c5862f8a3fab)& **callback** - Callback to subscribe. + +**Returns** + + [NewSystemHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ae0727f2bed9cbf276d161ada0a432b8c) - A handle to unsubscribe again. + +### unsubscribe_on_new_system() {#classmavsdk_1_1_mavsdk_1ad7f77f1295a700ee73cccc345019c1ff} +```cpp +void mavsdk::Mavsdk::unsubscribe_on_new_system(NewSystemHandle handle) +``` + + +unsubscribe from subscribe_on_new_system. + + +**Parameters** + +* [NewSystemHandle](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ae0727f2bed9cbf276d161ada0a432b8c) **handle** - [Handle](classmavsdk_1_1_handle.md) received on subscription. + +### server_component() {#classmavsdk_1_1_mavsdk_1a5ad97e4af7de0f253cca8af7e76b68b6} +```cpp +std::shared_ptr mavsdk::Mavsdk::server_component(unsigned instance=0) +``` + + +Get server component with default type of [Mavsdk](classmavsdk_1_1_mavsdk.md) instance. + + +**Parameters** + +* unsigned **instance** - + +**Returns** + + std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > - A valid shared pointer to a server component if it was successful, an empty pointer otherwise. + +### server_component_by_type() {#classmavsdk_1_1_mavsdk_1a669a7ec5ed40dec9fde7e7a080fa7f2d} +```cpp +std::shared_ptr mavsdk::Mavsdk::server_component_by_type(ComponentType component_type, unsigned instance=0) +``` + + +Get server component by a high level type. + +This represents a server component of the MAVSDK instance. + +**Parameters** + +* [ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) **component_type** - The high level type of the component. +* unsigned **instance** - The instance of the component if there are multiple, starting at 0. + +**Returns** + + std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > - A valid shared pointer to a server component if it was successful, an empty pointer otherwise. + +### server_component_by_id() {#classmavsdk_1_1_mavsdk_1a117e6dc31b9124b6d535aa363283f8d7} +```cpp +std::shared_ptr mavsdk::Mavsdk::server_component_by_id(uint8_t component_id) +``` + + +Get server component by the low MAVLink component ID. + +This represents a server component of the MAVSDK instance. + +**Parameters** + +* uint8_t **component_id** - MAVLink component ID to use + +**Returns** + + std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > - A valid shared pointer to a server component if it was successful, an empty pointer otherwise. + +### intercept_incoming_messages_async() {#classmavsdk_1_1_mavsdk_1ac80c8909958533131cbdbc61d061794f} +```cpp +void mavsdk::Mavsdk::intercept_incoming_messages_async(std::function< bool(mavlink_message_t &)> callback) +``` + + +Intercept incoming messages. + +This is a hook which allows to change or drop MAVLink messages as they are received before they get forwarded any subscribers. + + +> **Note** This functionality is provided primarily for testing in order to simulate packet drops or actors not adhering to the MAVLink protocols. + +**Parameters** + +* std::function< bool(mavlink_message_t &)> **callback** - Callback to be called for each incoming message. To drop a message, return 'false' from the callback. + +### intercept_outgoing_messages_async() {#classmavsdk_1_1_mavsdk_1a040ee5c1d41e71c0d63cf8f76d2db275} +```cpp +void mavsdk::Mavsdk::intercept_outgoing_messages_async(std::function< bool(mavlink_message_t &)> callback) +``` + + +Intercept outgoing messages. + +This is a hook which allows to change or drop MAVLink messages before they are sent. + + +> **Note** This functionality is provided primarily for testing in order to simulate packet drops or actors not adhering to the MAVLink protocols. + +**Parameters** + +* std::function< bool(mavlink_message_t &)> **callback** - Callback to be called for each outgoing message. To drop a message, return 'false' from the callback. + +## Field Documentation + + +### DEFAULT_UDP_BIND_IP {#classmavsdk_1_1_mavsdk_1ac46b2c27d9c428ec46092f10774482fa} + +```cpp +constexpr auto mavsdk::Mavsdk::DEFAULT_UDP_BIND_IP = "0.0.0.0" +``` + + +Default UDP bind IP (accepts any incoming connections). + + +### DEFAULT_UDP_PORT {#classmavsdk_1_1_mavsdk_1affddcc7c7849ed86a0c7dab1166e657a} + +```cpp +constexpr int mavsdk::Mavsdk::DEFAULT_UDP_PORT = 14540 +``` + + +Default UDP bind port (same port as used by MAVROS). + + +### DEFAULT_TCP_REMOTE_IP {#classmavsdk_1_1_mavsdk_1a0154aac9d933fa212a50dc687816fbad} + +```cpp +constexpr auto mavsdk::Mavsdk::DEFAULT_TCP_REMOTE_IP = "127.0.0.1" +``` + + +Default TCP remote IP (localhost). + + +### DEFAULT_TCP_REMOTE_PORT {#classmavsdk_1_1_mavsdk_1a52a6a9e0acd6c0ade566208d253427bd} + +```cpp +constexpr int mavsdk::Mavsdk::DEFAULT_TCP_REMOTE_PORT = 5760 +``` + + +Default TCP remote port. + + +### DEFAULT_SERIAL_BAUDRATE {#classmavsdk_1_1_mavsdk_1a870d15142914f1db564c12f385d5489b} + +```cpp +constexpr int mavsdk::Mavsdk::DEFAULT_SERIAL_BAUDRATE = 57600 +``` + + +Default serial baudrate. + + +### DEFAULT_TIMEOUT_S {#classmavsdk_1_1_mavsdk_1a74f7b4d32d9551bb9c11ce8668f634a6} + +```cpp +constexpr double mavsdk::Mavsdk::DEFAULT_TIMEOUT_S = 0.5 +``` + + +Default internal timeout in seconds. + diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_mavsdk_1_1_configuration.md b/docs/en/cpp/api_reference/classmavsdk_1_1_mavsdk_1_1_configuration.md new file mode 100644 index 000000000..74ff60acc --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_mavsdk_1_1_configuration.md @@ -0,0 +1,177 @@ +# mavsdk::Mavsdk::Configuration Class Reference +`#include: mavsdk.h` + +---- + + +Possible configurations. + + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Configuration](#classmavsdk_1_1_mavsdk_1_1_configuration_1a10477130d041107e76efd1f94e65b503) (uint8_t system_id, uint8_t component_id, bool always_send_heartbeats) | Create new [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) via manually configured system and component ID. +  | [Configuration](#classmavsdk_1_1_mavsdk_1_1_configuration_1abcc015ee6be8abc2da2c967bbbda9fed) ([ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) component_type) | Create new [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) using a component type. In this mode, the system and component ID will be automatically chosen. +  | [Configuration](#classmavsdk_1_1_mavsdk_1_1_configuration_1a1a65e2e31f06bec1f6692a933c95b03c) ()=delete | +  | [~Configuration](#classmavsdk_1_1_mavsdk_1_1_configuration_1a31cad2329ee14898752638d9c3759da9) ()=default | +uint8_t | [get_system_id](#classmavsdk_1_1_mavsdk_1_1_configuration_1a0497bdda816b674b1418ab07889ca781) () const | Get the system id of this configuration. +void | [set_system_id](#classmavsdk_1_1_mavsdk_1_1_configuration_1a28f495bce2cf89ca3c52bdfa938b1761) (uint8_t system_id) | Set the system id of this configuration. +uint8_t | [get_component_id](#classmavsdk_1_1_mavsdk_1_1_configuration_1adfcae3d5b6f047ad24d9c24983375e97) () const | Get the component id of this configuration. +void | [set_component_id](#classmavsdk_1_1_mavsdk_1_1_configuration_1aa590fbafa8ca104e1a004ca537f5798e) (uint8_t component_id) | Set the component id of this configuration. +bool | [get_always_send_heartbeats](#classmavsdk_1_1_mavsdk_1_1_configuration_1a0aa9008fe5a7498f374dbd2adad5f137) () const | Get whether to send heartbeats by default. +void | [set_always_send_heartbeats](#classmavsdk_1_1_mavsdk_1_1_configuration_1a0ad68b52763e205012b34faa5120a792) (bool always_send_heartbeats) | Set whether to send heartbeats by default. +[ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) | [get_component_type](#classmavsdk_1_1_mavsdk_1_1_configuration_1a81d3645816f8a3072044498c3f539d12) () const | Component type of this configuration, used for automatic ID set. +void | [set_component_type](#classmavsdk_1_1_mavsdk_1_1_configuration_1a06461b86734eaa9544e80a4a907c9754) ([ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) component_type) | Set the component type of this configuration. + + +## Constructor & Destructor Documentation + + +### Configuration() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a10477130d041107e76efd1f94e65b503} +```cpp +mavsdk::Mavsdk::Configuration::Configuration(uint8_t system_id, uint8_t component_id, bool always_send_heartbeats) +``` + + +Create new [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) via manually configured system and component ID. + + +**Parameters** + +* uint8_t **system_id** - the system id to store in this configuration +* uint8_t **component_id** - the component id to store in this configuration +* bool **always_send_heartbeats** - send heartbeats by default even without a system connected + +### Configuration() {#classmavsdk_1_1_mavsdk_1_1_configuration_1abcc015ee6be8abc2da2c967bbbda9fed} +```cpp +mavsdk::Mavsdk::Configuration::Configuration(ComponentType component_type) +``` + + +Create new [Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) using a component type. In this mode, the system and component ID will be automatically chosen. + + +**Parameters** + +* [ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) **component_type** - the component type, used for automatically choosing ids. + +### Configuration() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a1a65e2e31f06bec1f6692a933c95b03c} +```cpp +mavsdk::Mavsdk::Configuration::Configuration()=delete +``` + + +### ~Configuration() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a31cad2329ee14898752638d9c3759da9} +```cpp +mavsdk::Mavsdk::Configuration::~Configuration()=default +``` + + +## Member Function Documentation + + +### get_system_id() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a0497bdda816b674b1418ab07889ca781} +```cpp +uint8_t mavsdk::Mavsdk::Configuration::get_system_id() const +``` + + +Get the system id of this configuration. + + +**Returns** + + uint8_t - `uint8_t` the system id stored in this configuration, from 1-255 + +### set_system_id() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a28f495bce2cf89ca3c52bdfa938b1761} +```cpp +void mavsdk::Mavsdk::Configuration::set_system_id(uint8_t system_id) +``` + + +Set the system id of this configuration. + + +**Parameters** + +* uint8_t **system_id** - + +### get_component_id() {#classmavsdk_1_1_mavsdk_1_1_configuration_1adfcae3d5b6f047ad24d9c24983375e97} +```cpp +uint8_t mavsdk::Mavsdk::Configuration::get_component_id() const +``` + + +Get the component id of this configuration. + + +**Returns** + + uint8_t - `uint8_t` the component id stored in this configuration,from 1-255 + +### set_component_id() {#classmavsdk_1_1_mavsdk_1_1_configuration_1aa590fbafa8ca104e1a004ca537f5798e} +```cpp +void mavsdk::Mavsdk::Configuration::set_component_id(uint8_t component_id) +``` + + +Set the component id of this configuration. + + +**Parameters** + +* uint8_t **component_id** - + +### get_always_send_heartbeats() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a0aa9008fe5a7498f374dbd2adad5f137} +```cpp +bool mavsdk::Mavsdk::Configuration::get_always_send_heartbeats() const +``` + + +Get whether to send heartbeats by default. + + +**Returns** + + bool - whether to always send heartbeats + +### set_always_send_heartbeats() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a0ad68b52763e205012b34faa5120a792} +```cpp +void mavsdk::Mavsdk::Configuration::set_always_send_heartbeats(bool always_send_heartbeats) +``` + + +Set whether to send heartbeats by default. + + +**Parameters** + +* bool **always_send_heartbeats** - + +### get_component_type() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a81d3645816f8a3072044498c3f539d12} +```cpp +ComponentType mavsdk::Mavsdk::Configuration::get_component_type() const +``` + + +Component type of this configuration, used for automatic ID set. + + +**Returns** + + [ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) - + +### set_component_type() {#classmavsdk_1_1_mavsdk_1_1_configuration_1a06461b86734eaa9544e80a4a907c9754} +```cpp +void mavsdk::Mavsdk::Configuration::set_component_type(ComponentType component_type) +``` + + +Set the component type of this configuration. + + +**Parameters** + +* [ComponentType](classmavsdk_1_1_mavsdk.md#classmavsdk_1_1_mavsdk_1ac9e9d48bbf840dad8705323b224b1746) **component_type** - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_mission.md b/docs/en/cpp/api_reference/classmavsdk_1_1_mission.md new file mode 100644 index 000000000..b3bca7e41 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_mission.md @@ -0,0 +1,606 @@ +# mavsdk::Mission Class Reference +`#include: mission.h` + +---- + + +Enable waypoint missions. + + +## Data Structures + + +struct [MissionItem](structmavsdk_1_1_mission_1_1_mission_item.md) + +struct [MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) + +struct [MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md) + +struct [ProgressData](structmavsdk_1_1_mission_1_1_progress_data.md) + +struct [ProgressDataOrMission](structmavsdk_1_1_mission_1_1_progress_data_or_mission.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | Possible results returned for action requests. +std::function< void([Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6))> [ResultCallback](#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) | Callback type for asynchronous [Mission](classmavsdk_1_1_mission.md) calls. +std::function< void([Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), [ProgressData](structmavsdk_1_1_mission_1_1_progress_data.md))> [UploadMissionWithProgressCallback](#classmavsdk_1_1_mission_1a559c82c81b3b7694973da8a65af24837) | Callback type for upload_mission_with_progress_async. +std::function< void([Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), [MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md))> [DownloadMissionCallback](#classmavsdk_1_1_mission_1af40f70b9b4c91aa280bf75fbfc333b3b) | Callback type for download_mission_async. +std::function< void([Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), [ProgressDataOrMission](structmavsdk_1_1_mission_1_1_progress_data_or_mission.md))> [DownloadMissionWithProgressCallback](#classmavsdk_1_1_mission_1ae73dbe775ceaba81183cebdaa1b6779e) | Callback type for download_mission_with_progress_async. +std::function< void([MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md))> [MissionProgressCallback](#classmavsdk_1_1_mission_1a67e8d00b1b20affca59fd4338c34c0e2) | Callback type for subscribe_mission_progress. +[Handle](classmavsdk_1_1_handle.md)< [MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md) > [MissionProgressHandle](#classmavsdk_1_1_mission_1aded0ba06c787ad2f30f401a30b240c8a) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_mission_progress. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Mission](#classmavsdk_1_1_mission_1ab02ae9aada51b483e45d88948fe62c29) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Mission](#classmavsdk_1_1_mission_1a5222f05ac0c65c7455f19e136b8fcb22) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Mission](#classmavsdk_1_1_mission_1ab8ddd47439bbc63a0a6b175fdad0368e) () override | Destructor (internal use only). +  | [Mission](#classmavsdk_1_1_mission_1ab4a4a26254fdff0e3f3872f32479fe1c) (const [Mission](classmavsdk_1_1_mission.md) & other) | Copy constructor. +void | [upload_mission_async](#classmavsdk_1_1_mission_1a250fc4758d47ec12e025c327dc0eb482) ([MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) mission_plan, const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) callback) | Upload a list of mission items to the system. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [upload_mission](#classmavsdk_1_1_mission_1a38274b1c1509375a182c44711ee9f7b1) ([MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) mission_plan)const | Upload a list of mission items to the system. +void | [upload_mission_with_progress_async](#classmavsdk_1_1_mission_1a0faa587e80a59e8c40d7fc135650749c) ([MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) mission_plan, const [UploadMissionWithProgressCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a559c82c81b3b7694973da8a65af24837) & callback) | Upload a list of mission items to the system and report upload progress. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [cancel_mission_upload](#classmavsdk_1_1_mission_1ab82609426bef51202b2107d33412378c) () const | Cancel an ongoing mission upload. +void | [download_mission_async](#classmavsdk_1_1_mission_1a04e7e7074273b4591a820894c5c4ad43) (const [DownloadMissionCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1af40f70b9b4c91aa280bf75fbfc333b3b) callback) | Download a list of mission items from the system (asynchronous). +std::pair< [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), [Mission::MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) > | [download_mission](#classmavsdk_1_1_mission_1a23e9f7da32f42bcce7ef16ea8044fe53) () const | Download a list of mission items from the system (asynchronous). +void | [download_mission_with_progress_async](#classmavsdk_1_1_mission_1a5b6b93482f2599c08d75d27a31a4f1d9) (const [DownloadMissionWithProgressCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ae73dbe775ceaba81183cebdaa1b6779e) & callback) | Download a list of mission items from the system (asynchronous) and report progress. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [cancel_mission_download](#classmavsdk_1_1_mission_1a0eaaeffe0354156b5abed892f0950bcc) () const | Cancel an ongoing mission download. +void | [start_mission_async](#classmavsdk_1_1_mission_1a31ca2fc6b9fe4802dbc3fbebad0bb5d7) (const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) callback) | Start the mission. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [start_mission](#classmavsdk_1_1_mission_1a927fecc7734810d01cc218153780e6e3) () const | Start the mission. +void | [pause_mission_async](#classmavsdk_1_1_mission_1a4c5679369e215ef21901fc7ffe1ce32b) (const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) callback) | Pause the mission. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [pause_mission](#classmavsdk_1_1_mission_1ab569500d992d6d859c1c35052db07315) () const | Pause the mission. +void | [clear_mission_async](#classmavsdk_1_1_mission_1a51d04a808743915e3cac7f35fbd5038f) (const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) callback) | Clear the mission saved on the vehicle. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [clear_mission](#classmavsdk_1_1_mission_1a3c3f5eac6e864873f4bb0390d1ee9306) () const | Clear the mission saved on the vehicle. +void | [set_current_mission_item_async](#classmavsdk_1_1_mission_1a81aa356215cb2131c2480dc121a6af7b) (int32_t index, const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) callback) | Sets the mission item index to go to. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [set_current_mission_item](#classmavsdk_1_1_mission_1a419397edcf63771ddd59a6af231bc8d2) (int32_t index)const | Sets the mission item index to go to. +std::pair< [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), bool > | [is_mission_finished](#classmavsdk_1_1_mission_1a1ecf4f8798ab9ae96882dfbd34f23466) () const | Check if the mission has been finished. +[MissionProgressHandle](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1aded0ba06c787ad2f30f401a30b240c8a) | [subscribe_mission_progress](#classmavsdk_1_1_mission_1ac6d3e78de0ea2e6c1db2eaa5f3418660) (const [MissionProgressCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a67e8d00b1b20affca59fd4338c34c0e2) & callback) | Subscribe to mission progress updates. +void | [unsubscribe_mission_progress](#classmavsdk_1_1_mission_1a2b8bc4dd210506a703afa926f8406880) ([MissionProgressHandle](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1aded0ba06c787ad2f30f401a30b240c8a) handle) | Unsubscribe from subscribe_mission_progress. +[MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md) | [mission_progress](#classmavsdk_1_1_mission_1a5570443e7c1f08cff1759980ff44b40e) () const | Poll for '[MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md)' (blocking). +std::pair< [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), bool > | [get_return_to_launch_after_mission](#classmavsdk_1_1_mission_1a38d17268541ba81d494976caa4a08661) () const | Get whether to trigger Return-to-Launch (RTL) after mission is complete. +[Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) | [set_return_to_launch_after_mission](#classmavsdk_1_1_mission_1ab4adb09283b3fa64a8829f9a6e34cf37) (bool enable)const | Set whether to trigger Return-to-Launch (RTL) after the mission is complete. +const [Mission](classmavsdk_1_1_mission.md) & | [operator=](#classmavsdk_1_1_mission_1a30d49ea769f358cb4e4fe3056728838c) (const [Mission](classmavsdk_1_1_mission.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Mission() {#classmavsdk_1_1_mission_1ab02ae9aada51b483e45d88948fe62c29} +```cpp +mavsdk::Mission::Mission(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mission = Mission(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Mission() {#classmavsdk_1_1_mission_1a5222f05ac0c65c7455f19e136b8fcb22} +```cpp +mavsdk::Mission::Mission(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mission = Mission(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Mission() {#classmavsdk_1_1_mission_1ab8ddd47439bbc63a0a6b175fdad0368e} +```cpp +mavsdk::Mission::~Mission() override +``` + + +Destructor (internal use only). + + +### Mission() {#classmavsdk_1_1_mission_1ab4a4a26254fdff0e3f3872f32479fe1c} +```cpp +mavsdk::Mission::Mission(const Mission &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Mission](classmavsdk_1_1_mission.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591} + +```cpp +using mavsdk::Mission::ResultCallback = std::function +``` + + +Callback type for asynchronous [Mission](classmavsdk_1_1_mission.md) calls. + + +### typedef UploadMissionWithProgressCallback {#classmavsdk_1_1_mission_1a559c82c81b3b7694973da8a65af24837} + +```cpp +using mavsdk::Mission::UploadMissionWithProgressCallback = std::function +``` + + +Callback type for upload_mission_with_progress_async. + + +### typedef DownloadMissionCallback {#classmavsdk_1_1_mission_1af40f70b9b4c91aa280bf75fbfc333b3b} + +```cpp +using mavsdk::Mission::DownloadMissionCallback = std::function +``` + + +Callback type for download_mission_async. + + +### typedef DownloadMissionWithProgressCallback {#classmavsdk_1_1_mission_1ae73dbe775ceaba81183cebdaa1b6779e} + +```cpp +using mavsdk::Mission::DownloadMissionWithProgressCallback = std::function +``` + + +Callback type for download_mission_with_progress_async. + + +### typedef MissionProgressCallback {#classmavsdk_1_1_mission_1a67e8d00b1b20affca59fd4338c34c0e2} + +```cpp +using mavsdk::Mission::MissionProgressCallback = std::function +``` + + +Callback type for subscribe_mission_progress. + + +### typedef MissionProgressHandle {#classmavsdk_1_1_mission_1aded0ba06c787ad2f30f401a30b240c8a} + +```cpp +using mavsdk::Mission::MissionProgressHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_mission_progress. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6} + + +Possible results returned for action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `Error` | Error. + `TooManyMissionItems` | Too many mission items in the mission. + `Busy` | Vehicle is busy. + `Timeout` | Request timed out. + `InvalidArgument` | Invalid argument. + `Unsupported` | [Mission](classmavsdk_1_1_mission.md) downloaded from the system is not supported. + `NoMissionAvailable` | No mission available on the system. + `UnsupportedMissionCmd` | Unsupported mission command. + `TransferCancelled` | [Mission](classmavsdk_1_1_mission.md) transfer (upload or download) has been cancelled. + `NoSystem` | No system connected. + `Next` | Intermediate message showing progress. + `Denied` | Request denied. + `ProtocolError` | There was a protocol error. + `IntMessagesNotSupported` | The system does not support the MISSION_INT protocol. + +## Member Function Documentation + + +### upload_mission_async() {#classmavsdk_1_1_mission_1a250fc4758d47ec12e025c327dc0eb482} +```cpp +void mavsdk::Mission::upload_mission_async(MissionPlan mission_plan, const ResultCallback callback) +``` + + +Upload a list of mission items to the system. + +The mission items are uploaded to a drone. Once uploaded the mission can be started and executed even if the connection is lost. + + +This function is non-blocking. See 'upload_mission' for the blocking counterpart. + +**Parameters** + +* [MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) **mission_plan** - +* const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) **callback** - + +### upload_mission() {#classmavsdk_1_1_mission_1a38274b1c1509375a182c44711ee9f7b1} +```cpp +Result mavsdk::Mission::upload_mission(MissionPlan mission_plan) const +``` + + +Upload a list of mission items to the system. + +The mission items are uploaded to a drone. Once uploaded the mission can be started and executed even if the connection is lost. + + +This function is blocking. See 'upload_mission_async' for the non-blocking counterpart. + +**Parameters** + +* [MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) **mission_plan** - + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### upload_mission_with_progress_async() {#classmavsdk_1_1_mission_1a0faa587e80a59e8c40d7fc135650749c} +```cpp +void mavsdk::Mission::upload_mission_with_progress_async(MissionPlan mission_plan, const UploadMissionWithProgressCallback &callback) +``` + + +Upload a list of mission items to the system and report upload progress. + +The mission items are uploaded to a drone. Once uploaded the mission can be started and executed even if the connection is lost. + +**Parameters** + +* [MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) **mission_plan** - +* const [UploadMissionWithProgressCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a559c82c81b3b7694973da8a65af24837)& **callback** - + +### cancel_mission_upload() {#classmavsdk_1_1_mission_1ab82609426bef51202b2107d33412378c} +```cpp +Result mavsdk::Mission::cancel_mission_upload() const +``` + + +Cancel an ongoing mission upload. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### download_mission_async() {#classmavsdk_1_1_mission_1a04e7e7074273b4591a820894c5c4ad43} +```cpp +void mavsdk::Mission::download_mission_async(const DownloadMissionCallback callback) +``` + + +Download a list of mission items from the system (asynchronous). + +Will fail if any of the downloaded mission items are not supported by the MAVSDK API. + + +This function is non-blocking. See 'download_mission' for the blocking counterpart. + +**Parameters** + +* const [DownloadMissionCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1af40f70b9b4c91aa280bf75fbfc333b3b) **callback** - + +### download_mission() {#classmavsdk_1_1_mission_1a23e9f7da32f42bcce7ef16ea8044fe53} +```cpp +std::pair mavsdk::Mission::download_mission() const +``` + + +Download a list of mission items from the system (asynchronous). + +Will fail if any of the downloaded mission items are not supported by the MAVSDK API. + + +This function is blocking. See 'download_mission_async' for the non-blocking counterpart. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), [Mission::MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) > - Result of request. + +### download_mission_with_progress_async() {#classmavsdk_1_1_mission_1a5b6b93482f2599c08d75d27a31a4f1d9} +```cpp +void mavsdk::Mission::download_mission_with_progress_async(const DownloadMissionWithProgressCallback &callback) +``` + + +Download a list of mission items from the system (asynchronous) and report progress. + +Will fail if any of the downloaded mission items are not supported by the MAVSDK API. + +**Parameters** + +* const [DownloadMissionWithProgressCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ae73dbe775ceaba81183cebdaa1b6779e)& **callback** - + +### cancel_mission_download() {#classmavsdk_1_1_mission_1a0eaaeffe0354156b5abed892f0950bcc} +```cpp +Result mavsdk::Mission::cancel_mission_download() const +``` + + +Cancel an ongoing mission download. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### start_mission_async() {#classmavsdk_1_1_mission_1a31ca2fc6b9fe4802dbc3fbebad0bb5d7} +```cpp +void mavsdk::Mission::start_mission_async(const ResultCallback callback) +``` + + +Start the mission. + +A mission must be uploaded to the vehicle before this can be called. + + +This function is non-blocking. See 'start_mission' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) **callback** - + +### start_mission() {#classmavsdk_1_1_mission_1a927fecc7734810d01cc218153780e6e3} +```cpp +Result mavsdk::Mission::start_mission() const +``` + + +Start the mission. + +A mission must be uploaded to the vehicle before this can be called. + + +This function is blocking. See 'start_mission_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### pause_mission_async() {#classmavsdk_1_1_mission_1a4c5679369e215ef21901fc7ffe1ce32b} +```cpp +void mavsdk::Mission::pause_mission_async(const ResultCallback callback) +``` + + +Pause the mission. + +Pausing the mission puts the vehicle into [HOLD mode](https://docs.px4.io/en/flight_modes/hold.html). A multicopter should just hover at the spot while a fixedwing vehicle should loiter around the location where it paused. + + +This function is non-blocking. See 'pause_mission' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) **callback** - + +### pause_mission() {#classmavsdk_1_1_mission_1ab569500d992d6d859c1c35052db07315} +```cpp +Result mavsdk::Mission::pause_mission() const +``` + + +Pause the mission. + +Pausing the mission puts the vehicle into [HOLD mode](https://docs.px4.io/en/flight_modes/hold.html). A multicopter should just hover at the spot while a fixedwing vehicle should loiter around the location where it paused. + + +This function is blocking. See 'pause_mission_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### clear_mission_async() {#classmavsdk_1_1_mission_1a51d04a808743915e3cac7f35fbd5038f} +```cpp +void mavsdk::Mission::clear_mission_async(const ResultCallback callback) +``` + + +Clear the mission saved on the vehicle. + +This function is non-blocking. See 'clear_mission' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) **callback** - + +### clear_mission() {#classmavsdk_1_1_mission_1a3c3f5eac6e864873f4bb0390d1ee9306} +```cpp +Result mavsdk::Mission::clear_mission() const +``` + + +Clear the mission saved on the vehicle. + +This function is blocking. See 'clear_mission_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### set_current_mission_item_async() {#classmavsdk_1_1_mission_1a81aa356215cb2131c2480dc121a6af7b} +```cpp +void mavsdk::Mission::set_current_mission_item_async(int32_t index, const ResultCallback callback) +``` + + +Sets the mission item index to go to. + +By setting the current index to 0, the mission is restarted from the beginning. If it is set to a specific index of a mission item, the mission will be set to this item. + + +Note that this is not necessarily true for general missions using MAVLink if loop counters are used. + + +This function is non-blocking. See 'set_current_mission_item' for the blocking counterpart. + +**Parameters** + +* int32_t **index** - +* const [ResultCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a30091e79f5b67ade138e5be9d65b6591) **callback** - + +### set_current_mission_item() {#classmavsdk_1_1_mission_1a419397edcf63771ddd59a6af231bc8d2} +```cpp +Result mavsdk::Mission::set_current_mission_item(int32_t index) const +``` + + +Sets the mission item index to go to. + +By setting the current index to 0, the mission is restarted from the beginning. If it is set to a specific index of a mission item, the mission will be set to this item. + + +Note that this is not necessarily true for general missions using MAVLink if loop counters are used. + + +This function is blocking. See 'set_current_mission_item_async' for the non-blocking counterpart. + +**Parameters** + +* int32_t **index** - + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### is_mission_finished() {#classmavsdk_1_1_mission_1a1ecf4f8798ab9ae96882dfbd34f23466} +```cpp +std::pair mavsdk::Mission::is_mission_finished() const +``` + + +Check if the mission has been finished. + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), bool > - Result of request. + +### subscribe_mission_progress() {#classmavsdk_1_1_mission_1ac6d3e78de0ea2e6c1db2eaa5f3418660} +```cpp +MissionProgressHandle mavsdk::Mission::subscribe_mission_progress(const MissionProgressCallback &callback) +``` + + +Subscribe to mission progress updates. + + +**Parameters** + +* const [MissionProgressCallback](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1a67e8d00b1b20affca59fd4338c34c0e2)& **callback** - + +**Returns** + + [MissionProgressHandle](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1aded0ba06c787ad2f30f401a30b240c8a) - + +### unsubscribe_mission_progress() {#classmavsdk_1_1_mission_1a2b8bc4dd210506a703afa926f8406880} +```cpp +void mavsdk::Mission::unsubscribe_mission_progress(MissionProgressHandle handle) +``` + + +Unsubscribe from subscribe_mission_progress. + + +**Parameters** + +* [MissionProgressHandle](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1aded0ba06c787ad2f30f401a30b240c8a) **handle** - + +### mission_progress() {#classmavsdk_1_1_mission_1a5570443e7c1f08cff1759980ff44b40e} +```cpp +MissionProgress mavsdk::Mission::mission_progress() const +``` + + +Poll for '[MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md)' (blocking). + + +**Returns** + + [MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md) - One [MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md) update. + +### get_return_to_launch_after_mission() {#classmavsdk_1_1_mission_1a38d17268541ba81d494976caa4a08661} +```cpp +std::pair mavsdk::Mission::get_return_to_launch_after_mission() const +``` + + +Get whether to trigger Return-to-Launch (RTL) after mission is complete. + +Before getting this option, it needs to be set, or a mission needs to be downloaded. + + +This function is blocking. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6), bool > - Result of request. + +### set_return_to_launch_after_mission() {#classmavsdk_1_1_mission_1ab4adb09283b3fa64a8829f9a6e34cf37} +```cpp +Result mavsdk::Mission::set_return_to_launch_after_mission(bool enable) const +``` + + +Set whether to trigger Return-to-Launch (RTL) after the mission is complete. + +This will only take effect for the next mission upload, meaning that the mission may have to be uploaded again. + + +This function is blocking. + +**Parameters** + +* bool **enable** - + +**Returns** + + [Result](classmavsdk_1_1_mission.md#classmavsdk_1_1_mission_1ab3114c63db76bdc37460939a1f3316f6) - Result of request. + +### operator=() {#classmavsdk_1_1_mission_1a30d49ea769f358cb4e4fe3056728838c} +```cpp +const Mission& mavsdk::Mission::operator=(const Mission &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Mission](classmavsdk_1_1_mission.md)& - + +**Returns** + + const [Mission](classmavsdk_1_1_mission.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_mission_raw.md b/docs/en/cpp/api_reference/classmavsdk_1_1_mission_raw.md new file mode 100644 index 000000000..d8c42bd7a --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_mission_raw.md @@ -0,0 +1,673 @@ +# mavsdk::MissionRaw Class Reference +`#include: mission_raw.h` + +---- + + +Enable raw missions as exposed by MAVLink. + + +## Data Structures + + +struct [MissionImportData](structmavsdk_1_1_mission_raw_1_1_mission_import_data.md) + +struct [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) + +struct [MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | Possible results returned for action requests. +std::function< void([Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf))> [ResultCallback](#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) | Callback type for asynchronous [MissionRaw](classmavsdk_1_1_mission_raw.md) calls. +std::function< void([Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf), std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) >)> [DownloadMissionCallback](#classmavsdk_1_1_mission_raw_1a016633e6338744da02ac7cb6da28880a) | Callback type for download_mission_async. +std::function< void([MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md))> [MissionProgressCallback](#classmavsdk_1_1_mission_raw_1a9dd594878925da494b4add6acc3184fc) | Callback type for subscribe_mission_progress. +[Handle](classmavsdk_1_1_handle.md)< [MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md) > [MissionProgressHandle](#classmavsdk_1_1_mission_raw_1a34e0eaf9922daa5d27d2b044eae7885c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_mission_progress. +std::function< void(bool)> [MissionChangedCallback](#classmavsdk_1_1_mission_raw_1ac22d81eefc5e883cdb6baf792a7487e6) | Callback type for subscribe_mission_changed. +[Handle](classmavsdk_1_1_handle.md)< bool > [MissionChangedHandle](#classmavsdk_1_1_mission_raw_1a46da6d8a53822fd5fbd7b2a414624c5c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_mission_changed. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [MissionRaw](#classmavsdk_1_1_mission_raw_1ad03476f12988a12808a8c4385c7a7344) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [MissionRaw](#classmavsdk_1_1_mission_raw_1aec90f3e32d7366f3e27f025bb62c1e78) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~MissionRaw](#classmavsdk_1_1_mission_raw_1a1c7e90261ab67337d6b570cb3f9bfdb9) () override | Destructor (internal use only). +  | [MissionRaw](#classmavsdk_1_1_mission_raw_1a91216322f0b6139d5ba83127f2ef1f12) (const [MissionRaw](classmavsdk_1_1_mission_raw.md) & other) | Copy constructor. +void | [upload_mission_async](#classmavsdk_1_1_mission_raw_1a77cc5df3362b7ab4cbc94e5bc9707609) (std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > mission_items, const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) callback) | Upload a list of raw mission items to the system. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [upload_mission](#classmavsdk_1_1_mission_raw_1ad4f5c2ccfb2249f6e11c9533c263926a) (std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > mission_items)const | Upload a list of raw mission items to the system. +void | [upload_geofence_async](#classmavsdk_1_1_mission_raw_1abae3246480b334c319cfb8a9c0d2d8c6) (std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > mission_items, const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) callback) | Upload a list of geofence items to the system. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [upload_geofence](#classmavsdk_1_1_mission_raw_1ac65fe0675332c318c5c07be5a8d22ac7) (std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > mission_items)const | Upload a list of geofence items to the system. +void | [upload_rally_points_async](#classmavsdk_1_1_mission_raw_1a2c5d52246a8ad13151fcfedeab2859e5) (std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > mission_items, const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) callback) | Upload a list of rally point items to the system. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [upload_rally_points](#classmavsdk_1_1_mission_raw_1a02fc4f293a8094df5dbd7ea0d2184739) (std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > mission_items)const | Upload a list of rally point items to the system. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [cancel_mission_upload](#classmavsdk_1_1_mission_raw_1aa353e3fa6e836305248be131dbe19273) () const | Cancel an ongoing mission upload. +void | [download_mission_async](#classmavsdk_1_1_mission_raw_1a7e27b0fb58889ca5cb1202276c0e0669) (const [DownloadMissionCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a016633e6338744da02ac7cb6da28880a) callback) | Download a list of raw mission items from the system (asynchronous). +std::pair< [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf), std::vector< [MissionRaw::MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > > | [download_mission](#classmavsdk_1_1_mission_raw_1a2cc470785c486d1b7fdaaa2e3fbff809) () const | Download a list of raw mission items from the system (asynchronous). +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [cancel_mission_download](#classmavsdk_1_1_mission_raw_1a7c554999ca66c5434ef1fa334d949e5a) () const | Cancel an ongoing mission download. +void | [start_mission_async](#classmavsdk_1_1_mission_raw_1acca64e0a08978f5721be8fa955b1bb0f) (const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) callback) | Start the mission. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [start_mission](#classmavsdk_1_1_mission_raw_1af1b010b0f28b284a94eba88198ee15f8) () const | Start the mission. +void | [pause_mission_async](#classmavsdk_1_1_mission_raw_1aae0eedbe4216266eb6e2115cd03c61a1) (const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) callback) | Pause the mission. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [pause_mission](#classmavsdk_1_1_mission_raw_1abda483b0659a6c0397c588341688bb39) () const | Pause the mission. +void | [clear_mission_async](#classmavsdk_1_1_mission_raw_1acf6bf293facbd45fa1126e52e99248a2) (const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) callback) | Clear the mission saved on the vehicle. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [clear_mission](#classmavsdk_1_1_mission_raw_1ab10f8fcaa0f6d3e0f844b7430d8d14c2) () const | Clear the mission saved on the vehicle. +void | [set_current_mission_item_async](#classmavsdk_1_1_mission_raw_1a5540d6ca691d60ef19b66e303bae7f87) (int32_t index, const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) callback) | Sets the raw mission item index to go to. +[Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) | [set_current_mission_item](#classmavsdk_1_1_mission_raw_1ada9aa2abf79ebfc8e1d10de8e85e91ae) (int32_t index)const | Sets the raw mission item index to go to. +[MissionProgressHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a34e0eaf9922daa5d27d2b044eae7885c) | [subscribe_mission_progress](#classmavsdk_1_1_mission_raw_1a88a3c4b26418e734a547f251706988d2) (const [MissionProgressCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a9dd594878925da494b4add6acc3184fc) & callback) | Subscribe to mission progress updates. +void | [unsubscribe_mission_progress](#classmavsdk_1_1_mission_raw_1ac46f08b52706f45956cf3b01df381835) ([MissionProgressHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a34e0eaf9922daa5d27d2b044eae7885c) handle) | Unsubscribe from subscribe_mission_progress. +[MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md) | [mission_progress](#classmavsdk_1_1_mission_raw_1a3200dea1094926a4dd54f079f21b94e1) () const | Poll for '[MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md)' (blocking). +[MissionChangedHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a46da6d8a53822fd5fbd7b2a414624c5c) | [subscribe_mission_changed](#classmavsdk_1_1_mission_raw_1ad4a2991e1a8f9423270af4220309edfb) (const [MissionChangedCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1ac22d81eefc5e883cdb6baf792a7487e6) & callback) |
  • Subscribes to mission changed.

+void | [unsubscribe_mission_changed](#classmavsdk_1_1_mission_raw_1ac6cd7602b2e5b46ad0ea1cf8bf602a0c) ([MissionChangedHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a46da6d8a53822fd5fbd7b2a414624c5c) handle) | Unsubscribe from subscribe_mission_changed. +std::pair< [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf), [MissionRaw::MissionImportData](structmavsdk_1_1_mission_raw_1_1_mission_import_data.md) > | [import_qgroundcontrol_mission](#classmavsdk_1_1_mission_raw_1a43345b21cf9dedf594f62ec7ad963ce8) (std::string qgc_plan_path)const | Import a QGroundControl missions in JSON .plan format, from a file. +std::pair< [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf), [MissionRaw::MissionImportData](structmavsdk_1_1_mission_raw_1_1_mission_import_data.md) > | [import_qgroundcontrol_mission_from_string](#classmavsdk_1_1_mission_raw_1ab0a0d18b65beced6112b2f27556fae37) (std::string qgc_plan)const | Import a QGroundControl missions in JSON .plan format, from a string. +const [MissionRaw](classmavsdk_1_1_mission_raw.md) & | [operator=](#classmavsdk_1_1_mission_raw_1a0cfdf21bad5478c91cf18207b6a21ad3) (const [MissionRaw](classmavsdk_1_1_mission_raw.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### MissionRaw() {#classmavsdk_1_1_mission_raw_1ad03476f12988a12808a8c4385c7a7344} +```cpp +mavsdk::MissionRaw::MissionRaw(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mission_raw = MissionRaw(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### MissionRaw() {#classmavsdk_1_1_mission_raw_1aec90f3e32d7366f3e27f025bb62c1e78} +```cpp +mavsdk::MissionRaw::MissionRaw(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mission_raw = MissionRaw(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~MissionRaw() {#classmavsdk_1_1_mission_raw_1a1c7e90261ab67337d6b570cb3f9bfdb9} +```cpp +mavsdk::MissionRaw::~MissionRaw() override +``` + + +Destructor (internal use only). + + +### MissionRaw() {#classmavsdk_1_1_mission_raw_1a91216322f0b6139d5ba83127f2ef1f12} +```cpp +mavsdk::MissionRaw::MissionRaw(const MissionRaw &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [MissionRaw](classmavsdk_1_1_mission_raw.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564} + +```cpp +using mavsdk::MissionRaw::ResultCallback = std::function +``` + + +Callback type for asynchronous [MissionRaw](classmavsdk_1_1_mission_raw.md) calls. + + +### typedef DownloadMissionCallback {#classmavsdk_1_1_mission_raw_1a016633e6338744da02ac7cb6da28880a} + +```cpp +using mavsdk::MissionRaw::DownloadMissionCallback = std::function)> +``` + + +Callback type for download_mission_async. + + +### typedef MissionProgressCallback {#classmavsdk_1_1_mission_raw_1a9dd594878925da494b4add6acc3184fc} + +```cpp +using mavsdk::MissionRaw::MissionProgressCallback = std::function +``` + + +Callback type for subscribe_mission_progress. + + +### typedef MissionProgressHandle {#classmavsdk_1_1_mission_raw_1a34e0eaf9922daa5d27d2b044eae7885c} + +```cpp +using mavsdk::MissionRaw::MissionProgressHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_mission_progress. + + +### typedef MissionChangedCallback {#classmavsdk_1_1_mission_raw_1ac22d81eefc5e883cdb6baf792a7487e6} + +```cpp +using mavsdk::MissionRaw::MissionChangedCallback = std::function +``` + + +Callback type for subscribe_mission_changed. + + +### typedef MissionChangedHandle {#classmavsdk_1_1_mission_raw_1a46da6d8a53822fd5fbd7b2a414624c5c} + +```cpp +using mavsdk::MissionRaw::MissionChangedHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_mission_changed. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf} + + +Possible results returned for action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `Error` | Error. + `TooManyMissionItems` | Too many mission items in the mission. + `Busy` | Vehicle is busy. + `Timeout` | Request timed out. + `InvalidArgument` | Invalid argument. + `Unsupported` | [Mission](classmavsdk_1_1_mission.md) downloaded from the system is not supported. + `NoMissionAvailable` | No mission available on the system. + `TransferCancelled` | [Mission](classmavsdk_1_1_mission.md) transfer (upload or download) has been cancelled. + `FailedToOpenQgcPlan` | Failed to open the QGroundControl plan. + `FailedToParseQgcPlan` | Failed to parse the QGroundControl plan. + `NoSystem` | No system connected. + `Denied` | Request denied. + `MissionTypeNotConsistent` | [Mission](classmavsdk_1_1_mission.md) type is not consistent. + `InvalidSequence` | The mission item sequences are not increasing correctly. + `CurrentInvalid` | The current item is not set correctly. + `ProtocolError` | There was a protocol error. + `IntMessagesNotSupported` | The system does not support the MISSION_INT protocol. + +## Member Function Documentation + + +### upload_mission_async() {#classmavsdk_1_1_mission_raw_1a77cc5df3362b7ab4cbc94e5bc9707609} +```cpp +void mavsdk::MissionRaw::upload_mission_async(std::vector< MissionItem > mission_items, const ResultCallback callback) +``` + + +Upload a list of raw mission items to the system. + +The raw mission items are uploaded to a drone. Once uploaded the mission can be started and executed even if the connection is lost. + + +This function is non-blocking. See 'upload_mission' for the blocking counterpart. + +**Parameters** + +* std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > **mission_items** - +* const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) **callback** - + +### upload_mission() {#classmavsdk_1_1_mission_raw_1ad4f5c2ccfb2249f6e11c9533c263926a} +```cpp +Result mavsdk::MissionRaw::upload_mission(std::vector< MissionItem > mission_items) const +``` + + +Upload a list of raw mission items to the system. + +The raw mission items are uploaded to a drone. Once uploaded the mission can be started and executed even if the connection is lost. + + +This function is blocking. See 'upload_mission_async' for the non-blocking counterpart. + +**Parameters** + +* std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > **mission_items** - + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### upload_geofence_async() {#classmavsdk_1_1_mission_raw_1abae3246480b334c319cfb8a9c0d2d8c6} +```cpp +void mavsdk::MissionRaw::upload_geofence_async(std::vector< MissionItem > mission_items, const ResultCallback callback) +``` + + +Upload a list of geofence items to the system. + +This function is non-blocking. See 'upload_geofence' for the blocking counterpart. + +**Parameters** + +* std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > **mission_items** - +* const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) **callback** - + +### upload_geofence() {#classmavsdk_1_1_mission_raw_1ac65fe0675332c318c5c07be5a8d22ac7} +```cpp +Result mavsdk::MissionRaw::upload_geofence(std::vector< MissionItem > mission_items) const +``` + + +Upload a list of geofence items to the system. + +This function is blocking. See 'upload_geofence_async' for the non-blocking counterpart. + +**Parameters** + +* std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > **mission_items** - + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### upload_rally_points_async() {#classmavsdk_1_1_mission_raw_1a2c5d52246a8ad13151fcfedeab2859e5} +```cpp +void mavsdk::MissionRaw::upload_rally_points_async(std::vector< MissionItem > mission_items, const ResultCallback callback) +``` + + +Upload a list of rally point items to the system. + +This function is non-blocking. See 'upload_rally_points' for the blocking counterpart. + +**Parameters** + +* std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > **mission_items** - +* const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) **callback** - + +### upload_rally_points() {#classmavsdk_1_1_mission_raw_1a02fc4f293a8094df5dbd7ea0d2184739} +```cpp +Result mavsdk::MissionRaw::upload_rally_points(std::vector< MissionItem > mission_items) const +``` + + +Upload a list of rally point items to the system. + +This function is blocking. See 'upload_rally_points_async' for the non-blocking counterpart. + +**Parameters** + +* std::vector< [MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > **mission_items** - + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### cancel_mission_upload() {#classmavsdk_1_1_mission_raw_1aa353e3fa6e836305248be131dbe19273} +```cpp +Result mavsdk::MissionRaw::cancel_mission_upload() const +``` + + +Cancel an ongoing mission upload. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### download_mission_async() {#classmavsdk_1_1_mission_raw_1a7e27b0fb58889ca5cb1202276c0e0669} +```cpp +void mavsdk::MissionRaw::download_mission_async(const DownloadMissionCallback callback) +``` + + +Download a list of raw mission items from the system (asynchronous). + +This function is non-blocking. See 'download_mission' for the blocking counterpart. + +**Parameters** + +* const [DownloadMissionCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a016633e6338744da02ac7cb6da28880a) **callback** - + +### download_mission() {#classmavsdk_1_1_mission_raw_1a2cc470785c486d1b7fdaaa2e3fbff809} +```cpp +std::pair > mavsdk::MissionRaw::download_mission() const +``` + + +Download a list of raw mission items from the system (asynchronous). + +This function is blocking. See 'download_mission_async' for the non-blocking counterpart. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf), std::vector< [MissionRaw::MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) > > - Result of request. + +### cancel_mission_download() {#classmavsdk_1_1_mission_raw_1a7c554999ca66c5434ef1fa334d949e5a} +```cpp +Result mavsdk::MissionRaw::cancel_mission_download() const +``` + + +Cancel an ongoing mission download. + +This function is blocking. + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### start_mission_async() {#classmavsdk_1_1_mission_raw_1acca64e0a08978f5721be8fa955b1bb0f} +```cpp +void mavsdk::MissionRaw::start_mission_async(const ResultCallback callback) +``` + + +Start the mission. + +A mission must be uploaded to the vehicle before this can be called. + + +This function is non-blocking. See 'start_mission' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) **callback** - + +### start_mission() {#classmavsdk_1_1_mission_raw_1af1b010b0f28b284a94eba88198ee15f8} +```cpp +Result mavsdk::MissionRaw::start_mission() const +``` + + +Start the mission. + +A mission must be uploaded to the vehicle before this can be called. + + +This function is blocking. See 'start_mission_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### pause_mission_async() {#classmavsdk_1_1_mission_raw_1aae0eedbe4216266eb6e2115cd03c61a1} +```cpp +void mavsdk::MissionRaw::pause_mission_async(const ResultCallback callback) +``` + + +Pause the mission. + +Pausing the mission puts the vehicle into [HOLD mode](https://docs.px4.io/en/flight_modes/hold.html). A multicopter should just hover at the spot while a fixedwing vehicle should loiter around the location where it paused. + + +This function is non-blocking. See 'pause_mission' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) **callback** - + +### pause_mission() {#classmavsdk_1_1_mission_raw_1abda483b0659a6c0397c588341688bb39} +```cpp +Result mavsdk::MissionRaw::pause_mission() const +``` + + +Pause the mission. + +Pausing the mission puts the vehicle into [HOLD mode](https://docs.px4.io/en/flight_modes/hold.html). A multicopter should just hover at the spot while a fixedwing vehicle should loiter around the location where it paused. + + +This function is blocking. See 'pause_mission_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### clear_mission_async() {#classmavsdk_1_1_mission_raw_1acf6bf293facbd45fa1126e52e99248a2} +```cpp +void mavsdk::MissionRaw::clear_mission_async(const ResultCallback callback) +``` + + +Clear the mission saved on the vehicle. + +This function is non-blocking. See 'clear_mission' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) **callback** - + +### clear_mission() {#classmavsdk_1_1_mission_raw_1ab10f8fcaa0f6d3e0f844b7430d8d14c2} +```cpp +Result mavsdk::MissionRaw::clear_mission() const +``` + + +Clear the mission saved on the vehicle. + +This function is blocking. See 'clear_mission_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### set_current_mission_item_async() {#classmavsdk_1_1_mission_raw_1a5540d6ca691d60ef19b66e303bae7f87} +```cpp +void mavsdk::MissionRaw::set_current_mission_item_async(int32_t index, const ResultCallback callback) +``` + + +Sets the raw mission item index to go to. + +By setting the current index to 0, the mission is restarted from the beginning. If it is set to a specific index of a raw mission item, the mission will be set to this item. + + +This function is non-blocking. See 'set_current_mission_item' for the blocking counterpart. + +**Parameters** + +* int32_t **index** - +* const [ResultCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a1a36a84f17dca07e1da49c13abbc9564) **callback** - + +### set_current_mission_item() {#classmavsdk_1_1_mission_raw_1ada9aa2abf79ebfc8e1d10de8e85e91ae} +```cpp +Result mavsdk::MissionRaw::set_current_mission_item(int32_t index) const +``` + + +Sets the raw mission item index to go to. + +By setting the current index to 0, the mission is restarted from the beginning. If it is set to a specific index of a raw mission item, the mission will be set to this item. + + +This function is blocking. See 'set_current_mission_item_async' for the non-blocking counterpart. + +**Parameters** + +* int32_t **index** - + +**Returns** + + [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf) - Result of request. + +### subscribe_mission_progress() {#classmavsdk_1_1_mission_raw_1a88a3c4b26418e734a547f251706988d2} +```cpp +MissionProgressHandle mavsdk::MissionRaw::subscribe_mission_progress(const MissionProgressCallback &callback) +``` + + +Subscribe to mission progress updates. + + +**Parameters** + +* const [MissionProgressCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a9dd594878925da494b4add6acc3184fc)& **callback** - + +**Returns** + + [MissionProgressHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a34e0eaf9922daa5d27d2b044eae7885c) - + +### unsubscribe_mission_progress() {#classmavsdk_1_1_mission_raw_1ac46f08b52706f45956cf3b01df381835} +```cpp +void mavsdk::MissionRaw::unsubscribe_mission_progress(MissionProgressHandle handle) +``` + + +Unsubscribe from subscribe_mission_progress. + + +**Parameters** + +* [MissionProgressHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a34e0eaf9922daa5d27d2b044eae7885c) **handle** - + +### mission_progress() {#classmavsdk_1_1_mission_raw_1a3200dea1094926a4dd54f079f21b94e1} +```cpp +MissionProgress mavsdk::MissionRaw::mission_progress() const +``` + + +Poll for '[MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md)' (blocking). + + +**Returns** + + [MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md) - One [MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md) update. + +### subscribe_mission_changed() {#classmavsdk_1_1_mission_raw_1ad4a2991e1a8f9423270af4220309edfb} +```cpp +MissionChangedHandle mavsdk::MissionRaw::subscribe_mission_changed(const MissionChangedCallback &callback) +``` + + +
    +
  • Subscribes to mission changed.

    +
  • +
+ +This notification can be used to be informed if a ground station has been uploaded or changed by a ground station or companion computer. + +**Parameters** + +* const [MissionChangedCallback](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1ac22d81eefc5e883cdb6baf792a7487e6)& **callback** - Callback to notify about change. + +**Returns** + + [MissionChangedHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a46da6d8a53822fd5fbd7b2a414624c5c) - + +### unsubscribe_mission_changed() {#classmavsdk_1_1_mission_raw_1ac6cd7602b2e5b46ad0ea1cf8bf602a0c} +```cpp +void mavsdk::MissionRaw::unsubscribe_mission_changed(MissionChangedHandle handle) +``` + + +Unsubscribe from subscribe_mission_changed. + + +**Parameters** + +* [MissionChangedHandle](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a46da6d8a53822fd5fbd7b2a414624c5c) **handle** - + +### import_qgroundcontrol_mission() {#classmavsdk_1_1_mission_raw_1a43345b21cf9dedf594f62ec7ad963ce8} +```cpp +std::pair mavsdk::MissionRaw::import_qgroundcontrol_mission(std::string qgc_plan_path) const +``` + + +Import a QGroundControl missions in JSON .plan format, from a file. + +Supported: +
    +
  • Waypoints

    +
  • +
  • Survey Not supported:

    +
  • +
  • Structure Scan

    +
  • +
+ + +This function is blocking. + +**Parameters** + +* std::string **qgc_plan_path** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf), [MissionRaw::MissionImportData](structmavsdk_1_1_mission_raw_1_1_mission_import_data.md) > - Result of request. + +### import_qgroundcontrol_mission_from_string() {#classmavsdk_1_1_mission_raw_1ab0a0d18b65beced6112b2f27556fae37} +```cpp +std::pair mavsdk::MissionRaw::import_qgroundcontrol_mission_from_string(std::string qgc_plan) const +``` + + +Import a QGroundControl missions in JSON .plan format, from a string. + +Supported: +
    +
  • Waypoints

    +
  • +
  • Survey Not supported:

    +
  • +
  • Structure Scan

    +
  • +
+ + +This function is blocking. + +**Parameters** + +* std::string **qgc_plan** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_mission_raw.md#classmavsdk_1_1_mission_raw_1a7ea2a624818ebb5a3e209cc275d58eaf), [MissionRaw::MissionImportData](structmavsdk_1_1_mission_raw_1_1_mission_import_data.md) > - Result of request. + +### operator=() {#classmavsdk_1_1_mission_raw_1a0cfdf21bad5478c91cf18207b6a21ad3} +```cpp +const MissionRaw& mavsdk::MissionRaw::operator=(const MissionRaw &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [MissionRaw](classmavsdk_1_1_mission_raw.md)& - + +**Returns** + + const [MissionRaw](classmavsdk_1_1_mission_raw.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_mission_raw_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_mission_raw_server.md new file mode 100644 index 000000000..0630db869 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_mission_raw_server.md @@ -0,0 +1,352 @@ +# mavsdk::MissionRawServer Class Reference +`#include: mission_raw_server.h` + +---- + + +Acts as a vehicle and receives incoming missions from GCS (in raw MAVLINK format). Provides current mission item state, so the server can progress through missions. + + +## Data Structures + + +struct [MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md) + +struct [MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md) + +struct [MissionProgress](structmavsdk_1_1_mission_raw_server_1_1_mission_progress.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_mission_raw_server_1a14f2cae8b098b7221d8aae547b70f7bd) | Possible results returned for action requests. +std::function< void([Result](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a14f2cae8b098b7221d8aae547b70f7bd))> [ResultCallback](#classmavsdk_1_1_mission_raw_server_1a3bddb8adba3f8576ae102639601e576f) | Callback type for asynchronous [MissionRawServer](classmavsdk_1_1_mission_raw_server.md) calls. +std::function< void([Result](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a14f2cae8b098b7221d8aae547b70f7bd), [MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md))> [IncomingMissionCallback](#classmavsdk_1_1_mission_raw_server_1ac8bb83c581ff08945314e51973728693) | Callback type for subscribe_incoming_mission. +[Handle](classmavsdk_1_1_handle.md)< [Result](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a14f2cae8b098b7221d8aae547b70f7bd), [MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md) > [IncomingMissionHandle](#classmavsdk_1_1_mission_raw_server_1a71173397d112f738fd05014ccc0952ff) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_incoming_mission. +std::function< void([MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md))> [CurrentItemChangedCallback](#classmavsdk_1_1_mission_raw_server_1aca7ac64b6e39e612d05ff6497cd572b1) | Callback type for subscribe_current_item_changed. +[Handle](classmavsdk_1_1_handle.md)< [MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md) > [CurrentItemChangedHandle](#classmavsdk_1_1_mission_raw_server_1a490cab4b8b06fd5d6eb8e759427f5b47) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_current_item_changed. +std::function< void(uint32_t)> [ClearAllCallback](#classmavsdk_1_1_mission_raw_server_1ae9d7d9d863d1552274440d091e2ec869) | Callback type for subscribe_clear_all. +[Handle](classmavsdk_1_1_handle.md)< uint32_t > [ClearAllHandle](#classmavsdk_1_1_mission_raw_server_1a59022e22386a18e9d51f88e6ed3cf120) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_clear_all. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [MissionRawServer](#classmavsdk_1_1_mission_raw_server_1a8a899f742cf7b52c27185cee5e5b29e8) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~MissionRawServer](#classmavsdk_1_1_mission_raw_server_1a7e14a210c0e7ac4b19633cf8dbd4bbec) () override | Destructor (internal use only). +  | [MissionRawServer](#classmavsdk_1_1_mission_raw_server_1a14b11b78ba44bdda6fb718ed13e1ab77) (const [MissionRawServer](classmavsdk_1_1_mission_raw_server.md) & other) | Copy constructor. +[IncomingMissionHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a71173397d112f738fd05014ccc0952ff) | [subscribe_incoming_mission](#classmavsdk_1_1_mission_raw_server_1aede616f945d7c59d2da6afad830f377b) (const [IncomingMissionCallback](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1ac8bb83c581ff08945314e51973728693) & callback) | Subscribe to when a new mission is uploaded (asynchronous). +void | [unsubscribe_incoming_mission](#classmavsdk_1_1_mission_raw_server_1a93107d6ee73d03edc0050401c5a5f169) ([IncomingMissionHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a71173397d112f738fd05014ccc0952ff) handle) | Unsubscribe from subscribe_incoming_mission. +[MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md) | [incoming_mission](#classmavsdk_1_1_mission_raw_server_1ae7c20d621170e5454953513526241577) () const | Poll for '[MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md)' (blocking). +[CurrentItemChangedHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a490cab4b8b06fd5d6eb8e759427f5b47) | [subscribe_current_item_changed](#classmavsdk_1_1_mission_raw_server_1a287af1e5ca18de2e84345b4f5f8fa386) (const [CurrentItemChangedCallback](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1aca7ac64b6e39e612d05ff6497cd572b1) & callback) | Subscribe to when a new current item is set. +void | [unsubscribe_current_item_changed](#classmavsdk_1_1_mission_raw_server_1a8c693a86be890f78a5a10cee9a36dc6c) ([CurrentItemChangedHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a490cab4b8b06fd5d6eb8e759427f5b47) handle) | Unsubscribe from subscribe_current_item_changed. +[MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md) | [current_item_changed](#classmavsdk_1_1_mission_raw_server_1af2bbab99a8a2e1dd1dfebceb439f2ad1) () const | Poll for '[MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md)' (blocking). +void | [set_current_item_complete](#classmavsdk_1_1_mission_raw_server_1a496791a14c2bdc1e9917f5d04622330a) () const | Set Current item as completed. +[ClearAllHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a59022e22386a18e9d51f88e6ed3cf120) | [subscribe_clear_all](#classmavsdk_1_1_mission_raw_server_1a9b08ba6c1607618e67fd1ec723883415) (const [ClearAllCallback](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1ae9d7d9d863d1552274440d091e2ec869) & callback) | Subscribe when a MISSION_CLEAR_ALL is received. +void | [unsubscribe_clear_all](#classmavsdk_1_1_mission_raw_server_1af337c8126b52d78436605a3b2e558397) ([ClearAllHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a59022e22386a18e9d51f88e6ed3cf120) handle) | Unsubscribe from subscribe_clear_all. +uint32_t | [clear_all](#classmavsdk_1_1_mission_raw_server_1a307e0f39d704ae9aeb227a27092bf435) () const | Poll for 'uint32_t' (blocking). +const [MissionRawServer](classmavsdk_1_1_mission_raw_server.md) & | [operator=](#classmavsdk_1_1_mission_raw_server_1aad0690db8cec599b271d4f62e8ecd975) (const [MissionRawServer](classmavsdk_1_1_mission_raw_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### MissionRawServer() {#classmavsdk_1_1_mission_raw_server_1a8a899f742cf7b52c27185cee5e5b29e8} +```cpp +mavsdk::MissionRawServer::MissionRawServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto mission_raw_server = MissionRawServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~MissionRawServer() {#classmavsdk_1_1_mission_raw_server_1a7e14a210c0e7ac4b19633cf8dbd4bbec} +```cpp +mavsdk::MissionRawServer::~MissionRawServer() override +``` + + +Destructor (internal use only). + + +### MissionRawServer() {#classmavsdk_1_1_mission_raw_server_1a14b11b78ba44bdda6fb718ed13e1ab77} +```cpp +mavsdk::MissionRawServer::MissionRawServer(const MissionRawServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [MissionRawServer](classmavsdk_1_1_mission_raw_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_mission_raw_server_1a3bddb8adba3f8576ae102639601e576f} + +```cpp +using mavsdk::MissionRawServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [MissionRawServer](classmavsdk_1_1_mission_raw_server.md) calls. + + +### typedef IncomingMissionCallback {#classmavsdk_1_1_mission_raw_server_1ac8bb83c581ff08945314e51973728693} + +```cpp +using mavsdk::MissionRawServer::IncomingMissionCallback = std::function +``` + + +Callback type for subscribe_incoming_mission. + + +### typedef IncomingMissionHandle {#classmavsdk_1_1_mission_raw_server_1a71173397d112f738fd05014ccc0952ff} + +```cpp +using mavsdk::MissionRawServer::IncomingMissionHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_incoming_mission. + + +### typedef CurrentItemChangedCallback {#classmavsdk_1_1_mission_raw_server_1aca7ac64b6e39e612d05ff6497cd572b1} + +```cpp +using mavsdk::MissionRawServer::CurrentItemChangedCallback = std::function +``` + + +Callback type for subscribe_current_item_changed. + + +### typedef CurrentItemChangedHandle {#classmavsdk_1_1_mission_raw_server_1a490cab4b8b06fd5d6eb8e759427f5b47} + +```cpp +using mavsdk::MissionRawServer::CurrentItemChangedHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_current_item_changed. + + +### typedef ClearAllCallback {#classmavsdk_1_1_mission_raw_server_1ae9d7d9d863d1552274440d091e2ec869} + +```cpp +using mavsdk::MissionRawServer::ClearAllCallback = std::function +``` + + +Callback type for subscribe_clear_all. + + +### typedef ClearAllHandle {#classmavsdk_1_1_mission_raw_server_1a59022e22386a18e9d51f88e6ed3cf120} + +```cpp +using mavsdk::MissionRawServer::ClearAllHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_clear_all. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_mission_raw_server_1a14f2cae8b098b7221d8aae547b70f7bd} + + +Possible results returned for action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `Error` | Error. + `TooManyMissionItems` | Too many mission items in the mission. + `Busy` | Vehicle is busy. + `Timeout` | Request timed out. + `InvalidArgument` | Invalid argument. + `Unsupported` | [Mission](classmavsdk_1_1_mission.md) downloaded from the system is not supported. + `NoMissionAvailable` | No mission available on the system. + `UnsupportedMissionCmd` | Unsupported mission command. + `TransferCancelled` | [Mission](classmavsdk_1_1_mission.md) transfer (upload or download) has been cancelled. + `NoSystem` | No system connected. + `Next` | Intermediate message showing progress or instructions on the next steps. + +## Member Function Documentation + + +### subscribe_incoming_mission() {#classmavsdk_1_1_mission_raw_server_1aede616f945d7c59d2da6afad830f377b} +```cpp +IncomingMissionHandle mavsdk::MissionRawServer::subscribe_incoming_mission(const IncomingMissionCallback &callback) +``` + + +Subscribe to when a new mission is uploaded (asynchronous). + + +**Parameters** + +* const [IncomingMissionCallback](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1ac8bb83c581ff08945314e51973728693)& **callback** - + +**Returns** + + [IncomingMissionHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a71173397d112f738fd05014ccc0952ff) - + +### unsubscribe_incoming_mission() {#classmavsdk_1_1_mission_raw_server_1a93107d6ee73d03edc0050401c5a5f169} +```cpp +void mavsdk::MissionRawServer::unsubscribe_incoming_mission(IncomingMissionHandle handle) +``` + + +Unsubscribe from subscribe_incoming_mission. + + +**Parameters** + +* [IncomingMissionHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a71173397d112f738fd05014ccc0952ff) **handle** - + +### incoming_mission() {#classmavsdk_1_1_mission_raw_server_1ae7c20d621170e5454953513526241577} +```cpp +MissionPlan mavsdk::MissionRawServer::incoming_mission() const +``` + + +Poll for '[MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md)' (blocking). + + +**Returns** + + [MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md) - One [MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md) update. + +### subscribe_current_item_changed() {#classmavsdk_1_1_mission_raw_server_1a287af1e5ca18de2e84345b4f5f8fa386} +```cpp +CurrentItemChangedHandle mavsdk::MissionRawServer::subscribe_current_item_changed(const CurrentItemChangedCallback &callback) +``` + + +Subscribe to when a new current item is set. + + +**Parameters** + +* const [CurrentItemChangedCallback](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1aca7ac64b6e39e612d05ff6497cd572b1)& **callback** - + +**Returns** + + [CurrentItemChangedHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a490cab4b8b06fd5d6eb8e759427f5b47) - + +### unsubscribe_current_item_changed() {#classmavsdk_1_1_mission_raw_server_1a8c693a86be890f78a5a10cee9a36dc6c} +```cpp +void mavsdk::MissionRawServer::unsubscribe_current_item_changed(CurrentItemChangedHandle handle) +``` + + +Unsubscribe from subscribe_current_item_changed. + + +**Parameters** + +* [CurrentItemChangedHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a490cab4b8b06fd5d6eb8e759427f5b47) **handle** - + +### current_item_changed() {#classmavsdk_1_1_mission_raw_server_1af2bbab99a8a2e1dd1dfebceb439f2ad1} +```cpp +MissionItem mavsdk::MissionRawServer::current_item_changed() const +``` + + +Poll for '[MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md)' (blocking). + + +**Returns** + + [MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md) - One [MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md) update. + +### set_current_item_complete() {#classmavsdk_1_1_mission_raw_server_1a496791a14c2bdc1e9917f5d04622330a} +```cpp +void mavsdk::MissionRawServer::set_current_item_complete() const +``` + + +Set Current item as completed. + +This function is blocking. + +### subscribe_clear_all() {#classmavsdk_1_1_mission_raw_server_1a9b08ba6c1607618e67fd1ec723883415} +```cpp +ClearAllHandle mavsdk::MissionRawServer::subscribe_clear_all(const ClearAllCallback &callback) +``` + + +Subscribe when a MISSION_CLEAR_ALL is received. + + +**Parameters** + +* const [ClearAllCallback](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1ae9d7d9d863d1552274440d091e2ec869)& **callback** - + +**Returns** + + [ClearAllHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a59022e22386a18e9d51f88e6ed3cf120) - + +### unsubscribe_clear_all() {#classmavsdk_1_1_mission_raw_server_1af337c8126b52d78436605a3b2e558397} +```cpp +void mavsdk::MissionRawServer::unsubscribe_clear_all(ClearAllHandle handle) +``` + + +Unsubscribe from subscribe_clear_all. + + +**Parameters** + +* [ClearAllHandle](classmavsdk_1_1_mission_raw_server.md#classmavsdk_1_1_mission_raw_server_1a59022e22386a18e9d51f88e6ed3cf120) **handle** - + +### clear_all() {#classmavsdk_1_1_mission_raw_server_1a307e0f39d704ae9aeb227a27092bf435} +```cpp +uint32_t mavsdk::MissionRawServer::clear_all() const +``` + + +Poll for 'uint32_t' (blocking). + + +**Returns** + + uint32_t - One uint32_t update. + +### operator=() {#classmavsdk_1_1_mission_raw_server_1aad0690db8cec599b271d4f62e8ecd975} +```cpp +const MissionRawServer& mavsdk::MissionRawServer::operator=(const MissionRawServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [MissionRawServer](classmavsdk_1_1_mission_raw_server.md)& - + +**Returns** + + const [MissionRawServer](classmavsdk_1_1_mission_raw_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_mocap.md b/docs/en/cpp/api_reference/classmavsdk_1_1_mocap.md new file mode 100644 index 000000000..4861cb401 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_mocap.md @@ -0,0 +1,221 @@ +# mavsdk::Mocap Class Reference +`#include: mocap.h` + +---- + + +
    +
  • Allows interfacing a vehicle with a motion capture system in order to allow navigation without global positioning sources available (e.g. indoors, or when flying under a bridge. etc.).

    +
  • +
+ + +## Data Structures + + +struct [AngleBody](structmavsdk_1_1_mocap_1_1_angle_body.md) + +struct [AngularVelocityBody](structmavsdk_1_1_mocap_1_1_angular_velocity_body.md) + +struct [AttitudePositionMocap](structmavsdk_1_1_mocap_1_1_attitude_position_mocap.md) + +struct [Covariance](structmavsdk_1_1_mocap_1_1_covariance.md) + +struct [Odometry](structmavsdk_1_1_mocap_1_1_odometry.md) + +struct [PositionBody](structmavsdk_1_1_mocap_1_1_position_body.md) + +struct [Quaternion](structmavsdk_1_1_mocap_1_1_quaternion.md) + +struct [SpeedBody](structmavsdk_1_1_mocap_1_1_speed_body.md) + +struct [VisionPositionEstimate](structmavsdk_1_1_mocap_1_1_vision_position_estimate.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5) | Possible results returned for mocap requests. +std::function< void([Result](classmavsdk_1_1_mocap.md#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5))> [ResultCallback](#classmavsdk_1_1_mocap_1a7743939450a5e816dc9e7de237ec3934) | Callback type for asynchronous [Mocap](classmavsdk_1_1_mocap.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Mocap](#classmavsdk_1_1_mocap_1a993147a5f0ae4c8a4ddf8be4258690cc) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Mocap](#classmavsdk_1_1_mocap_1a981aaa6a7e313376b88557013649de65) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Mocap](#classmavsdk_1_1_mocap_1ad78b5299367dc1db3236d0b674816e22) () override | Destructor (internal use only). +  | [Mocap](#classmavsdk_1_1_mocap_1a0c2242e86da34ecd94c0a40dcec4858f) (const [Mocap](classmavsdk_1_1_mocap.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_mocap.md#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5) | [set_vision_position_estimate](#classmavsdk_1_1_mocap_1a22d007409839e28a45d7b10f10e22fd6) ([VisionPositionEstimate](structmavsdk_1_1_mocap_1_1_vision_position_estimate.md) vision_position_estimate)const | Send Global position/attitude estimate from a vision source. +[Result](classmavsdk_1_1_mocap.md#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5) | [set_attitude_position_mocap](#classmavsdk_1_1_mocap_1a5f9a63d8bbed750056e139640b38cd7f) ([AttitudePositionMocap](structmavsdk_1_1_mocap_1_1_attitude_position_mocap.md) attitude_position_mocap)const | Send motion capture attitude and position. +[Result](classmavsdk_1_1_mocap.md#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5) | [set_odometry](#classmavsdk_1_1_mocap_1a149fa242e0b01bc0aee9204118b00f59) ([Odometry](structmavsdk_1_1_mocap_1_1_odometry.md) odometry)const | Send odometry information with an external interface. +const [Mocap](classmavsdk_1_1_mocap.md) & | [operator=](#classmavsdk_1_1_mocap_1adf2f33e3befbec23f43e066946050eab) (const [Mocap](classmavsdk_1_1_mocap.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Mocap() {#classmavsdk_1_1_mocap_1a993147a5f0ae4c8a4ddf8be4258690cc} +```cpp +mavsdk::Mocap::Mocap(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mocap = Mocap(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Mocap() {#classmavsdk_1_1_mocap_1a981aaa6a7e313376b88557013649de65} +```cpp +mavsdk::Mocap::Mocap(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto mocap = Mocap(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Mocap() {#classmavsdk_1_1_mocap_1ad78b5299367dc1db3236d0b674816e22} +```cpp +mavsdk::Mocap::~Mocap() override +``` + + +Destructor (internal use only). + + +### Mocap() {#classmavsdk_1_1_mocap_1a0c2242e86da34ecd94c0a40dcec4858f} +```cpp +mavsdk::Mocap::Mocap(const Mocap &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Mocap](classmavsdk_1_1_mocap.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_mocap_1a7743939450a5e816dc9e7de237ec3934} + +```cpp +using mavsdk::Mocap::ResultCallback = std::function +``` + + +Callback type for asynchronous [Mocap](classmavsdk_1_1_mocap.md) calls. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5} + + +Possible results returned for mocap requests. + + +Value | Description +--- | --- + `Unknown` | Unknown error. + `Success` | Request succeeded. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `InvalidRequestData` | Invalid request data. + `Unsupported` | Function unsupported. + +## Member Function Documentation + + +### set_vision_position_estimate() {#classmavsdk_1_1_mocap_1a22d007409839e28a45d7b10f10e22fd6} +```cpp +Result mavsdk::Mocap::set_vision_position_estimate(VisionPositionEstimate vision_position_estimate) const +``` + + +Send Global position/attitude estimate from a vision source. + +This function is blocking. + +**Parameters** + +* [VisionPositionEstimate](structmavsdk_1_1_mocap_1_1_vision_position_estimate.md) **vision_position_estimate** - + +**Returns** + + [Result](classmavsdk_1_1_mocap.md#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5) - Result of request. + +### set_attitude_position_mocap() {#classmavsdk_1_1_mocap_1a5f9a63d8bbed750056e139640b38cd7f} +```cpp +Result mavsdk::Mocap::set_attitude_position_mocap(AttitudePositionMocap attitude_position_mocap) const +``` + + +Send motion capture attitude and position. + +This function is blocking. + +**Parameters** + +* [AttitudePositionMocap](structmavsdk_1_1_mocap_1_1_attitude_position_mocap.md) **attitude_position_mocap** - + +**Returns** + + [Result](classmavsdk_1_1_mocap.md#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5) - Result of request. + +### set_odometry() {#classmavsdk_1_1_mocap_1a149fa242e0b01bc0aee9204118b00f59} +```cpp +Result mavsdk::Mocap::set_odometry(Odometry odometry) const +``` + + +Send odometry information with an external interface. + +This function is blocking. + +**Parameters** + +* [Odometry](structmavsdk_1_1_mocap_1_1_odometry.md) **odometry** - + +**Returns** + + [Result](classmavsdk_1_1_mocap.md#classmavsdk_1_1_mocap_1a3af8c27b8ad9a4567feb1045e82884d5) - Result of request. + +### operator=() {#classmavsdk_1_1_mocap_1adf2f33e3befbec23f43e066946050eab} +```cpp +const Mocap& mavsdk::Mocap::operator=(const Mocap &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Mocap](classmavsdk_1_1_mocap.md)& - + +**Returns** + + const [Mocap](classmavsdk_1_1_mocap.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_offboard.md b/docs/en/cpp/api_reference/classmavsdk_1_1_offboard.md new file mode 100644 index 000000000..935fdcfdb --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_offboard.md @@ -0,0 +1,453 @@ +# mavsdk::Offboard Class Reference +`#include: offboard.h` + +---- + + +
    +
  • Control a drone with position, velocity, attitude or motor commands.

    +
  • +
+ + +The module is called offboard because the commands can be sent from external sources as opposed to onboard control right inside the autopilot "board". + + +Client code must specify a setpoint before starting offboard mode. [Mavsdk](classmavsdk_1_1_mavsdk.md) automatically sends setpoints at 20Hz (PX4 [Offboard](classmavsdk_1_1_offboard.md) mode requires that setpoints are minimally sent at 2Hz). + + +## Data Structures + + +struct [AccelerationNed](structmavsdk_1_1_offboard_1_1_acceleration_ned.md) + +struct [ActuatorControl](structmavsdk_1_1_offboard_1_1_actuator_control.md) + +struct [ActuatorControlGroup](structmavsdk_1_1_offboard_1_1_actuator_control_group.md) + +struct [Attitude](structmavsdk_1_1_offboard_1_1_attitude.md) + +struct [AttitudeRate](structmavsdk_1_1_offboard_1_1_attitude_rate.md) + +struct [PositionGlobalYaw](structmavsdk_1_1_offboard_1_1_position_global_yaw.md) + +struct [PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) + +struct [VelocityBodyYawspeed](structmavsdk_1_1_offboard_1_1_velocity_body_yawspeed.md) + +struct [VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | Possible results returned for offboard requests. +std::function< void([Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9))> [ResultCallback](#classmavsdk_1_1_offboard_1a16d95f55251e9f992261d46da89ef8b9) | Callback type for asynchronous [Offboard](classmavsdk_1_1_offboard.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Offboard](#classmavsdk_1_1_offboard_1aedb8ed185acabd2caa3b536f51b68dcb) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Offboard](#classmavsdk_1_1_offboard_1a9e11ce3a850ceb9a6c047288b5bc3b84) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Offboard](#classmavsdk_1_1_offboard_1a1cdbf816ec02e63681eeee3ef6f5c41a) () override | Destructor (internal use only). +  | [Offboard](#classmavsdk_1_1_offboard_1ab3674a3889b978e7a52626d5de6a6fa0) (const [Offboard](classmavsdk_1_1_offboard.md) & other) | Copy constructor. +void | [start_async](#classmavsdk_1_1_offboard_1a0c880ad3f663142e194dd6f187cfc934) (const [ResultCallback](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a16d95f55251e9f992261d46da89ef8b9) callback) | Start offboard control. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [start](#classmavsdk_1_1_offboard_1ab71d0dd2a81f76e3a0330b0304daa30b) () const | Start offboard control. +void | [stop_async](#classmavsdk_1_1_offboard_1a86c163d7fa1217b4e82a03daf52065c3) (const [ResultCallback](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a16d95f55251e9f992261d46da89ef8b9) callback) | Stop offboard control. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [stop](#classmavsdk_1_1_offboard_1a626810cbfa02b36019dde2d2fd4c3da9) () const | Stop offboard control. +bool | [is_active](#classmavsdk_1_1_offboard_1aa5e0f3c02a03f2667f82d5e162221ff5) () const | Check if offboard control is active. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_attitude](#classmavsdk_1_1_offboard_1af6f0d3991bb6b62f39d862c46fcffb34) ([Attitude](structmavsdk_1_1_offboard_1_1_attitude.md) attitude)const | Set the attitude in terms of roll, pitch and yaw in degrees with thrust. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_actuator_control](#classmavsdk_1_1_offboard_1a619ee02a1f73041a5cae6a5c72169b96) ([ActuatorControl](structmavsdk_1_1_offboard_1_1_actuator_control.md) actuator_control)const | Set direct actuator control values to groups #0 and #1. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_attitude_rate](#classmavsdk_1_1_offboard_1a034a98a0e7a5a7a0fac507adabf6ecf8) ([AttitudeRate](structmavsdk_1_1_offboard_1_1_attitude_rate.md) attitude_rate)const | Set the attitude rate in terms of pitch, roll and yaw angular rate along with thrust. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_position_ned](#classmavsdk_1_1_offboard_1ade7dcec93ebee17de60687a75184b8b6) ([PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) position_ned_yaw)const | Set the position in NED coordinates and yaw. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_position_global](#classmavsdk_1_1_offboard_1a97b2bd8f516e267e5b28373f369ff8d3) ([PositionGlobalYaw](structmavsdk_1_1_offboard_1_1_position_global_yaw.md) position_global_yaw)const | Set the position in Global coordinates (latitude, longitude, altitude) and yaw. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_velocity_body](#classmavsdk_1_1_offboard_1abe7364f0a48dda4df34c5c67d177cfb4) ([VelocityBodyYawspeed](structmavsdk_1_1_offboard_1_1_velocity_body_yawspeed.md) velocity_body_yawspeed)const | Set the velocity in body coordinates and yaw angular rate. Not available for fixed-wing aircraft. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_velocity_ned](#classmavsdk_1_1_offboard_1a4edbc6e4528ff955d4e46e7c4e711732) ([VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) velocity_ned_yaw)const | Set the velocity in NED coordinates and yaw. Not available for fixed-wing aircraft. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_position_velocity_ned](#classmavsdk_1_1_offboard_1ae422165680b434eed74e84cc901e3a33) ([PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) position_ned_yaw, [VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) velocity_ned_yaw)const | Set the position in NED coordinates, with the velocity to be used as feed-forward. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_position_velocity_acceleration_ned](#classmavsdk_1_1_offboard_1a845aab746fc078d1ee2848df33c04eb9) ([PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) position_ned_yaw, [VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) velocity_ned_yaw, [AccelerationNed](structmavsdk_1_1_offboard_1_1_acceleration_ned.md) acceleration_ned)const | Set the position, velocity and acceleration in NED coordinates, with velocity and acceleration used as feed-forward. +[Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) | [set_acceleration_ned](#classmavsdk_1_1_offboard_1ac0d471609df13c79a37e0e352be71d03) ([AccelerationNed](structmavsdk_1_1_offboard_1_1_acceleration_ned.md) acceleration_ned)const | Set the acceleration in NED coordinates. +const [Offboard](classmavsdk_1_1_offboard.md) & | [operator=](#classmavsdk_1_1_offboard_1acb01657624668251c0a022bc3f8135cd) (const [Offboard](classmavsdk_1_1_offboard.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Offboard() {#classmavsdk_1_1_offboard_1aedb8ed185acabd2caa3b536f51b68dcb} +```cpp +mavsdk::Offboard::Offboard(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto offboard = Offboard(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Offboard() {#classmavsdk_1_1_offboard_1a9e11ce3a850ceb9a6c047288b5bc3b84} +```cpp +mavsdk::Offboard::Offboard(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto offboard = Offboard(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Offboard() {#classmavsdk_1_1_offboard_1a1cdbf816ec02e63681eeee3ef6f5c41a} +```cpp +mavsdk::Offboard::~Offboard() override +``` + + +Destructor (internal use only). + + +### Offboard() {#classmavsdk_1_1_offboard_1ab3674a3889b978e7a52626d5de6a6fa0} +```cpp +mavsdk::Offboard::Offboard(const Offboard &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Offboard](classmavsdk_1_1_offboard.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_offboard_1a16d95f55251e9f992261d46da89ef8b9} + +```cpp +using mavsdk::Offboard::ResultCallback = std::function +``` + + +Callback type for asynchronous [Offboard](classmavsdk_1_1_offboard.md) calls. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9} + + +Possible results returned for offboard requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command denied. + `Timeout` | Request timed out. + `NoSetpointSet` | Cannot start without setpoint set. + `Failed` | Request failed. + +## Member Function Documentation + + +### start_async() {#classmavsdk_1_1_offboard_1a0c880ad3f663142e194dd6f187cfc934} +```cpp +void mavsdk::Offboard::start_async(const ResultCallback callback) +``` + + +Start offboard control. + +This function is non-blocking. See 'start' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a16d95f55251e9f992261d46da89ef8b9) **callback** - + +### start() {#classmavsdk_1_1_offboard_1ab71d0dd2a81f76e3a0330b0304daa30b} +```cpp +Result mavsdk::Offboard::start() const +``` + + +Start offboard control. + +This function is blocking. See 'start_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### stop_async() {#classmavsdk_1_1_offboard_1a86c163d7fa1217b4e82a03daf52065c3} +```cpp +void mavsdk::Offboard::stop_async(const ResultCallback callback) +``` + + +Stop offboard control. + +The vehicle will be put into Hold mode: [https://docs.px4.io/en/flight_modes/hold.html](https://docs.px4.io/en/flight_modes/hold.html) + + +This function is non-blocking. See 'stop' for the blocking counterpart. + +**Parameters** + +* const [ResultCallback](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a16d95f55251e9f992261d46da89ef8b9) **callback** - + +### stop() {#classmavsdk_1_1_offboard_1a626810cbfa02b36019dde2d2fd4c3da9} +```cpp +Result mavsdk::Offboard::stop() const +``` + + +Stop offboard control. + +The vehicle will be put into Hold mode: [https://docs.px4.io/en/flight_modes/hold.html](https://docs.px4.io/en/flight_modes/hold.html) + + +This function is blocking. See 'stop_async' for the non-blocking counterpart. + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### is_active() {#classmavsdk_1_1_offboard_1aa5e0f3c02a03f2667f82d5e162221ff5} +```cpp +bool mavsdk::Offboard::is_active() const +``` + + +Check if offboard control is active. + +True means that the vehicle is in offboard mode and we are actively sending setpoints. + + +This function is blocking. + +**Returns** + + bool - Result of request. + +### set_attitude() {#classmavsdk_1_1_offboard_1af6f0d3991bb6b62f39d862c46fcffb34} +```cpp +Result mavsdk::Offboard::set_attitude(Attitude attitude) const +``` + + +Set the attitude in terms of roll, pitch and yaw in degrees with thrust. + +This function is blocking. + +**Parameters** + +* [Attitude](structmavsdk_1_1_offboard_1_1_attitude.md) **attitude** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_actuator_control() {#classmavsdk_1_1_offboard_1a619ee02a1f73041a5cae6a5c72169b96} +```cpp +Result mavsdk::Offboard::set_actuator_control(ActuatorControl actuator_control) const +``` + + +Set direct actuator control values to groups #0 and #1. + +First 8 controls will go to control group 0, the following 8 controls to control group 1 (if actuator_control.num_controls more than 8). + + +This function is blocking. + +**Parameters** + +* [ActuatorControl](structmavsdk_1_1_offboard_1_1_actuator_control.md) **actuator_control** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_attitude_rate() {#classmavsdk_1_1_offboard_1a034a98a0e7a5a7a0fac507adabf6ecf8} +```cpp +Result mavsdk::Offboard::set_attitude_rate(AttitudeRate attitude_rate) const +``` + + +Set the attitude rate in terms of pitch, roll and yaw angular rate along with thrust. + +This function is blocking. + +**Parameters** + +* [AttitudeRate](structmavsdk_1_1_offboard_1_1_attitude_rate.md) **attitude_rate** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_position_ned() {#classmavsdk_1_1_offboard_1ade7dcec93ebee17de60687a75184b8b6} +```cpp +Result mavsdk::Offboard::set_position_ned(PositionNedYaw position_ned_yaw) const +``` + + +Set the position in NED coordinates and yaw. + +This function is blocking. + +**Parameters** + +* [PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) **position_ned_yaw** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_position_global() {#classmavsdk_1_1_offboard_1a97b2bd8f516e267e5b28373f369ff8d3} +```cpp +Result mavsdk::Offboard::set_position_global(PositionGlobalYaw position_global_yaw) const +``` + + +Set the position in Global coordinates (latitude, longitude, altitude) and yaw. + +This function is blocking. + +**Parameters** + +* [PositionGlobalYaw](structmavsdk_1_1_offboard_1_1_position_global_yaw.md) **position_global_yaw** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_velocity_body() {#classmavsdk_1_1_offboard_1abe7364f0a48dda4df34c5c67d177cfb4} +```cpp +Result mavsdk::Offboard::set_velocity_body(VelocityBodyYawspeed velocity_body_yawspeed) const +``` + + +Set the velocity in body coordinates and yaw angular rate. Not available for fixed-wing aircraft. + +This function is blocking. + +**Parameters** + +* [VelocityBodyYawspeed](structmavsdk_1_1_offboard_1_1_velocity_body_yawspeed.md) **velocity_body_yawspeed** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_velocity_ned() {#classmavsdk_1_1_offboard_1a4edbc6e4528ff955d4e46e7c4e711732} +```cpp +Result mavsdk::Offboard::set_velocity_ned(VelocityNedYaw velocity_ned_yaw) const +``` + + +Set the velocity in NED coordinates and yaw. Not available for fixed-wing aircraft. + +This function is blocking. + +**Parameters** + +* [VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) **velocity_ned_yaw** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_position_velocity_ned() {#classmavsdk_1_1_offboard_1ae422165680b434eed74e84cc901e3a33} +```cpp +Result mavsdk::Offboard::set_position_velocity_ned(PositionNedYaw position_ned_yaw, VelocityNedYaw velocity_ned_yaw) const +``` + + +Set the position in NED coordinates, with the velocity to be used as feed-forward. + +This function is blocking. + +**Parameters** + +* [PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) **position_ned_yaw** - +* [VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) **velocity_ned_yaw** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_position_velocity_acceleration_ned() {#classmavsdk_1_1_offboard_1a845aab746fc078d1ee2848df33c04eb9} +```cpp +Result mavsdk::Offboard::set_position_velocity_acceleration_ned(PositionNedYaw position_ned_yaw, VelocityNedYaw velocity_ned_yaw, AccelerationNed acceleration_ned) const +``` + + +Set the position, velocity and acceleration in NED coordinates, with velocity and acceleration used as feed-forward. + +This function is blocking. + +**Parameters** + +* [PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) **position_ned_yaw** - +* [VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) **velocity_ned_yaw** - +* [AccelerationNed](structmavsdk_1_1_offboard_1_1_acceleration_ned.md) **acceleration_ned** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### set_acceleration_ned() {#classmavsdk_1_1_offboard_1ac0d471609df13c79a37e0e352be71d03} +```cpp +Result mavsdk::Offboard::set_acceleration_ned(AccelerationNed acceleration_ned) const +``` + + +Set the acceleration in NED coordinates. + +This function is blocking. + +**Parameters** + +* [AccelerationNed](structmavsdk_1_1_offboard_1_1_acceleration_ned.md) **acceleration_ned** - + +**Returns** + + [Result](classmavsdk_1_1_offboard.md#classmavsdk_1_1_offboard_1a2d4d594301d8c756429457b0982130e9) - Result of request. + +### operator=() {#classmavsdk_1_1_offboard_1acb01657624668251c0a022bc3f8135cd} +```cpp +const Offboard& mavsdk::Offboard::operator=(const Offboard &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Offboard](classmavsdk_1_1_offboard.md)& - + +**Returns** + + const [Offboard](classmavsdk_1_1_offboard.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_param.md b/docs/en/cpp/api_reference/classmavsdk_1_1_param.md new file mode 100644 index 000000000..140524eb4 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_param.md @@ -0,0 +1,339 @@ +# mavsdk::Param Class Reference +`#include: param.h` + +---- + + +Provide raw access to get and set parameters. + + +## Data Structures + + +struct [AllParams](structmavsdk_1_1_param_1_1_all_params.md) + +struct [CustomParam](structmavsdk_1_1_param_1_1_custom_param.md) + +struct [FloatParam](structmavsdk_1_1_param_1_1_float_param.md) + +struct [IntParam](structmavsdk_1_1_param_1_1_int_param.md) + +## Public Types + + +Type | Description +--- | --- +enum [ProtocolVersion](#classmavsdk_1_1_param_1a37807968ecb40a732b4fec83792bd5c8) | Parameter version. +enum [Result](#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) | Possible results returned for param requests. +std::function< void([Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df))> [ResultCallback](#classmavsdk_1_1_param_1a7047374c38d4220e8709c2b10275f860) | Callback type for asynchronous [Param](classmavsdk_1_1_param.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Param](#classmavsdk_1_1_param_1a3f15c8d0c238a68cd97a49ba5c3ea1ef) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Param](#classmavsdk_1_1_param_1a08e40eaf4052555d28f2404cc7ede680) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Param](#classmavsdk_1_1_param_1a33f67b5c3daea8ca3af8c573f4e07153) () override | Destructor (internal use only). +  | [Param](#classmavsdk_1_1_param_1ab7a03a825118c944d31c562594826f72) (const [Param](classmavsdk_1_1_param.md) & other) | Copy constructor. +std::pair< [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df), int32_t > | [get_param_int](#classmavsdk_1_1_param_1a554099a07baa9e4765824005f47bef94) (std::string name)const | Get an int parameter. +[Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) | [set_param_int](#classmavsdk_1_1_param_1af8124bae8b4649605a51fe2943ae8414) (std::string name, int32_t value)const | Set an int parameter. +std::pair< [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df), float > | [get_param_float](#classmavsdk_1_1_param_1ac8efd0381aa1cc2e4461dfb256797619) (std::string name)const | Get a float parameter. +[Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) | [set_param_float](#classmavsdk_1_1_param_1a58a2f14fbcda2bf73815dbc2a31528bf) (std::string name, float value)const | Set a float parameter. +std::pair< [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df), std::string > | [get_param_custom](#classmavsdk_1_1_param_1a7914d3856a9e6d9b91d7f5483a260f4d) (std::string name)const | Get a custom parameter. +[Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) | [set_param_custom](#classmavsdk_1_1_param_1abb9cc4e4e14d33a93b23295f836de39e) (std::string name, std::string value)const | Set a custom parameter. +[Param::AllParams](structmavsdk_1_1_param_1_1_all_params.md) | [get_all_params](#classmavsdk_1_1_param_1ab9259e1f91809aa574404131aa540fd8) () const | Get all parameters. +[Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) | [select_component](#classmavsdk_1_1_param_1a2ef2e607225d54c6fedd21a9b483937f) (int32_t component_id, [ProtocolVersion](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1a37807968ecb40a732b4fec83792bd5c8) protocol_version)const | Select component ID of parameter component to talk to and param protocol version. +const [Param](classmavsdk_1_1_param.md) & | [operator=](#classmavsdk_1_1_param_1a4d75b066cb985d3a38cc8221e18aa608) (const [Param](classmavsdk_1_1_param.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Param() {#classmavsdk_1_1_param_1a3f15c8d0c238a68cd97a49ba5c3ea1ef} +```cpp +mavsdk::Param::Param(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto param = Param(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Param() {#classmavsdk_1_1_param_1a08e40eaf4052555d28f2404cc7ede680} +```cpp +mavsdk::Param::Param(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto param = Param(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Param() {#classmavsdk_1_1_param_1a33f67b5c3daea8ca3af8c573f4e07153} +```cpp +mavsdk::Param::~Param() override +``` + + +Destructor (internal use only). + + +### Param() {#classmavsdk_1_1_param_1ab7a03a825118c944d31c562594826f72} +```cpp +mavsdk::Param::Param(const Param &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Param](classmavsdk_1_1_param.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_param_1a7047374c38d4220e8709c2b10275f860} + +```cpp +using mavsdk::Param::ResultCallback = std::function +``` + + +Callback type for asynchronous [Param](classmavsdk_1_1_param.md) calls. + + +## Member Enumeration Documentation + + +### enum ProtocolVersion {#classmavsdk_1_1_param_1a37807968ecb40a732b4fec83792bd5c8} + + +Parameter version. + + +Value | Description +--- | --- + `V1` | Original v1 version. + `Ext` | Extended param version. + +### enum Result {#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df} + + +Possible results returned for param requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `Timeout` | Request timed out. + `ConnectionError` | Connection error. + `WrongType` | Wrong type. + `ParamNameTooLong` | Parameter name too long (> 16). + `NoSystem` | No system connected. + `ParamValueTooLong` | [Param](classmavsdk_1_1_param.md) value too long (> 128). + `Failed` | Operation failed.. + +## Member Function Documentation + + +### get_param_int() {#classmavsdk_1_1_param_1a554099a07baa9e4765824005f47bef94} +```cpp +std::pair mavsdk::Param::get_param_int(std::string name) const +``` + + +Get an int parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df), int32_t > - Result of request. + +### set_param_int() {#classmavsdk_1_1_param_1af8124bae8b4649605a51fe2943ae8414} +```cpp +Result mavsdk::Param::set_param_int(std::string name, int32_t value) const +``` + + +Set an int parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - +* int32_t **value** - + +**Returns** + + [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) - Result of request. + +### get_param_float() {#classmavsdk_1_1_param_1ac8efd0381aa1cc2e4461dfb256797619} +```cpp +std::pair mavsdk::Param::get_param_float(std::string name) const +``` + + +Get a float parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df), float > - Result of request. + +### set_param_float() {#classmavsdk_1_1_param_1a58a2f14fbcda2bf73815dbc2a31528bf} +```cpp +Result mavsdk::Param::set_param_float(std::string name, float value) const +``` + + +Set a float parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - +* float **value** - + +**Returns** + + [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) - Result of request. + +### get_param_custom() {#classmavsdk_1_1_param_1a7914d3856a9e6d9b91d7f5483a260f4d} +```cpp +std::pair mavsdk::Param::get_param_custom(std::string name) const +``` + + +Get a custom parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df), std::string > - Result of request. + +### set_param_custom() {#classmavsdk_1_1_param_1abb9cc4e4e14d33a93b23295f836de39e} +```cpp +Result mavsdk::Param::set_param_custom(std::string name, std::string value) const +``` + + +Set a custom parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - +* std::string **value** - + +**Returns** + + [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) - Result of request. + +### get_all_params() {#classmavsdk_1_1_param_1ab9259e1f91809aa574404131aa540fd8} +```cpp +Param::AllParams mavsdk::Param::get_all_params() const +``` + + +Get all parameters. + +This function is blocking. + +**Returns** + + [Param::AllParams](structmavsdk_1_1_param_1_1_all_params.md) - Result of request. + +### select_component() {#classmavsdk_1_1_param_1a2ef2e607225d54c6fedd21a9b483937f} +```cpp +Result mavsdk::Param::select_component(int32_t component_id, ProtocolVersion protocol_version) const +``` + + +Select component ID of parameter component to talk to and param protocol version. + +Default is the autopilot component (1), and Version (0). + + +This function is blocking. + +**Parameters** + +* int32_t **component_id** - +* [ProtocolVersion](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1a37807968ecb40a732b4fec83792bd5c8) **protocol_version** - + +**Returns** + + [Result](classmavsdk_1_1_param.md#classmavsdk_1_1_param_1afde69c8b60c41e2f21db148d211881df) - Result of request. + +### operator=() {#classmavsdk_1_1_param_1a4d75b066cb985d3a38cc8221e18aa608} +```cpp +const Param& mavsdk::Param::operator=(const Param &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Param](classmavsdk_1_1_param.md)& - + +**Returns** + + const [Param](classmavsdk_1_1_param.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_param_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_param_server.md new file mode 100644 index 000000000..0418fd698 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_param_server.md @@ -0,0 +1,445 @@ +# mavsdk::ParamServer Class Reference +`#include: param_server.h` + +---- + + +Provide raw access to retrieve and provide server parameters. + + +## Data Structures + + +struct [AllParams](structmavsdk_1_1_param_server_1_1_all_params.md) + +struct [CustomParam](structmavsdk_1_1_param_server_1_1_custom_param.md) + +struct [FloatParam](structmavsdk_1_1_param_server_1_1_float_param.md) + +struct [IntParam](structmavsdk_1_1_param_server_1_1_int_param.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469) | Possible results returned for param requests. +std::function< void([Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469))> [ResultCallback](#classmavsdk_1_1_param_server_1a669845877bb8e14482fb46542825c625) | Callback type for asynchronous [ParamServer](classmavsdk_1_1_param_server.md) calls. +std::function< void([IntParam](structmavsdk_1_1_param_server_1_1_int_param.md))> [ChangedParamIntCallback](#classmavsdk_1_1_param_server_1a7674183da6d76416b34df9ce51c59358) | Callback type for subscribe_changed_param_int. +[Handle](classmavsdk_1_1_handle.md)< [IntParam](structmavsdk_1_1_param_server_1_1_int_param.md) > [ChangedParamIntHandle](#classmavsdk_1_1_param_server_1a923f3ae88ca5614690f3b1b6e4eb259a) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_changed_param_int. +std::function< void([FloatParam](structmavsdk_1_1_param_server_1_1_float_param.md))> [ChangedParamFloatCallback](#classmavsdk_1_1_param_server_1a11b86b8482f80f95130647dfa98ebaa3) | Callback type for subscribe_changed_param_float. +[Handle](classmavsdk_1_1_handle.md)< [FloatParam](structmavsdk_1_1_param_server_1_1_float_param.md) > [ChangedParamFloatHandle](#classmavsdk_1_1_param_server_1a86b8aa9c92d3d6d7dd47fc9b8f0bf881) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_changed_param_float. +std::function< void([CustomParam](structmavsdk_1_1_param_server_1_1_custom_param.md))> [ChangedParamCustomCallback](#classmavsdk_1_1_param_server_1ada550af744c9125178f7ad74d3c1041a) | Callback type for subscribe_changed_param_custom. +[Handle](classmavsdk_1_1_handle.md)< [CustomParam](structmavsdk_1_1_param_server_1_1_custom_param.md) > [ChangedParamCustomHandle](#classmavsdk_1_1_param_server_1a27cf0998ffff4bbdb3f00743b30c903f) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_changed_param_custom. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [ParamServer](#classmavsdk_1_1_param_server_1ae86996ca7c1cf57ae1d011ca5279d231) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~ParamServer](#classmavsdk_1_1_param_server_1a0b221c28148f0278f063232059d372b5) () override | Destructor (internal use only). +  | [ParamServer](#classmavsdk_1_1_param_server_1a4cffcb488093838f72414c94e6c40fd0) (const [ParamServer](classmavsdk_1_1_param_server.md) & other) | Copy constructor. +std::pair< [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469), int32_t > | [retrieve_param_int](#classmavsdk_1_1_param_server_1a95c445dbdd2b764248c811da0230b0b4) (std::string name)const | Retrieve an int parameter. +[Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469) | [provide_param_int](#classmavsdk_1_1_param_server_1a9de5dade4020eda7fb1cc07c6868dad1) (std::string name, int32_t value)const | Provide an int parameter. +std::pair< [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469), float > | [retrieve_param_float](#classmavsdk_1_1_param_server_1a2845916c07a7e47e7444a49f88b23320) (std::string name)const | Retrieve a float parameter. +[Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469) | [provide_param_float](#classmavsdk_1_1_param_server_1a7893e4b00609eb0826835b3d8930db1f) (std::string name, float value)const | Provide a float parameter. +std::pair< [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469), std::string > | [retrieve_param_custom](#classmavsdk_1_1_param_server_1aa6564b8138bc66519f425a350265b50d) (std::string name)const | Retrieve a custom parameter. +[Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469) | [provide_param_custom](#classmavsdk_1_1_param_server_1a60487de3470b9b1c39b403d4c9053d73) (std::string name, std::string value)const | Provide a custom parameter. +[ParamServer::AllParams](structmavsdk_1_1_param_server_1_1_all_params.md) | [retrieve_all_params](#classmavsdk_1_1_param_server_1aaf6b3862213d415ff26730afad95565f) () const | Retrieve all parameters. +[ChangedParamIntHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a923f3ae88ca5614690f3b1b6e4eb259a) | [subscribe_changed_param_int](#classmavsdk_1_1_param_server_1ad022db97fe1c040d255ce8eeb98dcbf9) (const [ChangedParamIntCallback](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a7674183da6d76416b34df9ce51c59358) & callback) | Subscribe to changed int param. +void | [unsubscribe_changed_param_int](#classmavsdk_1_1_param_server_1adea6bfacaf4808d572d0559279d0d3a4) ([ChangedParamIntHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a923f3ae88ca5614690f3b1b6e4eb259a) handle) | Unsubscribe from subscribe_changed_param_int. +[ChangedParamFloatHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a86b8aa9c92d3d6d7dd47fc9b8f0bf881) | [subscribe_changed_param_float](#classmavsdk_1_1_param_server_1aed4a104c9e99603002e16843360c5a18) (const [ChangedParamFloatCallback](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a11b86b8482f80f95130647dfa98ebaa3) & callback) | Subscribe to changed float param. +void | [unsubscribe_changed_param_float](#classmavsdk_1_1_param_server_1a33796a9ecc396b905b51ad4d2ce7989b) ([ChangedParamFloatHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a86b8aa9c92d3d6d7dd47fc9b8f0bf881) handle) | Unsubscribe from subscribe_changed_param_float. +[ChangedParamCustomHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a27cf0998ffff4bbdb3f00743b30c903f) | [subscribe_changed_param_custom](#classmavsdk_1_1_param_server_1a91d4aa280e7e0c43621ea87088781ccb) (const [ChangedParamCustomCallback](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1ada550af744c9125178f7ad74d3c1041a) & callback) | Subscribe to changed custom param. +void | [unsubscribe_changed_param_custom](#classmavsdk_1_1_param_server_1aa78c8df43a9d4c2dbdb6516a04d5f2de) ([ChangedParamCustomHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a27cf0998ffff4bbdb3f00743b30c903f) handle) | Unsubscribe from subscribe_changed_param_custom. +const [ParamServer](classmavsdk_1_1_param_server.md) & | [operator=](#classmavsdk_1_1_param_server_1a29ce1d2c4a2b80fbe4a0b7e7470e14af) (const [ParamServer](classmavsdk_1_1_param_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ParamServer() {#classmavsdk_1_1_param_server_1ae86996ca7c1cf57ae1d011ca5279d231} +```cpp +mavsdk::ParamServer::ParamServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto param_server = ParamServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~ParamServer() {#classmavsdk_1_1_param_server_1a0b221c28148f0278f063232059d372b5} +```cpp +mavsdk::ParamServer::~ParamServer() override +``` + + +Destructor (internal use only). + + +### ParamServer() {#classmavsdk_1_1_param_server_1a4cffcb488093838f72414c94e6c40fd0} +```cpp +mavsdk::ParamServer::ParamServer(const ParamServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [ParamServer](classmavsdk_1_1_param_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_param_server_1a669845877bb8e14482fb46542825c625} + +```cpp +using mavsdk::ParamServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [ParamServer](classmavsdk_1_1_param_server.md) calls. + + +### typedef ChangedParamIntCallback {#classmavsdk_1_1_param_server_1a7674183da6d76416b34df9ce51c59358} + +```cpp +using mavsdk::ParamServer::ChangedParamIntCallback = std::function +``` + + +Callback type for subscribe_changed_param_int. + + +### typedef ChangedParamIntHandle {#classmavsdk_1_1_param_server_1a923f3ae88ca5614690f3b1b6e4eb259a} + +```cpp +using mavsdk::ParamServer::ChangedParamIntHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_changed_param_int. + + +### typedef ChangedParamFloatCallback {#classmavsdk_1_1_param_server_1a11b86b8482f80f95130647dfa98ebaa3} + +```cpp +using mavsdk::ParamServer::ChangedParamFloatCallback = std::function +``` + + +Callback type for subscribe_changed_param_float. + + +### typedef ChangedParamFloatHandle {#classmavsdk_1_1_param_server_1a86b8aa9c92d3d6d7dd47fc9b8f0bf881} + +```cpp +using mavsdk::ParamServer::ChangedParamFloatHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_changed_param_float. + + +### typedef ChangedParamCustomCallback {#classmavsdk_1_1_param_server_1ada550af744c9125178f7ad74d3c1041a} + +```cpp +using mavsdk::ParamServer::ChangedParamCustomCallback = std::function +``` + + +Callback type for subscribe_changed_param_custom. + + +### typedef ChangedParamCustomHandle {#classmavsdk_1_1_param_server_1a27cf0998ffff4bbdb3f00743b30c903f} + +```cpp +using mavsdk::ParamServer::ChangedParamCustomHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_changed_param_custom. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469} + + +Possible results returned for param requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NotFound` | Not Found. + `WrongType` | Wrong type. + `ParamNameTooLong` | Parameter name too long (> 16). + `NoSystem` | No system available. + `ParamValueTooLong` | Parameter name too long (> 128). + +## Member Function Documentation + + +### retrieve_param_int() {#classmavsdk_1_1_param_server_1a95c445dbdd2b764248c811da0230b0b4} +```cpp +std::pair mavsdk::ParamServer::retrieve_param_int(std::string name) const +``` + + +Retrieve an int parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469), int32_t > - Result of request. + +### provide_param_int() {#classmavsdk_1_1_param_server_1a9de5dade4020eda7fb1cc07c6868dad1} +```cpp +Result mavsdk::ParamServer::provide_param_int(std::string name, int32_t value) const +``` + + +Provide an int parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - +* int32_t **value** - + +**Returns** + + [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469) - Result of request. + +### retrieve_param_float() {#classmavsdk_1_1_param_server_1a2845916c07a7e47e7444a49f88b23320} +```cpp +std::pair mavsdk::ParamServer::retrieve_param_float(std::string name) const +``` + + +Retrieve a float parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469), float > - Result of request. + +### provide_param_float() {#classmavsdk_1_1_param_server_1a7893e4b00609eb0826835b3d8930db1f} +```cpp +Result mavsdk::ParamServer::provide_param_float(std::string name, float value) const +``` + + +Provide a float parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - +* float **value** - + +**Returns** + + [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469) - Result of request. + +### retrieve_param_custom() {#classmavsdk_1_1_param_server_1aa6564b8138bc66519f425a350265b50d} +```cpp +std::pair mavsdk::ParamServer::retrieve_param_custom(std::string name) const +``` + + +Retrieve a custom parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - + +**Returns** + + std::pair< [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469), std::string > - Result of request. + +### provide_param_custom() {#classmavsdk_1_1_param_server_1a60487de3470b9b1c39b403d4c9053d73} +```cpp +Result mavsdk::ParamServer::provide_param_custom(std::string name, std::string value) const +``` + + +Provide a custom parameter. + +If the type is wrong, the result will be `WRONG_TYPE`. + + +This function is blocking. + +**Parameters** + +* std::string **name** - +* std::string **value** - + +**Returns** + + [Result](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a6f7fcc017f43dcf68837dbc35ee4f469) - Result of request. + +### retrieve_all_params() {#classmavsdk_1_1_param_server_1aaf6b3862213d415ff26730afad95565f} +```cpp +ParamServer::AllParams mavsdk::ParamServer::retrieve_all_params() const +``` + + +Retrieve all parameters. + +This function is blocking. + +**Returns** + + [ParamServer::AllParams](structmavsdk_1_1_param_server_1_1_all_params.md) - Result of request. + +### subscribe_changed_param_int() {#classmavsdk_1_1_param_server_1ad022db97fe1c040d255ce8eeb98dcbf9} +```cpp +ChangedParamIntHandle mavsdk::ParamServer::subscribe_changed_param_int(const ChangedParamIntCallback &callback) +``` + + +Subscribe to changed int param. + + +**Parameters** + +* const [ChangedParamIntCallback](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a7674183da6d76416b34df9ce51c59358)& **callback** - + +**Returns** + + [ChangedParamIntHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a923f3ae88ca5614690f3b1b6e4eb259a) - + +### unsubscribe_changed_param_int() {#classmavsdk_1_1_param_server_1adea6bfacaf4808d572d0559279d0d3a4} +```cpp +void mavsdk::ParamServer::unsubscribe_changed_param_int(ChangedParamIntHandle handle) +``` + + +Unsubscribe from subscribe_changed_param_int. + + +**Parameters** + +* [ChangedParamIntHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a923f3ae88ca5614690f3b1b6e4eb259a) **handle** - + +### subscribe_changed_param_float() {#classmavsdk_1_1_param_server_1aed4a104c9e99603002e16843360c5a18} +```cpp +ChangedParamFloatHandle mavsdk::ParamServer::subscribe_changed_param_float(const ChangedParamFloatCallback &callback) +``` + + +Subscribe to changed float param. + + +**Parameters** + +* const [ChangedParamFloatCallback](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a11b86b8482f80f95130647dfa98ebaa3)& **callback** - + +**Returns** + + [ChangedParamFloatHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a86b8aa9c92d3d6d7dd47fc9b8f0bf881) - + +### unsubscribe_changed_param_float() {#classmavsdk_1_1_param_server_1a33796a9ecc396b905b51ad4d2ce7989b} +```cpp +void mavsdk::ParamServer::unsubscribe_changed_param_float(ChangedParamFloatHandle handle) +``` + + +Unsubscribe from subscribe_changed_param_float. + + +**Parameters** + +* [ChangedParamFloatHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a86b8aa9c92d3d6d7dd47fc9b8f0bf881) **handle** - + +### subscribe_changed_param_custom() {#classmavsdk_1_1_param_server_1a91d4aa280e7e0c43621ea87088781ccb} +```cpp +ChangedParamCustomHandle mavsdk::ParamServer::subscribe_changed_param_custom(const ChangedParamCustomCallback &callback) +``` + + +Subscribe to changed custom param. + + +**Parameters** + +* const [ChangedParamCustomCallback](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1ada550af744c9125178f7ad74d3c1041a)& **callback** - + +**Returns** + + [ChangedParamCustomHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a27cf0998ffff4bbdb3f00743b30c903f) - + +### unsubscribe_changed_param_custom() {#classmavsdk_1_1_param_server_1aa78c8df43a9d4c2dbdb6516a04d5f2de} +```cpp +void mavsdk::ParamServer::unsubscribe_changed_param_custom(ChangedParamCustomHandle handle) +``` + + +Unsubscribe from subscribe_changed_param_custom. + + +**Parameters** + +* [ChangedParamCustomHandle](classmavsdk_1_1_param_server.md#classmavsdk_1_1_param_server_1a27cf0998ffff4bbdb3f00743b30c903f) **handle** - + +### operator=() {#classmavsdk_1_1_param_server_1a29ce1d2c4a2b80fbe4a0b7e7470e14af} +```cpp +const ParamServer& mavsdk::ParamServer::operator=(const ParamServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [ParamServer](classmavsdk_1_1_param_server.md)& - + +**Returns** + + const [ParamServer](classmavsdk_1_1_param_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_plugin_base.md b/docs/en/cpp/api_reference/classmavsdk_1_1_plugin_base.md new file mode 100644 index 000000000..b1a18f4d7 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_plugin_base.md @@ -0,0 +1,73 @@ +# mavsdk::PluginBase Class Reference +`#include: plugin_base.h` + +---- + + +Base class for every plugin. + + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [PluginBase](#classmavsdk_1_1_plugin_base_1afbb5a017df6856e58fb576d65a9fe207) ()=default | Default Constructor. +  | [~PluginBase](#classmavsdk_1_1_plugin_base_1a038befc8f15d34e0be17ec7df8e9d092) ()=default | Default Destructor. +  | [PluginBase](#classmavsdk_1_1_plugin_base_1a717e8eda4a615730256f4a707f00aa72) (const [PluginBase](classmavsdk_1_1_plugin_base.md) &)=delete | Copy constructor (object is not copyable). +const [PluginBase](classmavsdk_1_1_plugin_base.md) & | [operator=](#classmavsdk_1_1_plugin_base_1a7336d48f2784ef2ffe284ee2aaea3063) (const [PluginBase](classmavsdk_1_1_plugin_base.md) &)=delete | Assign operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### PluginBase() {#classmavsdk_1_1_plugin_base_1afbb5a017df6856e58fb576d65a9fe207} +```cpp +mavsdk::PluginBase::PluginBase()=default +``` + + +Default Constructor. + + +### ~PluginBase() {#classmavsdk_1_1_plugin_base_1a038befc8f15d34e0be17ec7df8e9d092} +```cpp +virtual mavsdk::PluginBase::~PluginBase()=default +``` + + +Default Destructor. + + +### PluginBase() {#classmavsdk_1_1_plugin_base_1a717e8eda4a615730256f4a707f00aa72} +```cpp +mavsdk::PluginBase::PluginBase(const PluginBase &)=delete +``` + + +Copy constructor (object is not copyable). + + +**Parameters** + +* const [PluginBase](classmavsdk_1_1_plugin_base.md)& - + +## Member Function Documentation + + +### operator=() {#classmavsdk_1_1_plugin_base_1a7336d48f2784ef2ffe284ee2aaea3063} +```cpp +const PluginBase& mavsdk::PluginBase::operator=(const PluginBase &)=delete +``` + + +Assign operator (object is not copyable). + + +**Parameters** + +* const [PluginBase](classmavsdk_1_1_plugin_base.md)& - + +**Returns** + + const [PluginBase](classmavsdk_1_1_plugin_base.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_rtk.md b/docs/en/cpp/api_reference/classmavsdk_1_1_rtk.md new file mode 100644 index 000000000..b0dc970fd --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_rtk.md @@ -0,0 +1,163 @@ +# mavsdk::Rtk Class Reference +`#include: rtk.h` + +---- + + +Service to send RTK corrections to the vehicle. + + +## Data Structures + + +struct [RtcmData](structmavsdk_1_1_rtk_1_1_rtcm_data.md) + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_rtk_1a7e310a6ab3cfc82efb46e238bc918a94) | Possible results returned for rtk requests. +std::function< void([Result](classmavsdk_1_1_rtk.md#classmavsdk_1_1_rtk_1a7e310a6ab3cfc82efb46e238bc918a94))> [ResultCallback](#classmavsdk_1_1_rtk_1a63f4e9e3fd880d2f1d88e61f7cda0fdb) | Callback type for asynchronous [Rtk](classmavsdk_1_1_rtk.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Rtk](#classmavsdk_1_1_rtk_1af3b0f558cdab23843d06d898cfe7cf34) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Rtk](#classmavsdk_1_1_rtk_1a5b3d107b883e74885cc2c966cb6ebd10) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Rtk](#classmavsdk_1_1_rtk_1a008724fb2e96cb9a96024f38130c6213) () override | Destructor (internal use only). +  | [Rtk](#classmavsdk_1_1_rtk_1af9118d75e7ef85846bcf7a637d8df73c) (const [Rtk](classmavsdk_1_1_rtk.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_rtk.md#classmavsdk_1_1_rtk_1a7e310a6ab3cfc82efb46e238bc918a94) | [send_rtcm_data](#classmavsdk_1_1_rtk_1ab0f183ba8e57944e6f9d383f51490d09) ([RtcmData](structmavsdk_1_1_rtk_1_1_rtcm_data.md) rtcm_data)const | Send RTCM data. +const [Rtk](classmavsdk_1_1_rtk.md) & | [operator=](#classmavsdk_1_1_rtk_1a8d4c39419257c0df20b55aa7b838ecb2) (const [Rtk](classmavsdk_1_1_rtk.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Rtk() {#classmavsdk_1_1_rtk_1af3b0f558cdab23843d06d898cfe7cf34} +```cpp +mavsdk::Rtk::Rtk(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto rtk = Rtk(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Rtk() {#classmavsdk_1_1_rtk_1a5b3d107b883e74885cc2c966cb6ebd10} +```cpp +mavsdk::Rtk::Rtk(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto rtk = Rtk(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Rtk() {#classmavsdk_1_1_rtk_1a008724fb2e96cb9a96024f38130c6213} +```cpp +mavsdk::Rtk::~Rtk() override +``` + + +Destructor (internal use only). + + +### Rtk() {#classmavsdk_1_1_rtk_1af9118d75e7ef85846bcf7a637d8df73c} +```cpp +mavsdk::Rtk::Rtk(const Rtk &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Rtk](classmavsdk_1_1_rtk.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_rtk_1a63f4e9e3fd880d2f1d88e61f7cda0fdb} + +```cpp +using mavsdk::Rtk::ResultCallback = std::function +``` + + +Callback type for asynchronous [Rtk](classmavsdk_1_1_rtk.md) calls. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_rtk_1a7e310a6ab3cfc82efb46e238bc918a94} + + +Possible results returned for rtk requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `TooLong` | Passed data is too long. + `NoSystem` | No system connected. + `ConnectionError` | Connection error. + +## Member Function Documentation + + +### send_rtcm_data() {#classmavsdk_1_1_rtk_1ab0f183ba8e57944e6f9d383f51490d09} +```cpp +Result mavsdk::Rtk::send_rtcm_data(RtcmData rtcm_data) const +``` + + +Send RTCM data. + +This function is blocking. + +**Parameters** + +* [RtcmData](structmavsdk_1_1_rtk_1_1_rtcm_data.md) **rtcm_data** - + +**Returns** + + [Result](classmavsdk_1_1_rtk.md#classmavsdk_1_1_rtk_1a7e310a6ab3cfc82efb46e238bc918a94) - Result of request. + +### operator=() {#classmavsdk_1_1_rtk_1a8d4c39419257c0df20b55aa7b838ecb2} +```cpp +const Rtk& mavsdk::Rtk::operator=(const Rtk &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Rtk](classmavsdk_1_1_rtk.md)& - + +**Returns** + + const [Rtk](classmavsdk_1_1_rtk.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_server_component.md b/docs/en/cpp/api_reference/classmavsdk_1_1_server_component.md new file mode 100644 index 000000000..8252e6207 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_server_component.md @@ -0,0 +1,45 @@ +# mavsdk::ServerComponent Class Reference +`#include: server_component.h` + +---- + + +This class represents a component, used to initialize a server plugin. + + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [~ServerComponent](#classmavsdk_1_1_server_component_1aa93dd133c0c5476bfd9269365e4afcec) ()=default | Destructor. +uint8_t | [component_id](#classmavsdk_1_1_server_component_1af05efb79ba6c1ed9992e13671d3268ba) () const | MAVLink component ID of this component. + + +## Constructor & Destructor Documentation + + +### ~ServerComponent() {#classmavsdk_1_1_server_component_1aa93dd133c0c5476bfd9269365e4afcec} +```cpp +mavsdk::ServerComponent::~ServerComponent()=default +``` + + +Destructor. + + +## Member Function Documentation + + +### component_id() {#classmavsdk_1_1_server_component_1af05efb79ba6c1ed9992e13671d3268ba} +```cpp +uint8_t mavsdk::ServerComponent::component_id() const +``` + + +MAVLink component ID of this component. + + +**Returns** + + uint8_t - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_server_plugin_base.md b/docs/en/cpp/api_reference/classmavsdk_1_1_server_plugin_base.md new file mode 100644 index 000000000..7e71da7dd --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_server_plugin_base.md @@ -0,0 +1,73 @@ +# mavsdk::ServerPluginBase Class Reference +`#include: server_plugin_base.h` + +---- + + +Base class for every server plugin. + + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [ServerPluginBase](#classmavsdk_1_1_server_plugin_base_1a77b7c74e4e2a10cf55071e95b53eedae) ()=default | Default Constructor. +  | [~ServerPluginBase](#classmavsdk_1_1_server_plugin_base_1a97e1d14c2b72253d53f9284621b1d248) ()=default | Default Destructor. +  | [ServerPluginBase](#classmavsdk_1_1_server_plugin_base_1a86ef071b10d0afc7d287069ac8d11575) (const [ServerPluginBase](classmavsdk_1_1_server_plugin_base.md) &)=delete | Copy constructor (object is not copyable). +const [ServerPluginBase](classmavsdk_1_1_server_plugin_base.md) & | [operator=](#classmavsdk_1_1_server_plugin_base_1ab424dcb3a08fcb7159ca326361548301) (const [ServerPluginBase](classmavsdk_1_1_server_plugin_base.md) &)=delete | Assign operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ServerPluginBase() {#classmavsdk_1_1_server_plugin_base_1a77b7c74e4e2a10cf55071e95b53eedae} +```cpp +mavsdk::ServerPluginBase::ServerPluginBase()=default +``` + + +Default Constructor. + + +### ~ServerPluginBase() {#classmavsdk_1_1_server_plugin_base_1a97e1d14c2b72253d53f9284621b1d248} +```cpp +virtual mavsdk::ServerPluginBase::~ServerPluginBase()=default +``` + + +Default Destructor. + + +### ServerPluginBase() {#classmavsdk_1_1_server_plugin_base_1a86ef071b10d0afc7d287069ac8d11575} +```cpp +mavsdk::ServerPluginBase::ServerPluginBase(const ServerPluginBase &)=delete +``` + + +Copy constructor (object is not copyable). + + +**Parameters** + +* const [ServerPluginBase](classmavsdk_1_1_server_plugin_base.md)& - + +## Member Function Documentation + + +### operator=() {#classmavsdk_1_1_server_plugin_base_1ab424dcb3a08fcb7159ca326361548301} +```cpp +const ServerPluginBase& mavsdk::ServerPluginBase::operator=(const ServerPluginBase &)=delete +``` + + +Assign operator (object is not copyable). + + +**Parameters** + +* const [ServerPluginBase](classmavsdk_1_1_server_plugin_base.md)& - + +**Returns** + + const [ServerPluginBase](classmavsdk_1_1_server_plugin_base.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_server_utility.md b/docs/en/cpp/api_reference/classmavsdk_1_1_server_utility.md new file mode 100644 index 000000000..7c3adee2c --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_server_utility.md @@ -0,0 +1,177 @@ +# mavsdk::ServerUtility Class Reference +`#include: server_utility.h` + +---- + + +Utility for onboard MAVSDK instances for common "server" tasks. + + +## Public Types + + +Type | Description +--- | --- +enum [StatusTextType](#classmavsdk_1_1_server_utility_1a763ddc41251f992acec6af7f19287233) | Status types. +enum [Result](#classmavsdk_1_1_server_utility_1accdda519179f5fc6fe946a727f75f468) | Possible results returned for server utility requests. +std::function< void([Result](classmavsdk_1_1_server_utility.md#classmavsdk_1_1_server_utility_1accdda519179f5fc6fe946a727f75f468))> [ResultCallback](#classmavsdk_1_1_server_utility_1acbb4204dda65430ee20a802fe13cc199) | Callback type for asynchronous [ServerUtility](classmavsdk_1_1_server_utility.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [ServerUtility](#classmavsdk_1_1_server_utility_1af6a56f1c96b29e033c4412c669e02060) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [ServerUtility](#classmavsdk_1_1_server_utility_1a54e7ef77c7ff8bee6c8f3e8d5cc0864c) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~ServerUtility](#classmavsdk_1_1_server_utility_1a3f5fe15b02bcf41520a94feb2fc51fce) () override | Destructor (internal use only). +  | [ServerUtility](#classmavsdk_1_1_server_utility_1a9cbd0e7b1b19b21d98ce7e914ea03f95) (const [ServerUtility](classmavsdk_1_1_server_utility.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_server_utility.md#classmavsdk_1_1_server_utility_1accdda519179f5fc6fe946a727f75f468) | [send_status_text](#classmavsdk_1_1_server_utility_1a7b7bb0b568e94575615086a86a625ae1) ([StatusTextType](classmavsdk_1_1_server_utility.md#classmavsdk_1_1_server_utility_1a763ddc41251f992acec6af7f19287233) type, std::string text)const | Sends a statustext. +const [ServerUtility](classmavsdk_1_1_server_utility.md) & | [operator=](#classmavsdk_1_1_server_utility_1a11fcb91df55711ecb78d8687b1d47472) (const [ServerUtility](classmavsdk_1_1_server_utility.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ServerUtility() {#classmavsdk_1_1_server_utility_1af6a56f1c96b29e033c4412c669e02060} +```cpp +mavsdk::ServerUtility::ServerUtility(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto server_utility = ServerUtility(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### ServerUtility() {#classmavsdk_1_1_server_utility_1a54e7ef77c7ff8bee6c8f3e8d5cc0864c} +```cpp +mavsdk::ServerUtility::ServerUtility(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto server_utility = ServerUtility(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~ServerUtility() {#classmavsdk_1_1_server_utility_1a3f5fe15b02bcf41520a94feb2fc51fce} +```cpp +mavsdk::ServerUtility::~ServerUtility() override +``` + + +Destructor (internal use only). + + +### ServerUtility() {#classmavsdk_1_1_server_utility_1a9cbd0e7b1b19b21d98ce7e914ea03f95} +```cpp +mavsdk::ServerUtility::ServerUtility(const ServerUtility &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [ServerUtility](classmavsdk_1_1_server_utility.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_server_utility_1acbb4204dda65430ee20a802fe13cc199} + +```cpp +using mavsdk::ServerUtility::ResultCallback = std::function +``` + + +Callback type for asynchronous [ServerUtility](classmavsdk_1_1_server_utility.md) calls. + + +## Member Enumeration Documentation + + +### enum StatusTextType {#classmavsdk_1_1_server_utility_1a763ddc41251f992acec6af7f19287233} + + +Status types. + + +Value | Description +--- | --- + `Debug` | Debug. + `Info` | Information. + `Notice` | Notice. + `Warning` | Warning. + `Error` | Error. + `Critical` | Critical. + `Alert` | Alert. + `Emergency` | Emergency. + +### enum Result {#classmavsdk_1_1_server_utility_1accdda519179f5fc6fe946a727f75f468} + + +Possible results returned for server utility requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `InvalidArgument` | Invalid argument. + +## Member Function Documentation + + +### send_status_text() {#classmavsdk_1_1_server_utility_1a7b7bb0b568e94575615086a86a625ae1} +```cpp +Result mavsdk::ServerUtility::send_status_text(StatusTextType type, std::string text) const +``` + + +Sends a statustext. + +This function is blocking. + +**Parameters** + +* [StatusTextType](classmavsdk_1_1_server_utility.md#classmavsdk_1_1_server_utility_1a763ddc41251f992acec6af7f19287233) **type** - +* std::string **text** - + +**Returns** + + [Result](classmavsdk_1_1_server_utility.md#classmavsdk_1_1_server_utility_1accdda519179f5fc6fe946a727f75f468) - Result of request. + +### operator=() {#classmavsdk_1_1_server_utility_1a11fcb91df55711ecb78d8687b1d47472} +```cpp +const ServerUtility& mavsdk::ServerUtility::operator=(const ServerUtility &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [ServerUtility](classmavsdk_1_1_server_utility.md)& - + +**Returns** + + const [ServerUtility](classmavsdk_1_1_server_utility.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_shell.md b/docs/en/cpp/api_reference/classmavsdk_1_1_shell.md new file mode 100644 index 000000000..fbc49b629 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_shell.md @@ -0,0 +1,217 @@ +# mavsdk::Shell Class Reference +`#include: shell.h` + +---- + + +
    +
  • Allow to communicate with the vehicle's system shell.

    +
  • +
+ + +## Public Types + + +Type | Description +--- | --- +enum [Result](#classmavsdk_1_1_shell_1a768bfa296ba3309f936f887fb86c9ba8) | Possible results returned for shell requests. +std::function< void([Result](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1a768bfa296ba3309f936f887fb86c9ba8))> [ResultCallback](#classmavsdk_1_1_shell_1a4937843446c999606349ad438f8d682d) | Callback type for asynchronous [Shell](classmavsdk_1_1_shell.md) calls. +std::function< void(std::string)> [ReceiveCallback](#classmavsdk_1_1_shell_1adfa64ede96967ae1ab5a5ecd83032dbb) | Callback type for subscribe_receive. +[Handle](classmavsdk_1_1_handle.md)< std::string > [ReceiveHandle](#classmavsdk_1_1_shell_1aea7ab47a9a86aa3f91e71306cc9b430b) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_receive. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Shell](#classmavsdk_1_1_shell_1a31a80044ee4822e8b9ac1c515b0eea90) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Shell](#classmavsdk_1_1_shell_1ae6c98c4c854ff0803260fe49bad20a31) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Shell](#classmavsdk_1_1_shell_1aad035d078495e85c700d4c0148c5f4f9) () override | Destructor (internal use only). +  | [Shell](#classmavsdk_1_1_shell_1aa9d95d880297fca1a5cba341633e660e) (const [Shell](classmavsdk_1_1_shell.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1a768bfa296ba3309f936f887fb86c9ba8) | [send](#classmavsdk_1_1_shell_1a7b39022ce3be914eec82b53a76d19bc7) (std::string command)const | Send a command line. +[ReceiveHandle](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1aea7ab47a9a86aa3f91e71306cc9b430b) | [subscribe_receive](#classmavsdk_1_1_shell_1a2794ac389f4df4f1aaa344612bc8c470) (const [ReceiveCallback](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1adfa64ede96967ae1ab5a5ecd83032dbb) & callback) | Receive feedback from a sent command line. +void | [unsubscribe_receive](#classmavsdk_1_1_shell_1a5b696e1651459dbc3ceef2a393af433d) ([ReceiveHandle](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1aea7ab47a9a86aa3f91e71306cc9b430b) handle) | Unsubscribe from subscribe_receive. +const [Shell](classmavsdk_1_1_shell.md) & | [operator=](#classmavsdk_1_1_shell_1a492f8b2e36ef2468522bfd0f51f4b9b8) (const [Shell](classmavsdk_1_1_shell.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Shell() {#classmavsdk_1_1_shell_1a31a80044ee4822e8b9ac1c515b0eea90} +```cpp +mavsdk::Shell::Shell(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto shell = Shell(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Shell() {#classmavsdk_1_1_shell_1ae6c98c4c854ff0803260fe49bad20a31} +```cpp +mavsdk::Shell::Shell(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto shell = Shell(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Shell() {#classmavsdk_1_1_shell_1aad035d078495e85c700d4c0148c5f4f9} +```cpp +mavsdk::Shell::~Shell() override +``` + + +Destructor (internal use only). + + +### Shell() {#classmavsdk_1_1_shell_1aa9d95d880297fca1a5cba341633e660e} +```cpp +mavsdk::Shell::Shell(const Shell &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Shell](classmavsdk_1_1_shell.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_shell_1a4937843446c999606349ad438f8d682d} + +```cpp +using mavsdk::Shell::ResultCallback = std::function +``` + + +Callback type for asynchronous [Shell](classmavsdk_1_1_shell.md) calls. + + +### typedef ReceiveCallback {#classmavsdk_1_1_shell_1adfa64ede96967ae1ab5a5ecd83032dbb} + +```cpp +using mavsdk::Shell::ReceiveCallback = std::function +``` + + +Callback type for subscribe_receive. + + +### typedef ReceiveHandle {#classmavsdk_1_1_shell_1aea7ab47a9a86aa3f91e71306cc9b430b} + +```cpp +using mavsdk::Shell::ReceiveHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_receive. + + +## Member Enumeration Documentation + + +### enum Result {#classmavsdk_1_1_shell_1a768bfa296ba3309f936f887fb86c9ba8} + + +Possible results returned for shell requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + `NoResponse` | Response was not received. + `Busy` | [Shell](classmavsdk_1_1_shell.md) busy (transfer in progress). + +## Member Function Documentation + + +### send() {#classmavsdk_1_1_shell_1a7b39022ce3be914eec82b53a76d19bc7} +```cpp +Result mavsdk::Shell::send(std::string command) const +``` + + +Send a command line. + +This function is blocking. + +**Parameters** + +* std::string **command** - + +**Returns** + + [Result](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1a768bfa296ba3309f936f887fb86c9ba8) - Result of request. + +### subscribe_receive() {#classmavsdk_1_1_shell_1a2794ac389f4df4f1aaa344612bc8c470} +```cpp +ReceiveHandle mavsdk::Shell::subscribe_receive(const ReceiveCallback &callback) +``` + + +Receive feedback from a sent command line. + +This subscription needs to be made before a command line is sent, otherwise, no response will be sent. + +**Parameters** + +* const [ReceiveCallback](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1adfa64ede96967ae1ab5a5ecd83032dbb)& **callback** - + +**Returns** + + [ReceiveHandle](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1aea7ab47a9a86aa3f91e71306cc9b430b) - + +### unsubscribe_receive() {#classmavsdk_1_1_shell_1a5b696e1651459dbc3ceef2a393af433d} +```cpp +void mavsdk::Shell::unsubscribe_receive(ReceiveHandle handle) +``` + + +Unsubscribe from subscribe_receive. + + +**Parameters** + +* [ReceiveHandle](classmavsdk_1_1_shell.md#classmavsdk_1_1_shell_1aea7ab47a9a86aa3f91e71306cc9b430b) **handle** - + +### operator=() {#classmavsdk_1_1_shell_1a492f8b2e36ef2468522bfd0f51f4b9b8} +```cpp +const Shell& mavsdk::Shell::operator=(const Shell &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Shell](classmavsdk_1_1_shell.md)& - + +**Returns** + + const [Shell](classmavsdk_1_1_shell.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_system.md b/docs/en/cpp/api_reference/classmavsdk_1_1_system.md new file mode 100644 index 000000000..61529b55d --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_system.md @@ -0,0 +1,386 @@ +# mavsdk::System Class Reference +`#include: system.h` + +---- + + +This class represents a system, made up of one or more components (e.g. autopilot, cameras, servos, gimbals, etc). + + +[System](classmavsdk_1_1_system.md) objects are used to interact with UAVs (including their components) and standalone cameras. They are not created directly by application code, but are returned by the [Mavsdk](classmavsdk_1_1_mavsdk.md) class. + + +## Public Types + + +Type | Description +--- | --- +enum [ComponentType](#classmavsdk_1_1_system_1af2a91929d9771ae0e59c98557027b1dc) | Component Types. +std::function< void(bool)> [IsConnectedCallback](#classmavsdk_1_1_system_1a0e56bb48498100fde0872a3ec376f282) | type for is connected callback. +[Handle](classmavsdk_1_1_handle.md)< bool > [IsConnectedHandle](#classmavsdk_1_1_system_1adedf1d76e922076dfd3ca3c726443efd) | handle type to unsubscribe from subscribe_is_connected. +std::function< void([ComponentType](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1af2a91929d9771ae0e59c98557027b1dc))> [ComponentDiscoveredCallback](#classmavsdk_1_1_system_1a064172b17193bb9be448e2053c83627b) | type for component discovery callback +[Handle](classmavsdk_1_1_handle.md)< [ComponentType](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1af2a91929d9771ae0e59c98557027b1dc) > [ComponentDiscoveredHandle](#classmavsdk_1_1_system_1adfb374a9eaaa765cf0813cfa6b40df39) | type for component discovery callback handle +std::function< void([ComponentType](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1af2a91929d9771ae0e59c98557027b1dc), uint8_t)> [ComponentDiscoveredIdCallback](#classmavsdk_1_1_system_1a914c50b413b5bd61d334631096e614ca) | type for component discovery callback with component ID +[Handle](classmavsdk_1_1_handle.md)< [ComponentType](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1af2a91929d9771ae0e59c98557027b1dc), uint8_t > [ComponentDiscoveredIdHandle](#classmavsdk_1_1_system_1abd573ae09348f33e7cd3a006fc26a708) | type for component discovery callback handle with component ID + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [~System](#classmavsdk_1_1_system_1abdc4208c07d776c628acdc037a881ea6) () | Destructor. +  | [System](#classmavsdk_1_1_system_1ac0e97e92181683f6b31fe208165dc35c) (const [System](classmavsdk_1_1_system.md) &)=delete | Copy constructor (object is not copyable). +void | [init](#classmavsdk_1_1_system_1a5c4c30affa7abbe06cc809187f3ddcb3) (uint8_t system_id, uint8_t component_id)const | Initialize the system. +bool | [has_autopilot](#classmavsdk_1_1_system_1a0c3d766baa73f5b35e2950a6f0a38c02) () const | Checks whether the system has an autopilot. +bool | [is_standalone](#classmavsdk_1_1_system_1a7fb7ed01204498dcaa2ab7d9cc31acf2) () const | Checks whether the system is a standalone (non-autopilot). +bool | [has_camera](#classmavsdk_1_1_system_1a440fd601ed2120e1e41d9eab536a7da8) (int camera_id=-1)const | Checks whether the system has a camera with the given camera ID. +bool | [has_gimbal](#classmavsdk_1_1_system_1ad66c3ecc096970d40c34610e49dba929) () const | Checks whether the system has a gimbal. +bool | [is_connected](#classmavsdk_1_1_system_1ad07991ae044bc367e27f544db40d065b) () const | Checks if the system is connected. +uint8_t | [get_system_id](#classmavsdk_1_1_system_1a091d793db29719f4996040886ad951a6) () const | MAVLink [System](classmavsdk_1_1_system.md) ID of connected system. +std::vector< uint8_t > | [component_ids](#classmavsdk_1_1_system_1aa33f748f81cc512601451c80bd077888) () const | MAVLink component IDs of connected system. +[IsConnectedHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adedf1d76e922076dfd3ca3c726443efd) | [subscribe_is_connected](#classmavsdk_1_1_system_1aae68747c23976fa7eb63ec0762493263) (const [IsConnectedCallback](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1a0e56bb48498100fde0872a3ec376f282) & callback) | Subscribe to callback to be called when system connection state changes. +void | [unsubscribe_is_connected](#classmavsdk_1_1_system_1a2f1927d56c14a7ad44995bd56afb706f) ([IsConnectedHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adedf1d76e922076dfd3ca3c726443efd) handle) | Unsubscribe from subscribe_is_connected. +[ComponentDiscoveredHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adfb374a9eaaa765cf0813cfa6b40df39) | [subscribe_component_discovered](#classmavsdk_1_1_system_1a25ede402b74a9412334ff1cab521e7d3) (const [ComponentDiscoveredCallback](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1a064172b17193bb9be448e2053c83627b) & callback) | Subscribe to be called when a component is discovered. +void | [unsubscribe_component_discovered](#classmavsdk_1_1_system_1a5d62d308534b5e1673779543d02037f3) ([ComponentDiscoveredHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adfb374a9eaaa765cf0813cfa6b40df39) handle) | Unsubscribe from subscribe_component_discovered. +[ComponentDiscoveredIdHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1abd573ae09348f33e7cd3a006fc26a708) | [subscribe_component_discovered_id](#classmavsdk_1_1_system_1a1905176f3a6633a8a9fe655f2dcd2d23) (const [ComponentDiscoveredIdCallback](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1a914c50b413b5bd61d334631096e614ca) & callback) | Subscribe to be called when a component is discovered. +void | [unsubscribe_component_discovered_id](#classmavsdk_1_1_system_1a37bca637341bba8b07e8f95c97d122db) ([ComponentDiscoveredIdHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1abd573ae09348f33e7cd3a006fc26a708) handle) | Unsubscribe from subscribe_component_discovered_id. +void | [enable_timesync](#classmavsdk_1_1_system_1a7c7177fb0789aefbfb375f4bb12ce824) () | Enable time synchronization using the TIMESYNC messages. +const [System](classmavsdk_1_1_system.md) & | [operator=](#classmavsdk_1_1_system_1a21284c27829fda2391ee27f5732f916d) (const [System](classmavsdk_1_1_system.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### ~System() {#classmavsdk_1_1_system_1abdc4208c07d776c628acdc037a881ea6} +```cpp +mavsdk::System::~System() +``` + + +Destructor. + + +### System() {#classmavsdk_1_1_system_1ac0e97e92181683f6b31fe208165dc35c} +```cpp +mavsdk::System::System(const System &)=delete +``` + + +Copy constructor (object is not copyable). + + +**Parameters** + +* const [System](classmavsdk_1_1_system.md)& - + +## Member Typdef Documentation + + +### typedef IsConnectedCallback {#classmavsdk_1_1_system_1a0e56bb48498100fde0872a3ec376f282} + +```cpp +using mavsdk::System::IsConnectedCallback = std::function +``` + + +type for is connected callback. + + +### typedef IsConnectedHandle {#classmavsdk_1_1_system_1adedf1d76e922076dfd3ca3c726443efd} + +```cpp +using mavsdk::System::IsConnectedHandle = Handle +``` + + +handle type to unsubscribe from subscribe_is_connected. + + +### typedef ComponentDiscoveredCallback {#classmavsdk_1_1_system_1a064172b17193bb9be448e2053c83627b} + +```cpp +using mavsdk::System::ComponentDiscoveredCallback = std::function +``` + + +type for component discovery callback + + +### typedef ComponentDiscoveredHandle {#classmavsdk_1_1_system_1adfb374a9eaaa765cf0813cfa6b40df39} + +```cpp +using mavsdk::System::ComponentDiscoveredHandle = Handle +``` + + +type for component discovery callback handle + + +### typedef ComponentDiscoveredIdCallback {#classmavsdk_1_1_system_1a914c50b413b5bd61d334631096e614ca} + +```cpp +using mavsdk::System::ComponentDiscoveredIdCallback = std::function +``` + + +type for component discovery callback with component ID + + +### typedef ComponentDiscoveredIdHandle {#classmavsdk_1_1_system_1abd573ae09348f33e7cd3a006fc26a708} + +```cpp +using mavsdk::System::ComponentDiscoveredIdHandle = Handle +``` + + +type for component discovery callback handle with component ID + + +## Member Enumeration Documentation + + +### enum ComponentType {#classmavsdk_1_1_system_1af2a91929d9771ae0e59c98557027b1dc} + + +Component Types. + + +Value | Description +--- | --- + `UNKNOWN` | + `AUTOPILOT` | + `CAMERA` | + `GIMBAL` | + +## Member Function Documentation + + +### init() {#classmavsdk_1_1_system_1a5c4c30affa7abbe06cc809187f3ddcb3} +```cpp +void mavsdk::System::init(uint8_t system_id, uint8_t component_id) const +``` + + +Initialize the system. + +This is not (and should not be) directly called by application code. + +**Parameters** + +* uint8_t **system_id** - [System](classmavsdk_1_1_system.md) id. +* uint8_t **component_id** - Component id. + +### has_autopilot() {#classmavsdk_1_1_system_1a0c3d766baa73f5b35e2950a6f0a38c02} +```cpp +bool mavsdk::System::has_autopilot() const +``` + + +Checks whether the system has an autopilot. + + +**Returns** + + bool - `true` if it has an autopilot, `false` otherwise. + +### is_standalone() {#classmavsdk_1_1_system_1a7fb7ed01204498dcaa2ab7d9cc31acf2} +```cpp +bool mavsdk::System::is_standalone() const +``` + + +Checks whether the system is a standalone (non-autopilot). + + +**Returns** + + bool - `true` if stand alone, `false` otherwise. + +### has_camera() {#classmavsdk_1_1_system_1a440fd601ed2120e1e41d9eab536a7da8} +```cpp +bool mavsdk::System::has_camera(int camera_id=-1) const +``` + + +Checks whether the system has a camera with the given camera ID. + +A [System](classmavsdk_1_1_system.md) may have several cameras, with IDs starting from 0. When called without passing a camera ID, it checks whether the system has any camera. + +**Parameters** + +* int **camera_id** - ID of the camera starting from 0 onwards. + +**Returns** + + bool - `true` if camera with the given camera ID is found, `false` otherwise. + +### has_gimbal() {#classmavsdk_1_1_system_1ad66c3ecc096970d40c34610e49dba929} +```cpp +bool mavsdk::System::has_gimbal() const +``` + + +Checks whether the system has a gimbal. + + +**Returns** + + bool - `true` if the system has a gimbal, false otherwise. + +### is_connected() {#classmavsdk_1_1_system_1ad07991ae044bc367e27f544db40d065b} +```cpp +bool mavsdk::System::is_connected() const +``` + + +Checks if the system is connected. + +A system is connected when heartbeats are arriving (discovered and not timed out). + +**Returns** + + bool - `true` if the system is connected. + +### get_system_id() {#classmavsdk_1_1_system_1a091d793db29719f4996040886ad951a6} +```cpp +uint8_t mavsdk::System::get_system_id() const +``` + + +MAVLink [System](classmavsdk_1_1_system.md) ID of connected system. + +> **Note** : this is 0 if nothing is connected yet. + +**Returns** + + uint8_t - the system ID. + +### component_ids() {#classmavsdk_1_1_system_1aa33f748f81cc512601451c80bd077888} +```cpp +std::vector mavsdk::System::component_ids() const +``` + + +MAVLink component IDs of connected system. + +> **Note** : all components that have been seen at least once will be listed. + +**Returns** + + std::vector< uint8_t > - a list of all component ids + +### subscribe_is_connected() {#classmavsdk_1_1_system_1aae68747c23976fa7eb63ec0762493263} +```cpp +IsConnectedHandle mavsdk::System::subscribe_is_connected(const IsConnectedCallback &callback) +``` + + +Subscribe to callback to be called when system connection state changes. + + +**Parameters** + +* const [IsConnectedCallback](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1a0e56bb48498100fde0872a3ec376f282)& **callback** - Callback which will be called. + +**Returns** + + [IsConnectedHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adedf1d76e922076dfd3ca3c726443efd) - + +### unsubscribe_is_connected() {#classmavsdk_1_1_system_1a2f1927d56c14a7ad44995bd56afb706f} +```cpp +void mavsdk::System::unsubscribe_is_connected(IsConnectedHandle handle) +``` + + +Unsubscribe from subscribe_is_connected. + + +**Parameters** + +* [IsConnectedHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adedf1d76e922076dfd3ca3c726443efd) **handle** - + +### subscribe_component_discovered() {#classmavsdk_1_1_system_1a25ede402b74a9412334ff1cab521e7d3} +```cpp +ComponentDiscoveredHandle mavsdk::System::subscribe_component_discovered(const ComponentDiscoveredCallback &callback) +``` + + +Subscribe to be called when a component is discovered. + + +**Parameters** + +* const [ComponentDiscoveredCallback](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1a064172b17193bb9be448e2053c83627b)& **callback** - a function of type void(ComponentType) which will be called with the component type of the new component. + +**Returns** + + [ComponentDiscoveredHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adfb374a9eaaa765cf0813cfa6b40df39) - + +### unsubscribe_component_discovered() {#classmavsdk_1_1_system_1a5d62d308534b5e1673779543d02037f3} +```cpp +void mavsdk::System::unsubscribe_component_discovered(ComponentDiscoveredHandle handle) +``` + + +Unsubscribe from subscribe_component_discovered. + + +**Parameters** + +* [ComponentDiscoveredHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1adfb374a9eaaa765cf0813cfa6b40df39) **handle** - + +### subscribe_component_discovered_id() {#classmavsdk_1_1_system_1a1905176f3a6633a8a9fe655f2dcd2d23} +```cpp +ComponentDiscoveredIdHandle mavsdk::System::subscribe_component_discovered_id(const ComponentDiscoveredIdCallback &callback) +``` + + +Subscribe to be called when a component is discovered. + + +**Parameters** + +* const [ComponentDiscoveredIdCallback](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1a914c50b413b5bd61d334631096e614ca)& **callback** - a function of type void(ComponentType) which will be called with the component type and the component id of the new component. + +**Returns** + + [ComponentDiscoveredIdHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1abd573ae09348f33e7cd3a006fc26a708) - + +### unsubscribe_component_discovered_id() {#classmavsdk_1_1_system_1a37bca637341bba8b07e8f95c97d122db} +```cpp +void mavsdk::System::unsubscribe_component_discovered_id(ComponentDiscoveredIdHandle handle) +``` + + +Unsubscribe from subscribe_component_discovered_id. + + +**Parameters** + +* [ComponentDiscoveredIdHandle](classmavsdk_1_1_system.md#classmavsdk_1_1_system_1abd573ae09348f33e7cd3a006fc26a708) **handle** - + +### enable_timesync() {#classmavsdk_1_1_system_1a7c7177fb0789aefbfb375f4bb12ce824} +```cpp +void mavsdk::System::enable_timesync() +``` + + +Enable time synchronization using the TIMESYNC messages. + + +### operator=() {#classmavsdk_1_1_system_1a21284c27829fda2391ee27f5732f916d} +```cpp +const System& mavsdk::System::operator=(const System &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [System](classmavsdk_1_1_system.md)& - + +**Returns** + + const [System](classmavsdk_1_1_system.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_telemetry.md b/docs/en/cpp/api_reference/classmavsdk_1_1_telemetry.md new file mode 100644 index 000000000..d976527c7 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_telemetry.md @@ -0,0 +1,3489 @@ +# mavsdk::Telemetry Class Reference +`#include: telemetry.h` + +---- + + +Allow users to get vehicle telemetry and state information (e.g. battery, GPS, RC connection, flight mode etc.) and set telemetry update rates. + + +## Data Structures + + +struct [AccelerationFrd](structmavsdk_1_1_telemetry_1_1_acceleration_frd.md) + +struct [ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md) + +struct [ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md) + +struct [Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md) + +struct [AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md) + +struct [AngularVelocityFrd](structmavsdk_1_1_telemetry_1_1_angular_velocity_frd.md) + +struct [Battery](structmavsdk_1_1_telemetry_1_1_battery.md) + +struct [Covariance](structmavsdk_1_1_telemetry_1_1_covariance.md) + +struct [DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md) + +struct [EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) + +struct [FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md) + +struct [GpsGlobalOrigin](structmavsdk_1_1_telemetry_1_1_gps_global_origin.md) + +struct [GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md) + +struct [GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md) + +struct [Heading](structmavsdk_1_1_telemetry_1_1_heading.md) + +struct [Health](structmavsdk_1_1_telemetry_1_1_health.md) + +struct [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) + +struct [MagneticFieldFrd](structmavsdk_1_1_telemetry_1_1_magnetic_field_frd.md) + +struct [Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md) + +struct [Position](structmavsdk_1_1_telemetry_1_1_position.md) + +struct [PositionBody](structmavsdk_1_1_telemetry_1_1_position_body.md) + +struct [PositionNed](structmavsdk_1_1_telemetry_1_1_position_ned.md) + +struct [PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md) + +struct [Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) + +struct [RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md) + +struct [RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md) + +struct [ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md) + +struct [StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md) + +struct [VelocityBody](structmavsdk_1_1_telemetry_1_1_velocity_body.md) + +struct [VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md) + +## Public Types + + +Type | Description +--- | --- +enum [FixType](#classmavsdk_1_1_telemetry_1a548213e1b26615d7b6d1b0b3934639de) | GPS fix type. +enum [FlightMode](#classmavsdk_1_1_telemetry_1a8317d953a82a23654db6f14509acb4fe) | Flight modes. +enum [StatusTextType](#classmavsdk_1_1_telemetry_1ada3ebb336abad223a98bc2a625e0e7d8) | Status types. +enum [LandedState](#classmavsdk_1_1_telemetry_1ac6639935bc3b35b1da553cde41e8f046) | Landed State enumeration. +enum [VtolState](#classmavsdk_1_1_telemetry_1a256f951d993aa120c437d989a6e94166) | VTOL State enumeration. +enum [Result](#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | Possible results returned for telemetry requests. +std::function< void([Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75))> [ResultCallback](#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) | Callback type for asynchronous [Telemetry](classmavsdk_1_1_telemetry.md) calls. +std::function< void([Position](structmavsdk_1_1_telemetry_1_1_position.md))> [PositionCallback](#classmavsdk_1_1_telemetry_1a978b371d636226e198995462afa63552) | Callback type for subscribe_position. +[Handle](classmavsdk_1_1_handle.md)< [Position](structmavsdk_1_1_telemetry_1_1_position.md) > [PositionHandle](#classmavsdk_1_1_telemetry_1a7d82a98ea53c2aa254624bc943ec22f1) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_position. +std::function< void([Position](structmavsdk_1_1_telemetry_1_1_position.md))> [HomeCallback](#classmavsdk_1_1_telemetry_1aaac029969c37a001d43e2788a6abf634) | Callback type for subscribe_home. +[Handle](classmavsdk_1_1_handle.md)< [Position](structmavsdk_1_1_telemetry_1_1_position.md) > [HomeHandle](#classmavsdk_1_1_telemetry_1a7a2b3a8b50d66e911870700ea3fe007d) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_home. +std::function< void(bool)> [InAirCallback](#classmavsdk_1_1_telemetry_1af96cca452305dd8f51b42d4663f15a26) | Callback type for subscribe_in_air. +[Handle](classmavsdk_1_1_handle.md)< bool > [InAirHandle](#classmavsdk_1_1_telemetry_1a17582f68fabac027ab354073e0eca8e5) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_in_air. +std::function< void([LandedState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac6639935bc3b35b1da553cde41e8f046))> [LandedStateCallback](#classmavsdk_1_1_telemetry_1a0cd8ef17abdd7c3d6a9ee761ccc6ae5e) | Callback type for subscribe_landed_state. +[Handle](classmavsdk_1_1_handle.md)< [LandedState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac6639935bc3b35b1da553cde41e8f046) > [LandedStateHandle](#classmavsdk_1_1_telemetry_1a125f2ecfe3f5ce588e6d1799392a5fd7) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_landed_state. +std::function< void(bool)> [ArmedCallback](#classmavsdk_1_1_telemetry_1a9d23a4092d94e50694390e9f41b8c419) | Callback type for subscribe_armed. +[Handle](classmavsdk_1_1_handle.md)< bool > [ArmedHandle](#classmavsdk_1_1_telemetry_1a3cfe4b90e156fb055066f8164985311c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_armed. +std::function< void([VtolState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a256f951d993aa120c437d989a6e94166))> [VtolStateCallback](#classmavsdk_1_1_telemetry_1abf52126ce4d4efb99560aa8e8e58f20c) | Callback type for subscribe_vtol_state. +[Handle](classmavsdk_1_1_handle.md)< [VtolState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a256f951d993aa120c437d989a6e94166) > [VtolStateHandle](#classmavsdk_1_1_telemetry_1a824bab94514afa56334acf41b6f7d244) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_vtol_state. +std::function< void([Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md))> [AttitudeQuaternionCallback](#classmavsdk_1_1_telemetry_1ad16e61245511a99e930d6fdcbd761a30) | Callback type for subscribe_attitude_quaternion. +[Handle](classmavsdk_1_1_handle.md)< [Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) > [AttitudeQuaternionHandle](#classmavsdk_1_1_telemetry_1a0ce62986aedcd06d845406a2d99257d3) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_attitude_quaternion. +std::function< void([EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md))> [AttitudeEulerCallback](#classmavsdk_1_1_telemetry_1a321c7607922369926fbd5f2821986cba) | Callback type for subscribe_attitude_euler. +[Handle](classmavsdk_1_1_handle.md)< [EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) > [AttitudeEulerHandle](#classmavsdk_1_1_telemetry_1ae73f3d3ac224438a6cd07344fda9543b) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_attitude_euler. +std::function< void([AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md))> [AttitudeAngularVelocityBodyCallback](#classmavsdk_1_1_telemetry_1a35ff8def3048faeab7f732153d51085f) | Callback type for subscribe_attitude_angular_velocity_body. +[Handle](classmavsdk_1_1_handle.md)< [AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md) > [AttitudeAngularVelocityBodyHandle](#classmavsdk_1_1_telemetry_1a2328e39c1a96ce9a090cb19283d3ffc1) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_attitude_angular_velocity_body. +std::function< void([Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md))> [CameraAttitudeQuaternionCallback](#classmavsdk_1_1_telemetry_1aa83dafa14e9b5179573a574f6fbdd973) | Callback type for subscribe_camera_attitude_quaternion. +[Handle](classmavsdk_1_1_handle.md)< [Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) > [CameraAttitudeQuaternionHandle](#classmavsdk_1_1_telemetry_1aeb2a99828961bf2a4d5c24753e020358) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_camera_attitude_quaternion. +std::function< void([EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md))> [CameraAttitudeEulerCallback](#classmavsdk_1_1_telemetry_1aa29f9bb0767ba8c384bfe1df69f2fdd9) | Callback type for subscribe_camera_attitude_euler. +[Handle](classmavsdk_1_1_handle.md)< [EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) > [CameraAttitudeEulerHandle](#classmavsdk_1_1_telemetry_1a76471c91115d6e03e6165a3e1315808b) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_camera_attitude_euler. +std::function< void([VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md))> [VelocityNedCallback](#classmavsdk_1_1_telemetry_1ab5859d2f6a9c9bd81282166b3de92342) | Callback type for subscribe_velocity_ned. +[Handle](classmavsdk_1_1_handle.md)< [VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md) > [VelocityNedHandle](#classmavsdk_1_1_telemetry_1a2c3898f33bfa1bffe86681aaca33343e) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_velocity_ned. +std::function< void([GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md))> [GpsInfoCallback](#classmavsdk_1_1_telemetry_1ad8fa90886b2283eace09b4b46708048b) | Callback type for subscribe_gps_info. +[Handle](classmavsdk_1_1_handle.md)< [GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md) > [GpsInfoHandle](#classmavsdk_1_1_telemetry_1a87598b504f6ddf3ba0620b0458f2d39c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_gps_info. +std::function< void([RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md))> [RawGpsCallback](#classmavsdk_1_1_telemetry_1a915868d562ed445fa30beaa9140ea97c) | Callback type for subscribe_raw_gps. +[Handle](classmavsdk_1_1_handle.md)< [RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md) > [RawGpsHandle](#classmavsdk_1_1_telemetry_1a75a62eb3624bf77ea6860d5d965636fd) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_raw_gps. +std::function< void([Battery](structmavsdk_1_1_telemetry_1_1_battery.md))> [BatteryCallback](#classmavsdk_1_1_telemetry_1af4b121c576ef2ae567b1d571b12dff9d) | Callback type for subscribe_battery. +[Handle](classmavsdk_1_1_handle.md)< [Battery](structmavsdk_1_1_telemetry_1_1_battery.md) > [BatteryHandle](#classmavsdk_1_1_telemetry_1ad9c79c3a89de6f28aabc771a2b5cc92f) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_battery. +std::function< void([FlightMode](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a8317d953a82a23654db6f14509acb4fe))> [FlightModeCallback](#classmavsdk_1_1_telemetry_1a2d7318d0823771b7a586c40199bdb482) | Callback type for subscribe_flight_mode. +[Handle](classmavsdk_1_1_handle.md)< [FlightMode](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a8317d953a82a23654db6f14509acb4fe) > [FlightModeHandle](#classmavsdk_1_1_telemetry_1add61cde1555ed1cec93a34bbdadeef5c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_flight_mode. +std::function< void([Health](structmavsdk_1_1_telemetry_1_1_health.md))> [HealthCallback](#classmavsdk_1_1_telemetry_1a7a120dd053091c644e0e2e47fdcbeb75) | Callback type for subscribe_health. +[Handle](classmavsdk_1_1_handle.md)< [Health](structmavsdk_1_1_telemetry_1_1_health.md) > [HealthHandle](#classmavsdk_1_1_telemetry_1a52869d9dd1a240385b0d213a7057f3df) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_health. +std::function< void([RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md))> [RcStatusCallback](#classmavsdk_1_1_telemetry_1aafcd706b805898301b574ffa2b909b85) | Callback type for subscribe_rc_status. +[Handle](classmavsdk_1_1_handle.md)< [RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md) > [RcStatusHandle](#classmavsdk_1_1_telemetry_1ae3bd26bbc4c12eddc7f90f42482078de) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_rc_status. +std::function< void([StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md))> [StatusTextCallback](#classmavsdk_1_1_telemetry_1a46e51ff90fe779990ed09a593c1c7898) | Callback type for subscribe_status_text. +[Handle](classmavsdk_1_1_handle.md)< [StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md) > [StatusTextHandle](#classmavsdk_1_1_telemetry_1a5c2b31499961747b784664b87b851e04) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_status_text. +std::function< void([ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md))> [ActuatorControlTargetCallback](#classmavsdk_1_1_telemetry_1ada6af3de1b60b93a709345c3a8ede551) | Callback type for subscribe_actuator_control_target. +[Handle](classmavsdk_1_1_handle.md)< [ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md) > [ActuatorControlTargetHandle](#classmavsdk_1_1_telemetry_1a01438bbc123454e745b8874bc91bf874) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_actuator_control_target. +std::function< void([ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md))> [ActuatorOutputStatusCallback](#classmavsdk_1_1_telemetry_1a2b1e800ce1ba6fb776351416340ac8b9) | Callback type for subscribe_actuator_output_status. +[Handle](classmavsdk_1_1_handle.md)< [ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md) > [ActuatorOutputStatusHandle](#classmavsdk_1_1_telemetry_1ac0bbbb060195848f41de50600489713f) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_actuator_output_status. +std::function< void([Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md))> [OdometryCallback](#classmavsdk_1_1_telemetry_1a8cd23f7364f8f5cb22869155da67c65d) | Callback type for subscribe_odometry. +[Handle](classmavsdk_1_1_handle.md)< [Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md) > [OdometryHandle](#classmavsdk_1_1_telemetry_1a23b33f337ed73ec584e8ac8868c72f86) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_odometry. +std::function< void([PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md))> [PositionVelocityNedCallback](#classmavsdk_1_1_telemetry_1a5a38deb284622ff6926703e1e5c96a74) | Callback type for subscribe_position_velocity_ned. +[Handle](classmavsdk_1_1_handle.md)< [PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md) > [PositionVelocityNedHandle](#classmavsdk_1_1_telemetry_1aef1424caca3967e67336140af395e59c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_position_velocity_ned. +std::function< void([GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md))> [GroundTruthCallback](#classmavsdk_1_1_telemetry_1a222aae53852a2c535f6d69ed57221f13) | Callback type for subscribe_ground_truth. +[Handle](classmavsdk_1_1_handle.md)< [GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md) > [GroundTruthHandle](#classmavsdk_1_1_telemetry_1a373568d10564c5a3c3d325e5975a3a23) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_ground_truth. +std::function< void([FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md))> [FixedwingMetricsCallback](#classmavsdk_1_1_telemetry_1a5b42dbef0ef6d8c1768d503d0437f1e3) | Callback type for subscribe_fixedwing_metrics. +[Handle](classmavsdk_1_1_handle.md)< [FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md) > [FixedwingMetricsHandle](#classmavsdk_1_1_telemetry_1ab180a383ee3e17f20bb1b026b667db04) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_fixedwing_metrics. +std::function< void([Imu](structmavsdk_1_1_telemetry_1_1_imu.md))> [ImuCallback](#classmavsdk_1_1_telemetry_1a4fbc2ad274fd5a8af077004d2d7bd984) | Callback type for subscribe_imu. +[Handle](classmavsdk_1_1_handle.md)< [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) > [ImuHandle](#classmavsdk_1_1_telemetry_1a5b45a4c22abb67617d37ae56efdf8360) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_imu. +std::function< void([Imu](structmavsdk_1_1_telemetry_1_1_imu.md))> [ScaledImuCallback](#classmavsdk_1_1_telemetry_1a26159a775adcfbc42302234b7108d94f) | Callback type for subscribe_scaled_imu. +[Handle](classmavsdk_1_1_handle.md)< [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) > [ScaledImuHandle](#classmavsdk_1_1_telemetry_1a4968d9d418d48a4368f2915023ca0014) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_scaled_imu. +std::function< void([Imu](structmavsdk_1_1_telemetry_1_1_imu.md))> [RawImuCallback](#classmavsdk_1_1_telemetry_1a92711da85d343cb58b73561e6b730c76) | Callback type for subscribe_raw_imu. +[Handle](classmavsdk_1_1_handle.md)< [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) > [RawImuHandle](#classmavsdk_1_1_telemetry_1a416f5b4dc6c51d78d05572d5cc18f3fb) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_raw_imu. +std::function< void(bool)> [HealthAllOkCallback](#classmavsdk_1_1_telemetry_1a71cdcadfaa988dc14029e0b9fdbe742d) | Callback type for subscribe_health_all_ok. +[Handle](classmavsdk_1_1_handle.md)< bool > [HealthAllOkHandle](#classmavsdk_1_1_telemetry_1aa882d4938eb491cce5b7ca6aead2384c) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_health_all_ok. +std::function< void(uint64_t)> [UnixEpochTimeCallback](#classmavsdk_1_1_telemetry_1a321c7d809ae8f56bb8a361d5e5ce6391) | Callback type for subscribe_unix_epoch_time. +[Handle](classmavsdk_1_1_handle.md)< uint64_t > [UnixEpochTimeHandle](#classmavsdk_1_1_telemetry_1a4c4b00adfab9b7f04530133aafbafbd5) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_unix_epoch_time. +std::function< void([DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md))> [DistanceSensorCallback](#classmavsdk_1_1_telemetry_1aacfdb5e2cce7f3f77c68b36f020ed1f2) | Callback type for subscribe_distance_sensor. +[Handle](classmavsdk_1_1_handle.md)< [DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md) > [DistanceSensorHandle](#classmavsdk_1_1_telemetry_1aaa6bd0660aeb7d3f1d12240ce0710878) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_distance_sensor. +std::function< void([ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md))> [ScaledPressureCallback](#classmavsdk_1_1_telemetry_1ac123edc254bb1874edc08a0f531f82b1) | Callback type for subscribe_scaled_pressure. +[Handle](classmavsdk_1_1_handle.md)< [ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md) > [ScaledPressureHandle](#classmavsdk_1_1_telemetry_1ad19871b63833f64bed071db6017e4a22) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_scaled_pressure. +std::function< void([Heading](structmavsdk_1_1_telemetry_1_1_heading.md))> [HeadingCallback](#classmavsdk_1_1_telemetry_1aa3bca0adab525a4c733c1e7f5c5dd8b3) | Callback type for subscribe_heading. +[Handle](classmavsdk_1_1_handle.md)< [Heading](structmavsdk_1_1_telemetry_1_1_heading.md) > [HeadingHandle](#classmavsdk_1_1_telemetry_1a11cc43135c8162fd8478ba76a5b3166d) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_heading. +std::function< void([Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md))> [AltitudeCallback](#classmavsdk_1_1_telemetry_1a868986de0ab3990d4fe1ec842bce6adf) | Callback type for subscribe_altitude. +[Handle](classmavsdk_1_1_handle.md)< [Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md) > [AltitudeHandle](#classmavsdk_1_1_telemetry_1ae0714c14e07a08b4748c96ea20f1d12f) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_altitude. +std::function< void([Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75), [GpsGlobalOrigin](structmavsdk_1_1_telemetry_1_1_gps_global_origin.md))> [GetGpsGlobalOriginCallback](#classmavsdk_1_1_telemetry_1a350ee89a7e30a691e130e29ace8917ef) | Callback type for get_gps_global_origin_async. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Telemetry](#classmavsdk_1_1_telemetry_1a6c8c8ed8759fc8c6e9fd4e7644c63cbe) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Telemetry](#classmavsdk_1_1_telemetry_1af78f18fbb117c82d5ffe21e015535067) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Telemetry](#classmavsdk_1_1_telemetry_1a6ffca3dba4c6102ae6602822a140c8fc) () override | Destructor (internal use only). +  | [Telemetry](#classmavsdk_1_1_telemetry_1ad734f199b82a9928c63230676c9789e9) (const [Telemetry](classmavsdk_1_1_telemetry.md) & other) | Copy constructor. +[PositionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7d82a98ea53c2aa254624bc943ec22f1) | [subscribe_position](#classmavsdk_1_1_telemetry_1a647f3d61b4f3301fd8c2aca1afcafb31) (const [PositionCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a978b371d636226e198995462afa63552) & callback) | Subscribe to 'position' updates. +void | [unsubscribe_position](#classmavsdk_1_1_telemetry_1abf10cb55e2c477bbb875c0944938b76c) ([PositionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7d82a98ea53c2aa254624bc943ec22f1) handle) | Unsubscribe from subscribe_position. +[Position](structmavsdk_1_1_telemetry_1_1_position.md) | [position](#classmavsdk_1_1_telemetry_1a2299da1bc63313c429f07ab0fdbe5335) () const | Poll for '[Position](structmavsdk_1_1_telemetry_1_1_position.md)' (blocking). +[HomeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7a2b3a8b50d66e911870700ea3fe007d) | [subscribe_home](#classmavsdk_1_1_telemetry_1ae57e4c8741ba7ae05961cadfabc82875) (const [HomeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aaac029969c37a001d43e2788a6abf634) & callback) | Subscribe to 'home position' updates. +void | [unsubscribe_home](#classmavsdk_1_1_telemetry_1a83feb66aa64946b954ca305b6cc2f7ea) ([HomeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7a2b3a8b50d66e911870700ea3fe007d) handle) | Unsubscribe from subscribe_home. +[Position](structmavsdk_1_1_telemetry_1_1_position.md) | [home](#classmavsdk_1_1_telemetry_1ad5c239b93aa1923edd1b97494a3fbfe7) () const | Poll for '[Position](structmavsdk_1_1_telemetry_1_1_position.md)' (blocking). +[InAirHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a17582f68fabac027ab354073e0eca8e5) | [subscribe_in_air](#classmavsdk_1_1_telemetry_1a0fc586a0c90141e125a305fd8211e8d8) (const [InAirCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1af96cca452305dd8f51b42d4663f15a26) & callback) | Subscribe to in-air updates. +void | [unsubscribe_in_air](#classmavsdk_1_1_telemetry_1a2e23bf258ef69c267ab5b8dee203bd95) ([InAirHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a17582f68fabac027ab354073e0eca8e5) handle) | Unsubscribe from subscribe_in_air. +bool | [in_air](#classmavsdk_1_1_telemetry_1a909738ff2fbe104c6eb4524cc9bf2dd5) () const | Poll for 'bool' (blocking). +[LandedStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a125f2ecfe3f5ce588e6d1799392a5fd7) | [subscribe_landed_state](#classmavsdk_1_1_telemetry_1ae618a7ba0ed197e3d5c3427a63c3cfa0) (const [LandedStateCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a0cd8ef17abdd7c3d6a9ee761ccc6ae5e) & callback) | Subscribe to landed state updates. +void | [unsubscribe_landed_state](#classmavsdk_1_1_telemetry_1a17df3b1e3917f788725f39cf879145f6) ([LandedStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a125f2ecfe3f5ce588e6d1799392a5fd7) handle) | Unsubscribe from subscribe_landed_state. +[LandedState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac6639935bc3b35b1da553cde41e8f046) | [landed_state](#classmavsdk_1_1_telemetry_1af7d7c385852db38d6320516508ce7465) () const | Poll for 'LandedState' (blocking). +[ArmedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a3cfe4b90e156fb055066f8164985311c) | [subscribe_armed](#classmavsdk_1_1_telemetry_1a2ea3978439ed7e21973a41e1f2c2b24f) (const [ArmedCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a9d23a4092d94e50694390e9f41b8c419) & callback) | Subscribe to armed updates. +void | [unsubscribe_armed](#classmavsdk_1_1_telemetry_1a8c6080d520f6d2fdac9cb97279ffcbb9) ([ArmedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a3cfe4b90e156fb055066f8164985311c) handle) | Unsubscribe from subscribe_armed. +bool | [armed](#classmavsdk_1_1_telemetry_1a6620142adc47f069262e5bf69dbb3876) () const | Poll for 'bool' (blocking). +[VtolStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a824bab94514afa56334acf41b6f7d244) | [subscribe_vtol_state](#classmavsdk_1_1_telemetry_1a956eb63dc90a2cf905590f6f309edb36) (const [VtolStateCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1abf52126ce4d4efb99560aa8e8e58f20c) & callback) | subscribe to vtol state Updates +void | [unsubscribe_vtol_state](#classmavsdk_1_1_telemetry_1a932eb8b43e90e64bd131b3257f747963) ([VtolStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a824bab94514afa56334acf41b6f7d244) handle) | Unsubscribe from subscribe_vtol_state. +[VtolState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a256f951d993aa120c437d989a6e94166) | [vtol_state](#classmavsdk_1_1_telemetry_1a6d3fd68f3e639a2bf9940e9f38f220c3) () const | Poll for 'VtolState' (blocking). +[AttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a0ce62986aedcd06d845406a2d99257d3) | [subscribe_attitude_quaternion](#classmavsdk_1_1_telemetry_1a9248befe3416252c7d8fb63b19842421) (const [AttitudeQuaternionCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad16e61245511a99e930d6fdcbd761a30) & callback) | Subscribe to 'attitude' updates (quaternion). +void | [unsubscribe_attitude_quaternion](#classmavsdk_1_1_telemetry_1a06034401ac16901d50b850ded0b064b5) ([AttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a0ce62986aedcd06d845406a2d99257d3) handle) | Unsubscribe from subscribe_attitude_quaternion. +[Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) | [attitude_quaternion](#classmavsdk_1_1_telemetry_1aae76890957b33727be72a39807448c88) () const | Poll for '[Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md)' (blocking). +[AttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae73f3d3ac224438a6cd07344fda9543b) | [subscribe_attitude_euler](#classmavsdk_1_1_telemetry_1aaf90ca9cc8adcc9cb1963293bdfcefd6) (const [AttitudeEulerCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a321c7607922369926fbd5f2821986cba) & callback) | Subscribe to 'attitude' updates (Euler). +void | [unsubscribe_attitude_euler](#classmavsdk_1_1_telemetry_1aa770088117b037446efa8cbfe058e54d) ([AttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae73f3d3ac224438a6cd07344fda9543b) handle) | Unsubscribe from subscribe_attitude_euler. +[EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) | [attitude_euler](#classmavsdk_1_1_telemetry_1a03035bb72324e843372eb69cf7899ce5) () const | Poll for '[EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md)' (blocking). +[AttitudeAngularVelocityBodyHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2328e39c1a96ce9a090cb19283d3ffc1) | [subscribe_attitude_angular_velocity_body](#classmavsdk_1_1_telemetry_1a3bbefcdb4e9cd9af9692626984504cb7) (const [AttitudeAngularVelocityBodyCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a35ff8def3048faeab7f732153d51085f) & callback) | Subscribe to 'attitude' updates (angular velocity) +void | [unsubscribe_attitude_angular_velocity_body](#classmavsdk_1_1_telemetry_1a2319d78b4e214e5b2f3ef55a1c32e2c5) ([AttitudeAngularVelocityBodyHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2328e39c1a96ce9a090cb19283d3ffc1) handle) | Unsubscribe from subscribe_attitude_angular_velocity_body. +[AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md) | [attitude_angular_velocity_body](#classmavsdk_1_1_telemetry_1a8d9e2489b79c2cdbabaef8b6bb8e2952) () const | Poll for '[AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md)' (blocking). +[CameraAttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aeb2a99828961bf2a4d5c24753e020358) | [subscribe_camera_attitude_quaternion](#classmavsdk_1_1_telemetry_1a9b7517e15c841765fbb8b1230e73bf82) (const [CameraAttitudeQuaternionCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa83dafa14e9b5179573a574f6fbdd973) & callback) | Subscribe to 'camera attitude' updates (quaternion). +void | [unsubscribe_camera_attitude_quaternion](#classmavsdk_1_1_telemetry_1aa92270b8a30b22271f65d92e9a7ed9a1) ([CameraAttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aeb2a99828961bf2a4d5c24753e020358) handle) | Unsubscribe from subscribe_camera_attitude_quaternion. +[Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) | [camera_attitude_quaternion](#classmavsdk_1_1_telemetry_1a3c07447351d3b6195d5e2526e7b128b3) () const | Poll for '[Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md)' (blocking). +[CameraAttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a76471c91115d6e03e6165a3e1315808b) | [subscribe_camera_attitude_euler](#classmavsdk_1_1_telemetry_1aa50015ba9b1decb825d45e459191c342) (const [CameraAttitudeEulerCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa29f9bb0767ba8c384bfe1df69f2fdd9) & callback) | Subscribe to 'camera attitude' updates (Euler). +void | [unsubscribe_camera_attitude_euler](#classmavsdk_1_1_telemetry_1a90b8dfe6b83afc908e4c236bbbc32930) ([CameraAttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a76471c91115d6e03e6165a3e1315808b) handle) | Unsubscribe from subscribe_camera_attitude_euler. +[EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) | [camera_attitude_euler](#classmavsdk_1_1_telemetry_1a635643d955f0cd9a805914501f819796) () const | Poll for '[EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md)' (blocking). +[VelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2c3898f33bfa1bffe86681aaca33343e) | [subscribe_velocity_ned](#classmavsdk_1_1_telemetry_1a9b5e6bd8fb05324fd7a99d0260933c9d) (const [VelocityNedCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ab5859d2f6a9c9bd81282166b3de92342) & callback) | Subscribe to 'ground speed' updates (NED). +void | [unsubscribe_velocity_ned](#classmavsdk_1_1_telemetry_1ae14a663f3b4820e891a4d83c2f8aa2c3) ([VelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2c3898f33bfa1bffe86681aaca33343e) handle) | Unsubscribe from subscribe_velocity_ned. +[VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md) | [velocity_ned](#classmavsdk_1_1_telemetry_1a40a86062c0322d6be7c86d8e15a52f28) () const | Poll for '[VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md)' (blocking). +[GpsInfoHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a87598b504f6ddf3ba0620b0458f2d39c) | [subscribe_gps_info](#classmavsdk_1_1_telemetry_1a1933fa5b008856b5d621489d785c68e7) (const [GpsInfoCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad8fa90886b2283eace09b4b46708048b) & callback) | Subscribe to 'GPS info' updates. +void | [unsubscribe_gps_info](#classmavsdk_1_1_telemetry_1a96ba022d27983893a814ad4a787bfa51) ([GpsInfoHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a87598b504f6ddf3ba0620b0458f2d39c) handle) | Unsubscribe from subscribe_gps_info. +[GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md) | [gps_info](#classmavsdk_1_1_telemetry_1a983dabc1aed50745b326072662c419e8) () const | Poll for '[GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md)' (blocking). +[RawGpsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a75a62eb3624bf77ea6860d5d965636fd) | [subscribe_raw_gps](#classmavsdk_1_1_telemetry_1a39c324fdd723a2b5c5559ddadad597f0) (const [RawGpsCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a915868d562ed445fa30beaa9140ea97c) & callback) | Subscribe to 'Raw GPS' updates. +void | [unsubscribe_raw_gps](#classmavsdk_1_1_telemetry_1acc6c03a6d27b268f609c72b66aa48a09) ([RawGpsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a75a62eb3624bf77ea6860d5d965636fd) handle) | Unsubscribe from subscribe_raw_gps. +[RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md) | [raw_gps](#classmavsdk_1_1_telemetry_1ac43c29e435b6c1a6594854adc6a1bf6c) () const | Poll for '[RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md)' (blocking). +[BatteryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad9c79c3a89de6f28aabc771a2b5cc92f) | [subscribe_battery](#classmavsdk_1_1_telemetry_1ad7e7ceb85181aaac7bf5553af7f45e2a) (const [BatteryCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1af4b121c576ef2ae567b1d571b12dff9d) & callback) | Subscribe to 'battery' updates. +void | [unsubscribe_battery](#classmavsdk_1_1_telemetry_1a72ddd509a9480ba59f073fa8f1ee5dbc) ([BatteryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad9c79c3a89de6f28aabc771a2b5cc92f) handle) | Unsubscribe from subscribe_battery. +[Battery](structmavsdk_1_1_telemetry_1_1_battery.md) | [battery](#classmavsdk_1_1_telemetry_1afb3bad3c7a36c14ae97492df3f6bbd54) () const | Poll for '[Battery](structmavsdk_1_1_telemetry_1_1_battery.md)' (blocking). +[FlightModeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1add61cde1555ed1cec93a34bbdadeef5c) | [subscribe_flight_mode](#classmavsdk_1_1_telemetry_1accd831cbb9134c845744a5c70da1b418) (const [FlightModeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2d7318d0823771b7a586c40199bdb482) & callback) | Subscribe to 'flight mode' updates. +void | [unsubscribe_flight_mode](#classmavsdk_1_1_telemetry_1a64dc8d45d06b23332ba6353d50c9cc17) ([FlightModeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1add61cde1555ed1cec93a34bbdadeef5c) handle) | Unsubscribe from subscribe_flight_mode. +[FlightMode](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a8317d953a82a23654db6f14509acb4fe) | [flight_mode](#classmavsdk_1_1_telemetry_1a4972a3968e379d565e7700f2f51158dd) () const | Poll for 'FlightMode' (blocking). +[HealthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a52869d9dd1a240385b0d213a7057f3df) | [subscribe_health](#classmavsdk_1_1_telemetry_1a093a702abd1370ff97f4d9ebce449942) (const [HealthCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7a120dd053091c644e0e2e47fdcbeb75) & callback) | Subscribe to 'health' updates. +void | [unsubscribe_health](#classmavsdk_1_1_telemetry_1af7830aff90366a0255e71117c07f5484) ([HealthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a52869d9dd1a240385b0d213a7057f3df) handle) | Unsubscribe from subscribe_health. +[Health](structmavsdk_1_1_telemetry_1_1_health.md) | [health](#classmavsdk_1_1_telemetry_1aae4824c9eeb72603b197c864b5cc5df5) () const | Poll for '[Health](structmavsdk_1_1_telemetry_1_1_health.md)' (blocking). +[RcStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae3bd26bbc4c12eddc7f90f42482078de) | [subscribe_rc_status](#classmavsdk_1_1_telemetry_1a0252d9434190edab26fc5b3874bdcc1c) (const [RcStatusCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aafcd706b805898301b574ffa2b909b85) & callback) | Subscribe to 'RC status' updates. +void | [unsubscribe_rc_status](#classmavsdk_1_1_telemetry_1a975a70f6345f73a37894aa7a49495dc7) ([RcStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae3bd26bbc4c12eddc7f90f42482078de) handle) | Unsubscribe from subscribe_rc_status. +[RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md) | [rc_status](#classmavsdk_1_1_telemetry_1a59cd497c69f1d32be29a940a2d34a474) () const | Poll for '[RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md)' (blocking). +[StatusTextHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5c2b31499961747b784664b87b851e04) | [subscribe_status_text](#classmavsdk_1_1_telemetry_1a56e54b5dc245cb07da6088a3033d45f8) (const [StatusTextCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a46e51ff90fe779990ed09a593c1c7898) & callback) | Subscribe to 'status text' updates. +void | [unsubscribe_status_text](#classmavsdk_1_1_telemetry_1a972adcc6c0c88ddb6aefdd372bc06418) ([StatusTextHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5c2b31499961747b784664b87b851e04) handle) | Unsubscribe from subscribe_status_text. +[StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md) | [status_text](#classmavsdk_1_1_telemetry_1a2f31c0668ed1ac1bfdfa4b2e9a2023a9) () const | Poll for '[StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md)' (blocking). +[ActuatorControlTargetHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a01438bbc123454e745b8874bc91bf874) | [subscribe_actuator_control_target](#classmavsdk_1_1_telemetry_1ae9754c6f90e3fd95a9cab766ca588e0d) (const [ActuatorControlTargetCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ada6af3de1b60b93a709345c3a8ede551) & callback) | Subscribe to 'actuator control target' updates. +void | [unsubscribe_actuator_control_target](#classmavsdk_1_1_telemetry_1a13672a6c91e4bb74bf92fe9c779eeb40) ([ActuatorControlTargetHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a01438bbc123454e745b8874bc91bf874) handle) | Unsubscribe from subscribe_actuator_control_target. +[ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md) | [actuator_control_target](#classmavsdk_1_1_telemetry_1af4ffa70ff58c46b50be93a0fbf960f95) () const | Poll for '[ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md)' (blocking). +[ActuatorOutputStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac0bbbb060195848f41de50600489713f) | [subscribe_actuator_output_status](#classmavsdk_1_1_telemetry_1a65bbf4a157aa8898beeb57440808bbe6) (const [ActuatorOutputStatusCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2b1e800ce1ba6fb776351416340ac8b9) & callback) | Subscribe to 'actuator output status' updates. +void | [unsubscribe_actuator_output_status](#classmavsdk_1_1_telemetry_1aa40e1ff8e1eb2c9d0b6a8f36db6823b6) ([ActuatorOutputStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac0bbbb060195848f41de50600489713f) handle) | Unsubscribe from subscribe_actuator_output_status. +[ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md) | [actuator_output_status](#classmavsdk_1_1_telemetry_1a68fa1619dfad0a7cfcc2725025669252) () const | Poll for '[ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md)' (blocking). +[OdometryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a23b33f337ed73ec584e8ac8868c72f86) | [subscribe_odometry](#classmavsdk_1_1_telemetry_1a6def40a24f3eb85ca0cb076c5a576677) (const [OdometryCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a8cd23f7364f8f5cb22869155da67c65d) & callback) | Subscribe to 'odometry' updates. +void | [unsubscribe_odometry](#classmavsdk_1_1_telemetry_1a235d029cb79a071d137c7cfb03afb4b6) ([OdometryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a23b33f337ed73ec584e8ac8868c72f86) handle) | Unsubscribe from subscribe_odometry. +[Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md) | [odometry](#classmavsdk_1_1_telemetry_1a715b6e8ba1206059706f08844a0b96d2) () const | Poll for '[Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md)' (blocking). +[PositionVelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aef1424caca3967e67336140af395e59c) | [subscribe_position_velocity_ned](#classmavsdk_1_1_telemetry_1a70f1331b7df5e5bda2711b1141d86d68) (const [PositionVelocityNedCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5a38deb284622ff6926703e1e5c96a74) & callback) | Subscribe to 'position velocity' updates. +void | [unsubscribe_position_velocity_ned](#classmavsdk_1_1_telemetry_1ab561338c465b3b3e1d060fdd8c078306) ([PositionVelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aef1424caca3967e67336140af395e59c) handle) | Unsubscribe from subscribe_position_velocity_ned. +[PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md) | [position_velocity_ned](#classmavsdk_1_1_telemetry_1af9b06944ca73ad09caadacd9f4fae950) () const | Poll for '[PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md)' (blocking). +[GroundTruthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a373568d10564c5a3c3d325e5975a3a23) | [subscribe_ground_truth](#classmavsdk_1_1_telemetry_1a3853c0b62fe26202e13896f94af4f72c) (const [GroundTruthCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a222aae53852a2c535f6d69ed57221f13) & callback) | Subscribe to 'ground truth' updates. +void | [unsubscribe_ground_truth](#classmavsdk_1_1_telemetry_1a69dedf60328c385dedae208e7ca3e2b5) ([GroundTruthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a373568d10564c5a3c3d325e5975a3a23) handle) | Unsubscribe from subscribe_ground_truth. +[GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md) | [ground_truth](#classmavsdk_1_1_telemetry_1a1b5f387edc39e33b86954f2048133f71) () const | Poll for '[GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md)' (blocking). +[FixedwingMetricsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ab180a383ee3e17f20bb1b026b667db04) | [subscribe_fixedwing_metrics](#classmavsdk_1_1_telemetry_1ac5117bf112c932f47ffe283df7aac7f1) (const [FixedwingMetricsCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5b42dbef0ef6d8c1768d503d0437f1e3) & callback) | Subscribe to 'fixedwing metrics' updates. +void | [unsubscribe_fixedwing_metrics](#classmavsdk_1_1_telemetry_1a40a910811684cffe050f8dea0d682565) ([FixedwingMetricsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ab180a383ee3e17f20bb1b026b667db04) handle) | Unsubscribe from subscribe_fixedwing_metrics. +[FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md) | [fixedwing_metrics](#classmavsdk_1_1_telemetry_1a2ab8d2a8d017d46e77d49c4f899c7cbf) () const | Poll for '[FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md)' (blocking). +[ImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5b45a4c22abb67617d37ae56efdf8360) | [subscribe_imu](#classmavsdk_1_1_telemetry_1a24d0904fd8529724a76f8a4fda5bdb70) (const [ImuCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4fbc2ad274fd5a8af077004d2d7bd984) & callback) | Subscribe to 'IMU' updates (in SI units in NED body frame). +void | [unsubscribe_imu](#classmavsdk_1_1_telemetry_1a2af03957c69efd9b5cbb7537def56155) ([ImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5b45a4c22abb67617d37ae56efdf8360) handle) | Unsubscribe from subscribe_imu. +[Imu](structmavsdk_1_1_telemetry_1_1_imu.md) | [imu](#classmavsdk_1_1_telemetry_1a1a4e43b7bdcd988442955d2a5465b977) () const | Poll for '[Imu](structmavsdk_1_1_telemetry_1_1_imu.md)' (blocking). +[ScaledImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4968d9d418d48a4368f2915023ca0014) | [subscribe_scaled_imu](#classmavsdk_1_1_telemetry_1a61bd540f505a3a6acd858ca169e868b3) (const [ScaledImuCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a26159a775adcfbc42302234b7108d94f) & callback) | Subscribe to 'Scaled IMU' updates. +void | [unsubscribe_scaled_imu](#classmavsdk_1_1_telemetry_1a69acf5d201425f0a318a36ad6230fb46) ([ScaledImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4968d9d418d48a4368f2915023ca0014) handle) | Unsubscribe from subscribe_scaled_imu. +[Imu](structmavsdk_1_1_telemetry_1_1_imu.md) | [scaled_imu](#classmavsdk_1_1_telemetry_1ab6a515ba85a67bc80e6e1c9a05d1f94d) () const | Poll for '[Imu](structmavsdk_1_1_telemetry_1_1_imu.md)' (blocking). +[RawImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a416f5b4dc6c51d78d05572d5cc18f3fb) | [subscribe_raw_imu](#classmavsdk_1_1_telemetry_1a98db826585b84957478a6195d46f0491) (const [RawImuCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a92711da85d343cb58b73561e6b730c76) & callback) | Subscribe to 'Raw IMU' updates. +void | [unsubscribe_raw_imu](#classmavsdk_1_1_telemetry_1aec5b5fbbb37654bb6dae9607451929d7) ([RawImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a416f5b4dc6c51d78d05572d5cc18f3fb) handle) | Unsubscribe from subscribe_raw_imu. +[Imu](structmavsdk_1_1_telemetry_1_1_imu.md) | [raw_imu](#classmavsdk_1_1_telemetry_1a691464f001ddf8d02b97bcf137f5cf8a) () const | Poll for '[Imu](structmavsdk_1_1_telemetry_1_1_imu.md)' (blocking). +[HealthAllOkHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa882d4938eb491cce5b7ca6aead2384c) | [subscribe_health_all_ok](#classmavsdk_1_1_telemetry_1acc64edfa8230926024cdefe93ab10c7f) (const [HealthAllOkCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a71cdcadfaa988dc14029e0b9fdbe742d) & callback) | Subscribe to 'HealthAllOk' updates. +void | [unsubscribe_health_all_ok](#classmavsdk_1_1_telemetry_1ab0dd814f6ca883ded70839bf7ec0010c) ([HealthAllOkHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa882d4938eb491cce5b7ca6aead2384c) handle) | Unsubscribe from subscribe_health_all_ok. +bool | [health_all_ok](#classmavsdk_1_1_telemetry_1ad6d833741b5576f07204d268c5cd4d06) () const | Poll for 'bool' (blocking). +[UnixEpochTimeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4c4b00adfab9b7f04530133aafbafbd5) | [subscribe_unix_epoch_time](#classmavsdk_1_1_telemetry_1a172eb7793c61744a8195e38c0612ec1f) (const [UnixEpochTimeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a321c7d809ae8f56bb8a361d5e5ce6391) & callback) | Subscribe to 'unix epoch time' updates. +void | [unsubscribe_unix_epoch_time](#classmavsdk_1_1_telemetry_1acba0439f1175aa29c072d85efa0c68c6) ([UnixEpochTimeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4c4b00adfab9b7f04530133aafbafbd5) handle) | Unsubscribe from subscribe_unix_epoch_time. +uint64_t | [unix_epoch_time](#classmavsdk_1_1_telemetry_1ab5ea5f6bb35b5670e34d5697d8c880f4) () const | Poll for 'uint64_t' (blocking). +[DistanceSensorHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aaa6bd0660aeb7d3f1d12240ce0710878) | [subscribe_distance_sensor](#classmavsdk_1_1_telemetry_1a07cb00743cab5df75f0a656eb2ebaed1) (const [DistanceSensorCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aacfdb5e2cce7f3f77c68b36f020ed1f2) & callback) | Subscribe to 'Distance Sensor' updates. +void | [unsubscribe_distance_sensor](#classmavsdk_1_1_telemetry_1a726d49ea6b63128e7d16f781e016c192) ([DistanceSensorHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aaa6bd0660aeb7d3f1d12240ce0710878) handle) | Unsubscribe from subscribe_distance_sensor. +[DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md) | [distance_sensor](#classmavsdk_1_1_telemetry_1aa01828c0ffcb4727b884ffeae8fef59a) () const | Poll for '[DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md)' (blocking). +[ScaledPressureHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad19871b63833f64bed071db6017e4a22) | [subscribe_scaled_pressure](#classmavsdk_1_1_telemetry_1a934fe2b50a79219e3c6d404fc7d6825d) (const [ScaledPressureCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac123edc254bb1874edc08a0f531f82b1) & callback) | Subscribe to 'Scaled Pressure' updates. +void | [unsubscribe_scaled_pressure](#classmavsdk_1_1_telemetry_1a725b8f4f2bdda5eca799a0829f287848) ([ScaledPressureHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad19871b63833f64bed071db6017e4a22) handle) | Unsubscribe from subscribe_scaled_pressure. +[ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md) | [scaled_pressure](#classmavsdk_1_1_telemetry_1a825ecb6af46663034f982c3c3d6da022) () const | Poll for '[ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md)' (blocking). +[HeadingHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a11cc43135c8162fd8478ba76a5b3166d) | [subscribe_heading](#classmavsdk_1_1_telemetry_1a0ebfabba364867869314e389b118584b) (const [HeadingCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa3bca0adab525a4c733c1e7f5c5dd8b3) & callback) | Subscribe to '[Heading](structmavsdk_1_1_telemetry_1_1_heading.md)' updates. +void | [unsubscribe_heading](#classmavsdk_1_1_telemetry_1afe400d67b33f60a43d3bd823f598c0e9) ([HeadingHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a11cc43135c8162fd8478ba76a5b3166d) handle) | Unsubscribe from subscribe_heading. +[Heading](structmavsdk_1_1_telemetry_1_1_heading.md) | [heading](#classmavsdk_1_1_telemetry_1a2aec80b167a3076903be4fe52847a4d3) () const | Poll for '[Heading](structmavsdk_1_1_telemetry_1_1_heading.md)' (blocking). +[AltitudeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae0714c14e07a08b4748c96ea20f1d12f) | [subscribe_altitude](#classmavsdk_1_1_telemetry_1ae50ada2726b9a074157c73ddf0894b23) (const [AltitudeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a868986de0ab3990d4fe1ec842bce6adf) & callback) | Subscribe to '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' updates. +void | [unsubscribe_altitude](#classmavsdk_1_1_telemetry_1aee258bae5149771cf37a6e5b5d63415c) ([AltitudeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae0714c14e07a08b4748c96ea20f1d12f) handle) | Unsubscribe from subscribe_altitude. +[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md) | [altitude](#classmavsdk_1_1_telemetry_1a53f3c06d9b4e0f737f69c060c2be621d) () const | Poll for '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' (blocking). +void | [set_rate_position_async](#classmavsdk_1_1_telemetry_1ad7e5b576edb9398c8f5f2f14626b984a) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'position' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_position](#classmavsdk_1_1_telemetry_1a665439f3d5f8c58b3ef3dd427cf4782b) (double rate_hz)const | Set rate to 'position' updates. +void | [set_rate_home_async](#classmavsdk_1_1_telemetry_1a098f4c4f50fc3ac2c153ef152208fbbe) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'home position' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_home](#classmavsdk_1_1_telemetry_1af90e28ad8a8f05401176c98e427eecfc) (double rate_hz)const | Set rate to 'home position' updates. +void | [set_rate_in_air_async](#classmavsdk_1_1_telemetry_1a9ea77b7ef64acd1e25b05e593e638c70) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to in-air updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_in_air](#classmavsdk_1_1_telemetry_1a8f179e8397b395e61a48529ceeba2b14) (double rate_hz)const | Set rate to in-air updates. +void | [set_rate_landed_state_async](#classmavsdk_1_1_telemetry_1a180fff93b120a67c16ad5993f0b38847) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to landed state updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_landed_state](#classmavsdk_1_1_telemetry_1a53a3428c602c1f91cfcffdba188a4e51) (double rate_hz)const | Set rate to landed state updates. +void | [set_rate_vtol_state_async](#classmavsdk_1_1_telemetry_1a18f47beba583e6814061f95e68a3851d) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to VTOL state updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_vtol_state](#classmavsdk_1_1_telemetry_1a943c2e32a12098a117c4bd4eed7cdc22) (double rate_hz)const | Set rate to VTOL state updates. +void | [set_rate_attitude_quaternion_async](#classmavsdk_1_1_telemetry_1a1eb6bc9b25d1043405ac30e13172a272) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'attitude euler angle' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_attitude_quaternion](#classmavsdk_1_1_telemetry_1adfc8e1a3bfa0f459350640630283716d) (double rate_hz)const | Set rate to 'attitude euler angle' updates. +void | [set_rate_attitude_euler_async](#classmavsdk_1_1_telemetry_1aabf20f904d9c65582cdf167f7b0275a9) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'attitude quaternion' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_attitude_euler](#classmavsdk_1_1_telemetry_1adc7a43d7143261df5f97fdc8a882fdf3) (double rate_hz)const | Set rate to 'attitude quaternion' updates. +void | [set_rate_camera_attitude_async](#classmavsdk_1_1_telemetry_1a520f15e42f5f1b3987ca2a9cd94a3d9a) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate of camera attitude updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_camera_attitude](#classmavsdk_1_1_telemetry_1a427da223d16ce07a61b07d4e5af1ab04) (double rate_hz)const | Set rate of camera attitude updates. +void | [set_rate_velocity_ned_async](#classmavsdk_1_1_telemetry_1a9429ffa784fa56adee69c5017abedee4) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'ground speed' updates (NED). +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_velocity_ned](#classmavsdk_1_1_telemetry_1ab5cb79fd53f27f245808a6bb9ed3225d) (double rate_hz)const | Set rate to 'ground speed' updates (NED). +void | [set_rate_gps_info_async](#classmavsdk_1_1_telemetry_1ae6ada3cd6d4e9835dd4d1d712f1195e4) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'GPS info' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_gps_info](#classmavsdk_1_1_telemetry_1a14510bcb6fe3c31d91653d32d354613f) (double rate_hz)const | Set rate to 'GPS info' updates. +void | [set_rate_battery_async](#classmavsdk_1_1_telemetry_1a5615e21f616997dfca1318c96a7e550e) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'battery' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_battery](#classmavsdk_1_1_telemetry_1ae781d2e950a535a465f2bc1575e9f893) (double rate_hz)const | Set rate to 'battery' updates. +void | [set_rate_rc_status_async](#classmavsdk_1_1_telemetry_1a8cf84eaca875626bc53ed03e98d6eb7e) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'RC status' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_rc_status](#classmavsdk_1_1_telemetry_1acbfc54792f79c5fd2a9855278981f8ca) (double rate_hz)const | Set rate to 'RC status' updates. +void | [set_rate_actuator_control_target_async](#classmavsdk_1_1_telemetry_1aa44e3a76c482f273a2f1bc1a09bec27c) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'actuator control target' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_actuator_control_target](#classmavsdk_1_1_telemetry_1aa43efb510038f1bb95241953ae09c998) (double rate_hz)const | Set rate to 'actuator control target' updates. +void | [set_rate_actuator_output_status_async](#classmavsdk_1_1_telemetry_1a2ad19c1101962ed7cfeec89b7fae0f9c) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'actuator output status' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_actuator_output_status](#classmavsdk_1_1_telemetry_1a48b3e3a288ba6a8d38914c4827124006) (double rate_hz)const | Set rate to 'actuator output status' updates. +void | [set_rate_odometry_async](#classmavsdk_1_1_telemetry_1a23e507e1d53c6603479701f5e2af49ce) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'odometry' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_odometry](#classmavsdk_1_1_telemetry_1a4368bf825cec3bc9369d57546a45391e) (double rate_hz)const | Set rate to 'odometry' updates. +void | [set_rate_position_velocity_ned_async](#classmavsdk_1_1_telemetry_1a9a4c3b6affa497dd22e464f515ca278c) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'position velocity' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_position_velocity_ned](#classmavsdk_1_1_telemetry_1a64fe3457589cd208a9f7bd5dea763da1) (double rate_hz)const | Set rate to 'position velocity' updates. +void | [set_rate_ground_truth_async](#classmavsdk_1_1_telemetry_1a16b28ebdc6d211a5b182bd8d0abb4d2e) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'ground truth' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_ground_truth](#classmavsdk_1_1_telemetry_1a23b2962e5b7681ece3fcbc72220d6b48) (double rate_hz)const | Set rate to 'ground truth' updates. +void | [set_rate_fixedwing_metrics_async](#classmavsdk_1_1_telemetry_1a1484ccdcf4ba20a151e380e7bd7b9869) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'fixedwing metrics' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_fixedwing_metrics](#classmavsdk_1_1_telemetry_1ab345a5925d132c27e0a5e1ab65a1e2c1) (double rate_hz)const | Set rate to 'fixedwing metrics' updates. +void | [set_rate_imu_async](#classmavsdk_1_1_telemetry_1a7dca435daa0de2db2d2e9d588c6bed99) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'IMU' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_imu](#classmavsdk_1_1_telemetry_1a4e0d1dc2350e06f68f472d85dc69d175) (double rate_hz)const | Set rate to 'IMU' updates. +void | [set_rate_scaled_imu_async](#classmavsdk_1_1_telemetry_1aebbf2eb2e5d117d8b40f21075845467c) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'Scaled IMU' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_scaled_imu](#classmavsdk_1_1_telemetry_1af8dc4f38bf7cc89f700c985a04e03237) (double rate_hz)const | Set rate to 'Scaled IMU' updates. +void | [set_rate_raw_imu_async](#classmavsdk_1_1_telemetry_1a36d19058a0f71d711de3e50ba718704e) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'Raw IMU' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_raw_imu](#classmavsdk_1_1_telemetry_1a020cb8760e6f00b759c8ef564d8801ad) (double rate_hz)const | Set rate to 'Raw IMU' updates. +void | [set_rate_unix_epoch_time_async](#classmavsdk_1_1_telemetry_1a74b18cd8a5faed4d46b244db0a6e3c50) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'unix epoch time' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_unix_epoch_time](#classmavsdk_1_1_telemetry_1a340ac34547672ee07131bca34cbbb820) (double rate_hz)const | Set rate to 'unix epoch time' updates. +void | [set_rate_distance_sensor_async](#classmavsdk_1_1_telemetry_1a0371c470866b539b3aa1e254c974aa43) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to 'Distance Sensor' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_distance_sensor](#classmavsdk_1_1_telemetry_1a7f536359536478691d7db980ffe49e49) (double rate_hz)const | Set rate to 'Distance Sensor' updates. +void | [set_rate_altitude_async](#classmavsdk_1_1_telemetry_1a15461dd3f64aef2b921c9f06ee144bc1) (double rate_hz, const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) callback) | Set rate to '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' updates. +[Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) | [set_rate_altitude](#classmavsdk_1_1_telemetry_1a100fc786b86637385c6188ea53121b98) (double rate_hz)const | Set rate to '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' updates. +void | [get_gps_global_origin_async](#classmavsdk_1_1_telemetry_1a60cca43e2f87e3fd3a9e170ff2b64e0a) (const [GetGpsGlobalOriginCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a350ee89a7e30a691e130e29ace8917ef) callback) | Get the GPS location of where the estimator has been initialized. +std::pair< [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75), [Telemetry::GpsGlobalOrigin](structmavsdk_1_1_telemetry_1_1_gps_global_origin.md) > | [get_gps_global_origin](#classmavsdk_1_1_telemetry_1a77747e7cea5a4d644bd6bec9441c7bfb) () const | Get the GPS location of where the estimator has been initialized. +const [Telemetry](classmavsdk_1_1_telemetry.md) & | [operator=](#classmavsdk_1_1_telemetry_1a703ac978c925be8806921925cf16aca9) (const [Telemetry](classmavsdk_1_1_telemetry.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Telemetry() {#classmavsdk_1_1_telemetry_1a6c8c8ed8759fc8c6e9fd4e7644c63cbe} +```cpp +mavsdk::Telemetry::Telemetry(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto telemetry = Telemetry(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Telemetry() {#classmavsdk_1_1_telemetry_1af78f18fbb117c82d5ffe21e015535067} +```cpp +mavsdk::Telemetry::Telemetry(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto telemetry = Telemetry(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Telemetry() {#classmavsdk_1_1_telemetry_1a6ffca3dba4c6102ae6602822a140c8fc} +```cpp +mavsdk::Telemetry::~Telemetry() override +``` + + +Destructor (internal use only). + + +### Telemetry() {#classmavsdk_1_1_telemetry_1ad734f199b82a9928c63230676c9789e9} +```cpp +mavsdk::Telemetry::Telemetry(const Telemetry &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Telemetry](classmavsdk_1_1_telemetry.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b} + +```cpp +using mavsdk::Telemetry::ResultCallback = std::function +``` + + +Callback type for asynchronous [Telemetry](classmavsdk_1_1_telemetry.md) calls. + + +### typedef PositionCallback {#classmavsdk_1_1_telemetry_1a978b371d636226e198995462afa63552} + +```cpp +using mavsdk::Telemetry::PositionCallback = std::function +``` + + +Callback type for subscribe_position. + + +### typedef PositionHandle {#classmavsdk_1_1_telemetry_1a7d82a98ea53c2aa254624bc943ec22f1} + +```cpp +using mavsdk::Telemetry::PositionHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_position. + + +### typedef HomeCallback {#classmavsdk_1_1_telemetry_1aaac029969c37a001d43e2788a6abf634} + +```cpp +using mavsdk::Telemetry::HomeCallback = std::function +``` + + +Callback type for subscribe_home. + + +### typedef HomeHandle {#classmavsdk_1_1_telemetry_1a7a2b3a8b50d66e911870700ea3fe007d} + +```cpp +using mavsdk::Telemetry::HomeHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_home. + + +### typedef InAirCallback {#classmavsdk_1_1_telemetry_1af96cca452305dd8f51b42d4663f15a26} + +```cpp +using mavsdk::Telemetry::InAirCallback = std::function +``` + + +Callback type for subscribe_in_air. + + +### typedef InAirHandle {#classmavsdk_1_1_telemetry_1a17582f68fabac027ab354073e0eca8e5} + +```cpp +using mavsdk::Telemetry::InAirHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_in_air. + + +### typedef LandedStateCallback {#classmavsdk_1_1_telemetry_1a0cd8ef17abdd7c3d6a9ee761ccc6ae5e} + +```cpp +using mavsdk::Telemetry::LandedStateCallback = std::function +``` + + +Callback type for subscribe_landed_state. + + +### typedef LandedStateHandle {#classmavsdk_1_1_telemetry_1a125f2ecfe3f5ce588e6d1799392a5fd7} + +```cpp +using mavsdk::Telemetry::LandedStateHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_landed_state. + + +### typedef ArmedCallback {#classmavsdk_1_1_telemetry_1a9d23a4092d94e50694390e9f41b8c419} + +```cpp +using mavsdk::Telemetry::ArmedCallback = std::function +``` + + +Callback type for subscribe_armed. + + +### typedef ArmedHandle {#classmavsdk_1_1_telemetry_1a3cfe4b90e156fb055066f8164985311c} + +```cpp +using mavsdk::Telemetry::ArmedHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_armed. + + +### typedef VtolStateCallback {#classmavsdk_1_1_telemetry_1abf52126ce4d4efb99560aa8e8e58f20c} + +```cpp +using mavsdk::Telemetry::VtolStateCallback = std::function +``` + + +Callback type for subscribe_vtol_state. + + +### typedef VtolStateHandle {#classmavsdk_1_1_telemetry_1a824bab94514afa56334acf41b6f7d244} + +```cpp +using mavsdk::Telemetry::VtolStateHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_vtol_state. + + +### typedef AttitudeQuaternionCallback {#classmavsdk_1_1_telemetry_1ad16e61245511a99e930d6fdcbd761a30} + +```cpp +using mavsdk::Telemetry::AttitudeQuaternionCallback = std::function +``` + + +Callback type for subscribe_attitude_quaternion. + + +### typedef AttitudeQuaternionHandle {#classmavsdk_1_1_telemetry_1a0ce62986aedcd06d845406a2d99257d3} + +```cpp +using mavsdk::Telemetry::AttitudeQuaternionHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_attitude_quaternion. + + +### typedef AttitudeEulerCallback {#classmavsdk_1_1_telemetry_1a321c7607922369926fbd5f2821986cba} + +```cpp +using mavsdk::Telemetry::AttitudeEulerCallback = std::function +``` + + +Callback type for subscribe_attitude_euler. + + +### typedef AttitudeEulerHandle {#classmavsdk_1_1_telemetry_1ae73f3d3ac224438a6cd07344fda9543b} + +```cpp +using mavsdk::Telemetry::AttitudeEulerHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_attitude_euler. + + +### typedef AttitudeAngularVelocityBodyCallback {#classmavsdk_1_1_telemetry_1a35ff8def3048faeab7f732153d51085f} + +```cpp +using mavsdk::Telemetry::AttitudeAngularVelocityBodyCallback = std::function +``` + + +Callback type for subscribe_attitude_angular_velocity_body. + + +### typedef AttitudeAngularVelocityBodyHandle {#classmavsdk_1_1_telemetry_1a2328e39c1a96ce9a090cb19283d3ffc1} + +```cpp +using mavsdk::Telemetry::AttitudeAngularVelocityBodyHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_attitude_angular_velocity_body. + + +### typedef CameraAttitudeQuaternionCallback {#classmavsdk_1_1_telemetry_1aa83dafa14e9b5179573a574f6fbdd973} + +```cpp +using mavsdk::Telemetry::CameraAttitudeQuaternionCallback = std::function +``` + + +Callback type for subscribe_camera_attitude_quaternion. + + +### typedef CameraAttitudeQuaternionHandle {#classmavsdk_1_1_telemetry_1aeb2a99828961bf2a4d5c24753e020358} + +```cpp +using mavsdk::Telemetry::CameraAttitudeQuaternionHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_camera_attitude_quaternion. + + +### typedef CameraAttitudeEulerCallback {#classmavsdk_1_1_telemetry_1aa29f9bb0767ba8c384bfe1df69f2fdd9} + +```cpp +using mavsdk::Telemetry::CameraAttitudeEulerCallback = std::function +``` + + +Callback type for subscribe_camera_attitude_euler. + + +### typedef CameraAttitudeEulerHandle {#classmavsdk_1_1_telemetry_1a76471c91115d6e03e6165a3e1315808b} + +```cpp +using mavsdk::Telemetry::CameraAttitudeEulerHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_camera_attitude_euler. + + +### typedef VelocityNedCallback {#classmavsdk_1_1_telemetry_1ab5859d2f6a9c9bd81282166b3de92342} + +```cpp +using mavsdk::Telemetry::VelocityNedCallback = std::function +``` + + +Callback type for subscribe_velocity_ned. + + +### typedef VelocityNedHandle {#classmavsdk_1_1_telemetry_1a2c3898f33bfa1bffe86681aaca33343e} + +```cpp +using mavsdk::Telemetry::VelocityNedHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_velocity_ned. + + +### typedef GpsInfoCallback {#classmavsdk_1_1_telemetry_1ad8fa90886b2283eace09b4b46708048b} + +```cpp +using mavsdk::Telemetry::GpsInfoCallback = std::function +``` + + +Callback type for subscribe_gps_info. + + +### typedef GpsInfoHandle {#classmavsdk_1_1_telemetry_1a87598b504f6ddf3ba0620b0458f2d39c} + +```cpp +using mavsdk::Telemetry::GpsInfoHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_gps_info. + + +### typedef RawGpsCallback {#classmavsdk_1_1_telemetry_1a915868d562ed445fa30beaa9140ea97c} + +```cpp +using mavsdk::Telemetry::RawGpsCallback = std::function +``` + + +Callback type for subscribe_raw_gps. + + +### typedef RawGpsHandle {#classmavsdk_1_1_telemetry_1a75a62eb3624bf77ea6860d5d965636fd} + +```cpp +using mavsdk::Telemetry::RawGpsHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_raw_gps. + + +### typedef BatteryCallback {#classmavsdk_1_1_telemetry_1af4b121c576ef2ae567b1d571b12dff9d} + +```cpp +using mavsdk::Telemetry::BatteryCallback = std::function +``` + + +Callback type for subscribe_battery. + + +### typedef BatteryHandle {#classmavsdk_1_1_telemetry_1ad9c79c3a89de6f28aabc771a2b5cc92f} + +```cpp +using mavsdk::Telemetry::BatteryHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_battery. + + +### typedef FlightModeCallback {#classmavsdk_1_1_telemetry_1a2d7318d0823771b7a586c40199bdb482} + +```cpp +using mavsdk::Telemetry::FlightModeCallback = std::function +``` + + +Callback type for subscribe_flight_mode. + + +### typedef FlightModeHandle {#classmavsdk_1_1_telemetry_1add61cde1555ed1cec93a34bbdadeef5c} + +```cpp +using mavsdk::Telemetry::FlightModeHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_flight_mode. + + +### typedef HealthCallback {#classmavsdk_1_1_telemetry_1a7a120dd053091c644e0e2e47fdcbeb75} + +```cpp +using mavsdk::Telemetry::HealthCallback = std::function +``` + + +Callback type for subscribe_health. + + +### typedef HealthHandle {#classmavsdk_1_1_telemetry_1a52869d9dd1a240385b0d213a7057f3df} + +```cpp +using mavsdk::Telemetry::HealthHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_health. + + +### typedef RcStatusCallback {#classmavsdk_1_1_telemetry_1aafcd706b805898301b574ffa2b909b85} + +```cpp +using mavsdk::Telemetry::RcStatusCallback = std::function +``` + + +Callback type for subscribe_rc_status. + + +### typedef RcStatusHandle {#classmavsdk_1_1_telemetry_1ae3bd26bbc4c12eddc7f90f42482078de} + +```cpp +using mavsdk::Telemetry::RcStatusHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_rc_status. + + +### typedef StatusTextCallback {#classmavsdk_1_1_telemetry_1a46e51ff90fe779990ed09a593c1c7898} + +```cpp +using mavsdk::Telemetry::StatusTextCallback = std::function +``` + + +Callback type for subscribe_status_text. + + +### typedef StatusTextHandle {#classmavsdk_1_1_telemetry_1a5c2b31499961747b784664b87b851e04} + +```cpp +using mavsdk::Telemetry::StatusTextHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_status_text. + + +### typedef ActuatorControlTargetCallback {#classmavsdk_1_1_telemetry_1ada6af3de1b60b93a709345c3a8ede551} + +```cpp +using mavsdk::Telemetry::ActuatorControlTargetCallback = std::function +``` + + +Callback type for subscribe_actuator_control_target. + + +### typedef ActuatorControlTargetHandle {#classmavsdk_1_1_telemetry_1a01438bbc123454e745b8874bc91bf874} + +```cpp +using mavsdk::Telemetry::ActuatorControlTargetHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_actuator_control_target. + + +### typedef ActuatorOutputStatusCallback {#classmavsdk_1_1_telemetry_1a2b1e800ce1ba6fb776351416340ac8b9} + +```cpp +using mavsdk::Telemetry::ActuatorOutputStatusCallback = std::function +``` + + +Callback type for subscribe_actuator_output_status. + + +### typedef ActuatorOutputStatusHandle {#classmavsdk_1_1_telemetry_1ac0bbbb060195848f41de50600489713f} + +```cpp +using mavsdk::Telemetry::ActuatorOutputStatusHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_actuator_output_status. + + +### typedef OdometryCallback {#classmavsdk_1_1_telemetry_1a8cd23f7364f8f5cb22869155da67c65d} + +```cpp +using mavsdk::Telemetry::OdometryCallback = std::function +``` + + +Callback type for subscribe_odometry. + + +### typedef OdometryHandle {#classmavsdk_1_1_telemetry_1a23b33f337ed73ec584e8ac8868c72f86} + +```cpp +using mavsdk::Telemetry::OdometryHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_odometry. + + +### typedef PositionVelocityNedCallback {#classmavsdk_1_1_telemetry_1a5a38deb284622ff6926703e1e5c96a74} + +```cpp +using mavsdk::Telemetry::PositionVelocityNedCallback = std::function +``` + + +Callback type for subscribe_position_velocity_ned. + + +### typedef PositionVelocityNedHandle {#classmavsdk_1_1_telemetry_1aef1424caca3967e67336140af395e59c} + +```cpp +using mavsdk::Telemetry::PositionVelocityNedHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_position_velocity_ned. + + +### typedef GroundTruthCallback {#classmavsdk_1_1_telemetry_1a222aae53852a2c535f6d69ed57221f13} + +```cpp +using mavsdk::Telemetry::GroundTruthCallback = std::function +``` + + +Callback type for subscribe_ground_truth. + + +### typedef GroundTruthHandle {#classmavsdk_1_1_telemetry_1a373568d10564c5a3c3d325e5975a3a23} + +```cpp +using mavsdk::Telemetry::GroundTruthHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_ground_truth. + + +### typedef FixedwingMetricsCallback {#classmavsdk_1_1_telemetry_1a5b42dbef0ef6d8c1768d503d0437f1e3} + +```cpp +using mavsdk::Telemetry::FixedwingMetricsCallback = std::function +``` + + +Callback type for subscribe_fixedwing_metrics. + + +### typedef FixedwingMetricsHandle {#classmavsdk_1_1_telemetry_1ab180a383ee3e17f20bb1b026b667db04} + +```cpp +using mavsdk::Telemetry::FixedwingMetricsHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_fixedwing_metrics. + + +### typedef ImuCallback {#classmavsdk_1_1_telemetry_1a4fbc2ad274fd5a8af077004d2d7bd984} + +```cpp +using mavsdk::Telemetry::ImuCallback = std::function +``` + + +Callback type for subscribe_imu. + + +### typedef ImuHandle {#classmavsdk_1_1_telemetry_1a5b45a4c22abb67617d37ae56efdf8360} + +```cpp +using mavsdk::Telemetry::ImuHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_imu. + + +### typedef ScaledImuCallback {#classmavsdk_1_1_telemetry_1a26159a775adcfbc42302234b7108d94f} + +```cpp +using mavsdk::Telemetry::ScaledImuCallback = std::function +``` + + +Callback type for subscribe_scaled_imu. + + +### typedef ScaledImuHandle {#classmavsdk_1_1_telemetry_1a4968d9d418d48a4368f2915023ca0014} + +```cpp +using mavsdk::Telemetry::ScaledImuHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_scaled_imu. + + +### typedef RawImuCallback {#classmavsdk_1_1_telemetry_1a92711da85d343cb58b73561e6b730c76} + +```cpp +using mavsdk::Telemetry::RawImuCallback = std::function +``` + + +Callback type for subscribe_raw_imu. + + +### typedef RawImuHandle {#classmavsdk_1_1_telemetry_1a416f5b4dc6c51d78d05572d5cc18f3fb} + +```cpp +using mavsdk::Telemetry::RawImuHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_raw_imu. + + +### typedef HealthAllOkCallback {#classmavsdk_1_1_telemetry_1a71cdcadfaa988dc14029e0b9fdbe742d} + +```cpp +using mavsdk::Telemetry::HealthAllOkCallback = std::function +``` + + +Callback type for subscribe_health_all_ok. + + +### typedef HealthAllOkHandle {#classmavsdk_1_1_telemetry_1aa882d4938eb491cce5b7ca6aead2384c} + +```cpp +using mavsdk::Telemetry::HealthAllOkHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_health_all_ok. + + +### typedef UnixEpochTimeCallback {#classmavsdk_1_1_telemetry_1a321c7d809ae8f56bb8a361d5e5ce6391} + +```cpp +using mavsdk::Telemetry::UnixEpochTimeCallback = std::function +``` + + +Callback type for subscribe_unix_epoch_time. + + +### typedef UnixEpochTimeHandle {#classmavsdk_1_1_telemetry_1a4c4b00adfab9b7f04530133aafbafbd5} + +```cpp +using mavsdk::Telemetry::UnixEpochTimeHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_unix_epoch_time. + + +### typedef DistanceSensorCallback {#classmavsdk_1_1_telemetry_1aacfdb5e2cce7f3f77c68b36f020ed1f2} + +```cpp +using mavsdk::Telemetry::DistanceSensorCallback = std::function +``` + + +Callback type for subscribe_distance_sensor. + + +### typedef DistanceSensorHandle {#classmavsdk_1_1_telemetry_1aaa6bd0660aeb7d3f1d12240ce0710878} + +```cpp +using mavsdk::Telemetry::DistanceSensorHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_distance_sensor. + + +### typedef ScaledPressureCallback {#classmavsdk_1_1_telemetry_1ac123edc254bb1874edc08a0f531f82b1} + +```cpp +using mavsdk::Telemetry::ScaledPressureCallback = std::function +``` + + +Callback type for subscribe_scaled_pressure. + + +### typedef ScaledPressureHandle {#classmavsdk_1_1_telemetry_1ad19871b63833f64bed071db6017e4a22} + +```cpp +using mavsdk::Telemetry::ScaledPressureHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_scaled_pressure. + + +### typedef HeadingCallback {#classmavsdk_1_1_telemetry_1aa3bca0adab525a4c733c1e7f5c5dd8b3} + +```cpp +using mavsdk::Telemetry::HeadingCallback = std::function +``` + + +Callback type for subscribe_heading. + + +### typedef HeadingHandle {#classmavsdk_1_1_telemetry_1a11cc43135c8162fd8478ba76a5b3166d} + +```cpp +using mavsdk::Telemetry::HeadingHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_heading. + + +### typedef AltitudeCallback {#classmavsdk_1_1_telemetry_1a868986de0ab3990d4fe1ec842bce6adf} + +```cpp +using mavsdk::Telemetry::AltitudeCallback = std::function +``` + + +Callback type for subscribe_altitude. + + +### typedef AltitudeHandle {#classmavsdk_1_1_telemetry_1ae0714c14e07a08b4748c96ea20f1d12f} + +```cpp +using mavsdk::Telemetry::AltitudeHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_altitude. + + +### typedef GetGpsGlobalOriginCallback {#classmavsdk_1_1_telemetry_1a350ee89a7e30a691e130e29ace8917ef} + +```cpp +using mavsdk::Telemetry::GetGpsGlobalOriginCallback = std::function +``` + + +Callback type for get_gps_global_origin_async. + + +## Member Enumeration Documentation + + +### enum FixType {#classmavsdk_1_1_telemetry_1a548213e1b26615d7b6d1b0b3934639de} + + +GPS fix type. + + +Value | Description +--- | --- + `NoGps` | No GPS connected. + `NoFix` | No position information, GPS is connected. + `Fix2D` | 2D position. + `Fix3D` | 3D position. + `FixDgps` | DGPS/SBAS aided 3D position. + `RtkFloat` | RTK float, 3D position. + `RtkFixed` | RTK Fixed, 3D position. + +### enum FlightMode {#classmavsdk_1_1_telemetry_1a8317d953a82a23654db6f14509acb4fe} + + +Flight modes. + +For more information about flight modes, check out [https://docs.px4.io/master/en/config/flight_mode.html](https://docs.px4.io/master/en/config/flight_mode.html). + +Value | Description +--- | --- + `Unknown` | Mode not known. + `Ready` | Armed and ready to take off. + `Takeoff` | Taking off. + `Hold` | Holding (hovering in place (or circling for fixed-wing vehicles). + `Mission` | In mission. + `ReturnToLaunch` | Returning to launch position (then landing). + `Land` | Landing. + `Offboard` | In 'offboard' mode. + `FollowMe` | In 'follow-me' mode. + `Manual` | In 'Manual' mode. + `Altctl` | In '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md) Control' mode. + `Posctl` | In '[Position](structmavsdk_1_1_telemetry_1_1_position.md) Control' mode. + `Acro` | In 'Acro' mode. + `Stabilized` | In 'Stabilize' mode. + `Rattitude` | In 'Rattitude' mode. + +### enum StatusTextType {#classmavsdk_1_1_telemetry_1ada3ebb336abad223a98bc2a625e0e7d8} + + +Status types. + + +Value | Description +--- | --- + `Debug` | Debug. + `Info` | Information. + `Notice` | Notice. + `Warning` | Warning. + `Error` | Error. + `Critical` | Critical. + `Alert` | Alert. + `Emergency` | Emergency. + +### enum LandedState {#classmavsdk_1_1_telemetry_1ac6639935bc3b35b1da553cde41e8f046} + + +Landed State enumeration. + + +Value | Description +--- | --- + `Unknown` | Landed state is unknown. + `OnGround` | The vehicle is on the ground. + `InAir` | The vehicle is in the air. + `TakingOff` | The vehicle is taking off. + `Landing` | The vehicle is landing. + +### enum VtolState {#classmavsdk_1_1_telemetry_1a256f951d993aa120c437d989a6e94166} + + +VTOL State enumeration. + + +Value | Description +--- | --- + `Undefined` | MAV is not configured as VTOL. + `TransitionToFw` | VTOL is in transition from multicopter to fixed-wing. + `TransitionToMc` | VTOL is in transition from fixed-wing to multicopter. + `Mc` | VTOL is in multicopter state. + `Fw` | VTOL is in fixed-wing state. + +### enum Result {#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75} + + +Possible results returned for telemetry requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Success: the telemetry command was accepted by the vehicle. + `NoSystem` | No system connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command refused by vehicle. + `Timeout` | Request timed out. + `Unsupported` | Request not supported. + +## Member Function Documentation + + +### subscribe_position() {#classmavsdk_1_1_telemetry_1a647f3d61b4f3301fd8c2aca1afcafb31} +```cpp +PositionHandle mavsdk::Telemetry::subscribe_position(const PositionCallback &callback) +``` + + +Subscribe to 'position' updates. + + +**Parameters** + +* const [PositionCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a978b371d636226e198995462afa63552)& **callback** - + +**Returns** + + [PositionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7d82a98ea53c2aa254624bc943ec22f1) - + +### unsubscribe_position() {#classmavsdk_1_1_telemetry_1abf10cb55e2c477bbb875c0944938b76c} +```cpp +void mavsdk::Telemetry::unsubscribe_position(PositionHandle handle) +``` + + +Unsubscribe from subscribe_position. + + +**Parameters** + +* [PositionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7d82a98ea53c2aa254624bc943ec22f1) **handle** - + +### position() {#classmavsdk_1_1_telemetry_1a2299da1bc63313c429f07ab0fdbe5335} +```cpp +Position mavsdk::Telemetry::position() const +``` + + +Poll for '[Position](structmavsdk_1_1_telemetry_1_1_position.md)' (blocking). + + +**Returns** + + [Position](structmavsdk_1_1_telemetry_1_1_position.md) - One [Position](structmavsdk_1_1_telemetry_1_1_position.md) update. + +### subscribe_home() {#classmavsdk_1_1_telemetry_1ae57e4c8741ba7ae05961cadfabc82875} +```cpp +HomeHandle mavsdk::Telemetry::subscribe_home(const HomeCallback &callback) +``` + + +Subscribe to 'home position' updates. + + +**Parameters** + +* const [HomeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aaac029969c37a001d43e2788a6abf634)& **callback** - + +**Returns** + + [HomeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7a2b3a8b50d66e911870700ea3fe007d) - + +### unsubscribe_home() {#classmavsdk_1_1_telemetry_1a83feb66aa64946b954ca305b6cc2f7ea} +```cpp +void mavsdk::Telemetry::unsubscribe_home(HomeHandle handle) +``` + + +Unsubscribe from subscribe_home. + + +**Parameters** + +* [HomeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7a2b3a8b50d66e911870700ea3fe007d) **handle** - + +### home() {#classmavsdk_1_1_telemetry_1ad5c239b93aa1923edd1b97494a3fbfe7} +```cpp +Position mavsdk::Telemetry::home() const +``` + + +Poll for '[Position](structmavsdk_1_1_telemetry_1_1_position.md)' (blocking). + + +**Returns** + + [Position](structmavsdk_1_1_telemetry_1_1_position.md) - One [Position](structmavsdk_1_1_telemetry_1_1_position.md) update. + +### subscribe_in_air() {#classmavsdk_1_1_telemetry_1a0fc586a0c90141e125a305fd8211e8d8} +```cpp +InAirHandle mavsdk::Telemetry::subscribe_in_air(const InAirCallback &callback) +``` + + +Subscribe to in-air updates. + + +**Parameters** + +* const [InAirCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1af96cca452305dd8f51b42d4663f15a26)& **callback** - + +**Returns** + + [InAirHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a17582f68fabac027ab354073e0eca8e5) - + +### unsubscribe_in_air() {#classmavsdk_1_1_telemetry_1a2e23bf258ef69c267ab5b8dee203bd95} +```cpp +void mavsdk::Telemetry::unsubscribe_in_air(InAirHandle handle) +``` + + +Unsubscribe from subscribe_in_air. + + +**Parameters** + +* [InAirHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a17582f68fabac027ab354073e0eca8e5) **handle** - + +### in_air() {#classmavsdk_1_1_telemetry_1a909738ff2fbe104c6eb4524cc9bf2dd5} +```cpp +bool mavsdk::Telemetry::in_air() const +``` + + +Poll for 'bool' (blocking). + + +**Returns** + + bool - One bool update. + +### subscribe_landed_state() {#classmavsdk_1_1_telemetry_1ae618a7ba0ed197e3d5c3427a63c3cfa0} +```cpp +LandedStateHandle mavsdk::Telemetry::subscribe_landed_state(const LandedStateCallback &callback) +``` + + +Subscribe to landed state updates. + + +**Parameters** + +* const [LandedStateCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a0cd8ef17abdd7c3d6a9ee761ccc6ae5e)& **callback** - + +**Returns** + + [LandedStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a125f2ecfe3f5ce588e6d1799392a5fd7) - + +### unsubscribe_landed_state() {#classmavsdk_1_1_telemetry_1a17df3b1e3917f788725f39cf879145f6} +```cpp +void mavsdk::Telemetry::unsubscribe_landed_state(LandedStateHandle handle) +``` + + +Unsubscribe from subscribe_landed_state. + + +**Parameters** + +* [LandedStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a125f2ecfe3f5ce588e6d1799392a5fd7) **handle** - + +### landed_state() {#classmavsdk_1_1_telemetry_1af7d7c385852db38d6320516508ce7465} +```cpp +LandedState mavsdk::Telemetry::landed_state() const +``` + + +Poll for 'LandedState' (blocking). + + +**Returns** + + [LandedState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac6639935bc3b35b1da553cde41e8f046) - One LandedState update. + +### subscribe_armed() {#classmavsdk_1_1_telemetry_1a2ea3978439ed7e21973a41e1f2c2b24f} +```cpp +ArmedHandle mavsdk::Telemetry::subscribe_armed(const ArmedCallback &callback) +``` + + +Subscribe to armed updates. + + +**Parameters** + +* const [ArmedCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a9d23a4092d94e50694390e9f41b8c419)& **callback** - + +**Returns** + + [ArmedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a3cfe4b90e156fb055066f8164985311c) - + +### unsubscribe_armed() {#classmavsdk_1_1_telemetry_1a8c6080d520f6d2fdac9cb97279ffcbb9} +```cpp +void mavsdk::Telemetry::unsubscribe_armed(ArmedHandle handle) +``` + + +Unsubscribe from subscribe_armed. + + +**Parameters** + +* [ArmedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a3cfe4b90e156fb055066f8164985311c) **handle** - + +### armed() {#classmavsdk_1_1_telemetry_1a6620142adc47f069262e5bf69dbb3876} +```cpp +bool mavsdk::Telemetry::armed() const +``` + + +Poll for 'bool' (blocking). + + +**Returns** + + bool - One bool update. + +### subscribe_vtol_state() {#classmavsdk_1_1_telemetry_1a956eb63dc90a2cf905590f6f309edb36} +```cpp +VtolStateHandle mavsdk::Telemetry::subscribe_vtol_state(const VtolStateCallback &callback) +``` + + +subscribe to vtol state Updates + + +**Parameters** + +* const [VtolStateCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1abf52126ce4d4efb99560aa8e8e58f20c)& **callback** - + +**Returns** + + [VtolStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a824bab94514afa56334acf41b6f7d244) - + +### unsubscribe_vtol_state() {#classmavsdk_1_1_telemetry_1a932eb8b43e90e64bd131b3257f747963} +```cpp +void mavsdk::Telemetry::unsubscribe_vtol_state(VtolStateHandle handle) +``` + + +Unsubscribe from subscribe_vtol_state. + + +**Parameters** + +* [VtolStateHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a824bab94514afa56334acf41b6f7d244) **handle** - + +### vtol_state() {#classmavsdk_1_1_telemetry_1a6d3fd68f3e639a2bf9940e9f38f220c3} +```cpp +VtolState mavsdk::Telemetry::vtol_state() const +``` + + +Poll for 'VtolState' (blocking). + + +**Returns** + + [VtolState](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a256f951d993aa120c437d989a6e94166) - One VtolState update. + +### subscribe_attitude_quaternion() {#classmavsdk_1_1_telemetry_1a9248befe3416252c7d8fb63b19842421} +```cpp +AttitudeQuaternionHandle mavsdk::Telemetry::subscribe_attitude_quaternion(const AttitudeQuaternionCallback &callback) +``` + + +Subscribe to 'attitude' updates (quaternion). + + +**Parameters** + +* const [AttitudeQuaternionCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad16e61245511a99e930d6fdcbd761a30)& **callback** - + +**Returns** + + [AttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a0ce62986aedcd06d845406a2d99257d3) - + +### unsubscribe_attitude_quaternion() {#classmavsdk_1_1_telemetry_1a06034401ac16901d50b850ded0b064b5} +```cpp +void mavsdk::Telemetry::unsubscribe_attitude_quaternion(AttitudeQuaternionHandle handle) +``` + + +Unsubscribe from subscribe_attitude_quaternion. + + +**Parameters** + +* [AttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a0ce62986aedcd06d845406a2d99257d3) **handle** - + +### attitude_quaternion() {#classmavsdk_1_1_telemetry_1aae76890957b33727be72a39807448c88} +```cpp +Quaternion mavsdk::Telemetry::attitude_quaternion() const +``` + + +Poll for '[Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md)' (blocking). + + +**Returns** + + [Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) - One [Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) update. + +### subscribe_attitude_euler() {#classmavsdk_1_1_telemetry_1aaf90ca9cc8adcc9cb1963293bdfcefd6} +```cpp +AttitudeEulerHandle mavsdk::Telemetry::subscribe_attitude_euler(const AttitudeEulerCallback &callback) +``` + + +Subscribe to 'attitude' updates (Euler). + + +**Parameters** + +* const [AttitudeEulerCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a321c7607922369926fbd5f2821986cba)& **callback** - + +**Returns** + + [AttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae73f3d3ac224438a6cd07344fda9543b) - + +### unsubscribe_attitude_euler() {#classmavsdk_1_1_telemetry_1aa770088117b037446efa8cbfe058e54d} +```cpp +void mavsdk::Telemetry::unsubscribe_attitude_euler(AttitudeEulerHandle handle) +``` + + +Unsubscribe from subscribe_attitude_euler. + + +**Parameters** + +* [AttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae73f3d3ac224438a6cd07344fda9543b) **handle** - + +### attitude_euler() {#classmavsdk_1_1_telemetry_1a03035bb72324e843372eb69cf7899ce5} +```cpp +EulerAngle mavsdk::Telemetry::attitude_euler() const +``` + + +Poll for '[EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md)' (blocking). + + +**Returns** + + [EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) - One [EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) update. + +### subscribe_attitude_angular_velocity_body() {#classmavsdk_1_1_telemetry_1a3bbefcdb4e9cd9af9692626984504cb7} +```cpp +AttitudeAngularVelocityBodyHandle mavsdk::Telemetry::subscribe_attitude_angular_velocity_body(const AttitudeAngularVelocityBodyCallback &callback) +``` + + +Subscribe to 'attitude' updates (angular velocity) + + +**Parameters** + +* const [AttitudeAngularVelocityBodyCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a35ff8def3048faeab7f732153d51085f)& **callback** - + +**Returns** + + [AttitudeAngularVelocityBodyHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2328e39c1a96ce9a090cb19283d3ffc1) - + +### unsubscribe_attitude_angular_velocity_body() {#classmavsdk_1_1_telemetry_1a2319d78b4e214e5b2f3ef55a1c32e2c5} +```cpp +void mavsdk::Telemetry::unsubscribe_attitude_angular_velocity_body(AttitudeAngularVelocityBodyHandle handle) +``` + + +Unsubscribe from subscribe_attitude_angular_velocity_body. + + +**Parameters** + +* [AttitudeAngularVelocityBodyHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2328e39c1a96ce9a090cb19283d3ffc1) **handle** - + +### attitude_angular_velocity_body() {#classmavsdk_1_1_telemetry_1a8d9e2489b79c2cdbabaef8b6bb8e2952} +```cpp +AngularVelocityBody mavsdk::Telemetry::attitude_angular_velocity_body() const +``` + + +Poll for '[AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md)' (blocking). + + +**Returns** + + [AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md) - One [AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md) update. + +### subscribe_camera_attitude_quaternion() {#classmavsdk_1_1_telemetry_1a9b7517e15c841765fbb8b1230e73bf82} +```cpp +CameraAttitudeQuaternionHandle mavsdk::Telemetry::subscribe_camera_attitude_quaternion(const CameraAttitudeQuaternionCallback &callback) +``` + + +Subscribe to 'camera attitude' updates (quaternion). + + +**Parameters** + +* const [CameraAttitudeQuaternionCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa83dafa14e9b5179573a574f6fbdd973)& **callback** - + +**Returns** + + [CameraAttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aeb2a99828961bf2a4d5c24753e020358) - + +### unsubscribe_camera_attitude_quaternion() {#classmavsdk_1_1_telemetry_1aa92270b8a30b22271f65d92e9a7ed9a1} +```cpp +void mavsdk::Telemetry::unsubscribe_camera_attitude_quaternion(CameraAttitudeQuaternionHandle handle) +``` + + +Unsubscribe from subscribe_camera_attitude_quaternion. + + +**Parameters** + +* [CameraAttitudeQuaternionHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aeb2a99828961bf2a4d5c24753e020358) **handle** - + +### camera_attitude_quaternion() {#classmavsdk_1_1_telemetry_1a3c07447351d3b6195d5e2526e7b128b3} +```cpp +Quaternion mavsdk::Telemetry::camera_attitude_quaternion() const +``` + + +Poll for '[Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md)' (blocking). + + +**Returns** + + [Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) - One [Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) update. + +### subscribe_camera_attitude_euler() {#classmavsdk_1_1_telemetry_1aa50015ba9b1decb825d45e459191c342} +```cpp +CameraAttitudeEulerHandle mavsdk::Telemetry::subscribe_camera_attitude_euler(const CameraAttitudeEulerCallback &callback) +``` + + +Subscribe to 'camera attitude' updates (Euler). + + +**Parameters** + +* const [CameraAttitudeEulerCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa29f9bb0767ba8c384bfe1df69f2fdd9)& **callback** - + +**Returns** + + [CameraAttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a76471c91115d6e03e6165a3e1315808b) - + +### unsubscribe_camera_attitude_euler() {#classmavsdk_1_1_telemetry_1a90b8dfe6b83afc908e4c236bbbc32930} +```cpp +void mavsdk::Telemetry::unsubscribe_camera_attitude_euler(CameraAttitudeEulerHandle handle) +``` + + +Unsubscribe from subscribe_camera_attitude_euler. + + +**Parameters** + +* [CameraAttitudeEulerHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a76471c91115d6e03e6165a3e1315808b) **handle** - + +### camera_attitude_euler() {#classmavsdk_1_1_telemetry_1a635643d955f0cd9a805914501f819796} +```cpp +EulerAngle mavsdk::Telemetry::camera_attitude_euler() const +``` + + +Poll for '[EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md)' (blocking). + + +**Returns** + + [EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) - One [EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) update. + +### subscribe_velocity_ned() {#classmavsdk_1_1_telemetry_1a9b5e6bd8fb05324fd7a99d0260933c9d} +```cpp +VelocityNedHandle mavsdk::Telemetry::subscribe_velocity_ned(const VelocityNedCallback &callback) +``` + + +Subscribe to 'ground speed' updates (NED). + + +**Parameters** + +* const [VelocityNedCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ab5859d2f6a9c9bd81282166b3de92342)& **callback** - + +**Returns** + + [VelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2c3898f33bfa1bffe86681aaca33343e) - + +### unsubscribe_velocity_ned() {#classmavsdk_1_1_telemetry_1ae14a663f3b4820e891a4d83c2f8aa2c3} +```cpp +void mavsdk::Telemetry::unsubscribe_velocity_ned(VelocityNedHandle handle) +``` + + +Unsubscribe from subscribe_velocity_ned. + + +**Parameters** + +* [VelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2c3898f33bfa1bffe86681aaca33343e) **handle** - + +### velocity_ned() {#classmavsdk_1_1_telemetry_1a40a86062c0322d6be7c86d8e15a52f28} +```cpp +VelocityNed mavsdk::Telemetry::velocity_ned() const +``` + + +Poll for '[VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md)' (blocking). + + +**Returns** + + [VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md) - One [VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md) update. + +### subscribe_gps_info() {#classmavsdk_1_1_telemetry_1a1933fa5b008856b5d621489d785c68e7} +```cpp +GpsInfoHandle mavsdk::Telemetry::subscribe_gps_info(const GpsInfoCallback &callback) +``` + + +Subscribe to 'GPS info' updates. + + +**Parameters** + +* const [GpsInfoCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad8fa90886b2283eace09b4b46708048b)& **callback** - + +**Returns** + + [GpsInfoHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a87598b504f6ddf3ba0620b0458f2d39c) - + +### unsubscribe_gps_info() {#classmavsdk_1_1_telemetry_1a96ba022d27983893a814ad4a787bfa51} +```cpp +void mavsdk::Telemetry::unsubscribe_gps_info(GpsInfoHandle handle) +``` + + +Unsubscribe from subscribe_gps_info. + + +**Parameters** + +* [GpsInfoHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a87598b504f6ddf3ba0620b0458f2d39c) **handle** - + +### gps_info() {#classmavsdk_1_1_telemetry_1a983dabc1aed50745b326072662c419e8} +```cpp +GpsInfo mavsdk::Telemetry::gps_info() const +``` + + +Poll for '[GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md)' (blocking). + + +**Returns** + + [GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md) - One [GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md) update. + +### subscribe_raw_gps() {#classmavsdk_1_1_telemetry_1a39c324fdd723a2b5c5559ddadad597f0} +```cpp +RawGpsHandle mavsdk::Telemetry::subscribe_raw_gps(const RawGpsCallback &callback) +``` + + +Subscribe to 'Raw GPS' updates. + + +**Parameters** + +* const [RawGpsCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a915868d562ed445fa30beaa9140ea97c)& **callback** - + +**Returns** + + [RawGpsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a75a62eb3624bf77ea6860d5d965636fd) - + +### unsubscribe_raw_gps() {#classmavsdk_1_1_telemetry_1acc6c03a6d27b268f609c72b66aa48a09} +```cpp +void mavsdk::Telemetry::unsubscribe_raw_gps(RawGpsHandle handle) +``` + + +Unsubscribe from subscribe_raw_gps. + + +**Parameters** + +* [RawGpsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a75a62eb3624bf77ea6860d5d965636fd) **handle** - + +### raw_gps() {#classmavsdk_1_1_telemetry_1ac43c29e435b6c1a6594854adc6a1bf6c} +```cpp +RawGps mavsdk::Telemetry::raw_gps() const +``` + + +Poll for '[RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md)' (blocking). + + +**Returns** + + [RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md) - One [RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md) update. + +### subscribe_battery() {#classmavsdk_1_1_telemetry_1ad7e7ceb85181aaac7bf5553af7f45e2a} +```cpp +BatteryHandle mavsdk::Telemetry::subscribe_battery(const BatteryCallback &callback) +``` + + +Subscribe to 'battery' updates. + + +**Parameters** + +* const [BatteryCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1af4b121c576ef2ae567b1d571b12dff9d)& **callback** - + +**Returns** + + [BatteryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad9c79c3a89de6f28aabc771a2b5cc92f) - + +### unsubscribe_battery() {#classmavsdk_1_1_telemetry_1a72ddd509a9480ba59f073fa8f1ee5dbc} +```cpp +void mavsdk::Telemetry::unsubscribe_battery(BatteryHandle handle) +``` + + +Unsubscribe from subscribe_battery. + + +**Parameters** + +* [BatteryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad9c79c3a89de6f28aabc771a2b5cc92f) **handle** - + +### battery() {#classmavsdk_1_1_telemetry_1afb3bad3c7a36c14ae97492df3f6bbd54} +```cpp +Battery mavsdk::Telemetry::battery() const +``` + + +Poll for '[Battery](structmavsdk_1_1_telemetry_1_1_battery.md)' (blocking). + + +**Returns** + + [Battery](structmavsdk_1_1_telemetry_1_1_battery.md) - One [Battery](structmavsdk_1_1_telemetry_1_1_battery.md) update. + +### subscribe_flight_mode() {#classmavsdk_1_1_telemetry_1accd831cbb9134c845744a5c70da1b418} +```cpp +FlightModeHandle mavsdk::Telemetry::subscribe_flight_mode(const FlightModeCallback &callback) +``` + + +Subscribe to 'flight mode' updates. + + +**Parameters** + +* const [FlightModeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2d7318d0823771b7a586c40199bdb482)& **callback** - + +**Returns** + + [FlightModeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1add61cde1555ed1cec93a34bbdadeef5c) - + +### unsubscribe_flight_mode() {#classmavsdk_1_1_telemetry_1a64dc8d45d06b23332ba6353d50c9cc17} +```cpp +void mavsdk::Telemetry::unsubscribe_flight_mode(FlightModeHandle handle) +``` + + +Unsubscribe from subscribe_flight_mode. + + +**Parameters** + +* [FlightModeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1add61cde1555ed1cec93a34bbdadeef5c) **handle** - + +### flight_mode() {#classmavsdk_1_1_telemetry_1a4972a3968e379d565e7700f2f51158dd} +```cpp +FlightMode mavsdk::Telemetry::flight_mode() const +``` + + +Poll for 'FlightMode' (blocking). + + +**Returns** + + [FlightMode](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a8317d953a82a23654db6f14509acb4fe) - One FlightMode update. + +### subscribe_health() {#classmavsdk_1_1_telemetry_1a093a702abd1370ff97f4d9ebce449942} +```cpp +HealthHandle mavsdk::Telemetry::subscribe_health(const HealthCallback &callback) +``` + + +Subscribe to 'health' updates. + + +**Parameters** + +* const [HealthCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a7a120dd053091c644e0e2e47fdcbeb75)& **callback** - + +**Returns** + + [HealthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a52869d9dd1a240385b0d213a7057f3df) - + +### unsubscribe_health() {#classmavsdk_1_1_telemetry_1af7830aff90366a0255e71117c07f5484} +```cpp +void mavsdk::Telemetry::unsubscribe_health(HealthHandle handle) +``` + + +Unsubscribe from subscribe_health. + + +**Parameters** + +* [HealthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a52869d9dd1a240385b0d213a7057f3df) **handle** - + +### health() {#classmavsdk_1_1_telemetry_1aae4824c9eeb72603b197c864b5cc5df5} +```cpp +Health mavsdk::Telemetry::health() const +``` + + +Poll for '[Health](structmavsdk_1_1_telemetry_1_1_health.md)' (blocking). + + +**Returns** + + [Health](structmavsdk_1_1_telemetry_1_1_health.md) - One [Health](structmavsdk_1_1_telemetry_1_1_health.md) update. + +### subscribe_rc_status() {#classmavsdk_1_1_telemetry_1a0252d9434190edab26fc5b3874bdcc1c} +```cpp +RcStatusHandle mavsdk::Telemetry::subscribe_rc_status(const RcStatusCallback &callback) +``` + + +Subscribe to 'RC status' updates. + + +**Parameters** + +* const [RcStatusCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aafcd706b805898301b574ffa2b909b85)& **callback** - + +**Returns** + + [RcStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae3bd26bbc4c12eddc7f90f42482078de) - + +### unsubscribe_rc_status() {#classmavsdk_1_1_telemetry_1a975a70f6345f73a37894aa7a49495dc7} +```cpp +void mavsdk::Telemetry::unsubscribe_rc_status(RcStatusHandle handle) +``` + + +Unsubscribe from subscribe_rc_status. + + +**Parameters** + +* [RcStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae3bd26bbc4c12eddc7f90f42482078de) **handle** - + +### rc_status() {#classmavsdk_1_1_telemetry_1a59cd497c69f1d32be29a940a2d34a474} +```cpp +RcStatus mavsdk::Telemetry::rc_status() const +``` + + +Poll for '[RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md)' (blocking). + + +**Returns** + + [RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md) - One [RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md) update. + +### subscribe_status_text() {#classmavsdk_1_1_telemetry_1a56e54b5dc245cb07da6088a3033d45f8} +```cpp +StatusTextHandle mavsdk::Telemetry::subscribe_status_text(const StatusTextCallback &callback) +``` + + +Subscribe to 'status text' updates. + + +**Parameters** + +* const [StatusTextCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a46e51ff90fe779990ed09a593c1c7898)& **callback** - + +**Returns** + + [StatusTextHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5c2b31499961747b784664b87b851e04) - + +### unsubscribe_status_text() {#classmavsdk_1_1_telemetry_1a972adcc6c0c88ddb6aefdd372bc06418} +```cpp +void mavsdk::Telemetry::unsubscribe_status_text(StatusTextHandle handle) +``` + + +Unsubscribe from subscribe_status_text. + + +**Parameters** + +* [StatusTextHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5c2b31499961747b784664b87b851e04) **handle** - + +### status_text() {#classmavsdk_1_1_telemetry_1a2f31c0668ed1ac1bfdfa4b2e9a2023a9} +```cpp +StatusText mavsdk::Telemetry::status_text() const +``` + + +Poll for '[StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md)' (blocking). + + +**Returns** + + [StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md) - One [StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md) update. + +### subscribe_actuator_control_target() {#classmavsdk_1_1_telemetry_1ae9754c6f90e3fd95a9cab766ca588e0d} +```cpp +ActuatorControlTargetHandle mavsdk::Telemetry::subscribe_actuator_control_target(const ActuatorControlTargetCallback &callback) +``` + + +Subscribe to 'actuator control target' updates. + + +**Parameters** + +* const [ActuatorControlTargetCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ada6af3de1b60b93a709345c3a8ede551)& **callback** - + +**Returns** + + [ActuatorControlTargetHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a01438bbc123454e745b8874bc91bf874) - + +### unsubscribe_actuator_control_target() {#classmavsdk_1_1_telemetry_1a13672a6c91e4bb74bf92fe9c779eeb40} +```cpp +void mavsdk::Telemetry::unsubscribe_actuator_control_target(ActuatorControlTargetHandle handle) +``` + + +Unsubscribe from subscribe_actuator_control_target. + + +**Parameters** + +* [ActuatorControlTargetHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a01438bbc123454e745b8874bc91bf874) **handle** - + +### actuator_control_target() {#classmavsdk_1_1_telemetry_1af4ffa70ff58c46b50be93a0fbf960f95} +```cpp +ActuatorControlTarget mavsdk::Telemetry::actuator_control_target() const +``` + + +Poll for '[ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md)' (blocking). + + +**Returns** + + [ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md) - One [ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md) update. + +### subscribe_actuator_output_status() {#classmavsdk_1_1_telemetry_1a65bbf4a157aa8898beeb57440808bbe6} +```cpp +ActuatorOutputStatusHandle mavsdk::Telemetry::subscribe_actuator_output_status(const ActuatorOutputStatusCallback &callback) +``` + + +Subscribe to 'actuator output status' updates. + + +**Parameters** + +* const [ActuatorOutputStatusCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a2b1e800ce1ba6fb776351416340ac8b9)& **callback** - + +**Returns** + + [ActuatorOutputStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac0bbbb060195848f41de50600489713f) - + +### unsubscribe_actuator_output_status() {#classmavsdk_1_1_telemetry_1aa40e1ff8e1eb2c9d0b6a8f36db6823b6} +```cpp +void mavsdk::Telemetry::unsubscribe_actuator_output_status(ActuatorOutputStatusHandle handle) +``` + + +Unsubscribe from subscribe_actuator_output_status. + + +**Parameters** + +* [ActuatorOutputStatusHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac0bbbb060195848f41de50600489713f) **handle** - + +### actuator_output_status() {#classmavsdk_1_1_telemetry_1a68fa1619dfad0a7cfcc2725025669252} +```cpp +ActuatorOutputStatus mavsdk::Telemetry::actuator_output_status() const +``` + + +Poll for '[ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md)' (blocking). + + +**Returns** + + [ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md) - One [ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md) update. + +### subscribe_odometry() {#classmavsdk_1_1_telemetry_1a6def40a24f3eb85ca0cb076c5a576677} +```cpp +OdometryHandle mavsdk::Telemetry::subscribe_odometry(const OdometryCallback &callback) +``` + + +Subscribe to 'odometry' updates. + + +**Parameters** + +* const [OdometryCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a8cd23f7364f8f5cb22869155da67c65d)& **callback** - + +**Returns** + + [OdometryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a23b33f337ed73ec584e8ac8868c72f86) - + +### unsubscribe_odometry() {#classmavsdk_1_1_telemetry_1a235d029cb79a071d137c7cfb03afb4b6} +```cpp +void mavsdk::Telemetry::unsubscribe_odometry(OdometryHandle handle) +``` + + +Unsubscribe from subscribe_odometry. + + +**Parameters** + +* [OdometryHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a23b33f337ed73ec584e8ac8868c72f86) **handle** - + +### odometry() {#classmavsdk_1_1_telemetry_1a715b6e8ba1206059706f08844a0b96d2} +```cpp +Odometry mavsdk::Telemetry::odometry() const +``` + + +Poll for '[Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md)' (blocking). + + +**Returns** + + [Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md) - One [Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md) update. + +### subscribe_position_velocity_ned() {#classmavsdk_1_1_telemetry_1a70f1331b7df5e5bda2711b1141d86d68} +```cpp +PositionVelocityNedHandle mavsdk::Telemetry::subscribe_position_velocity_ned(const PositionVelocityNedCallback &callback) +``` + + +Subscribe to 'position velocity' updates. + + +**Parameters** + +* const [PositionVelocityNedCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5a38deb284622ff6926703e1e5c96a74)& **callback** - + +**Returns** + + [PositionVelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aef1424caca3967e67336140af395e59c) - + +### unsubscribe_position_velocity_ned() {#classmavsdk_1_1_telemetry_1ab561338c465b3b3e1d060fdd8c078306} +```cpp +void mavsdk::Telemetry::unsubscribe_position_velocity_ned(PositionVelocityNedHandle handle) +``` + + +Unsubscribe from subscribe_position_velocity_ned. + + +**Parameters** + +* [PositionVelocityNedHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aef1424caca3967e67336140af395e59c) **handle** - + +### position_velocity_ned() {#classmavsdk_1_1_telemetry_1af9b06944ca73ad09caadacd9f4fae950} +```cpp +PositionVelocityNed mavsdk::Telemetry::position_velocity_ned() const +``` + + +Poll for '[PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md)' (blocking). + + +**Returns** + + [PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md) - One [PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md) update. + +### subscribe_ground_truth() {#classmavsdk_1_1_telemetry_1a3853c0b62fe26202e13896f94af4f72c} +```cpp +GroundTruthHandle mavsdk::Telemetry::subscribe_ground_truth(const GroundTruthCallback &callback) +``` + + +Subscribe to 'ground truth' updates. + + +**Parameters** + +* const [GroundTruthCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a222aae53852a2c535f6d69ed57221f13)& **callback** - + +**Returns** + + [GroundTruthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a373568d10564c5a3c3d325e5975a3a23) - + +### unsubscribe_ground_truth() {#classmavsdk_1_1_telemetry_1a69dedf60328c385dedae208e7ca3e2b5} +```cpp +void mavsdk::Telemetry::unsubscribe_ground_truth(GroundTruthHandle handle) +``` + + +Unsubscribe from subscribe_ground_truth. + + +**Parameters** + +* [GroundTruthHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a373568d10564c5a3c3d325e5975a3a23) **handle** - + +### ground_truth() {#classmavsdk_1_1_telemetry_1a1b5f387edc39e33b86954f2048133f71} +```cpp +GroundTruth mavsdk::Telemetry::ground_truth() const +``` + + +Poll for '[GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md)' (blocking). + + +**Returns** + + [GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md) - One [GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md) update. + +### subscribe_fixedwing_metrics() {#classmavsdk_1_1_telemetry_1ac5117bf112c932f47ffe283df7aac7f1} +```cpp +FixedwingMetricsHandle mavsdk::Telemetry::subscribe_fixedwing_metrics(const FixedwingMetricsCallback &callback) +``` + + +Subscribe to 'fixedwing metrics' updates. + + +**Parameters** + +* const [FixedwingMetricsCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5b42dbef0ef6d8c1768d503d0437f1e3)& **callback** - + +**Returns** + + [FixedwingMetricsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ab180a383ee3e17f20bb1b026b667db04) - + +### unsubscribe_fixedwing_metrics() {#classmavsdk_1_1_telemetry_1a40a910811684cffe050f8dea0d682565} +```cpp +void mavsdk::Telemetry::unsubscribe_fixedwing_metrics(FixedwingMetricsHandle handle) +``` + + +Unsubscribe from subscribe_fixedwing_metrics. + + +**Parameters** + +* [FixedwingMetricsHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ab180a383ee3e17f20bb1b026b667db04) **handle** - + +### fixedwing_metrics() {#classmavsdk_1_1_telemetry_1a2ab8d2a8d017d46e77d49c4f899c7cbf} +```cpp +FixedwingMetrics mavsdk::Telemetry::fixedwing_metrics() const +``` + + +Poll for '[FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md)' (blocking). + + +**Returns** + + [FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md) - One [FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md) update. + +### subscribe_imu() {#classmavsdk_1_1_telemetry_1a24d0904fd8529724a76f8a4fda5bdb70} +```cpp +ImuHandle mavsdk::Telemetry::subscribe_imu(const ImuCallback &callback) +``` + + +Subscribe to 'IMU' updates (in SI units in NED body frame). + + +**Parameters** + +* const [ImuCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4fbc2ad274fd5a8af077004d2d7bd984)& **callback** - + +**Returns** + + [ImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5b45a4c22abb67617d37ae56efdf8360) - + +### unsubscribe_imu() {#classmavsdk_1_1_telemetry_1a2af03957c69efd9b5cbb7537def56155} +```cpp +void mavsdk::Telemetry::unsubscribe_imu(ImuHandle handle) +``` + + +Unsubscribe from subscribe_imu. + + +**Parameters** + +* [ImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a5b45a4c22abb67617d37ae56efdf8360) **handle** - + +### imu() {#classmavsdk_1_1_telemetry_1a1a4e43b7bdcd988442955d2a5465b977} +```cpp +Imu mavsdk::Telemetry::imu() const +``` + + +Poll for '[Imu](structmavsdk_1_1_telemetry_1_1_imu.md)' (blocking). + + +**Returns** + + [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) - One [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) update. + +### subscribe_scaled_imu() {#classmavsdk_1_1_telemetry_1a61bd540f505a3a6acd858ca169e868b3} +```cpp +ScaledImuHandle mavsdk::Telemetry::subscribe_scaled_imu(const ScaledImuCallback &callback) +``` + + +Subscribe to 'Scaled IMU' updates. + + +**Parameters** + +* const [ScaledImuCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a26159a775adcfbc42302234b7108d94f)& **callback** - + +**Returns** + + [ScaledImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4968d9d418d48a4368f2915023ca0014) - + +### unsubscribe_scaled_imu() {#classmavsdk_1_1_telemetry_1a69acf5d201425f0a318a36ad6230fb46} +```cpp +void mavsdk::Telemetry::unsubscribe_scaled_imu(ScaledImuHandle handle) +``` + + +Unsubscribe from subscribe_scaled_imu. + + +**Parameters** + +* [ScaledImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4968d9d418d48a4368f2915023ca0014) **handle** - + +### scaled_imu() {#classmavsdk_1_1_telemetry_1ab6a515ba85a67bc80e6e1c9a05d1f94d} +```cpp +Imu mavsdk::Telemetry::scaled_imu() const +``` + + +Poll for '[Imu](structmavsdk_1_1_telemetry_1_1_imu.md)' (blocking). + + +**Returns** + + [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) - One [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) update. + +### subscribe_raw_imu() {#classmavsdk_1_1_telemetry_1a98db826585b84957478a6195d46f0491} +```cpp +RawImuHandle mavsdk::Telemetry::subscribe_raw_imu(const RawImuCallback &callback) +``` + + +Subscribe to 'Raw IMU' updates. + + +**Parameters** + +* const [RawImuCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a92711da85d343cb58b73561e6b730c76)& **callback** - + +**Returns** + + [RawImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a416f5b4dc6c51d78d05572d5cc18f3fb) - + +### unsubscribe_raw_imu() {#classmavsdk_1_1_telemetry_1aec5b5fbbb37654bb6dae9607451929d7} +```cpp +void mavsdk::Telemetry::unsubscribe_raw_imu(RawImuHandle handle) +``` + + +Unsubscribe from subscribe_raw_imu. + + +**Parameters** + +* [RawImuHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a416f5b4dc6c51d78d05572d5cc18f3fb) **handle** - + +### raw_imu() {#classmavsdk_1_1_telemetry_1a691464f001ddf8d02b97bcf137f5cf8a} +```cpp +Imu mavsdk::Telemetry::raw_imu() const +``` + + +Poll for '[Imu](structmavsdk_1_1_telemetry_1_1_imu.md)' (blocking). + + +**Returns** + + [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) - One [Imu](structmavsdk_1_1_telemetry_1_1_imu.md) update. + +### subscribe_health_all_ok() {#classmavsdk_1_1_telemetry_1acc64edfa8230926024cdefe93ab10c7f} +```cpp +HealthAllOkHandle mavsdk::Telemetry::subscribe_health_all_ok(const HealthAllOkCallback &callback) +``` + + +Subscribe to 'HealthAllOk' updates. + + +**Parameters** + +* const [HealthAllOkCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a71cdcadfaa988dc14029e0b9fdbe742d)& **callback** - + +**Returns** + + [HealthAllOkHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa882d4938eb491cce5b7ca6aead2384c) - + +### unsubscribe_health_all_ok() {#classmavsdk_1_1_telemetry_1ab0dd814f6ca883ded70839bf7ec0010c} +```cpp +void mavsdk::Telemetry::unsubscribe_health_all_ok(HealthAllOkHandle handle) +``` + + +Unsubscribe from subscribe_health_all_ok. + + +**Parameters** + +* [HealthAllOkHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa882d4938eb491cce5b7ca6aead2384c) **handle** - + +### health_all_ok() {#classmavsdk_1_1_telemetry_1ad6d833741b5576f07204d268c5cd4d06} +```cpp +bool mavsdk::Telemetry::health_all_ok() const +``` + + +Poll for 'bool' (blocking). + + +**Returns** + + bool - One bool update. + +### subscribe_unix_epoch_time() {#classmavsdk_1_1_telemetry_1a172eb7793c61744a8195e38c0612ec1f} +```cpp +UnixEpochTimeHandle mavsdk::Telemetry::subscribe_unix_epoch_time(const UnixEpochTimeCallback &callback) +``` + + +Subscribe to 'unix epoch time' updates. + + +**Parameters** + +* const [UnixEpochTimeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a321c7d809ae8f56bb8a361d5e5ce6391)& **callback** - + +**Returns** + + [UnixEpochTimeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4c4b00adfab9b7f04530133aafbafbd5) - + +### unsubscribe_unix_epoch_time() {#classmavsdk_1_1_telemetry_1acba0439f1175aa29c072d85efa0c68c6} +```cpp +void mavsdk::Telemetry::unsubscribe_unix_epoch_time(UnixEpochTimeHandle handle) +``` + + +Unsubscribe from subscribe_unix_epoch_time. + + +**Parameters** + +* [UnixEpochTimeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a4c4b00adfab9b7f04530133aafbafbd5) **handle** - + +### unix_epoch_time() {#classmavsdk_1_1_telemetry_1ab5ea5f6bb35b5670e34d5697d8c880f4} +```cpp +uint64_t mavsdk::Telemetry::unix_epoch_time() const +``` + + +Poll for 'uint64_t' (blocking). + + +**Returns** + + uint64_t - One uint64_t update. + +### subscribe_distance_sensor() {#classmavsdk_1_1_telemetry_1a07cb00743cab5df75f0a656eb2ebaed1} +```cpp +DistanceSensorHandle mavsdk::Telemetry::subscribe_distance_sensor(const DistanceSensorCallback &callback) +``` + + +Subscribe to 'Distance Sensor' updates. + + +**Parameters** + +* const [DistanceSensorCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aacfdb5e2cce7f3f77c68b36f020ed1f2)& **callback** - + +**Returns** + + [DistanceSensorHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aaa6bd0660aeb7d3f1d12240ce0710878) - + +### unsubscribe_distance_sensor() {#classmavsdk_1_1_telemetry_1a726d49ea6b63128e7d16f781e016c192} +```cpp +void mavsdk::Telemetry::unsubscribe_distance_sensor(DistanceSensorHandle handle) +``` + + +Unsubscribe from subscribe_distance_sensor. + + +**Parameters** + +* [DistanceSensorHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aaa6bd0660aeb7d3f1d12240ce0710878) **handle** - + +### distance_sensor() {#classmavsdk_1_1_telemetry_1aa01828c0ffcb4727b884ffeae8fef59a} +```cpp +DistanceSensor mavsdk::Telemetry::distance_sensor() const +``` + + +Poll for '[DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md)' (blocking). + + +**Returns** + + [DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md) - One [DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md) update. + +### subscribe_scaled_pressure() {#classmavsdk_1_1_telemetry_1a934fe2b50a79219e3c6d404fc7d6825d} +```cpp +ScaledPressureHandle mavsdk::Telemetry::subscribe_scaled_pressure(const ScaledPressureCallback &callback) +``` + + +Subscribe to 'Scaled Pressure' updates. + + +**Parameters** + +* const [ScaledPressureCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ac123edc254bb1874edc08a0f531f82b1)& **callback** - + +**Returns** + + [ScaledPressureHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad19871b63833f64bed071db6017e4a22) - + +### unsubscribe_scaled_pressure() {#classmavsdk_1_1_telemetry_1a725b8f4f2bdda5eca799a0829f287848} +```cpp +void mavsdk::Telemetry::unsubscribe_scaled_pressure(ScaledPressureHandle handle) +``` + + +Unsubscribe from subscribe_scaled_pressure. + + +**Parameters** + +* [ScaledPressureHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ad19871b63833f64bed071db6017e4a22) **handle** - + +### scaled_pressure() {#classmavsdk_1_1_telemetry_1a825ecb6af46663034f982c3c3d6da022} +```cpp +ScaledPressure mavsdk::Telemetry::scaled_pressure() const +``` + + +Poll for '[ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md)' (blocking). + + +**Returns** + + [ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md) - One [ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md) update. + +### subscribe_heading() {#classmavsdk_1_1_telemetry_1a0ebfabba364867869314e389b118584b} +```cpp +HeadingHandle mavsdk::Telemetry::subscribe_heading(const HeadingCallback &callback) +``` + + +Subscribe to '[Heading](structmavsdk_1_1_telemetry_1_1_heading.md)' updates. + + +**Parameters** + +* const [HeadingCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1aa3bca0adab525a4c733c1e7f5c5dd8b3)& **callback** - + +**Returns** + + [HeadingHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a11cc43135c8162fd8478ba76a5b3166d) - + +### unsubscribe_heading() {#classmavsdk_1_1_telemetry_1afe400d67b33f60a43d3bd823f598c0e9} +```cpp +void mavsdk::Telemetry::unsubscribe_heading(HeadingHandle handle) +``` + + +Unsubscribe from subscribe_heading. + + +**Parameters** + +* [HeadingHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a11cc43135c8162fd8478ba76a5b3166d) **handle** - + +### heading() {#classmavsdk_1_1_telemetry_1a2aec80b167a3076903be4fe52847a4d3} +```cpp +Heading mavsdk::Telemetry::heading() const +``` + + +Poll for '[Heading](structmavsdk_1_1_telemetry_1_1_heading.md)' (blocking). + + +**Returns** + + [Heading](structmavsdk_1_1_telemetry_1_1_heading.md) - One [Heading](structmavsdk_1_1_telemetry_1_1_heading.md) update. + +### subscribe_altitude() {#classmavsdk_1_1_telemetry_1ae50ada2726b9a074157c73ddf0894b23} +```cpp +AltitudeHandle mavsdk::Telemetry::subscribe_altitude(const AltitudeCallback &callback) +``` + + +Subscribe to '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' updates. + + +**Parameters** + +* const [AltitudeCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a868986de0ab3990d4fe1ec842bce6adf)& **callback** - + +**Returns** + + [AltitudeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae0714c14e07a08b4748c96ea20f1d12f) - + +### unsubscribe_altitude() {#classmavsdk_1_1_telemetry_1aee258bae5149771cf37a6e5b5d63415c} +```cpp +void mavsdk::Telemetry::unsubscribe_altitude(AltitudeHandle handle) +``` + + +Unsubscribe from subscribe_altitude. + + +**Parameters** + +* [AltitudeHandle](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1ae0714c14e07a08b4748c96ea20f1d12f) **handle** - + +### altitude() {#classmavsdk_1_1_telemetry_1a53f3c06d9b4e0f737f69c060c2be621d} +```cpp +Altitude mavsdk::Telemetry::altitude() const +``` + + +Poll for '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' (blocking). + + +**Returns** + + [Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md) - One [Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md) update. + +### set_rate_position_async() {#classmavsdk_1_1_telemetry_1ad7e5b576edb9398c8f5f2f14626b984a} +```cpp +void mavsdk::Telemetry::set_rate_position_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'position' updates. + +This function is non-blocking. See 'set_rate_position' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_position() {#classmavsdk_1_1_telemetry_1a665439f3d5f8c58b3ef3dd427cf4782b} +```cpp +Result mavsdk::Telemetry::set_rate_position(double rate_hz) const +``` + + +Set rate to 'position' updates. + +This function is blocking. See 'set_rate_position_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_home_async() {#classmavsdk_1_1_telemetry_1a098f4c4f50fc3ac2c153ef152208fbbe} +```cpp +void mavsdk::Telemetry::set_rate_home_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'home position' updates. + +This function is non-blocking. See 'set_rate_home' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_home() {#classmavsdk_1_1_telemetry_1af90e28ad8a8f05401176c98e427eecfc} +```cpp +Result mavsdk::Telemetry::set_rate_home(double rate_hz) const +``` + + +Set rate to 'home position' updates. + +This function is blocking. See 'set_rate_home_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_in_air_async() {#classmavsdk_1_1_telemetry_1a9ea77b7ef64acd1e25b05e593e638c70} +```cpp +void mavsdk::Telemetry::set_rate_in_air_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to in-air updates. + +This function is non-blocking. See 'set_rate_in_air' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_in_air() {#classmavsdk_1_1_telemetry_1a8f179e8397b395e61a48529ceeba2b14} +```cpp +Result mavsdk::Telemetry::set_rate_in_air(double rate_hz) const +``` + + +Set rate to in-air updates. + +This function is blocking. See 'set_rate_in_air_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_landed_state_async() {#classmavsdk_1_1_telemetry_1a180fff93b120a67c16ad5993f0b38847} +```cpp +void mavsdk::Telemetry::set_rate_landed_state_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to landed state updates. + +This function is non-blocking. See 'set_rate_landed_state' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_landed_state() {#classmavsdk_1_1_telemetry_1a53a3428c602c1f91cfcffdba188a4e51} +```cpp +Result mavsdk::Telemetry::set_rate_landed_state(double rate_hz) const +``` + + +Set rate to landed state updates. + +This function is blocking. See 'set_rate_landed_state_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_vtol_state_async() {#classmavsdk_1_1_telemetry_1a18f47beba583e6814061f95e68a3851d} +```cpp +void mavsdk::Telemetry::set_rate_vtol_state_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to VTOL state updates. + +This function is non-blocking. See 'set_rate_vtol_state' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_vtol_state() {#classmavsdk_1_1_telemetry_1a943c2e32a12098a117c4bd4eed7cdc22} +```cpp +Result mavsdk::Telemetry::set_rate_vtol_state(double rate_hz) const +``` + + +Set rate to VTOL state updates. + +This function is blocking. See 'set_rate_vtol_state_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_attitude_quaternion_async() {#classmavsdk_1_1_telemetry_1a1eb6bc9b25d1043405ac30e13172a272} +```cpp +void mavsdk::Telemetry::set_rate_attitude_quaternion_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'attitude euler angle' updates. + +This function is non-blocking. See 'set_rate_attitude_quaternion' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_attitude_quaternion() {#classmavsdk_1_1_telemetry_1adfc8e1a3bfa0f459350640630283716d} +```cpp +Result mavsdk::Telemetry::set_rate_attitude_quaternion(double rate_hz) const +``` + + +Set rate to 'attitude euler angle' updates. + +This function is blocking. See 'set_rate_attitude_quaternion_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_attitude_euler_async() {#classmavsdk_1_1_telemetry_1aabf20f904d9c65582cdf167f7b0275a9} +```cpp +void mavsdk::Telemetry::set_rate_attitude_euler_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'attitude quaternion' updates. + +This function is non-blocking. See 'set_rate_attitude_euler' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_attitude_euler() {#classmavsdk_1_1_telemetry_1adc7a43d7143261df5f97fdc8a882fdf3} +```cpp +Result mavsdk::Telemetry::set_rate_attitude_euler(double rate_hz) const +``` + + +Set rate to 'attitude quaternion' updates. + +This function is blocking. See 'set_rate_attitude_euler_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_camera_attitude_async() {#classmavsdk_1_1_telemetry_1a520f15e42f5f1b3987ca2a9cd94a3d9a} +```cpp +void mavsdk::Telemetry::set_rate_camera_attitude_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate of camera attitude updates. + +This function is non-blocking. See 'set_rate_camera_attitude' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_camera_attitude() {#classmavsdk_1_1_telemetry_1a427da223d16ce07a61b07d4e5af1ab04} +```cpp +Result mavsdk::Telemetry::set_rate_camera_attitude(double rate_hz) const +``` + + +Set rate of camera attitude updates. + +This function is blocking. See 'set_rate_camera_attitude_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_velocity_ned_async() {#classmavsdk_1_1_telemetry_1a9429ffa784fa56adee69c5017abedee4} +```cpp +void mavsdk::Telemetry::set_rate_velocity_ned_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'ground speed' updates (NED). + +This function is non-blocking. See 'set_rate_velocity_ned' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_velocity_ned() {#classmavsdk_1_1_telemetry_1ab5cb79fd53f27f245808a6bb9ed3225d} +```cpp +Result mavsdk::Telemetry::set_rate_velocity_ned(double rate_hz) const +``` + + +Set rate to 'ground speed' updates (NED). + +This function is blocking. See 'set_rate_velocity_ned_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_gps_info_async() {#classmavsdk_1_1_telemetry_1ae6ada3cd6d4e9835dd4d1d712f1195e4} +```cpp +void mavsdk::Telemetry::set_rate_gps_info_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'GPS info' updates. + +This function is non-blocking. See 'set_rate_gps_info' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_gps_info() {#classmavsdk_1_1_telemetry_1a14510bcb6fe3c31d91653d32d354613f} +```cpp +Result mavsdk::Telemetry::set_rate_gps_info(double rate_hz) const +``` + + +Set rate to 'GPS info' updates. + +This function is blocking. See 'set_rate_gps_info_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_battery_async() {#classmavsdk_1_1_telemetry_1a5615e21f616997dfca1318c96a7e550e} +```cpp +void mavsdk::Telemetry::set_rate_battery_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'battery' updates. + +This function is non-blocking. See 'set_rate_battery' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_battery() {#classmavsdk_1_1_telemetry_1ae781d2e950a535a465f2bc1575e9f893} +```cpp +Result mavsdk::Telemetry::set_rate_battery(double rate_hz) const +``` + + +Set rate to 'battery' updates. + +This function is blocking. See 'set_rate_battery_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_rc_status_async() {#classmavsdk_1_1_telemetry_1a8cf84eaca875626bc53ed03e98d6eb7e} +```cpp +void mavsdk::Telemetry::set_rate_rc_status_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'RC status' updates. + +This function is non-blocking. See 'set_rate_rc_status' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_rc_status() {#classmavsdk_1_1_telemetry_1acbfc54792f79c5fd2a9855278981f8ca} +```cpp +Result mavsdk::Telemetry::set_rate_rc_status(double rate_hz) const +``` + + +Set rate to 'RC status' updates. + +This function is blocking. See 'set_rate_rc_status_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_actuator_control_target_async() {#classmavsdk_1_1_telemetry_1aa44e3a76c482f273a2f1bc1a09bec27c} +```cpp +void mavsdk::Telemetry::set_rate_actuator_control_target_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'actuator control target' updates. + +This function is non-blocking. See 'set_rate_actuator_control_target' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_actuator_control_target() {#classmavsdk_1_1_telemetry_1aa43efb510038f1bb95241953ae09c998} +```cpp +Result mavsdk::Telemetry::set_rate_actuator_control_target(double rate_hz) const +``` + + +Set rate to 'actuator control target' updates. + +This function is blocking. See 'set_rate_actuator_control_target_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_actuator_output_status_async() {#classmavsdk_1_1_telemetry_1a2ad19c1101962ed7cfeec89b7fae0f9c} +```cpp +void mavsdk::Telemetry::set_rate_actuator_output_status_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'actuator output status' updates. + +This function is non-blocking. See 'set_rate_actuator_output_status' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_actuator_output_status() {#classmavsdk_1_1_telemetry_1a48b3e3a288ba6a8d38914c4827124006} +```cpp +Result mavsdk::Telemetry::set_rate_actuator_output_status(double rate_hz) const +``` + + +Set rate to 'actuator output status' updates. + +This function is blocking. See 'set_rate_actuator_output_status_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_odometry_async() {#classmavsdk_1_1_telemetry_1a23e507e1d53c6603479701f5e2af49ce} +```cpp +void mavsdk::Telemetry::set_rate_odometry_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'odometry' updates. + +This function is non-blocking. See 'set_rate_odometry' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_odometry() {#classmavsdk_1_1_telemetry_1a4368bf825cec3bc9369d57546a45391e} +```cpp +Result mavsdk::Telemetry::set_rate_odometry(double rate_hz) const +``` + + +Set rate to 'odometry' updates. + +This function is blocking. See 'set_rate_odometry_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_position_velocity_ned_async() {#classmavsdk_1_1_telemetry_1a9a4c3b6affa497dd22e464f515ca278c} +```cpp +void mavsdk::Telemetry::set_rate_position_velocity_ned_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'position velocity' updates. + +This function is non-blocking. See 'set_rate_position_velocity_ned' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_position_velocity_ned() {#classmavsdk_1_1_telemetry_1a64fe3457589cd208a9f7bd5dea763da1} +```cpp +Result mavsdk::Telemetry::set_rate_position_velocity_ned(double rate_hz) const +``` + + +Set rate to 'position velocity' updates. + +This function is blocking. See 'set_rate_position_velocity_ned_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_ground_truth_async() {#classmavsdk_1_1_telemetry_1a16b28ebdc6d211a5b182bd8d0abb4d2e} +```cpp +void mavsdk::Telemetry::set_rate_ground_truth_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'ground truth' updates. + +This function is non-blocking. See 'set_rate_ground_truth' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_ground_truth() {#classmavsdk_1_1_telemetry_1a23b2962e5b7681ece3fcbc72220d6b48} +```cpp +Result mavsdk::Telemetry::set_rate_ground_truth(double rate_hz) const +``` + + +Set rate to 'ground truth' updates. + +This function is blocking. See 'set_rate_ground_truth_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_fixedwing_metrics_async() {#classmavsdk_1_1_telemetry_1a1484ccdcf4ba20a151e380e7bd7b9869} +```cpp +void mavsdk::Telemetry::set_rate_fixedwing_metrics_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'fixedwing metrics' updates. + +This function is non-blocking. See 'set_rate_fixedwing_metrics' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_fixedwing_metrics() {#classmavsdk_1_1_telemetry_1ab345a5925d132c27e0a5e1ab65a1e2c1} +```cpp +Result mavsdk::Telemetry::set_rate_fixedwing_metrics(double rate_hz) const +``` + + +Set rate to 'fixedwing metrics' updates. + +This function is blocking. See 'set_rate_fixedwing_metrics_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_imu_async() {#classmavsdk_1_1_telemetry_1a7dca435daa0de2db2d2e9d588c6bed99} +```cpp +void mavsdk::Telemetry::set_rate_imu_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'IMU' updates. + +This function is non-blocking. See 'set_rate_imu' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_imu() {#classmavsdk_1_1_telemetry_1a4e0d1dc2350e06f68f472d85dc69d175} +```cpp +Result mavsdk::Telemetry::set_rate_imu(double rate_hz) const +``` + + +Set rate to 'IMU' updates. + +This function is blocking. See 'set_rate_imu_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_scaled_imu_async() {#classmavsdk_1_1_telemetry_1aebbf2eb2e5d117d8b40f21075845467c} +```cpp +void mavsdk::Telemetry::set_rate_scaled_imu_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'Scaled IMU' updates. + +This function is non-blocking. See 'set_rate_scaled_imu' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_scaled_imu() {#classmavsdk_1_1_telemetry_1af8dc4f38bf7cc89f700c985a04e03237} +```cpp +Result mavsdk::Telemetry::set_rate_scaled_imu(double rate_hz) const +``` + + +Set rate to 'Scaled IMU' updates. + +This function is blocking. See 'set_rate_scaled_imu_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_raw_imu_async() {#classmavsdk_1_1_telemetry_1a36d19058a0f71d711de3e50ba718704e} +```cpp +void mavsdk::Telemetry::set_rate_raw_imu_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'Raw IMU' updates. + +This function is non-blocking. See 'set_rate_raw_imu' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_raw_imu() {#classmavsdk_1_1_telemetry_1a020cb8760e6f00b759c8ef564d8801ad} +```cpp +Result mavsdk::Telemetry::set_rate_raw_imu(double rate_hz) const +``` + + +Set rate to 'Raw IMU' updates. + +This function is blocking. See 'set_rate_raw_imu_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_unix_epoch_time_async() {#classmavsdk_1_1_telemetry_1a74b18cd8a5faed4d46b244db0a6e3c50} +```cpp +void mavsdk::Telemetry::set_rate_unix_epoch_time_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'unix epoch time' updates. + +This function is non-blocking. See 'set_rate_unix_epoch_time' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_unix_epoch_time() {#classmavsdk_1_1_telemetry_1a340ac34547672ee07131bca34cbbb820} +```cpp +Result mavsdk::Telemetry::set_rate_unix_epoch_time(double rate_hz) const +``` + + +Set rate to 'unix epoch time' updates. + +This function is blocking. See 'set_rate_unix_epoch_time_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_distance_sensor_async() {#classmavsdk_1_1_telemetry_1a0371c470866b539b3aa1e254c974aa43} +```cpp +void mavsdk::Telemetry::set_rate_distance_sensor_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'Distance Sensor' updates. + +This function is non-blocking. See 'set_rate_distance_sensor' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_distance_sensor() {#classmavsdk_1_1_telemetry_1a7f536359536478691d7db980ffe49e49} +```cpp +Result mavsdk::Telemetry::set_rate_distance_sensor(double rate_hz) const +``` + + +Set rate to 'Distance Sensor' updates. + +This function is blocking. See 'set_rate_distance_sensor_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### set_rate_altitude_async() {#classmavsdk_1_1_telemetry_1a15461dd3f64aef2b921c9f06ee144bc1} +```cpp +void mavsdk::Telemetry::set_rate_altitude_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' updates. + +This function is non-blocking. See 'set_rate_altitude' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a166e81c6573532978e5940eafdfcec0b) **callback** - + +### set_rate_altitude() {#classmavsdk_1_1_telemetry_1a100fc786b86637385c6188ea53121b98} +```cpp +Result mavsdk::Telemetry::set_rate_altitude(double rate_hz) const +``` + + +Set rate to '[Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md)' updates. + +This function is blocking. See 'set_rate_altitude_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75) - Result of request. + +### get_gps_global_origin_async() {#classmavsdk_1_1_telemetry_1a60cca43e2f87e3fd3a9e170ff2b64e0a} +```cpp +void mavsdk::Telemetry::get_gps_global_origin_async(const GetGpsGlobalOriginCallback callback) +``` + + +Get the GPS location of where the estimator has been initialized. + +This function is non-blocking. See 'get_gps_global_origin' for the blocking counterpart. + +**Parameters** + +* const [GetGpsGlobalOriginCallback](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a350ee89a7e30a691e130e29ace8917ef) **callback** - + +### get_gps_global_origin() {#classmavsdk_1_1_telemetry_1a77747e7cea5a4d644bd6bec9441c7bfb} +```cpp +std::pair mavsdk::Telemetry::get_gps_global_origin() const +``` + + +Get the GPS location of where the estimator has been initialized. + +This function is blocking. See 'get_gps_global_origin_async' for the non-blocking counterpart. + +**Returns** + + std::pair< [Result](classmavsdk_1_1_telemetry.md#classmavsdk_1_1_telemetry_1a241427df9a06234df2d3020fb524db75), [Telemetry::GpsGlobalOrigin](structmavsdk_1_1_telemetry_1_1_gps_global_origin.md) > - Result of request. + +### operator=() {#classmavsdk_1_1_telemetry_1a703ac978c925be8806921925cf16aca9} +```cpp +const Telemetry& mavsdk::Telemetry::operator=(const Telemetry &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Telemetry](classmavsdk_1_1_telemetry.md)& - + +**Returns** + + const [Telemetry](classmavsdk_1_1_telemetry.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_telemetry_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_telemetry_server.md new file mode 100644 index 000000000..dd7cb0955 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_telemetry_server.md @@ -0,0 +1,539 @@ +# mavsdk::TelemetryServer Class Reference +`#include: telemetry_server.h` + +---- + + +Allow users to provide vehicle telemetry and state information (e.g. battery, GPS, RC connection, flight mode etc.) and set telemetry update rates. + + +## Data Structures + + +struct [AccelerationFrd](structmavsdk_1_1_telemetry_server_1_1_acceleration_frd.md) + +struct [ActuatorControlTarget](structmavsdk_1_1_telemetry_server_1_1_actuator_control_target.md) + +struct [ActuatorOutputStatus](structmavsdk_1_1_telemetry_server_1_1_actuator_output_status.md) + +struct [AngularVelocityBody](structmavsdk_1_1_telemetry_server_1_1_angular_velocity_body.md) + +struct [AngularVelocityFrd](structmavsdk_1_1_telemetry_server_1_1_angular_velocity_frd.md) + +struct [Battery](structmavsdk_1_1_telemetry_server_1_1_battery.md) + +struct [Covariance](structmavsdk_1_1_telemetry_server_1_1_covariance.md) + +struct [DistanceSensor](structmavsdk_1_1_telemetry_server_1_1_distance_sensor.md) + +struct [EulerAngle](structmavsdk_1_1_telemetry_server_1_1_euler_angle.md) + +struct [FixedwingMetrics](structmavsdk_1_1_telemetry_server_1_1_fixedwing_metrics.md) + +struct [GpsInfo](structmavsdk_1_1_telemetry_server_1_1_gps_info.md) + +struct [GroundTruth](structmavsdk_1_1_telemetry_server_1_1_ground_truth.md) + +struct [Heading](structmavsdk_1_1_telemetry_server_1_1_heading.md) + +struct [Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) + +struct [MagneticFieldFrd](structmavsdk_1_1_telemetry_server_1_1_magnetic_field_frd.md) + +struct [Odometry](structmavsdk_1_1_telemetry_server_1_1_odometry.md) + +struct [Position](structmavsdk_1_1_telemetry_server_1_1_position.md) + +struct [PositionBody](structmavsdk_1_1_telemetry_server_1_1_position_body.md) + +struct [PositionNed](structmavsdk_1_1_telemetry_server_1_1_position_ned.md) + +struct [PositionVelocityNed](structmavsdk_1_1_telemetry_server_1_1_position_velocity_ned.md) + +struct [Quaternion](structmavsdk_1_1_telemetry_server_1_1_quaternion.md) + +struct [RawGps](structmavsdk_1_1_telemetry_server_1_1_raw_gps.md) + +struct [RcStatus](structmavsdk_1_1_telemetry_server_1_1_rc_status.md) + +struct [ScaledPressure](structmavsdk_1_1_telemetry_server_1_1_scaled_pressure.md) + +struct [StatusText](structmavsdk_1_1_telemetry_server_1_1_status_text.md) + +struct [VelocityBody](structmavsdk_1_1_telemetry_server_1_1_velocity_body.md) + +struct [VelocityNed](structmavsdk_1_1_telemetry_server_1_1_velocity_ned.md) + +## Public Types + + +Type | Description +--- | --- +enum [FixType](#classmavsdk_1_1_telemetry_server_1ac3acfa87349708ecf8b53c8e7426e36e) | GPS fix type. +enum [VtolState](#classmavsdk_1_1_telemetry_server_1a8ca81cee4e0f7702ab854c10bec91fda) | Maps to MAV_VTOL_STATE. +enum [StatusTextType](#classmavsdk_1_1_telemetry_server_1a31ddd2e06b5f7c41eeaab4967f550c55) | Status types. +enum [LandedState](#classmavsdk_1_1_telemetry_server_1a28e2047a3a679c5fcca3945a44f66bdb) | Landed State enumeration. +enum [Result](#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | Possible results returned for telemetry requests. +std::function< void([Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a))> [ResultCallback](#classmavsdk_1_1_telemetry_server_1a47ca7112b0b88f42b0cf7e51fa79d010) | Callback type for asynchronous [TelemetryServer](classmavsdk_1_1_telemetry_server.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [TelemetryServer](#classmavsdk_1_1_telemetry_server_1a49e68672755eaa7a4b0b42108bc8761a) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~TelemetryServer](#classmavsdk_1_1_telemetry_server_1a459bdc50c062ae94060a331c1a1d8ed8) () override | Destructor (internal use only). +  | [TelemetryServer](#classmavsdk_1_1_telemetry_server_1a412c886b49f0c7b0cf64c13e7664cc7f) (const [TelemetryServer](classmavsdk_1_1_telemetry_server.md) & other) | Copy constructor. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_position](#classmavsdk_1_1_telemetry_server_1ac323f672bf90a210f62bc460f45ce1b4) ([Position](structmavsdk_1_1_telemetry_server_1_1_position.md) position, [VelocityNed](structmavsdk_1_1_telemetry_server_1_1_velocity_ned.md) velocity_ned, [Heading](structmavsdk_1_1_telemetry_server_1_1_heading.md) heading)const | Publish to 'position' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_home](#classmavsdk_1_1_telemetry_server_1a4a7a504dc665a134b85ea82f90c4e1ac) ([Position](structmavsdk_1_1_telemetry_server_1_1_position.md) home)const | Publish to 'home position' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_sys_status](#classmavsdk_1_1_telemetry_server_1a4abd61400c28d53c0e244c8b7ad07730) ([Battery](structmavsdk_1_1_telemetry_server_1_1_battery.md) battery, bool rc_receiver_status, bool gyro_status, bool accel_status, bool mag_status, bool gps_status)const | Publish 'sys status' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_extended_sys_state](#classmavsdk_1_1_telemetry_server_1a8bcb2315e9b2f2f0999d83d61c951961) ([VtolState](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a8ca81cee4e0f7702ab854c10bec91fda) vtol_state, [LandedState](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a28e2047a3a679c5fcca3945a44f66bdb) landed_state)const | Publish 'extended sys state' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_raw_gps](#classmavsdk_1_1_telemetry_server_1a9a81a55e3da3a79251c03baf8838623f) ([RawGps](structmavsdk_1_1_telemetry_server_1_1_raw_gps.md) raw_gps, [GpsInfo](structmavsdk_1_1_telemetry_server_1_1_gps_info.md) gps_info)const | Publish to 'Raw GPS' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_battery](#classmavsdk_1_1_telemetry_server_1ae4a6bb3929517e74f01cfcbfc2bdd9e1) ([Battery](structmavsdk_1_1_telemetry_server_1_1_battery.md) battery)const | Publish to 'battery' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_status_text](#classmavsdk_1_1_telemetry_server_1a63de339cba22f7ead00cad6021f476c8) ([StatusText](structmavsdk_1_1_telemetry_server_1_1_status_text.md) status_text)const | Publish to 'status text' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_odometry](#classmavsdk_1_1_telemetry_server_1a5663a04d971242dcd4aeb0241304279c) ([Odometry](structmavsdk_1_1_telemetry_server_1_1_odometry.md) odometry)const | Publish to 'odometry' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_position_velocity_ned](#classmavsdk_1_1_telemetry_server_1ac20e6bd7250de7c1290ccf9d18b02b96) ([PositionVelocityNed](structmavsdk_1_1_telemetry_server_1_1_position_velocity_ned.md) position_velocity_ned)const | Publish to 'position velocity' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_ground_truth](#classmavsdk_1_1_telemetry_server_1af882e6fa87294895f6afb7da8c9f6761) ([GroundTruth](structmavsdk_1_1_telemetry_server_1_1_ground_truth.md) ground_truth)const | Publish to 'ground truth' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_imu](#classmavsdk_1_1_telemetry_server_1a077f33d7fdbdb0cc9b091bdf8e647969) ([Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) imu)const | Publish to 'IMU' updates (in SI units in NED body frame). +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_scaled_imu](#classmavsdk_1_1_telemetry_server_1aff52c34112c885662c711cda94b7c985) ([Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) imu)const | Publish to 'Scaled IMU' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_raw_imu](#classmavsdk_1_1_telemetry_server_1a92f3fcb090ffc96c70ce35d433a1a2a5) ([Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) imu)const | Publish to 'Raw IMU' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_unix_epoch_time](#classmavsdk_1_1_telemetry_server_1a27b1b901cd8baf91380029c2b95b2dac) (uint64_t time_us)const | Publish to 'unix epoch time' updates. +[Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) | [publish_distance_sensor](#classmavsdk_1_1_telemetry_server_1a7532d068284fb7f55c00804a4a996a6d) ([DistanceSensor](structmavsdk_1_1_telemetry_server_1_1_distance_sensor.md) distance_sensor)const | Publish to "distance sensor" updates. +const [TelemetryServer](classmavsdk_1_1_telemetry_server.md) & | [operator=](#classmavsdk_1_1_telemetry_server_1a479502f1ce3bdc2c5be486911a20ca25) (const [TelemetryServer](classmavsdk_1_1_telemetry_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### TelemetryServer() {#classmavsdk_1_1_telemetry_server_1a49e68672755eaa7a4b0b42108bc8761a} +```cpp +mavsdk::TelemetryServer::TelemetryServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto telemetry_server = TelemetryServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~TelemetryServer() {#classmavsdk_1_1_telemetry_server_1a459bdc50c062ae94060a331c1a1d8ed8} +```cpp +mavsdk::TelemetryServer::~TelemetryServer() override +``` + + +Destructor (internal use only). + + +### TelemetryServer() {#classmavsdk_1_1_telemetry_server_1a412c886b49f0c7b0cf64c13e7664cc7f} +```cpp +mavsdk::TelemetryServer::TelemetryServer(const TelemetryServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [TelemetryServer](classmavsdk_1_1_telemetry_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_telemetry_server_1a47ca7112b0b88f42b0cf7e51fa79d010} + +```cpp +using mavsdk::TelemetryServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [TelemetryServer](classmavsdk_1_1_telemetry_server.md) calls. + + +## Member Enumeration Documentation + + +### enum FixType {#classmavsdk_1_1_telemetry_server_1ac3acfa87349708ecf8b53c8e7426e36e} + + +GPS fix type. + + +Value | Description +--- | --- + `NoGps` | No GPS connected. + `NoFix` | No position information, GPS is connected. + `Fix2D` | 2D position. + `Fix3D` | 3D position. + `FixDgps` | DGPS/SBAS aided 3D position. + `RtkFloat` | RTK float, 3D position. + `RtkFixed` | RTK Fixed, 3D position. + +### enum VtolState {#classmavsdk_1_1_telemetry_server_1a8ca81cee4e0f7702ab854c10bec91fda} + + +Maps to MAV_VTOL_STATE. + + +Value | Description +--- | --- + `Undefined` | Not VTOL. + `TransitionToFw` | Transitioning to fixed-wing. + `TransitionToMc` | Transitioning to multi-copter. + `Mc` | Multi-copter. + `Fw` | Fixed-wing. + +### enum StatusTextType {#classmavsdk_1_1_telemetry_server_1a31ddd2e06b5f7c41eeaab4967f550c55} + + +Status types. + + +Value | Description +--- | --- + `Debug` | Debug. + `Info` | Information. + `Notice` | Notice. + `Warning` | Warning. + `Error` | Error. + `Critical` | Critical. + `Alert` | Alert. + `Emergency` | Emergency. + +### enum LandedState {#classmavsdk_1_1_telemetry_server_1a28e2047a3a679c5fcca3945a44f66bdb} + + +Landed State enumeration. + + +Value | Description +--- | --- + `Unknown` | Landed state is unknown. + `OnGround` | The vehicle is on the ground. + `InAir` | The vehicle is in the air. + `TakingOff` | The vehicle is taking off. + `Landing` | The vehicle is landing. + +### enum Result {#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a} + + +Possible results returned for telemetry requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Success: the telemetry command was accepted by the vehicle. + `NoSystem` | No system connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command refused by vehicle. + `Timeout` | Request timed out. + `Unsupported` | Request not supported. + +## Member Function Documentation + + +### publish_position() {#classmavsdk_1_1_telemetry_server_1ac323f672bf90a210f62bc460f45ce1b4} +```cpp +Result mavsdk::TelemetryServer::publish_position(Position position, VelocityNed velocity_ned, Heading heading) const +``` + + +Publish to 'position' updates. + +This function is blocking. + +**Parameters** + +* [Position](structmavsdk_1_1_telemetry_server_1_1_position.md) **position** - +* [VelocityNed](structmavsdk_1_1_telemetry_server_1_1_velocity_ned.md) **velocity_ned** - +* [Heading](structmavsdk_1_1_telemetry_server_1_1_heading.md) **heading** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_home() {#classmavsdk_1_1_telemetry_server_1a4a7a504dc665a134b85ea82f90c4e1ac} +```cpp +Result mavsdk::TelemetryServer::publish_home(Position home) const +``` + + +Publish to 'home position' updates. + +This function is blocking. + +**Parameters** + +* [Position](structmavsdk_1_1_telemetry_server_1_1_position.md) **home** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_sys_status() {#classmavsdk_1_1_telemetry_server_1a4abd61400c28d53c0e244c8b7ad07730} +```cpp +Result mavsdk::TelemetryServer::publish_sys_status(Battery battery, bool rc_receiver_status, bool gyro_status, bool accel_status, bool mag_status, bool gps_status) const +``` + + +Publish 'sys status' updates. + +This function is blocking. + +**Parameters** + +* [Battery](structmavsdk_1_1_telemetry_server_1_1_battery.md) **battery** - +* bool **rc_receiver_status** - +* bool **gyro_status** - +* bool **accel_status** - +* bool **mag_status** - +* bool **gps_status** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_extended_sys_state() {#classmavsdk_1_1_telemetry_server_1a8bcb2315e9b2f2f0999d83d61c951961} +```cpp +Result mavsdk::TelemetryServer::publish_extended_sys_state(VtolState vtol_state, LandedState landed_state) const +``` + + +Publish 'extended sys state' updates. + +This function is blocking. + +**Parameters** + +* [VtolState](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a8ca81cee4e0f7702ab854c10bec91fda) **vtol_state** - +* [LandedState](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a28e2047a3a679c5fcca3945a44f66bdb) **landed_state** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_raw_gps() {#classmavsdk_1_1_telemetry_server_1a9a81a55e3da3a79251c03baf8838623f} +```cpp +Result mavsdk::TelemetryServer::publish_raw_gps(RawGps raw_gps, GpsInfo gps_info) const +``` + + +Publish to 'Raw GPS' updates. + +This function is blocking. + +**Parameters** + +* [RawGps](structmavsdk_1_1_telemetry_server_1_1_raw_gps.md) **raw_gps** - +* [GpsInfo](structmavsdk_1_1_telemetry_server_1_1_gps_info.md) **gps_info** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_battery() {#classmavsdk_1_1_telemetry_server_1ae4a6bb3929517e74f01cfcbfc2bdd9e1} +```cpp +Result mavsdk::TelemetryServer::publish_battery(Battery battery) const +``` + + +Publish to 'battery' updates. + +This function is blocking. + +**Parameters** + +* [Battery](structmavsdk_1_1_telemetry_server_1_1_battery.md) **battery** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_status_text() {#classmavsdk_1_1_telemetry_server_1a63de339cba22f7ead00cad6021f476c8} +```cpp +Result mavsdk::TelemetryServer::publish_status_text(StatusText status_text) const +``` + + +Publish to 'status text' updates. + +This function is blocking. + +**Parameters** + +* [StatusText](structmavsdk_1_1_telemetry_server_1_1_status_text.md) **status_text** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_odometry() {#classmavsdk_1_1_telemetry_server_1a5663a04d971242dcd4aeb0241304279c} +```cpp +Result mavsdk::TelemetryServer::publish_odometry(Odometry odometry) const +``` + + +Publish to 'odometry' updates. + +This function is blocking. + +**Parameters** + +* [Odometry](structmavsdk_1_1_telemetry_server_1_1_odometry.md) **odometry** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_position_velocity_ned() {#classmavsdk_1_1_telemetry_server_1ac20e6bd7250de7c1290ccf9d18b02b96} +```cpp +Result mavsdk::TelemetryServer::publish_position_velocity_ned(PositionVelocityNed position_velocity_ned) const +``` + + +Publish to 'position velocity' updates. + +This function is blocking. + +**Parameters** + +* [PositionVelocityNed](structmavsdk_1_1_telemetry_server_1_1_position_velocity_ned.md) **position_velocity_ned** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_ground_truth() {#classmavsdk_1_1_telemetry_server_1af882e6fa87294895f6afb7da8c9f6761} +```cpp +Result mavsdk::TelemetryServer::publish_ground_truth(GroundTruth ground_truth) const +``` + + +Publish to 'ground truth' updates. + +This function is blocking. + +**Parameters** + +* [GroundTruth](structmavsdk_1_1_telemetry_server_1_1_ground_truth.md) **ground_truth** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_imu() {#classmavsdk_1_1_telemetry_server_1a077f33d7fdbdb0cc9b091bdf8e647969} +```cpp +Result mavsdk::TelemetryServer::publish_imu(Imu imu) const +``` + + +Publish to 'IMU' updates (in SI units in NED body frame). + +This function is blocking. + +**Parameters** + +* [Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) **imu** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_scaled_imu() {#classmavsdk_1_1_telemetry_server_1aff52c34112c885662c711cda94b7c985} +```cpp +Result mavsdk::TelemetryServer::publish_scaled_imu(Imu imu) const +``` + + +Publish to 'Scaled IMU' updates. + +This function is blocking. + +**Parameters** + +* [Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) **imu** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_raw_imu() {#classmavsdk_1_1_telemetry_server_1a92f3fcb090ffc96c70ce35d433a1a2a5} +```cpp +Result mavsdk::TelemetryServer::publish_raw_imu(Imu imu) const +``` + + +Publish to 'Raw IMU' updates. + +This function is blocking. + +**Parameters** + +* [Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) **imu** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_unix_epoch_time() {#classmavsdk_1_1_telemetry_server_1a27b1b901cd8baf91380029c2b95b2dac} +```cpp +Result mavsdk::TelemetryServer::publish_unix_epoch_time(uint64_t time_us) const +``` + + +Publish to 'unix epoch time' updates. + +This function is blocking. + +**Parameters** + +* uint64_t **time_us** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### publish_distance_sensor() {#classmavsdk_1_1_telemetry_server_1a7532d068284fb7f55c00804a4a996a6d} +```cpp +Result mavsdk::TelemetryServer::publish_distance_sensor(DistanceSensor distance_sensor) const +``` + + +Publish to "distance sensor" updates. + +This function is blocking. + +**Parameters** + +* [DistanceSensor](structmavsdk_1_1_telemetry_server_1_1_distance_sensor.md) **distance_sensor** - + +**Returns** + + [Result](classmavsdk_1_1_telemetry_server.md#classmavsdk_1_1_telemetry_server_1a39d62e69bdc289d55b73b0e4c3a3ac8a) - Result of request. + +### operator=() {#classmavsdk_1_1_telemetry_server_1a479502f1ce3bdc2c5be486911a20ca25} +```cpp +const TelemetryServer& mavsdk::TelemetryServer::operator=(const TelemetryServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [TelemetryServer](classmavsdk_1_1_telemetry_server.md)& - + +**Returns** + + const [TelemetryServer](classmavsdk_1_1_telemetry_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_tracking_server.md b/docs/en/cpp/api_reference/classmavsdk_1_1_tracking_server.md new file mode 100644 index 000000000..48864c9ee --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_tracking_server.md @@ -0,0 +1,401 @@ +# mavsdk::TrackingServer Class Reference +`#include: tracking_server.h` + +---- + + +API for an onboard image tracking software. + + +## Data Structures + + +struct [TrackPoint](structmavsdk_1_1_tracking_server_1_1_track_point.md) + +struct [TrackRectangle](structmavsdk_1_1_tracking_server_1_1_track_rectangle.md) + +## Public Types + + +Type | Description +--- | --- +enum [CommandAnswer](#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61) | Answer to respond to an incoming command. +enum [Result](#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2) | Possible results returned for tracking_server requests. +std::function< void([Result](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2))> [ResultCallback](#classmavsdk_1_1_tracking_server_1a5f726eec45daac754660d557f43e8b99) | Callback type for asynchronous [TrackingServer](classmavsdk_1_1_tracking_server.md) calls. +std::function< void([TrackPoint](structmavsdk_1_1_tracking_server_1_1_track_point.md))> [TrackingPointCommandCallback](#classmavsdk_1_1_tracking_server_1afc190d231e0cd23d22055d5f5319f00d) | Callback type for subscribe_tracking_point_command. +[Handle](classmavsdk_1_1_handle.md)< [TrackPoint](structmavsdk_1_1_tracking_server_1_1_track_point.md) > [TrackingPointCommandHandle](#classmavsdk_1_1_tracking_server_1abd57fbc319036028db3f1b3802bfa184) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_tracking_point_command. +std::function< void([TrackRectangle](structmavsdk_1_1_tracking_server_1_1_track_rectangle.md))> [TrackingRectangleCommandCallback](#classmavsdk_1_1_tracking_server_1ad9a54dd2042c28046a03c8b1c5ba5b41) | Callback type for subscribe_tracking_rectangle_command. +[Handle](classmavsdk_1_1_handle.md)< [TrackRectangle](structmavsdk_1_1_tracking_server_1_1_track_rectangle.md) > [TrackingRectangleCommandHandle](#classmavsdk_1_1_tracking_server_1a0bc52069d6d7fe1f5ae2760568c1ed5d) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_tracking_rectangle_command. +std::function< void(int32_t)> [TrackingOffCommandCallback](#classmavsdk_1_1_tracking_server_1a585e63bb331d1a5c3e0108b505c6e2e7) | Callback type for subscribe_tracking_off_command. +[Handle](classmavsdk_1_1_handle.md)< int32_t > [TrackingOffCommandHandle](#classmavsdk_1_1_tracking_server_1a7fd355b3ec3e7f0f4a08da194d9ae625) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_tracking_off_command. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [TrackingServer](#classmavsdk_1_1_tracking_server_1a8e3a87d4bf33fd4ca94dc7c1bf8f50a9) (std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > server_component) | Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. +  | [~TrackingServer](#classmavsdk_1_1_tracking_server_1af459f9f101561ab3a837e3783e56457a) () override | Destructor (internal use only). +  | [TrackingServer](#classmavsdk_1_1_tracking_server_1ade3caff75ba75c18637b30944d7fbb25) (const [TrackingServer](classmavsdk_1_1_tracking_server.md) & other) | Copy constructor. +void | [set_tracking_point_status](#classmavsdk_1_1_tracking_server_1a76404bc162c15dbfb50b7afbb2d3de4e) ([TrackPoint](structmavsdk_1_1_tracking_server_1_1_track_point.md) tracked_point)const | Set/update the current point tracking status. +void | [set_tracking_rectangle_status](#classmavsdk_1_1_tracking_server_1ae3f0696613834aecdd5dbd99a346b9a0) ([TrackRectangle](structmavsdk_1_1_tracking_server_1_1_track_rectangle.md) tracked_rectangle)const | Set/update the current rectangle tracking status. +void | [set_tracking_off_status](#classmavsdk_1_1_tracking_server_1a2d77454965d854f68704e29da645bf94) () const | Set the current tracking status to off. +[TrackingPointCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abd57fbc319036028db3f1b3802bfa184) | [subscribe_tracking_point_command](#classmavsdk_1_1_tracking_server_1a7fc9f06c0d13ce0a73b8a36c3b39591c) (const [TrackingPointCommandCallback](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1afc190d231e0cd23d22055d5f5319f00d) & callback) | Subscribe to incoming tracking point command. +void | [unsubscribe_tracking_point_command](#classmavsdk_1_1_tracking_server_1aaf00344b10e8bbb0c6cd7b5bfd43806b) ([TrackingPointCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abd57fbc319036028db3f1b3802bfa184) handle) | Unsubscribe from subscribe_tracking_point_command. +[TrackingRectangleCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a0bc52069d6d7fe1f5ae2760568c1ed5d) | [subscribe_tracking_rectangle_command](#classmavsdk_1_1_tracking_server_1a5a36aa7b26085834ed56ea1aa80f42b8) (const [TrackingRectangleCommandCallback](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1ad9a54dd2042c28046a03c8b1c5ba5b41) & callback) | Subscribe to incoming tracking rectangle command. +void | [unsubscribe_tracking_rectangle_command](#classmavsdk_1_1_tracking_server_1a35d2617d48c378c176e36f1c8db9594d) ([TrackingRectangleCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a0bc52069d6d7fe1f5ae2760568c1ed5d) handle) | Unsubscribe from subscribe_tracking_rectangle_command. +[TrackingOffCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a7fd355b3ec3e7f0f4a08da194d9ae625) | [subscribe_tracking_off_command](#classmavsdk_1_1_tracking_server_1ad8c9ea7f6b62e56e862d59532b7edf0d) (const [TrackingOffCommandCallback](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a585e63bb331d1a5c3e0108b505c6e2e7) & callback) | Subscribe to incoming tracking off command. +void | [unsubscribe_tracking_off_command](#classmavsdk_1_1_tracking_server_1a9ac5db837aa263dcc8c98fcf0aafa170) ([TrackingOffCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a7fd355b3ec3e7f0f4a08da194d9ae625) handle) | Unsubscribe from subscribe_tracking_off_command. +[Result](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2) | [respond_tracking_point_command](#classmavsdk_1_1_tracking_server_1a75ec8813d5c5dac5dc3fcd3590a62e2a) ([CommandAnswer](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61) command_answer)const | Respond to an incoming tracking point command. +[Result](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2) | [respond_tracking_rectangle_command](#classmavsdk_1_1_tracking_server_1a6388d3a7bafeb0fbb58343a09495fc7c) ([CommandAnswer](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61) command_answer)const | Respond to an incoming tracking rectangle command. +[Result](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2) | [respond_tracking_off_command](#classmavsdk_1_1_tracking_server_1a113b2d4adf5b62a5f167b81c39474da4) ([CommandAnswer](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61) command_answer)const | Respond to an incoming tracking off command. +const [TrackingServer](classmavsdk_1_1_tracking_server.md) & | [operator=](#classmavsdk_1_1_tracking_server_1a9ea0947f9038e3affbd4129f5d6f671d) (const [TrackingServer](classmavsdk_1_1_tracking_server.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### TrackingServer() {#classmavsdk_1_1_tracking_server_1a8e3a87d4bf33fd4ca94dc7c1bf8f50a9} +```cpp +mavsdk::TrackingServer::TrackingServer(std::shared_ptr< ServerComponent > server_component) +``` + + +Constructor. Creates the plugin for a [ServerComponent](classmavsdk_1_1_server_component.md) instance. + +The plugin is typically created as shown below: + +```cpp +auto tracking_server = TrackingServer(server_component); +``` + +**Parameters** + +* std::shared_ptr< [ServerComponent](classmavsdk_1_1_server_component.md) > **server_component** - The [ServerComponent](classmavsdk_1_1_server_component.md) instance associated with this server plugin. + +### ~TrackingServer() {#classmavsdk_1_1_tracking_server_1af459f9f101561ab3a837e3783e56457a} +```cpp +mavsdk::TrackingServer::~TrackingServer() override +``` + + +Destructor (internal use only). + + +### TrackingServer() {#classmavsdk_1_1_tracking_server_1ade3caff75ba75c18637b30944d7fbb25} +```cpp +mavsdk::TrackingServer::TrackingServer(const TrackingServer &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [TrackingServer](classmavsdk_1_1_tracking_server.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_tracking_server_1a5f726eec45daac754660d557f43e8b99} + +```cpp +using mavsdk::TrackingServer::ResultCallback = std::function +``` + + +Callback type for asynchronous [TrackingServer](classmavsdk_1_1_tracking_server.md) calls. + + +### typedef TrackingPointCommandCallback {#classmavsdk_1_1_tracking_server_1afc190d231e0cd23d22055d5f5319f00d} + +```cpp +using mavsdk::TrackingServer::TrackingPointCommandCallback = std::function +``` + + +Callback type for subscribe_tracking_point_command. + + +### typedef TrackingPointCommandHandle {#classmavsdk_1_1_tracking_server_1abd57fbc319036028db3f1b3802bfa184} + +```cpp +using mavsdk::TrackingServer::TrackingPointCommandHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_tracking_point_command. + + +### typedef TrackingRectangleCommandCallback {#classmavsdk_1_1_tracking_server_1ad9a54dd2042c28046a03c8b1c5ba5b41} + +```cpp +using mavsdk::TrackingServer::TrackingRectangleCommandCallback = std::function +``` + + +Callback type for subscribe_tracking_rectangle_command. + + +### typedef TrackingRectangleCommandHandle {#classmavsdk_1_1_tracking_server_1a0bc52069d6d7fe1f5ae2760568c1ed5d} + +```cpp +using mavsdk::TrackingServer::TrackingRectangleCommandHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_tracking_rectangle_command. + + +### typedef TrackingOffCommandCallback {#classmavsdk_1_1_tracking_server_1a585e63bb331d1a5c3e0108b505c6e2e7} + +```cpp +using mavsdk::TrackingServer::TrackingOffCommandCallback = std::function +``` + + +Callback type for subscribe_tracking_off_command. + + +### typedef TrackingOffCommandHandle {#classmavsdk_1_1_tracking_server_1a7fd355b3ec3e7f0f4a08da194d9ae625} + +```cpp +using mavsdk::TrackingServer::TrackingOffCommandHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_tracking_off_command. + + +## Member Enumeration Documentation + + +### enum CommandAnswer {#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61} + + +Answer to respond to an incoming command. + + +Value | Description +--- | --- + `Accepted` | Command accepted. + `TemporarilyRejected` | Command temporarily rejected. + `Denied` | Command denied. + `Unsupported` | Command unsupported. + `Failed` | Command failed. + +### enum Result {#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2} + + +Possible results returned for tracking_server requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `NoSystem` | No system is connected. + `ConnectionError` | Connection error. + +## Member Function Documentation + + +### set_tracking_point_status() {#classmavsdk_1_1_tracking_server_1a76404bc162c15dbfb50b7afbb2d3de4e} +```cpp +void mavsdk::TrackingServer::set_tracking_point_status(TrackPoint tracked_point) const +``` + + +Set/update the current point tracking status. + +This function is blocking. + +**Parameters** + +* [TrackPoint](structmavsdk_1_1_tracking_server_1_1_track_point.md) **tracked_point** - + +### set_tracking_rectangle_status() {#classmavsdk_1_1_tracking_server_1ae3f0696613834aecdd5dbd99a346b9a0} +```cpp +void mavsdk::TrackingServer::set_tracking_rectangle_status(TrackRectangle tracked_rectangle) const +``` + + +Set/update the current rectangle tracking status. + +This function is blocking. + +**Parameters** + +* [TrackRectangle](structmavsdk_1_1_tracking_server_1_1_track_rectangle.md) **tracked_rectangle** - + +### set_tracking_off_status() {#classmavsdk_1_1_tracking_server_1a2d77454965d854f68704e29da645bf94} +```cpp +void mavsdk::TrackingServer::set_tracking_off_status() const +``` + + +Set the current tracking status to off. + +This function is blocking. + +### subscribe_tracking_point_command() {#classmavsdk_1_1_tracking_server_1a7fc9f06c0d13ce0a73b8a36c3b39591c} +```cpp +TrackingPointCommandHandle mavsdk::TrackingServer::subscribe_tracking_point_command(const TrackingPointCommandCallback &callback) +``` + + +Subscribe to incoming tracking point command. + + +**Parameters** + +* const [TrackingPointCommandCallback](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1afc190d231e0cd23d22055d5f5319f00d)& **callback** - + +**Returns** + + [TrackingPointCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abd57fbc319036028db3f1b3802bfa184) - + +### unsubscribe_tracking_point_command() {#classmavsdk_1_1_tracking_server_1aaf00344b10e8bbb0c6cd7b5bfd43806b} +```cpp +void mavsdk::TrackingServer::unsubscribe_tracking_point_command(TrackingPointCommandHandle handle) +``` + + +Unsubscribe from subscribe_tracking_point_command. + + +**Parameters** + +* [TrackingPointCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abd57fbc319036028db3f1b3802bfa184) **handle** - + +### subscribe_tracking_rectangle_command() {#classmavsdk_1_1_tracking_server_1a5a36aa7b26085834ed56ea1aa80f42b8} +```cpp +TrackingRectangleCommandHandle mavsdk::TrackingServer::subscribe_tracking_rectangle_command(const TrackingRectangleCommandCallback &callback) +``` + + +Subscribe to incoming tracking rectangle command. + + +**Parameters** + +* const [TrackingRectangleCommandCallback](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1ad9a54dd2042c28046a03c8b1c5ba5b41)& **callback** - + +**Returns** + + [TrackingRectangleCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a0bc52069d6d7fe1f5ae2760568c1ed5d) - + +### unsubscribe_tracking_rectangle_command() {#classmavsdk_1_1_tracking_server_1a35d2617d48c378c176e36f1c8db9594d} +```cpp +void mavsdk::TrackingServer::unsubscribe_tracking_rectangle_command(TrackingRectangleCommandHandle handle) +``` + + +Unsubscribe from subscribe_tracking_rectangle_command. + + +**Parameters** + +* [TrackingRectangleCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a0bc52069d6d7fe1f5ae2760568c1ed5d) **handle** - + +### subscribe_tracking_off_command() {#classmavsdk_1_1_tracking_server_1ad8c9ea7f6b62e56e862d59532b7edf0d} +```cpp +TrackingOffCommandHandle mavsdk::TrackingServer::subscribe_tracking_off_command(const TrackingOffCommandCallback &callback) +``` + + +Subscribe to incoming tracking off command. + + +**Parameters** + +* const [TrackingOffCommandCallback](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a585e63bb331d1a5c3e0108b505c6e2e7)& **callback** - + +**Returns** + + [TrackingOffCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a7fd355b3ec3e7f0f4a08da194d9ae625) - + +### unsubscribe_tracking_off_command() {#classmavsdk_1_1_tracking_server_1a9ac5db837aa263dcc8c98fcf0aafa170} +```cpp +void mavsdk::TrackingServer::unsubscribe_tracking_off_command(TrackingOffCommandHandle handle) +``` + + +Unsubscribe from subscribe_tracking_off_command. + + +**Parameters** + +* [TrackingOffCommandHandle](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a7fd355b3ec3e7f0f4a08da194d9ae625) **handle** - + +### respond_tracking_point_command() {#classmavsdk_1_1_tracking_server_1a75ec8813d5c5dac5dc3fcd3590a62e2a} +```cpp +Result mavsdk::TrackingServer::respond_tracking_point_command(CommandAnswer command_answer) const +``` + + +Respond to an incoming tracking point command. + +This function is blocking. + +**Parameters** + +* [CommandAnswer](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61) **command_answer** - + +**Returns** + + [Result](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2) - Result of request. + +### respond_tracking_rectangle_command() {#classmavsdk_1_1_tracking_server_1a6388d3a7bafeb0fbb58343a09495fc7c} +```cpp +Result mavsdk::TrackingServer::respond_tracking_rectangle_command(CommandAnswer command_answer) const +``` + + +Respond to an incoming tracking rectangle command. + +This function is blocking. + +**Parameters** + +* [CommandAnswer](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61) **command_answer** - + +**Returns** + + [Result](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2) - Result of request. + +### respond_tracking_off_command() {#classmavsdk_1_1_tracking_server_1a113b2d4adf5b62a5f167b81c39474da4} +```cpp +Result mavsdk::TrackingServer::respond_tracking_off_command(CommandAnswer command_answer) const +``` + + +Respond to an incoming tracking off command. + +This function is blocking. + +**Parameters** + +* [CommandAnswer](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1abe88efaef492f9b549a57b5b05666d61) **command_answer** - + +**Returns** + + [Result](classmavsdk_1_1_tracking_server.md#classmavsdk_1_1_tracking_server_1a1a288ecd74fd52a6f0ffbf24e8da2cc2) - Result of request. + +### operator=() {#classmavsdk_1_1_tracking_server_1a9ea0947f9038e3affbd4129f5d6f671d} +```cpp +const TrackingServer& mavsdk::TrackingServer::operator=(const TrackingServer &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [TrackingServer](classmavsdk_1_1_tracking_server.md)& - + +**Returns** + + const [TrackingServer](classmavsdk_1_1_tracking_server.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_transponder.md b/docs/en/cpp/api_reference/classmavsdk_1_1_transponder.md new file mode 100644 index 000000000..9afd92c33 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_transponder.md @@ -0,0 +1,291 @@ +# mavsdk::Transponder Class Reference +`#include: transponder.h` + +---- + + +Allow users to get ADS-B information and set ADS-B update rates. + + +## Data Structures + + +struct [AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) + +## Public Types + + +Type | Description +--- | --- +enum [AdsbEmitterType](#classmavsdk_1_1_transponder_1a0b16f74131c28940c6604bc55776c039) | ADSB classification for the type of vehicle emitting the transponder signal. +enum [AdsbAltitudeType](#classmavsdk_1_1_transponder_1a64af76be070a2496e0db1c201ece9313) | Altitude type used in [AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) message. +enum [Result](#classmavsdk_1_1_transponder_1a683477ab9a02d00b2524bc2dcea3ecc8) | Possible results returned for transponder requests. +std::function< void([Result](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1a683477ab9a02d00b2524bc2dcea3ecc8))> [ResultCallback](#classmavsdk_1_1_transponder_1a57166e61c37ad92ecd5420bc1b7972a5) | Callback type for asynchronous [Transponder](classmavsdk_1_1_transponder.md) calls. +std::function< void([AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md))> [TransponderCallback](#classmavsdk_1_1_transponder_1a239211c3cf8ce383d0f5c82b671aed34) | Callback type for subscribe_transponder. +[Handle](classmavsdk_1_1_handle.md)< [AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) > [TransponderHandle](#classmavsdk_1_1_transponder_1abd96184c88f8bcb8bbb0aa138c3355b7) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_transponder. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Transponder](#classmavsdk_1_1_transponder_1a14df6f56a65f692f0a77e12255aa5813) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Transponder](#classmavsdk_1_1_transponder_1aa24bac9cdb6a648e83630a58feee120c) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Transponder](#classmavsdk_1_1_transponder_1a2bd5706f4b1bd5cf773fdd8870d5c457) () override | Destructor (internal use only). +  | [Transponder](#classmavsdk_1_1_transponder_1a610383ecbf848dd7ef214b13c445e170) (const [Transponder](classmavsdk_1_1_transponder.md) & other) | Copy constructor. +[TransponderHandle](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1abd96184c88f8bcb8bbb0aa138c3355b7) | [subscribe_transponder](#classmavsdk_1_1_transponder_1a1854383cab590dbc28cb18bb8bf3415f) (const [TransponderCallback](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1a239211c3cf8ce383d0f5c82b671aed34) & callback) | Subscribe to 'transponder' updates. +void | [unsubscribe_transponder](#classmavsdk_1_1_transponder_1a28735123acd679533a315a39dd096db0) ([TransponderHandle](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1abd96184c88f8bcb8bbb0aa138c3355b7) handle) | Unsubscribe from subscribe_transponder. +[AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) | [transponder](#classmavsdk_1_1_transponder_1a1674c21928af3368e2be84bd182251d9) () const | Poll for '[AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md)' (blocking). +void | [set_rate_transponder_async](#classmavsdk_1_1_transponder_1a098f5692a3f2b76a201ce0b22a56f0ec) (double rate_hz, const [ResultCallback](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1a57166e61c37ad92ecd5420bc1b7972a5) callback) | Set rate to 'transponder' updates. +[Result](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1a683477ab9a02d00b2524bc2dcea3ecc8) | [set_rate_transponder](#classmavsdk_1_1_transponder_1a9d9f4b4899ef61b6d13d9e25f44dbecd) (double rate_hz)const | Set rate to 'transponder' updates. +const [Transponder](classmavsdk_1_1_transponder.md) & | [operator=](#classmavsdk_1_1_transponder_1aaee71763de213002fadeb9dec3ec9fb6) (const [Transponder](classmavsdk_1_1_transponder.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Transponder() {#classmavsdk_1_1_transponder_1a14df6f56a65f692f0a77e12255aa5813} +```cpp +mavsdk::Transponder::Transponder(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto transponder = Transponder(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Transponder() {#classmavsdk_1_1_transponder_1aa24bac9cdb6a648e83630a58feee120c} +```cpp +mavsdk::Transponder::Transponder(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto transponder = Transponder(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Transponder() {#classmavsdk_1_1_transponder_1a2bd5706f4b1bd5cf773fdd8870d5c457} +```cpp +mavsdk::Transponder::~Transponder() override +``` + + +Destructor (internal use only). + + +### Transponder() {#classmavsdk_1_1_transponder_1a610383ecbf848dd7ef214b13c445e170} +```cpp +mavsdk::Transponder::Transponder(const Transponder &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Transponder](classmavsdk_1_1_transponder.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_transponder_1a57166e61c37ad92ecd5420bc1b7972a5} + +```cpp +using mavsdk::Transponder::ResultCallback = std::function +``` + + +Callback type for asynchronous [Transponder](classmavsdk_1_1_transponder.md) calls. + + +### typedef TransponderCallback {#classmavsdk_1_1_transponder_1a239211c3cf8ce383d0f5c82b671aed34} + +```cpp +using mavsdk::Transponder::TransponderCallback = std::function +``` + + +Callback type for subscribe_transponder. + + +### typedef TransponderHandle {#classmavsdk_1_1_transponder_1abd96184c88f8bcb8bbb0aa138c3355b7} + +```cpp +using mavsdk::Transponder::TransponderHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_transponder. + + +## Member Enumeration Documentation + + +### enum AdsbEmitterType {#classmavsdk_1_1_transponder_1a0b16f74131c28940c6604bc55776c039} + + +ADSB classification for the type of vehicle emitting the transponder signal. + + +Value | Description +--- | --- + `NoInfo` | No emitter info.. + `Light` | Light emitter.. + `Small` | Small emitter.. + `Large` | Large emitter.. + `HighVortexLarge` | High vortex emitter.. + `Heavy` | Heavy emitter.. + `HighlyManuv` | Highly maneuverable emitter.. + `Rotocraft` | Rotorcraft emitter.. + `Unassigned` | Unassigned emitter.. + `Glider` | Glider emitter.. + `LighterAir` | Lighter air emitter.. + `Parachute` | Parachute emitter.. + `UltraLight` | Ultra light emitter.. + `Unassigned2` | Unassigned2 emitter.. + `Uav` | UAV emitter.. + `Space` | Space emitter.. + `Unassgined3` | Unassigned3 emitter.. + `EmergencySurface` | Emergency emitter.. + `ServiceSurface` | Service surface emitter.. + `PointObstacle` | Point obstacle emitter.. + +### enum AdsbAltitudeType {#classmavsdk_1_1_transponder_1a64af76be070a2496e0db1c201ece9313} + + +Altitude type used in [AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) message. + + +Value | Description +--- | --- + `PressureQnh` | Altitude reported from a Baro source using QNH reference. + `Geometric` | Altitude reported from a GNSS source. + +### enum Result {#classmavsdk_1_1_transponder_1a683477ab9a02d00b2524bc2dcea3ecc8} + + +Possible results returned for transponder requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Success: the transponder command was accepted by the vehicle. + `NoSystem` | No system connected. + `ConnectionError` | Connection error. + `Busy` | Vehicle is busy. + `CommandDenied` | Command refused by vehicle. + `Timeout` | Request timed out. + +## Member Function Documentation + + +### subscribe_transponder() {#classmavsdk_1_1_transponder_1a1854383cab590dbc28cb18bb8bf3415f} +```cpp +TransponderHandle mavsdk::Transponder::subscribe_transponder(const TransponderCallback &callback) +``` + + +Subscribe to 'transponder' updates. + + +**Parameters** + +* const [TransponderCallback](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1a239211c3cf8ce383d0f5c82b671aed34)& **callback** - + +**Returns** + + [TransponderHandle](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1abd96184c88f8bcb8bbb0aa138c3355b7) - + +### unsubscribe_transponder() {#classmavsdk_1_1_transponder_1a28735123acd679533a315a39dd096db0} +```cpp +void mavsdk::Transponder::unsubscribe_transponder(TransponderHandle handle) +``` + + +Unsubscribe from subscribe_transponder. + + +**Parameters** + +* [TransponderHandle](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1abd96184c88f8bcb8bbb0aa138c3355b7) **handle** - + +### transponder() {#classmavsdk_1_1_transponder_1a1674c21928af3368e2be84bd182251d9} +```cpp +AdsbVehicle mavsdk::Transponder::transponder() const +``` + + +Poll for '[AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md)' (blocking). + + +**Returns** + + [AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) - One [AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) update. + +### set_rate_transponder_async() {#classmavsdk_1_1_transponder_1a098f5692a3f2b76a201ce0b22a56f0ec} +```cpp +void mavsdk::Transponder::set_rate_transponder_async(double rate_hz, const ResultCallback callback) +``` + + +Set rate to 'transponder' updates. + +This function is non-blocking. See 'set_rate_transponder' for the blocking counterpart. + +**Parameters** + +* double **rate_hz** - +* const [ResultCallback](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1a57166e61c37ad92ecd5420bc1b7972a5) **callback** - + +### set_rate_transponder() {#classmavsdk_1_1_transponder_1a9d9f4b4899ef61b6d13d9e25f44dbecd} +```cpp +Result mavsdk::Transponder::set_rate_transponder(double rate_hz) const +``` + + +Set rate to 'transponder' updates. + +This function is blocking. See 'set_rate_transponder_async' for the non-blocking counterpart. + +**Parameters** + +* double **rate_hz** - + +**Returns** + + [Result](classmavsdk_1_1_transponder.md#classmavsdk_1_1_transponder_1a683477ab9a02d00b2524bc2dcea3ecc8) - Result of request. + +### operator=() {#classmavsdk_1_1_transponder_1aaee71763de213002fadeb9dec3ec9fb6} +```cpp +const Transponder& mavsdk::Transponder::operator=(const Transponder &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Transponder](classmavsdk_1_1_transponder.md)& - + +**Returns** + + const [Transponder](classmavsdk_1_1_transponder.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_tune.md b/docs/en/cpp/api_reference/classmavsdk_1_1_tune.md new file mode 100644 index 000000000..100b1943b --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_tune.md @@ -0,0 +1,211 @@ +# mavsdk::Tune Class Reference +`#include: tune.h` + +---- + + +Enable creating and sending a tune to be played on the system. + + +## Data Structures + + +struct [TuneDescription](structmavsdk_1_1_tune_1_1_tune_description.md) + +## Public Types + + +Type | Description +--- | --- +enum [SongElement](#classmavsdk_1_1_tune_1a97d85b5d578c74edc82a4337fc7bed57) | An element of the tune. +enum [Result](#classmavsdk_1_1_tune_1aed2b008974298098cedd69b7e95e909d) | Possible results returned for tune requests. +std::function< void([Result](classmavsdk_1_1_tune.md#classmavsdk_1_1_tune_1aed2b008974298098cedd69b7e95e909d))> [ResultCallback](#classmavsdk_1_1_tune_1aa283f6824bee43d341fec56d7ff70985) | Callback type for asynchronous [Tune](classmavsdk_1_1_tune.md) calls. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Tune](#classmavsdk_1_1_tune_1a1f60ea360006940e2bbae055733cc40a) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Tune](#classmavsdk_1_1_tune_1ae53cb416ec500a56d796e85376420c0a) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Tune](#classmavsdk_1_1_tune_1a5f157ec4a056b0dad4fb7c15542a555f) () override | Destructor (internal use only). +  | [Tune](#classmavsdk_1_1_tune_1ae3fb9d4ec2116f1c9543c0e09371b2e0) (const [Tune](classmavsdk_1_1_tune.md) & other) | Copy constructor. +void | [play_tune_async](#classmavsdk_1_1_tune_1a6a88b2cfe944a4c1e4ab6945b06620d5) ([TuneDescription](structmavsdk_1_1_tune_1_1_tune_description.md) tune_description, const [ResultCallback](classmavsdk_1_1_tune.md#classmavsdk_1_1_tune_1aa283f6824bee43d341fec56d7ff70985) callback) | Send a tune to be played by the system. +[Result](classmavsdk_1_1_tune.md#classmavsdk_1_1_tune_1aed2b008974298098cedd69b7e95e909d) | [play_tune](#classmavsdk_1_1_tune_1a94df5e7c5d8f5ca49fd9844557060695) ([TuneDescription](structmavsdk_1_1_tune_1_1_tune_description.md) tune_description)const | Send a tune to be played by the system. +const [Tune](classmavsdk_1_1_tune.md) & | [operator=](#classmavsdk_1_1_tune_1ae4a076da0417c6858df6fb59fa5110b5) (const [Tune](classmavsdk_1_1_tune.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Tune() {#classmavsdk_1_1_tune_1a1f60ea360006940e2bbae055733cc40a} +```cpp +mavsdk::Tune::Tune(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto tune = Tune(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Tune() {#classmavsdk_1_1_tune_1ae53cb416ec500a56d796e85376420c0a} +```cpp +mavsdk::Tune::Tune(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto tune = Tune(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Tune() {#classmavsdk_1_1_tune_1a5f157ec4a056b0dad4fb7c15542a555f} +```cpp +mavsdk::Tune::~Tune() override +``` + + +Destructor (internal use only). + + +### Tune() {#classmavsdk_1_1_tune_1ae3fb9d4ec2116f1c9543c0e09371b2e0} +```cpp +mavsdk::Tune::Tune(const Tune &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Tune](classmavsdk_1_1_tune.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_tune_1aa283f6824bee43d341fec56d7ff70985} + +```cpp +using mavsdk::Tune::ResultCallback = std::function +``` + + +Callback type for asynchronous [Tune](classmavsdk_1_1_tune.md) calls. + + +## Member Enumeration Documentation + + +### enum SongElement {#classmavsdk_1_1_tune_1a97d85b5d578c74edc82a4337fc7bed57} + + +An element of the tune. + + +Value | Description +--- | --- + `StyleLegato` | After this element, start playing legato. + `StyleNormal` | After this element, start playing normal. + `StyleStaccato` | After this element, start playing staccato. + `Duration1` | After this element, set the note duration to 1. + `Duration2` | After this element, set the note duration to 2. + `Duration4` | After this element, set the note duration to 4. + `Duration8` | After this element, set the note duration to 8. + `Duration16` | After this element, set the note duration to 16. + `Duration32` | After this element, set the note duration to 32. + `NoteA` | Play note A. + `NoteB` | Play note B. + `NoteC` | Play note C. + `NoteD` | Play note D. + `NoteE` | Play note E. + `NoteF` | Play note F. + `NoteG` | Play note G. + `NotePause` | Play a rest. + `Sharp` | After this element, sharp the note (half a step up). + `Flat` | After this element, flat the note (half a step down). + `OctaveUp` | After this element, shift the note 1 octave up. + `OctaveDown` | After this element, shift the note 1 octave down. + +### enum Result {#classmavsdk_1_1_tune_1aed2b008974298098cedd69b7e95e909d} + + +Possible results returned for tune requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request succeeded. + `InvalidTempo` | Invalid tempo (range: 32 - 255). + `TuneTooLong` | Invalid tune: encoded string must be at most 247 chars. + `Error` | Failed to send the request. + `NoSystem` | No system connected. + +## Member Function Documentation + + +### play_tune_async() {#classmavsdk_1_1_tune_1a6a88b2cfe944a4c1e4ab6945b06620d5} +```cpp +void mavsdk::Tune::play_tune_async(TuneDescription tune_description, const ResultCallback callback) +``` + + +Send a tune to be played by the system. + +This function is non-blocking. See 'play_tune' for the blocking counterpart. + +**Parameters** + +* [TuneDescription](structmavsdk_1_1_tune_1_1_tune_description.md) **tune_description** - +* const [ResultCallback](classmavsdk_1_1_tune.md#classmavsdk_1_1_tune_1aa283f6824bee43d341fec56d7ff70985) **callback** - + +### play_tune() {#classmavsdk_1_1_tune_1a94df5e7c5d8f5ca49fd9844557060695} +```cpp +Result mavsdk::Tune::play_tune(TuneDescription tune_description) const +``` + + +Send a tune to be played by the system. + +This function is blocking. See 'play_tune_async' for the non-blocking counterpart. + +**Parameters** + +* [TuneDescription](structmavsdk_1_1_tune_1_1_tune_description.md) **tune_description** - + +**Returns** + + [Result](classmavsdk_1_1_tune.md#classmavsdk_1_1_tune_1aed2b008974298098cedd69b7e95e909d) - Result of request. + +### operator=() {#classmavsdk_1_1_tune_1ae4a076da0417c6858df6fb59fa5110b5} +```cpp +const Tune& mavsdk::Tune::operator=(const Tune &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Tune](classmavsdk_1_1_tune.md)& - + +**Returns** + + const [Tune](classmavsdk_1_1_tune.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1_winch.md b/docs/en/cpp/api_reference/classmavsdk_1_1_winch.md new file mode 100644 index 000000000..1e5799eea --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1_winch.md @@ -0,0 +1,598 @@ +# mavsdk::Winch Class Reference +`#include: winch.h` + +---- + + +Allows users to send winch actions, as well as receive status information from winch systems. + + +## Data Structures + + +struct [Status](structmavsdk_1_1_winch_1_1_status.md) + +struct [StatusFlags](structmavsdk_1_1_winch_1_1_status_flags.md) + +## Public Types + + +Type | Description +--- | --- +enum [WinchAction](#classmavsdk_1_1_winch_1a2c63ccb04edf046026919d5b3db77a83) | [Winch](classmavsdk_1_1_winch.md) [Action](classmavsdk_1_1_action.md) type. +enum [Result](#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | Possible results returned for winch action requests. +std::function< void([Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091))> [ResultCallback](#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) | Callback type for asynchronous [Winch](classmavsdk_1_1_winch.md) calls. +std::function< void([Status](structmavsdk_1_1_winch_1_1_status.md))> [StatusCallback](#classmavsdk_1_1_winch_1a6c84089eac00fc9de890ab7e8c0eb32a) | Callback type for subscribe_status. +[Handle](classmavsdk_1_1_handle.md)< [Status](structmavsdk_1_1_winch_1_1_status.md) > [StatusHandle](#classmavsdk_1_1_winch_1a78284180b73b3092c37e45b3c2bdc2ab) | [Handle](classmavsdk_1_1_handle.md) type for subscribe_status. + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [Winch](#classmavsdk_1_1_winch_1a222e543b5ef54c89ee41411e800d3b88) ([System](classmavsdk_1_1_system.md) & system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [Winch](#classmavsdk_1_1_winch_1a7546040a07899cc9fe3edb00cb1b2007) (std::shared_ptr< [System](classmavsdk_1_1_system.md) > system) | Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). +  | [~Winch](#classmavsdk_1_1_winch_1a06330946e884dae7415003aa89c3010e) () override | Destructor (internal use only). +  | [Winch](#classmavsdk_1_1_winch_1a9125a173b929f9a1a2e5ca0199961fb4) (const [Winch](classmavsdk_1_1_winch.md) & other) | Copy constructor. +[StatusHandle](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a78284180b73b3092c37e45b3c2bdc2ab) | [subscribe_status](#classmavsdk_1_1_winch_1a92363df861842edf0b81aa18fba26bc8) (const [StatusCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a6c84089eac00fc9de890ab7e8c0eb32a) & callback) | Subscribe to 'winch status' updates. +void | [unsubscribe_status](#classmavsdk_1_1_winch_1af1176a4992e0a6850dbd44ea2b1f0bad) ([StatusHandle](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a78284180b73b3092c37e45b3c2bdc2ab) handle) | Unsubscribe from subscribe_status. +[Status](structmavsdk_1_1_winch_1_1_status.md) | [status](#classmavsdk_1_1_winch_1aa24ccd5e6e44db1fbf96e4aca6947689) () const | Poll for '[Status](structmavsdk_1_1_winch_1_1_status.md)' (blocking). +void | [relax_async](#classmavsdk_1_1_winch_1a48eec9e1fb693620e452234e0a740989) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Allow motor to freewheel. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [relax](#classmavsdk_1_1_winch_1ae1fa0d57d8d72e3bbbb4833770047ab3) (uint32_t instance)const | Allow motor to freewheel. +void | [relative_length_control_async](#classmavsdk_1_1_winch_1aa2cb382d36cda8e0fe918ae07fb7a9ec) (uint32_t instance, float length_m, float rate_m_s, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Wind or unwind specified length of line, optionally using specified rate. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [relative_length_control](#classmavsdk_1_1_winch_1ae39f5844dd5b6d93b6ccf3953781cee0) (uint32_t instance, float length_m, float rate_m_s)const | Wind or unwind specified length of line, optionally using specified rate. +void | [rate_control_async](#classmavsdk_1_1_winch_1a21ce05ef8cedd2601d22209d31a980f8) (uint32_t instance, float rate_m_s, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Wind or unwind line at specified rate. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [rate_control](#classmavsdk_1_1_winch_1aaec8a2bac41941e1f696cd9541abd4ca) (uint32_t instance, float rate_m_s)const | Wind or unwind line at specified rate. +void | [lock_async](#classmavsdk_1_1_winch_1a0ff91279058752931bee2bc5dfd7c711) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Perform the locking sequence to relieve motor while in the fully retracted position. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [lock](#classmavsdk_1_1_winch_1ad0f907f0164a724f8e8a57fe9796ecb3) (uint32_t instance)const | Perform the locking sequence to relieve motor while in the fully retracted position. +void | [deliver_async](#classmavsdk_1_1_winch_1acbd43a3f00ab1e910b6b05654afc9458) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Sequence of drop, slow down, touch down, reel up, lock. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [deliver](#classmavsdk_1_1_winch_1a8910df835085243a366290dbc4492680) (uint32_t instance)const | Sequence of drop, slow down, touch down, reel up, lock. +void | [hold_async](#classmavsdk_1_1_winch_1a6c97626d33532469871a687e8043e27e) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Engage motor and hold current position. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [hold](#classmavsdk_1_1_winch_1a2e7ae05d09b82964024c70211b1920d9) (uint32_t instance)const | Engage motor and hold current position. +void | [retract_async](#classmavsdk_1_1_winch_1a6485b743115d441b43f3d0e39341412d) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Return the reel to the fully retracted position. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [retract](#classmavsdk_1_1_winch_1a353cad0259d2eb8201e2884e037422eb) (uint32_t instance)const | Return the reel to the fully retracted position. +void | [load_line_async](#classmavsdk_1_1_winch_1ad0588792ef3fbd469511f99988140637) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Load the reel with line. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [load_line](#classmavsdk_1_1_winch_1aabeb779b2e03632176799c92058adb92) (uint32_t instance)const | Load the reel with line. +void | [abandon_line_async](#classmavsdk_1_1_winch_1a3970c74e067d3734ba8dd3382c534b0a) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Spool out the entire length of the line. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [abandon_line](#classmavsdk_1_1_winch_1a625f6d58d5447afbe0c40e3d896071b0) (uint32_t instance)const | Spool out the entire length of the line. +void | [load_payload_async](#classmavsdk_1_1_winch_1af715b6c01dc75c44868c2936af04d40a) (uint32_t instance, const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) callback) | Spools out just enough to present the hook to the user to load the payload. +[Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) | [load_payload](#classmavsdk_1_1_winch_1a01fec2758f7f09d8aef5de23f4566d47) (uint32_t instance)const | Spools out just enough to present the hook to the user to load the payload. +const [Winch](classmavsdk_1_1_winch.md) & | [operator=](#classmavsdk_1_1_winch_1a5216eb2d1533b1e737ad30f31b7eff7a) (const [Winch](classmavsdk_1_1_winch.md) &)=delete | Equality operator (object is not copyable). + + +## Constructor & Destructor Documentation + + +### Winch() {#classmavsdk_1_1_winch_1a222e543b5ef54c89ee41411e800d3b88} +```cpp +mavsdk::Winch::Winch(System &system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto winch = Winch(system); +``` + +**Parameters** + +* [System](classmavsdk_1_1_system.md)& **system** - The specific system associated with this plugin. + +### Winch() {#classmavsdk_1_1_winch_1a7546040a07899cc9fe3edb00cb1b2007} +```cpp +mavsdk::Winch::Winch(std::shared_ptr< System > system) +``` + + +Constructor. Creates the plugin for a specific [System](classmavsdk_1_1_system.md). + +The plugin is typically created as shown below: + +```cpp +auto winch = Winch(system); +``` + +**Parameters** + +* std::shared_ptr< [System](classmavsdk_1_1_system.md) > **system** - The specific system associated with this plugin. + +### ~Winch() {#classmavsdk_1_1_winch_1a06330946e884dae7415003aa89c3010e} +```cpp +mavsdk::Winch::~Winch() override +``` + + +Destructor (internal use only). + + +### Winch() {#classmavsdk_1_1_winch_1a9125a173b929f9a1a2e5ca0199961fb4} +```cpp +mavsdk::Winch::Winch(const Winch &other) +``` + + +Copy constructor. + + +**Parameters** + +* const [Winch](classmavsdk_1_1_winch.md)& **other** - + +## Member Typdef Documentation + + +### typedef ResultCallback {#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7} + +```cpp +using mavsdk::Winch::ResultCallback = std::function +``` + + +Callback type for asynchronous [Winch](classmavsdk_1_1_winch.md) calls. + + +### typedef StatusCallback {#classmavsdk_1_1_winch_1a6c84089eac00fc9de890ab7e8c0eb32a} + +```cpp +using mavsdk::Winch::StatusCallback = std::function +``` + + +Callback type for subscribe_status. + + +### typedef StatusHandle {#classmavsdk_1_1_winch_1a78284180b73b3092c37e45b3c2bdc2ab} + +```cpp +using mavsdk::Winch::StatusHandle = Handle +``` + + +[Handle](classmavsdk_1_1_handle.md) type for subscribe_status. + + +## Member Enumeration Documentation + + +### enum WinchAction {#classmavsdk_1_1_winch_1a2c63ccb04edf046026919d5b3db77a83} + + +[Winch](classmavsdk_1_1_winch.md) [Action](classmavsdk_1_1_action.md) type. + + +Value | Description +--- | --- + `Relaxed` | Allow motor to freewheel. + `RelativeLengthControl` | Wind or unwind specified length of line, optionally using specified rate. + `RateControl` | Wind or unwind line at specified rate. + `Lock` | Perform the locking sequence to relieve motor while in the fully retracted position. + `Deliver` | Sequence of drop, slow down, touch down, reel up, lock. + `Hold` | Engage motor and hold current position. + `Retract` | Return the reel to the fully retracted position. + `LoadLine` | Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + `AbandonLine` | Spool out the entire length of the line. + `LoadPayload` | Spools out just enough to present the hook to the user to load the payload. + +### enum Result {#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091} + + +Possible results returned for winch action requests. + + +Value | Description +--- | --- + `Unknown` | Unknown result. + `Success` | Request was successful. + `NoSystem` | No system is connected. + `Busy` | Temporarily rejected. + `Timeout` | Request timed out. + `Unsupported` | [Action](classmavsdk_1_1_action.md) not supported. + `Failed` | [Action](classmavsdk_1_1_action.md) failed. + +## Member Function Documentation + + +### subscribe_status() {#classmavsdk_1_1_winch_1a92363df861842edf0b81aa18fba26bc8} +```cpp +StatusHandle mavsdk::Winch::subscribe_status(const StatusCallback &callback) +``` + + +Subscribe to 'winch status' updates. + + +**Parameters** + +* const [StatusCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a6c84089eac00fc9de890ab7e8c0eb32a)& **callback** - + +**Returns** + + [StatusHandle](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a78284180b73b3092c37e45b3c2bdc2ab) - + +### unsubscribe_status() {#classmavsdk_1_1_winch_1af1176a4992e0a6850dbd44ea2b1f0bad} +```cpp +void mavsdk::Winch::unsubscribe_status(StatusHandle handle) +``` + + +Unsubscribe from subscribe_status. + + +**Parameters** + +* [StatusHandle](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a78284180b73b3092c37e45b3c2bdc2ab) **handle** - + +### status() {#classmavsdk_1_1_winch_1aa24ccd5e6e44db1fbf96e4aca6947689} +```cpp +Status mavsdk::Winch::status() const +``` + + +Poll for '[Status](structmavsdk_1_1_winch_1_1_status.md)' (blocking). + + +**Returns** + + [Status](structmavsdk_1_1_winch_1_1_status.md) - One [Status](structmavsdk_1_1_winch_1_1_status.md) update. + +### relax_async() {#classmavsdk_1_1_winch_1a48eec9e1fb693620e452234e0a740989} +```cpp +void mavsdk::Winch::relax_async(uint32_t instance, const ResultCallback callback) +``` + + +Allow motor to freewheel. + +This function is non-blocking. See 'relax' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### relax() {#classmavsdk_1_1_winch_1ae1fa0d57d8d72e3bbbb4833770047ab3} +```cpp +Result mavsdk::Winch::relax(uint32_t instance) const +``` + + +Allow motor to freewheel. + +This function is blocking. See 'relax_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### relative_length_control_async() {#classmavsdk_1_1_winch_1aa2cb382d36cda8e0fe918ae07fb7a9ec} +```cpp +void mavsdk::Winch::relative_length_control_async(uint32_t instance, float length_m, float rate_m_s, const ResultCallback callback) +``` + + +Wind or unwind specified length of line, optionally using specified rate. + +This function is non-blocking. See 'relative_length_control' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* float **length_m** - +* float **rate_m_s** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### relative_length_control() {#classmavsdk_1_1_winch_1ae39f5844dd5b6d93b6ccf3953781cee0} +```cpp +Result mavsdk::Winch::relative_length_control(uint32_t instance, float length_m, float rate_m_s) const +``` + + +Wind or unwind specified length of line, optionally using specified rate. + +This function is blocking. See 'relative_length_control_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* float **length_m** - +* float **rate_m_s** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### rate_control_async() {#classmavsdk_1_1_winch_1a21ce05ef8cedd2601d22209d31a980f8} +```cpp +void mavsdk::Winch::rate_control_async(uint32_t instance, float rate_m_s, const ResultCallback callback) +``` + + +Wind or unwind line at specified rate. + +This function is non-blocking. See 'rate_control' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* float **rate_m_s** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### rate_control() {#classmavsdk_1_1_winch_1aaec8a2bac41941e1f696cd9541abd4ca} +```cpp +Result mavsdk::Winch::rate_control(uint32_t instance, float rate_m_s) const +``` + + +Wind or unwind line at specified rate. + +This function is blocking. See 'rate_control_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* float **rate_m_s** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### lock_async() {#classmavsdk_1_1_winch_1a0ff91279058752931bee2bc5dfd7c711} +```cpp +void mavsdk::Winch::lock_async(uint32_t instance, const ResultCallback callback) +``` + + +Perform the locking sequence to relieve motor while in the fully retracted position. + +This function is non-blocking. See 'lock' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### lock() {#classmavsdk_1_1_winch_1ad0f907f0164a724f8e8a57fe9796ecb3} +```cpp +Result mavsdk::Winch::lock(uint32_t instance) const +``` + + +Perform the locking sequence to relieve motor while in the fully retracted position. + +This function is blocking. See 'lock_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### deliver_async() {#classmavsdk_1_1_winch_1acbd43a3f00ab1e910b6b05654afc9458} +```cpp +void mavsdk::Winch::deliver_async(uint32_t instance, const ResultCallback callback) +``` + + +Sequence of drop, slow down, touch down, reel up, lock. + +This function is non-blocking. See 'deliver' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### deliver() {#classmavsdk_1_1_winch_1a8910df835085243a366290dbc4492680} +```cpp +Result mavsdk::Winch::deliver(uint32_t instance) const +``` + + +Sequence of drop, slow down, touch down, reel up, lock. + +This function is blocking. See 'deliver_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### hold_async() {#classmavsdk_1_1_winch_1a6c97626d33532469871a687e8043e27e} +```cpp +void mavsdk::Winch::hold_async(uint32_t instance, const ResultCallback callback) +``` + + +Engage motor and hold current position. + +This function is non-blocking. See 'hold' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### hold() {#classmavsdk_1_1_winch_1a2e7ae05d09b82964024c70211b1920d9} +```cpp +Result mavsdk::Winch::hold(uint32_t instance) const +``` + + +Engage motor and hold current position. + +This function is blocking. See 'hold_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### retract_async() {#classmavsdk_1_1_winch_1a6485b743115d441b43f3d0e39341412d} +```cpp +void mavsdk::Winch::retract_async(uint32_t instance, const ResultCallback callback) +``` + + +Return the reel to the fully retracted position. + +This function is non-blocking. See 'retract' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### retract() {#classmavsdk_1_1_winch_1a353cad0259d2eb8201e2884e037422eb} +```cpp +Result mavsdk::Winch::retract(uint32_t instance) const +``` + + +Return the reel to the fully retracted position. + +This function is blocking. See 'retract_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### load_line_async() {#classmavsdk_1_1_winch_1ad0588792ef3fbd469511f99988140637} +```cpp +void mavsdk::Winch::load_line_async(uint32_t instance, const ResultCallback callback) +``` + + +Load the reel with line. + +The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + + +This function is non-blocking. See 'load_line' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### load_line() {#classmavsdk_1_1_winch_1aabeb779b2e03632176799c92058adb92} +```cpp +Result mavsdk::Winch::load_line(uint32_t instance) const +``` + + +Load the reel with line. + +The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + + +This function is blocking. See 'load_line_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### abandon_line_async() {#classmavsdk_1_1_winch_1a3970c74e067d3734ba8dd3382c534b0a} +```cpp +void mavsdk::Winch::abandon_line_async(uint32_t instance, const ResultCallback callback) +``` + + +Spool out the entire length of the line. + +This function is non-blocking. See 'abandon_line' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### abandon_line() {#classmavsdk_1_1_winch_1a625f6d58d5447afbe0c40e3d896071b0} +```cpp +Result mavsdk::Winch::abandon_line(uint32_t instance) const +``` + + +Spool out the entire length of the line. + +This function is blocking. See 'abandon_line_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### load_payload_async() {#classmavsdk_1_1_winch_1af715b6c01dc75c44868c2936af04d40a} +```cpp +void mavsdk::Winch::load_payload_async(uint32_t instance, const ResultCallback callback) +``` + + +Spools out just enough to present the hook to the user to load the payload. + +This function is non-blocking. See 'load_payload' for the blocking counterpart. + +**Parameters** + +* uint32_t **instance** - +* const [ResultCallback](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a683fc7d385d461efb059df917622a6b7) **callback** - + +### load_payload() {#classmavsdk_1_1_winch_1a01fec2758f7f09d8aef5de23f4566d47} +```cpp +Result mavsdk::Winch::load_payload(uint32_t instance) const +``` + + +Spools out just enough to present the hook to the user to load the payload. + +This function is blocking. See 'load_payload_async' for the non-blocking counterpart. + +**Parameters** + +* uint32_t **instance** - + +**Returns** + + [Result](classmavsdk_1_1_winch.md#classmavsdk_1_1_winch_1a48edb6e5176dc8d5e95bd30eacd7a091) - Result of request. + +### operator=() {#classmavsdk_1_1_winch_1a5216eb2d1533b1e737ad30f31b7eff7a} +```cpp +const Winch& mavsdk::Winch::operator=(const Winch &)=delete +``` + + +Equality operator (object is not copyable). + + +**Parameters** + +* const [Winch](classmavsdk_1_1_winch.md)& - + +**Returns** + + const [Winch](classmavsdk_1_1_winch.md) & - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/classmavsdk_1_1geometry_1_1_coordinate_transformation.md b/docs/en/cpp/api_reference/classmavsdk_1_1geometry_1_1_coordinate_transformation.md new file mode 100644 index 000000000..c24a66e43 --- /dev/null +++ b/docs/en/cpp/api_reference/classmavsdk_1_1geometry_1_1_coordinate_transformation.md @@ -0,0 +1,101 @@ +# mavsdk::geometry::CoordinateTransformation Class Reference +`#include: geometry.h` + +---- + + +This is a utility class for coordinate transformations. + + +The projections used to transform from global (lat/lon) to local (meter) coordinates are taken from: [http://mathworld.wolfram.com/AzimuthalEquidistantProjection.html](http://mathworld.wolfram.com/AzimuthalEquidistantProjection.html) and inspired by the implementations in: [https://github.com/PX4/ecl/blob/master/geo/geo.cpp](https://github.com/PX4/ecl/blob/master/geo/geo.cpp) + + +## Data Structures + + +struct [GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) + +struct [LocalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_local_coordinate.md) + +## Public Member Functions + + +Type | Name | Description +---: | --- | --- +  | [CoordinateTransformation](#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a1e4d767efd8da2270bdac68e11671826) ()=delete | Default constructor not available. +  | [CoordinateTransformation](#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a33af8b4b2db7e00677e405a59d413261) ([GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) reference) | Constructor to initialize projection reference. +  | [~CoordinateTransformation](#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a91a4e007c7b0e314dbd2f211b5e4e0c5) ()=default | Destructor. +[LocalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_local_coordinate.md) | [local_from_global](#classmavsdk_1_1geometry_1_1_coordinate_transformation_1aedab88f8af68a2e0135d480b70ee6fbc) ([GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) global_coordinate)const | Calculate local coordinates from global coordinates. +[GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) | [global_from_local](#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a8555f4bd4557b49d82a39b5b0273122f) ([LocalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_local_coordinate.md) local_coordinate)const | Calculate global coordinates from local coordinates. + + +## Constructor & Destructor Documentation + + +### CoordinateTransformation() {#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a1e4d767efd8da2270bdac68e11671826} +```cpp +mavsdk::geometry::CoordinateTransformation::CoordinateTransformation()=delete +``` + + +Default constructor not available. + + +### CoordinateTransformation() {#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a33af8b4b2db7e00677e405a59d413261} +```cpp +mavsdk::geometry::CoordinateTransformation::CoordinateTransformation(GlobalCoordinate reference) +``` + + +Constructor to initialize projection reference. + + +**Parameters** + +* [GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) **reference** - Reference coordinate to project from. + +### ~CoordinateTransformation() {#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a91a4e007c7b0e314dbd2f211b5e4e0c5} +```cpp +mavsdk::geometry::CoordinateTransformation::~CoordinateTransformation()=default +``` + + +Destructor. + + +## Member Function Documentation + + +### local_from_global() {#classmavsdk_1_1geometry_1_1_coordinate_transformation_1aedab88f8af68a2e0135d480b70ee6fbc} +```cpp +LocalCoordinate mavsdk::geometry::CoordinateTransformation::local_from_global(GlobalCoordinate global_coordinate) const +``` + + +Calculate local coordinates from global coordinates. + + +**Parameters** + +* [GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) **global_coordinate** - The global coordinate to project from. + +**Returns** + + [LocalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_local_coordinate.md) - + +### global_from_local() {#classmavsdk_1_1geometry_1_1_coordinate_transformation_1a8555f4bd4557b49d82a39b5b0273122f} +```cpp +GlobalCoordinate mavsdk::geometry::CoordinateTransformation::global_from_local(LocalCoordinate local_coordinate) const +``` + + +Calculate global coordinates from local coordinates. + + +**Parameters** + +* [LocalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_local_coordinate.md) **local_coordinate** - The local coordinate to project from. + +**Returns** + + [GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/index.md b/docs/en/cpp/api_reference/index.md new file mode 100644 index 000000000..a3ad23887 --- /dev/null +++ b/docs/en/cpp/api_reference/index.md @@ -0,0 +1,194 @@ +# C++ API Reference + +* [class Mavsdk](classmavsdk_1_1_mavsdk.md) + * [class Mavsdk::Configuration](classmavsdk_1_1_mavsdk_1_1_configuration.md) + * [struct MavlinkAddress](struct_mavlink_address.md) +* [class Action](classmavsdk_1_1_action.md) +* [class ActionServer](classmavsdk_1_1_action_server.md) + * [struct AllowableFlightModes](structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md) + * [struct ArmDisarm](structmavsdk_1_1_action_server_1_1_arm_disarm.md) +* [class Calibration](classmavsdk_1_1_calibration.md) + * [struct ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md) +* [class Camera](classmavsdk_1_1_camera.md) + * [struct Information](structmavsdk_1_1_camera_1_1_information.md) + * [struct CaptureInfo](structmavsdk_1_1_camera_1_1_capture_info.md) + * [struct Position](structmavsdk_1_1_camera_1_1_position.md) + * [struct Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) + * [struct EulerAngle](structmavsdk_1_1_camera_1_1_euler_angle.md) + * [struct Status](structmavsdk_1_1_camera_1_1_status.md) + * [struct VideoStreamInfo](structmavsdk_1_1_camera_1_1_video_stream_info.md) + * [struct VideoStreamSettings](structmavsdk_1_1_camera_1_1_video_stream_settings.md) + * [struct Option](structmavsdk_1_1_camera_1_1_option.md) + * [struct Setting](structmavsdk_1_1_camera_1_1_setting.md) + * [struct SettingOptions](structmavsdk_1_1_camera_1_1_setting_options.md) +* [class CameraServer](classmavsdk_1_1_camera_server.md) + * [struct CaptureInfo](structmavsdk_1_1_camera_server_1_1_capture_info.md) + * [struct CaptureStatus](structmavsdk_1_1_camera_server_1_1_capture_status.md) + * [struct Information](structmavsdk_1_1_camera_server_1_1_information.md) + * [struct Position](structmavsdk_1_1_camera_server_1_1_position.md) + * [struct Quaternion](structmavsdk_1_1_camera_server_1_1_quaternion.md) + * [struct StorageStatus](structmavsdk_1_1_camera_server_1_1_capture_status.md) + * [struct VideoStreaming](structmavsdk_1_1_camera_server_1_1_video_streaming.md) +* [class ComponentInformation](classmavsdk_1_1_component_information.md) + * [struct FloatParam](structmavsdk_1_1_component_information_1_1_float_param.md) + * [struct FloatParamUpdate](structmavsdk_1_1_component_information_1_1_float_param_update.md) +* [class ComponentInformationServer](classmavsdk_1_1_component_information_server.md) + * [struct FloatParam](structmavsdk_1_1_component_information_server_1_1_float_param.md) + * [struct FloatParamUpdate](structmavsdk_1_1_component_information_server_1_1_float_param_update.md) +* [class Failure](classmavsdk_1_1_failure.md) +* [class FollowMe](classmavsdk_1_1_follow_me.md) + * [struct Config](structmavsdk_1_1_follow_me_1_1_config.md) + * [struct TargetLocation](structmavsdk_1_1_follow_me_1_1_target_location.md) +* [class Ftp](classmavsdk_1_1_ftp.md) +* [class FtpServer](classmavsdk_1_1_ftp_server.md) +* [class Geofence](classmavsdk_1_1_geofence.md) + * [struct Circle](structmavsdk_1_1_geofence_1_1_circle.md) + * [struct GeofenceData](structmavsdk_1_1_geofence_1_1_geofence_data.md) + * [struct Polygon](structmavsdk_1_1_geofence_1_1_polygon.md) + * [struct Point](structmavsdk_1_1_geofence_1_1_point.md) + * [struct ProgressData](structmavsdk_1_1_ftp_1_1_progress_data.md) +* [class geometry::CoordinateTransformation](classmavsdk_1_1geometry_1_1_coordinate_transformation.md) + * [struct GlobalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_global_coordinate.md) + * [struct LocalCoordinate](structmavsdk_1_1geometry_1_1_coordinate_transformation_1_1_local_coordinate.md) +* [class Gimbal](classmavsdk_1_1_gimbal.md) + * [struct ControlStatus](structmavsdk_1_1_gimbal_1_1_control_status.md) +* [class Gripper](classmavsdk_1_1_gripper.md) +* [class Info](classmavsdk_1_1_info.md) + * [struct FlightInfo](structmavsdk_1_1_info_1_1_flight_info.md) + * [struct Identification](structmavsdk_1_1_info_1_1_identification.md) + * [struct Product](structmavsdk_1_1_info_1_1_product.md) + * [struct Version](structmavsdk_1_1_info_1_1_version.md) +* [class LogFiles](classmavsdk_1_1_log_files.md) + * [struct Entry](structmavsdk_1_1_log_files_1_1_entry.md) + * [struct ProgressData](structmavsdk_1_1_log_files_1_1_progress_data.md) +* [class ManualControl](classmavsdk_1_1_manual_control.md) +* [class MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md) + * [struct CommandInt](structmavsdk_1_1_mavlink_passthrough_1_1_command_int.md) + * [struct CommandLong](structmavsdk_1_1_mavlink_passthrough_1_1_command_long.md) +* [class Mission](classmavsdk_1_1_mission.md) + * [struct MissionItem](structmavsdk_1_1_mission_1_1_mission_item.md) + * [struct MissionPlan](structmavsdk_1_1_mission_1_1_mission_plan.md) + * [struct MissionProgress](structmavsdk_1_1_mission_1_1_mission_progress.md) + * [struct ProgressData](structmavsdk_1_1_mission_1_1_progress_data.md) + * [struct ProgressDataOrMission](structmavsdk_1_1_mission_1_1_progress_data_or_mission.md) +* [class MissionRaw](classmavsdk_1_1_mission_raw.md) + * [struct MissionItem](structmavsdk_1_1_mission_raw_1_1_mission_item.md) + * [struct MissionProgress](structmavsdk_1_1_mission_raw_1_1_mission_progress.md) +* [class MissionRawServer](classmavsdk_1_1_mission_raw_server.md) + * [struct MissionItem](structmavsdk_1_1_mission_raw_server_1_1_mission_item.md) + * [struct MissionPlan](structmavsdk_1_1_mission_raw_server_1_1_mission_plan.md) + * [struct MissionProgress](structmavsdk_1_1_mission_raw_server_1_1_mission_progress.md) +* [class Mocap](classmavsdk_1_1_mocap.md) + * [struct AngleBody](structmavsdk_1_1_mocap_1_1_angle_body.md) + * [struct AngularVelocityBody](structmavsdk_1_1_mocap_1_1_angular_velocity_body.md) + * [struct AttitudePositionMocap](structmavsdk_1_1_mocap_1_1_attitude_position_mocap.md) + * [struct Covariance](structmavsdk_1_1_mocap_1_1_covariance.md) + * [struct Odometry](structmavsdk_1_1_mocap_1_1_odometry.md) + * [struct PositionBody](structmavsdk_1_1_mocap_1_1_position_body.md) + * [struct Quaternion](structmavsdk_1_1_mocap_1_1_quaternion.md) + * [struct SpeedBody](structmavsdk_1_1_mocap_1_1_speed_body.md) + * [struct VisionPositionEstimate](structmavsdk_1_1_mocap_1_1_vision_position_estimate.md) +* [class Offboard](classmavsdk_1_1_offboard.md) + * [struct ActuatorControl](structmavsdk_1_1_offboard_1_1_actuator_control.md) + * [struct ActuatorControlGroup](structmavsdk_1_1_offboard_1_1_actuator_control_group.md) + * [struct Attitude](structmavsdk_1_1_offboard_1_1_attitude.md) + * [struct AttitudeRate](structmavsdk_1_1_offboard_1_1_attitude_rate.md) + * [struct VelocityBodyYawspeed](structmavsdk_1_1_offboard_1_1_velocity_body_yawspeed.md) + * [struct VelocityNedYaw](structmavsdk_1_1_offboard_1_1_velocity_ned_yaw.md) + * [struct PositionNedYaw](structmavsdk_1_1_offboard_1_1_position_ned_yaw.md) + * [struct PositionGlobalYaw](structmavsdk_1_1_offboard_1_1_position_global_yaw.md) +* [class Param](classmavsdk_1_1_param.md) + * [struct AllParams](structmavsdk_1_1_param_1_1_all_params.md) + * [struct CustomParam](structmavsdk_1_1_param_1_1_custom_param.md) + * [struct FloatParam](structmavsdk_1_1_param_1_1_float_param.md) + * [struct IntParam](structmavsdk_1_1_param_1_1_int_param.md) +* [class ParamServer](classmavsdk_1_1_param_server.md) + * [struct AllParams](structmavsdk_1_1_param_server_1_1_all_params.md) + * [struct CustomParam](structmavsdk_1_1_param_server_1_1_custom_param.md) + * [struct FloatParam](structmavsdk_1_1_param_server_1_1_float_param.md) + * [struct IntParam](structmavsdk_1_1_param_server_1_1_int_param.md) +* [class Rtk](classmavsdk_1_1_rtk.md) + * [struct RtcmData](structmavsdk_1_1_rtk_1_1_rtcm_data.md) +* [class ServerUtility](classmavsdk_1_1_server_utility.md) +* [class Shell](classmavsdk_1_1_shell.md) +* [class System](classmavsdk_1_1_system.md) + * [struct AutopilotVersion](structmavsdk_1_1_system_1_1_autopilot_version.md) +* [class Telemetry](classmavsdk_1_1_telemetry.md) + * [struct AccelerationFrd](structmavsdk_1_1_telemetry_1_1_acceleration_frd.md) + * [struct ActuatorControlTarget](structmavsdk_1_1_telemetry_1_1_actuator_control_target.md) + * [struct ActuatorOutputStatus](structmavsdk_1_1_telemetry_1_1_actuator_output_status.md) + * [struct Altitude](structmavsdk_1_1_telemetry_1_1_altitude.md) + * [struct AngularVelocityBody](structmavsdk_1_1_telemetry_1_1_angular_velocity_body.md) + * [struct AngularVelocityNed](structmavsdk_1_1_telemetry_1_1_angular_velocity_frd.md) + * [struct Battery](structmavsdk_1_1_telemetry_1_1_battery.md) + * [struct Covariance](structmavsdk_1_1_telemetry_1_1_covariance.md) + * [struct DistanceSensor](structmavsdk_1_1_telemetry_1_1_distance_sensor.md) + * [struct EulerAngle](structmavsdk_1_1_telemetry_1_1_euler_angle.md) + * [struct FixedwingMetrics](structmavsdk_1_1_telemetry_1_1_fixedwing_metrics.md) + * [struct GpsInfo](structmavsdk_1_1_telemetry_1_1_gps_info.md) + * [struct GpsGlobalOrigin](structmavsdk_1_1_telemetry_1_1_gps_global_origin.md) + * [struct GroundTruth](structmavsdk_1_1_telemetry_1_1_ground_truth.md) + * [struct Heading](structmavsdk_1_1_telemetry_1_1_heading.md) + * [struct Health](structmavsdk_1_1_telemetry_1_1_health.md) + * [struct Imu](structmavsdk_1_1_telemetry_1_1_imu.md) + * [struct MagneticFieldFrd](structmavsdk_1_1_telemetry_1_1_magnetic_field_frd.md) + * [struct Odometry](structmavsdk_1_1_telemetry_1_1_odometry.md) + * [struct Position](structmavsdk_1_1_telemetry_1_1_position.md) + * [struct PositionBody](structmavsdk_1_1_telemetry_1_1_position_body.md) + * [struct PositionNed](structmavsdk_1_1_telemetry_1_1_position_ned.md) + * [struct VelocityNed](structmavsdk_1_1_telemetry_1_1_velocity_ned.md) + * [struct VelocityBody](structmavsdk_1_1_telemetry_1_1_velocity_body.md) + * [struct PositionVelocityNed](structmavsdk_1_1_telemetry_1_1_position_velocity_ned.md) + * [struct Quaternion](structmavsdk_1_1_telemetry_1_1_quaternion.md) + * [struct RawGps](structmavsdk_1_1_telemetry_1_1_raw_gps.md) + * [struct RcStatus](structmavsdk_1_1_telemetry_1_1_rc_status.md) + * [struct ScaledPressure](structmavsdk_1_1_telemetry_1_1_scaled_pressure.md) + * [struct StatusText](structmavsdk_1_1_telemetry_1_1_status_text.md) +* [class TelemetryServer](classmavsdk_1_1_telemetry_server.md) + * [struct AccelerationFrd](structmavsdk_1_1_telemetry_server_1_1_acceleration_frd.md) + * [struct ActuatorControlTarget](structmavsdk_1_1_telemetry_server_1_1_actuator_control_target.md) + * [struct ActuatorOutputStatus](structmavsdk_1_1_telemetry_server_1_1_actuator_output_status.md) + * [struct AngularVelocityBody](structmavsdk_1_1_telemetry_server_1_1_angular_velocity_body.md) + * [struct AngularVelocityFrd](structmavsdk_1_1_telemetry_server_1_1_angular_velocity_frd.md) + * [struct Battery](structmavsdk_1_1_telemetry_server_1_1_battery.md) + * [struct Covariance](structmavsdk_1_1_telemetry_server_1_1_covariance.md) + * [struct DistanceSensor](structmavsdk_1_1_telemetry_server_1_1_distance_sensor.md) + * [struct EulerAngle](structmavsdk_1_1_telemetry_server_1_1_euler_angle.md) + * [struct FixedwingMetrics](structmavsdk_1_1_telemetry_server_1_1_fixedwing_metrics.md) + * [struct GpsInfo](structmavsdk_1_1_telemetry_server_1_1_gps_info.md) + * [struct GroundTruth](structmavsdk_1_1_telemetry_server_1_1_ground_truth.md) + * [struct Heading](structmavsdk_1_1_telemetry_server_1_1_heading.md) + * [struct Imu](structmavsdk_1_1_telemetry_server_1_1_imu.md) + * [struct MagneticFieldFrd](structmavsdk_1_1_telemetry_server_1_1_magnetic_field_frd.md) + * [struct Odometry](structmavsdk_1_1_telemetry_server_1_1_odometry.md) + * [struct Position](structmavsdk_1_1_telemetry_server_1_1_position.md) + * [struct PositionBody](structmavsdk_1_1_telemetry_server_1_1_position_body.md) + * [struct PositionNed](structmavsdk_1_1_telemetry_server_1_1_position_ned.md) + * [struct PositionVelocityNed](structmavsdk_1_1_telemetry_server_1_1_position_velocity_ned.md) + * [struct Quaternion](structmavsdk_1_1_telemetry_server_1_1_quaternion.md) + * [struct RawGps](structmavsdk_1_1_telemetry_server_1_1_raw_gps.md) + * [struct RcStatus](structmavsdk_1_1_telemetry_server_1_1_rc_status.md) + * [struct ScaledPressure](structmavsdk_1_1_telemetry_server_1_1_scaled_pressure.md) + * [struct StatusText](structmavsdk_1_1_telemetry_server_1_1_status_text.md) + * [struct VelocityBody](structmavsdk_1_1_telemetry_server_1_1_velocity_body.md) + * [struct VelocityNed](structmavsdk_1_1_telemetry_server_1_1_velocity_ned.md) +* [class TrackingServer](classmavsdk_1_1_tracking_server.md) + * [struct TrackPoint](structmavsdk_1_1_tracking_server_1_1_track_point.md) + * [struct TrackRectangle](structmavsdk_1_1_tracking_server_1_1_track_rectangle.md) +* [class Transponder](classmavsdk_1_1_transponder.md) + * [struct AdsbVehicle](structmavsdk_1_1_transponder_1_1_adsb_vehicle.md) +* [class Tune](classmavsdk_1_1_tune.md) + * [struct TuneDescription](structmavsdk_1_1_tune_1_1_tune_description.md) +* [class Winch](classmavsdk_1_1_winch.md) + * [struct Status](en/cpp/api_reference/structmavsdk_1_1_winch_1_1_status.md) + * [struct StatusFlags](en/cpp/api_reference/structmavsdk_1_1_winch_1_1_status_flags.md) +* [class PluginBase](classmavsdk_1_1_plugin_base.md) +* [class Overloaded](structmavsdk_1_1overloaded.md) +* [class CallbackList](classmavsdk_1_1_callback_list.md) +* [class CallbackListImpl](classmavsdk_1_1_callback_list_impl.md) +* [class Handle](classmavsdk_1_1_handle.md) +* [class FakeHandle](classmavsdk_1_1_fake_handle.md) +* [class ServerComponent](classmavsdk_1_1_server_component.md) +* [class ServerPluginBase](classmavsdk_1_1_server_plugin_base.md) +* [namespace mavsdk (globals)](namespacemavsdk.md) + diff --git a/docs/en/cpp/api_reference/namespacemavsdk.md b/docs/en/cpp/api_reference/namespacemavsdk.md new file mode 100644 index 000000000..5014f40ba --- /dev/null +++ b/docs/en/cpp/api_reference/namespacemavsdk.md @@ -0,0 +1,155 @@ +# mavsdk Namespace Reference + +---- + +Namespace for all mavsdk types. + + +## Data Structures + +* [mavsdk::CallbackListImpl](classmavsdk_1_1_callback_list_impl.md) +* [mavsdk::CallbackList](classmavsdk_1_1_callback_list.md) +* [mavsdk::FakeHandle](classmavsdk_1_1_fake_handle.md) +* [mavsdk::Handle](classmavsdk_1_1_handle.md) +* [mavsdk::Mavsdk](classmavsdk_1_1_mavsdk.md) +* [mavsdk::overloaded](structmavsdk_1_1overloaded.md) +* [mavsdk::PluginBase](classmavsdk_1_1_plugin_base.md) +* [mavsdk::Action](classmavsdk_1_1_action.md) +* [mavsdk::ActionServer](classmavsdk_1_1_action_server.md) +* [mavsdk::Calibration](classmavsdk_1_1_calibration.md) +* [mavsdk::Camera](classmavsdk_1_1_camera.md) +* [mavsdk::CameraServer](classmavsdk_1_1_camera_server.md) +* [mavsdk::ComponentInformation](classmavsdk_1_1_component_information.md) +* [mavsdk::ComponentInformationServer](classmavsdk_1_1_component_information_server.md) +* [mavsdk::Failure](classmavsdk_1_1_failure.md) +* [mavsdk::FollowMe](classmavsdk_1_1_follow_me.md) +* [mavsdk::Ftp](classmavsdk_1_1_ftp.md) +* [mavsdk::FtpServer](classmavsdk_1_1_ftp_server.md) +* [mavsdk::Geofence](classmavsdk_1_1_geofence.md) +* [mavsdk::Gimbal](classmavsdk_1_1_gimbal.md) +* [mavsdk::Gripper](classmavsdk_1_1_gripper.md) +* [mavsdk::Info](classmavsdk_1_1_info.md) +* [mavsdk::LogFiles](classmavsdk_1_1_log_files.md) +* [mavsdk::ManualControl](classmavsdk_1_1_manual_control.md) +* [mavsdk::MavlinkPassthrough](classmavsdk_1_1_mavlink_passthrough.md) +* [mavsdk::Mission](classmavsdk_1_1_mission.md) +* [mavsdk::MissionRaw](classmavsdk_1_1_mission_raw.md) +* [mavsdk::MissionRawServer](classmavsdk_1_1_mission_raw_server.md) +* [mavsdk::Mocap](classmavsdk_1_1_mocap.md) +* [mavsdk::Offboard](classmavsdk_1_1_offboard.md) +* [mavsdk::Param](classmavsdk_1_1_param.md) +* [mavsdk::ParamServer](classmavsdk_1_1_param_server.md) +* [mavsdk::Rtk](classmavsdk_1_1_rtk.md) +* [mavsdk::ServerUtility](classmavsdk_1_1_server_utility.md) +* [mavsdk::Shell](classmavsdk_1_1_shell.md) +* [mavsdk::Telemetry](classmavsdk_1_1_telemetry.md) +* [mavsdk::TelemetryServer](classmavsdk_1_1_telemetry_server.md) +* [mavsdk::TrackingServer](classmavsdk_1_1_tracking_server.md) +* [mavsdk::Transponder](classmavsdk_1_1_transponder.md) +* [mavsdk::Tune](classmavsdk_1_1_tune.md) +* [mavsdk::Winch](classmavsdk_1_1_winch.md) +* [mavsdk::ServerComponent](classmavsdk_1_1_server_component.md) +* [mavsdk::ServerPluginBase](classmavsdk_1_1_server_plugin_base.md) +* [mavsdk::System](classmavsdk_1_1_system.md) + +## Enumerations + +Type | Description +--- | --- +enum [ConnectionResult](#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) | Result type returned when adding a connection. +enum [ForwardingOption](#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9) | ForwardingOption for Connection, used to set message forwarding option. + +## Functions + +Type | Name | Description +--- | --- | --- +std::ostream & | [operator<<](#namespacemavsdk_1a3307e6cbeb3dba8551dcde4b873691d3) (std::ostream & str, const [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992) & result) | Stream operator to print information about a `ConnectionResult`. +  | [overloaded](#namespacemavsdk_1a724e321aaff91eb2ba28279e0292e552) (Ts...)-> overloaded< Ts... > | Template deduction helper for `overloaded` + +## Enumeration Type Documentation + + +### enum ConnectionResult {#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992} + +``` +#include: connection_result.h +``` + + +Result type returned when adding a connection. + +**Note**: [Mavsdk](classmavsdk_1_1_mavsdk.md) does not throw exceptions. Instead a result of this type will be returned when you add a connection: add_udp_connection(). + +Value | Description +--- | --- + `Success` | Connection succeeded. + `Timeout` | Connection timed out. + `SocketError` | Socket error. + `BindError` | Bind error. + `SocketConnectionError` | Socket connection error. + `ConnectionError` | Connection error. + `NotImplemented` | Connection type not implemented. + `SystemNotConnected` | No system is connected. + `SystemBusy` | System is busy. + `CommandDenied` | Command is denied. + `DestinationIpUnknown` | Connection IP is unknown. + `ConnectionsExhausted` | Connections exhausted. + `ConnectionUrlInvalid` | URL invalid. + `BaudrateUnknown` | Baudrate unknown. + +### enum ForwardingOption {#namespacemavsdk_1a7066729108eae8a605d4dd169e4581b9} + +``` +#include: mavsdk.h +``` + + +ForwardingOption for Connection, used to set message forwarding option. + + +Value | Description +--- | --- + `ForwardingOff` | + `ForwardingOn` | + +## Function Documentation + + +### operator<<() {#namespacemavsdk_1a3307e6cbeb3dba8551dcde4b873691d3} + +``` +#include: connection_result.h +``` +```cpp +std::ostream& mavsdk::operator<<(std::ostream &str, const ConnectionResult &result) +``` + + +Stream operator to print information about a `ConnectionResult`. + + +**Parameters** + +* std::ostream& **str** - +* const [ConnectionResult](namespacemavsdk.md#namespacemavsdk_1a0bad93f6d037051ac3906a0bcc09f992)& **result** - + +**Returns** + + std::ostream & - A reference to the stream. + +### overloaded() {#namespacemavsdk_1a724e321aaff91eb2ba28279e0292e552} + +``` +#include: plugin_base.h +``` +```cpp +mavsdk::overloaded(Ts...) -> overloaded< Ts... > +``` + + +Template deduction helper for `overloaded` + + +**Parameters** + +* Ts... - \ No newline at end of file diff --git a/docs/en/cpp/api_reference/struct_mavlink_address.md b/docs/en/cpp/api_reference/struct_mavlink_address.md new file mode 100644 index 000000000..1c23eb411 --- /dev/null +++ b/docs/en/cpp/api_reference/struct_mavlink_address.md @@ -0,0 +1,39 @@ +# MavlinkAddress Struct Reference +`#include: mavlink_address.h` + +---- + + +Struct to represent a MAVLink address. + + +## Data Fields + + +uint8_t [system_id](#struct_mavlink_address_1ace50a41854b60452a8cb8fddd86348af) - System ID, also called sysid. + +uint8_t [component_id](#struct_mavlink_address_1a666949f3b25592649b66a96bebf1d82b) - Component ID, also called compid. + + +## Field Documentation + + +### system_id {#struct_mavlink_address_1ace50a41854b60452a8cb8fddd86348af} + +```cpp +uint8_t MavlinkAddress::system_id +``` + + +System ID, also called sysid. + + +### component_id {#struct_mavlink_address_1a666949f3b25592649b66a96bebf1d82b} + +```cpp +uint8_t MavlinkAddress::component_id +``` + + +Component ID, also called compid. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md b/docs/en/cpp/api_reference/structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md new file mode 100644 index 000000000..abf88fff8 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_action_server_1_1_allowable_flight_modes.md @@ -0,0 +1,51 @@ +# mavsdk::ActionServer::AllowableFlightModes Struct Reference +`#include: action_server.h` + +---- + + +State to check if the vehicle can transition to respective flightmodes. + + +## Data Fields + + +bool [can_auto_mode](#structmavsdk_1_1_action_server_1_1_allowable_flight_modes_1ac953fe1b15d9cb4fc127e16f989d34ab) {} - Auto/mission mode. + +bool [can_guided_mode](#structmavsdk_1_1_action_server_1_1_allowable_flight_modes_1a1887755bf34cba572c96fc44dc4cae3b) {} - Guided mode. + +bool [can_stabilize_mode](#structmavsdk_1_1_action_server_1_1_allowable_flight_modes_1a341661c5e1d018f3f4595f8cc9e67ed3) {} - Stabilize mode. + + +## Field Documentation + + +### can_auto_mode {#structmavsdk_1_1_action_server_1_1_allowable_flight_modes_1ac953fe1b15d9cb4fc127e16f989d34ab} + +```cpp +bool mavsdk::ActionServer::AllowableFlightModes::can_auto_mode {} +``` + + +Auto/mission mode. + + +### can_guided_mode {#structmavsdk_1_1_action_server_1_1_allowable_flight_modes_1a1887755bf34cba572c96fc44dc4cae3b} + +```cpp +bool mavsdk::ActionServer::AllowableFlightModes::can_guided_mode {} +``` + + +Guided mode. + + +### can_stabilize_mode {#structmavsdk_1_1_action_server_1_1_allowable_flight_modes_1a341661c5e1d018f3f4595f8cc9e67ed3} + +```cpp +bool mavsdk::ActionServer::AllowableFlightModes::can_stabilize_mode {} +``` + + +Stabilize mode. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_action_server_1_1_arm_disarm.md b/docs/en/cpp/api_reference/structmavsdk_1_1_action_server_1_1_arm_disarm.md new file mode 100644 index 000000000..609669e21 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_action_server_1_1_arm_disarm.md @@ -0,0 +1,39 @@ +# mavsdk::ActionServer::ArmDisarm Struct Reference +`#include: action_server.h` + +---- + + +Arming message type. + + +## Data Fields + + +bool [arm](#structmavsdk_1_1_action_server_1_1_arm_disarm_1acfcd754fb8389f43830cc64505a2bdf1) {} - Should vehicle arm. + +bool [force](#structmavsdk_1_1_action_server_1_1_arm_disarm_1af36cd34928194ab74904e053721886e5) {} - Should arm override pre-flight checks. + + +## Field Documentation + + +### arm {#structmavsdk_1_1_action_server_1_1_arm_disarm_1acfcd754fb8389f43830cc64505a2bdf1} + +```cpp +bool mavsdk::ActionServer::ArmDisarm::arm {} +``` + + +Should vehicle arm. + + +### force {#structmavsdk_1_1_action_server_1_1_arm_disarm_1af36cd34928194ab74904e053721886e5} + +```cpp +bool mavsdk::ActionServer::ArmDisarm::force {} +``` + + +Should arm override pre-flight checks. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_calibration_1_1_progress_data.md b/docs/en/cpp/api_reference/structmavsdk_1_1_calibration_1_1_progress_data.md new file mode 100644 index 000000000..7f7046732 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_calibration_1_1_progress_data.md @@ -0,0 +1,66 @@ +# mavsdk::Calibration::ProgressData Struct Reference +`#include: calibration.h` + +---- + + +Progress data coming from calibration. + + +Can be a progress percentage, or an instruction text. + + +## Data Fields + + +bool [has_progress](#structmavsdk_1_1_calibration_1_1_progress_data_1a1b34241aba778eb9e1e67ae9f3404249) { false} - Whether this [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md) contains a 'progress' status or not. + +float [progress](#structmavsdk_1_1_calibration_1_1_progress_data_1a573b314b1440961d593881f931aeca32) {float(NAN)} - Progress (percentage) + +bool [has_status_text](#structmavsdk_1_1_calibration_1_1_progress_data_1ac6780fbc4f8e8eaea3a2ccf6290a2c78) { false} - Whether this [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md) contains a 'status_text' or not. + +std::string [status_text](#structmavsdk_1_1_calibration_1_1_progress_data_1a8fae64b0166ed65158d045b07ed9b48d) {} - Instruction text. + + +## Field Documentation + + +### has_progress {#structmavsdk_1_1_calibration_1_1_progress_data_1a1b34241aba778eb9e1e67ae9f3404249} + +```cpp +bool mavsdk::Calibration::ProgressData::has_progress { false} +``` + + +Whether this [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md) contains a 'progress' status or not. + + +### progress {#structmavsdk_1_1_calibration_1_1_progress_data_1a573b314b1440961d593881f931aeca32} + +```cpp +float mavsdk::Calibration::ProgressData::progress {float(NAN)} +``` + + +Progress (percentage) + + +### has_status_text {#structmavsdk_1_1_calibration_1_1_progress_data_1ac6780fbc4f8e8eaea3a2ccf6290a2c78} + +```cpp +bool mavsdk::Calibration::ProgressData::has_status_text { false} +``` + + +Whether this [ProgressData](structmavsdk_1_1_calibration_1_1_progress_data.md) contains a 'status_text' or not. + + +### status_text {#structmavsdk_1_1_calibration_1_1_progress_data_1a8fae64b0166ed65158d045b07ed9b48d} + +```cpp +std::string mavsdk::Calibration::ProgressData::status_text {} +``` + + +Instruction text. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_capture_info.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_capture_info.md new file mode 100644 index 000000000..f9da42936 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_capture_info.md @@ -0,0 +1,99 @@ +# mavsdk::Camera::CaptureInfo Struct Reference +`#include: camera.h` + +---- + + +[Information](structmavsdk_1_1_camera_1_1_information.md) about a picture just captured. + + +## Data Fields + + +[Position](structmavsdk_1_1_camera_1_1_position.md) [position](#structmavsdk_1_1_camera_1_1_capture_info_1a570779eaff94d3cf3c1a160938096d0f) {} - Location where the picture was taken. + +[Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) [attitude_quaternion](#structmavsdk_1_1_camera_1_1_capture_info_1add20201828d0e0a82a6ee6366022abc4) {} - Attitude of the camera when the picture was taken (quaternion) + +[EulerAngle](structmavsdk_1_1_camera_1_1_euler_angle.md) [attitude_euler_angle](#structmavsdk_1_1_camera_1_1_capture_info_1a6265295864a8f4e7081a34edb070a531) {} - Attitude of the camera when the picture was taken (euler angle) + +uint64_t [time_utc_us](#structmavsdk_1_1_camera_1_1_capture_info_1ad0e92389ab305025ce3cebe0e35d0b51) {} - Timestamp in UTC (since UNIX epoch) in microseconds. + +bool [is_success](#structmavsdk_1_1_camera_1_1_capture_info_1a654b17853337aaa3e46b9e70394642d0) {} - True if the capture was successful. + +int32_t [index](#structmavsdk_1_1_camera_1_1_capture_info_1ad8d31a8640a824a6e8c449a49bdd4f82) {} - Zero-based index of this image since vehicle was armed. + +std::string [file_url](#structmavsdk_1_1_camera_1_1_capture_info_1a6fa362c6a13fe4fafe40d8cb5043407f) {} - Download URL of this image. + + +## Field Documentation + + +### position {#structmavsdk_1_1_camera_1_1_capture_info_1a570779eaff94d3cf3c1a160938096d0f} + +```cpp +Position mavsdk::Camera::CaptureInfo::position {} +``` + + +Location where the picture was taken. + + +### attitude_quaternion {#structmavsdk_1_1_camera_1_1_capture_info_1add20201828d0e0a82a6ee6366022abc4} + +```cpp +Quaternion mavsdk::Camera::CaptureInfo::attitude_quaternion {} +``` + + +Attitude of the camera when the picture was taken (quaternion) + + +### attitude_euler_angle {#structmavsdk_1_1_camera_1_1_capture_info_1a6265295864a8f4e7081a34edb070a531} + +```cpp +EulerAngle mavsdk::Camera::CaptureInfo::attitude_euler_angle {} +``` + + +Attitude of the camera when the picture was taken (euler angle) + + +### time_utc_us {#structmavsdk_1_1_camera_1_1_capture_info_1ad0e92389ab305025ce3cebe0e35d0b51} + +```cpp +uint64_t mavsdk::Camera::CaptureInfo::time_utc_us {} +``` + + +Timestamp in UTC (since UNIX epoch) in microseconds. + + +### is_success {#structmavsdk_1_1_camera_1_1_capture_info_1a654b17853337aaa3e46b9e70394642d0} + +```cpp +bool mavsdk::Camera::CaptureInfo::is_success {} +``` + + +True if the capture was successful. + + +### index {#structmavsdk_1_1_camera_1_1_capture_info_1ad8d31a8640a824a6e8c449a49bdd4f82} + +```cpp +int32_t mavsdk::Camera::CaptureInfo::index {} +``` + + +Zero-based index of this image since vehicle was armed. + + +### file_url {#structmavsdk_1_1_camera_1_1_capture_info_1a6fa362c6a13fe4fafe40d8cb5043407f} + +```cpp +std::string mavsdk::Camera::CaptureInfo::file_url {} +``` + + +Download URL of this image. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_euler_angle.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_euler_angle.md new file mode 100644 index 000000000..04f036f31 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_euler_angle.md @@ -0,0 +1,57 @@ +# mavsdk::Camera::EulerAngle Struct Reference +`#include: camera.h` + +---- + + +Euler angle type. + + +All rotations and axis systems follow the right-hand rule. The Euler angles follow the convention of a 3-2-1 intrinsic Tait-Bryan rotation sequence. + + +For more info see [https://en.wikipedia.org/wiki/Euler_angles](https://en.wikipedia.org/wiki/Euler_angles) + + +## Data Fields + + +float [roll_deg](#structmavsdk_1_1_camera_1_1_euler_angle_1aa63fe9f7e9c4346686d554f37d47a178) {} - Roll angle in degrees, positive is banking to the right. + +float [pitch_deg](#structmavsdk_1_1_camera_1_1_euler_angle_1a682e6baf3c8051afefec07d620b510f2) {} - Pitch angle in degrees, positive is pitching nose up. + +float [yaw_deg](#structmavsdk_1_1_camera_1_1_euler_angle_1ad828494c6937d685ab33e02c04f529dd) {} - Yaw angle in degrees, positive is clock-wise seen from above. + + +## Field Documentation + + +### roll_deg {#structmavsdk_1_1_camera_1_1_euler_angle_1aa63fe9f7e9c4346686d554f37d47a178} + +```cpp +float mavsdk::Camera::EulerAngle::roll_deg {} +``` + + +Roll angle in degrees, positive is banking to the right. + + +### pitch_deg {#structmavsdk_1_1_camera_1_1_euler_angle_1a682e6baf3c8051afefec07d620b510f2} + +```cpp +float mavsdk::Camera::EulerAngle::pitch_deg {} +``` + + +Pitch angle in degrees, positive is pitching nose up. + + +### yaw_deg {#structmavsdk_1_1_camera_1_1_euler_angle_1ad828494c6937d685ab33e02c04f529dd} + +```cpp +float mavsdk::Camera::EulerAngle::yaw_deg {} +``` + + +Yaw angle in degrees, positive is clock-wise seen from above. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_information.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_information.md new file mode 100644 index 000000000..4b130d37e --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_information.md @@ -0,0 +1,99 @@ +# mavsdk::Camera::Information Struct Reference +`#include: camera.h` + +---- + + +Type to represent a camera information. + + +## Data Fields + + +std::string [vendor_name](#structmavsdk_1_1_camera_1_1_information_1a54c399e4a570ff8a96b4cd4c01651834) {} - Name of the camera vendor. + +std::string [model_name](#structmavsdk_1_1_camera_1_1_information_1a500232dfe9359366211cd303cc702eaa) {} - Name of the camera model. + +float [focal_length_mm](#structmavsdk_1_1_camera_1_1_information_1aa7a80af4dd54cd006c8ea1a2c44a0f57) {} - Focal length. + +float [horizontal_sensor_size_mm](#structmavsdk_1_1_camera_1_1_information_1a0fcd78494ebf68c865f2ced9d203f48a) {} - Horizontal sensor size. + +float [vertical_sensor_size_mm](#structmavsdk_1_1_camera_1_1_information_1aa3014269144bc0708e78685b57fca538) {} - Vertical sensor size. + +uint32_t [horizontal_resolution_px](#structmavsdk_1_1_camera_1_1_information_1a6e6a611961c63c1862bbdb790cd46afa) {} - Horizontal image resolution in pixels. + +uint32_t [vertical_resolution_px](#structmavsdk_1_1_camera_1_1_information_1a2c1f6d69ccd1c0ae216f810fc75551b2) {} - Vertical image resolution in pixels. + + +## Field Documentation + + +### vendor_name {#structmavsdk_1_1_camera_1_1_information_1a54c399e4a570ff8a96b4cd4c01651834} + +```cpp +std::string mavsdk::Camera::Information::vendor_name {} +``` + + +Name of the camera vendor. + + +### model_name {#structmavsdk_1_1_camera_1_1_information_1a500232dfe9359366211cd303cc702eaa} + +```cpp +std::string mavsdk::Camera::Information::model_name {} +``` + + +Name of the camera model. + + +### focal_length_mm {#structmavsdk_1_1_camera_1_1_information_1aa7a80af4dd54cd006c8ea1a2c44a0f57} + +```cpp +float mavsdk::Camera::Information::focal_length_mm {} +``` + + +Focal length. + + +### horizontal_sensor_size_mm {#structmavsdk_1_1_camera_1_1_information_1a0fcd78494ebf68c865f2ced9d203f48a} + +```cpp +float mavsdk::Camera::Information::horizontal_sensor_size_mm {} +``` + + +Horizontal sensor size. + + +### vertical_sensor_size_mm {#structmavsdk_1_1_camera_1_1_information_1aa3014269144bc0708e78685b57fca538} + +```cpp +float mavsdk::Camera::Information::vertical_sensor_size_mm {} +``` + + +Vertical sensor size. + + +### horizontal_resolution_px {#structmavsdk_1_1_camera_1_1_information_1a6e6a611961c63c1862bbdb790cd46afa} + +```cpp +uint32_t mavsdk::Camera::Information::horizontal_resolution_px {} +``` + + +Horizontal image resolution in pixels. + + +### vertical_resolution_px {#structmavsdk_1_1_camera_1_1_information_1a2c1f6d69ccd1c0ae216f810fc75551b2} + +```cpp +uint32_t mavsdk::Camera::Information::vertical_resolution_px {} +``` + + +Vertical image resolution in pixels. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_option.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_option.md new file mode 100644 index 000000000..1c6493dec --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_option.md @@ -0,0 +1,39 @@ +# mavsdk::Camera::Option Struct Reference +`#include: camera.h` + +---- + + +Type to represent a setting option. + + +## Data Fields + + +std::string [option_id](#structmavsdk_1_1_camera_1_1_option_1aaa7f93e9d89a0b16c319a6ca695bc2e7) {} - Name of the option (machine readable) + +std::string [option_description](#structmavsdk_1_1_camera_1_1_option_1a72fc01f628a19a44fb730964ad50459e) {} - Description of the option (human readable) + + +## Field Documentation + + +### option_id {#structmavsdk_1_1_camera_1_1_option_1aaa7f93e9d89a0b16c319a6ca695bc2e7} + +```cpp +std::string mavsdk::Camera::Option::option_id {} +``` + + +Name of the option (machine readable) + + +### option_description {#structmavsdk_1_1_camera_1_1_option_1a72fc01f628a19a44fb730964ad50459e} + +```cpp +std::string mavsdk::Camera::Option::option_description {} +``` + + +Description of the option (human readable) + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_position.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_position.md new file mode 100644 index 000000000..d8eb2f213 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_position.md @@ -0,0 +1,63 @@ +# mavsdk::Camera::Position Struct Reference +`#include: camera.h` + +---- + + +[Position](structmavsdk_1_1_camera_1_1_position.md) type in global coordinates. + + +## Data Fields + + +double [latitude_deg](#structmavsdk_1_1_camera_1_1_position_1a6f8941d78449d5228fa43fe8c1182317) {} - Latitude in degrees (range: -90 to +90) + +double [longitude_deg](#structmavsdk_1_1_camera_1_1_position_1a7b464ed04437649533787e1442400264) {} - Longitude in degrees (range: -180 to +180) + +float [absolute_altitude_m](#structmavsdk_1_1_camera_1_1_position_1a543460f2a6039e6be3a4dfe50fd3b2d0) {} - Altitude AMSL (above mean sea level) in metres. + +float [relative_altitude_m](#structmavsdk_1_1_camera_1_1_position_1a07b0b2baef1707c4a99eaa29cd3912dd) {} - Altitude relative to takeoff altitude in metres. + + +## Field Documentation + + +### latitude_deg {#structmavsdk_1_1_camera_1_1_position_1a6f8941d78449d5228fa43fe8c1182317} + +```cpp +double mavsdk::Camera::Position::latitude_deg {} +``` + + +Latitude in degrees (range: -90 to +90) + + +### longitude_deg {#structmavsdk_1_1_camera_1_1_position_1a7b464ed04437649533787e1442400264} + +```cpp +double mavsdk::Camera::Position::longitude_deg {} +``` + + +Longitude in degrees (range: -180 to +180) + + +### absolute_altitude_m {#structmavsdk_1_1_camera_1_1_position_1a543460f2a6039e6be3a4dfe50fd3b2d0} + +```cpp +float mavsdk::Camera::Position::absolute_altitude_m {} +``` + + +Altitude AMSL (above mean sea level) in metres. + + +### relative_altitude_m {#structmavsdk_1_1_camera_1_1_position_1a07b0b2baef1707c4a99eaa29cd3912dd} + +```cpp +float mavsdk::Camera::Position::relative_altitude_m {} +``` + + +Altitude relative to takeoff altitude in metres. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_quaternion.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_quaternion.md new file mode 100644 index 000000000..3054de1c8 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_quaternion.md @@ -0,0 +1,69 @@ +# mavsdk::Camera::Quaternion Struct Reference +`#include: camera.h` + +---- + + +[Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) type. + + +All rotations and axis systems follow the right-hand rule. The Hamilton quaternion product definition is used. A zero-rotation quaternion is represented by (1,0,0,0). The quaternion could also be written as w + xi + yj + zk. + + +For more info see: [https://en.wikipedia.org/wiki/Quaternion](https://en.wikipedia.org/wiki/Quaternion) + + +## Data Fields + + +float [w](#structmavsdk_1_1_camera_1_1_quaternion_1a1521eb9ca360cd59714a6dd0a38e8c74) {} - [Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 0, also denoted as a. + +float [x](#structmavsdk_1_1_camera_1_1_quaternion_1a1a8f92a67b3b55313dce82c214b66a86) {} - [Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 1, also denoted as b. + +float [y](#structmavsdk_1_1_camera_1_1_quaternion_1ab6e0c3eb312bc4f1c111b9f63ec41b79) {} - [Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 2, also denoted as c. + +float [z](#structmavsdk_1_1_camera_1_1_quaternion_1a03afdb3eed56e43d51d183f5d087d552) {} - [Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 3, also denoted as d. + + +## Field Documentation + + +### w {#structmavsdk_1_1_camera_1_1_quaternion_1a1521eb9ca360cd59714a6dd0a38e8c74} + +```cpp +float mavsdk::Camera::Quaternion::w {} +``` + + +[Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 0, also denoted as a. + + +### x {#structmavsdk_1_1_camera_1_1_quaternion_1a1a8f92a67b3b55313dce82c214b66a86} + +```cpp +float mavsdk::Camera::Quaternion::x {} +``` + + +[Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 1, also denoted as b. + + +### y {#structmavsdk_1_1_camera_1_1_quaternion_1ab6e0c3eb312bc4f1c111b9f63ec41b79} + +```cpp +float mavsdk::Camera::Quaternion::y {} +``` + + +[Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 2, also denoted as c. + + +### z {#structmavsdk_1_1_camera_1_1_quaternion_1a03afdb3eed56e43d51d183f5d087d552} + +```cpp +float mavsdk::Camera::Quaternion::z {} +``` + + +[Quaternion](structmavsdk_1_1_camera_1_1_quaternion.md) entry 3, also denoted as d. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_setting.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_setting.md new file mode 100644 index 000000000..3519a7180 --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_setting.md @@ -0,0 +1,63 @@ +# mavsdk::Camera::Setting Struct Reference +`#include: camera.h` + +---- + + +Type to represent a setting with a selected option. + + +## Data Fields + + +std::string [setting_id](#structmavsdk_1_1_camera_1_1_setting_1a8dcb34e9a21bc0c72a38ff918d7d9efa) {} - Name of a setting (machine readable) + +std::string [setting_description](#structmavsdk_1_1_camera_1_1_setting_1a6a86a6d058b991d6df42b881315ace6c) {} - Description of the setting (human readable). This field is meant to be read from the drone, ignore it when setting. + +[Option](structmavsdk_1_1_camera_1_1_option.md) [option](#structmavsdk_1_1_camera_1_1_setting_1a7ae3fde46fe0446a52563e521ea3d3e7) {} - Selected option. + +bool [is_range](#structmavsdk_1_1_camera_1_1_setting_1ac11ee3ca5ed15460b27409a9d516a759) {} - If option is given as a range. This field is meant to be read from the drone, ignore it when setting. + + +## Field Documentation + + +### setting_id {#structmavsdk_1_1_camera_1_1_setting_1a8dcb34e9a21bc0c72a38ff918d7d9efa} + +```cpp +std::string mavsdk::Camera::Setting::setting_id {} +``` + + +Name of a setting (machine readable) + + +### setting_description {#structmavsdk_1_1_camera_1_1_setting_1a6a86a6d058b991d6df42b881315ace6c} + +```cpp +std::string mavsdk::Camera::Setting::setting_description {} +``` + + +Description of the setting (human readable). This field is meant to be read from the drone, ignore it when setting. + + +### option {#structmavsdk_1_1_camera_1_1_setting_1a7ae3fde46fe0446a52563e521ea3d3e7} + +```cpp +Option mavsdk::Camera::Setting::option {} +``` + + +Selected option. + + +### is_range {#structmavsdk_1_1_camera_1_1_setting_1ac11ee3ca5ed15460b27409a9d516a759} + +```cpp +bool mavsdk::Camera::Setting::is_range {} +``` + + +If option is given as a range. This field is meant to be read from the drone, ignore it when setting. + diff --git a/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_setting_options.md b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_setting_options.md new file mode 100644 index 000000000..c2f72a90d --- /dev/null +++ b/docs/en/cpp/api_reference/structmavsdk_1_1_camera_1_1_setting_options.md @@ -0,0 +1,63 @@ +# mavsdk::Camera::SettingOptions Struct Reference +`#include: camera.h` + +---- + + +Type to represent a setting with a list of options to choose from. + + +## Data Fields + + +std::string [setting_id](#structmavsdk_1_1_camera_1_1_setting_options_1aca647af6e140ee78b41d85565d673f14) {} - Name of the setting (machine readable) + +std::string [setting_description](#structmavsdk_1_1_camera_1_1_setting_options_1a8902e7f9dfc25ee9c8363cf5f4775b92) {} - Description of the setting (human readable) + +std::vector< [Option](structmavsdk_1_1_camera_1_1_option.md) > [options](#structmavsdk_1_1_camera_1_1_setting_options_1a06b292df50c638625ef942b1a19917c3) {} - List of options or if range [min, max] or [min, max, interval]. + +bool [is_range](#structmavsdk_1_1_camera_1_1_setting_options_1af6459fc1e354ec95f67f07248242a3b7) {} - If option is given as a range. + + +## Field Documentation + + +### setting_id {#structmavsdk_1_1_camera_1_1_setting_options_1aca647af6e140ee78b41d85565d673f14} + +```cpp +std::string mavsdk::Camera::SettingOptions::setting_id {} +``` + + +Name of the setting (machine readable) + + +### setting_description {#structmavsdk_1_1_camera_1_1_setting_options_1a8902e7f9dfc25ee9c8363cf5f4775b92} + +```cpp +std::string mavsdk::Camera::SettingOptions::setting_description {} +``` + + +Description of the setting (human readable) + + +### options {#structmavsdk_1_1_camera_1_1_setting_options_1a06b292df50c638625ef942b1a19917c3} + +```cpp +std::vector