OpenPilot GCS Development





OpenPilot GCS Development

Introduction

Every large system has a well defined system architecture; which if understood well makes it easy for us to start developing. The OpenPilot GCS is no different in this regard. In this page, the basic architecture of the GCS is outlined.

It’s Plugins All The Way Down

The actual OpenPilot GCS is basically a Plugin loader as all functionality of the application is implemented in plugins.

The core functionality is implemented in the Core Plugin (Core::ICore), additionally the plugin manager (ExtensionSystem::PluginManager) provides simple means for plugin cooperation that allow plugins to provide hooks for other plugin’s extensions.

Plugins Explained

At the most fundamental level plugin is a shared library (DLL file on Windows, SO file on Linux, DYLIB file on Mac). From a developer’s point of view plugin is a module that:

  1. Implements the ExtensionSystem::IPlugin interface in a class.
  2. Exports the Plugin Class using the Q_EXPORT_PLUGIN macro.
  3. Provides a pluginspec file that provides some meta information about the plugin.
  4. Exposes one or more objects that might be of some interest to other plugins.
  5. Searches for the availability of one or more objects exposed by other plugins.

UAV Gadgets

We mention plugins a lot because from a developers point of view this is exactly what they are, however from a users perspective all the plugins they will be aware of are UAV Gadgets.

UAV Gadgets are in fact a special type of plugin which, on top of the above creates a IUAVGadget upon initialization. This is normally done through a gadget factory. The following diagram shows the classes that you have to implement in order to write a gadget (colored) an some other classes that are related to a gadget.

Here are the sources (DIA) for the diagram: OpenPilot GCS Development

The Core Plugin

The Core Plugin is the central plugin for the GCS. For normal plugin-development you don’t need to know about the internals. The following is intended for people who do development on the Core-Plugin. The following diagram shows some central relations of the Core Plugin.

 

Comments

So empty here ... leave a comment!

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Sidebar