Skip to content

The state-based behavior processing system is both a design methodology and software architecture to support and implement re-configurable, complex, state-based control of systems such as UAVs (Unmanned Aerial Vehicles), robots and less exotic systems.

License

Notifications You must be signed in to change notification settings

wavelet55/BehaviorSystemCpp

Repository files navigation

Behavior System Introduction {#mainpage}

The Behavior System is a project substantially implemented in .NET/Mono C#. This source code is refered to as BehaviorProcessing and is contained within the develop folder of the project.

The project is currently developed with either Visual Studio (2012 or 2015) or Monodevelop version 5.1. This project requires .NET 4.5 at least.

The layout of the .NET/Mono solution is divided between three solution folders:

  1. [Documentation](@ref BehaviorSystemDoc)
  2. [BehaviorProcessing](@ref BehaviorProcessingPoc)
  3. [BehaviorsXIVPgm](@ref BehaviorsXIVPgmDoc)
  4. [BehaviorsXIVLib](@ref BehaviorsXIVLibDoc)
  5. [BehavioralSystemUI](@ref BehavioralSystemUIDoc)

Each of the links above take you to the README file for that solution folder; however, here is a brief summary for each folder:

BehaviorProcessing

This is the library to be included in a user's project. This library provides all the Behavior Processing functionality. User's develop their own behaviors nodes, and the Behavior Processing provides all the underlying code to call and switch between behaviours.

BehaviorsXIVPgm

This program is used to read user's behavior nodes and export all the node's parameter information which is used by the Behavior System UI/Editor.

BehaviorsXIVLib

This library is used to help read user's behavior nodes and export all the node's parameter information which is used by the Behavior System UI/Editor.

BehavioralSystemUI

This program is the Behavior System Editor/UI for create behavior systems from user's behavior nodes..

For Developers

The following is some tips for developers.

Required Tools

Some required tools a developer will need is:

  1. IDE
    • Visual Studio 2012
    • Visual Studio 2015 Community Edition
    • Monodevelop 5.1
  2. .NET Implementation Compatible with .NET 4.5
    • mono 3+
    • .NET 4.5 +

Getting Started

To get started developing this project:

  1. Clone the repository into a directory of your choosing.
  2. Create your own branch git checkout -b MyNewBranch
    • Branches are cheap in git, make a branch for your different features/fixes. This makes it easy to tell where changes happened.
  3. Open the BehaviorSystemProject.sln file in an IDE such as Monodevelop or Visual Studio
  4. Restore NuGet Packages

Library Dependancies

Logger

Unit Test Dependancies

  1. libgtest-dev: sudo apt install lib

The .gitignore file ignores what is in the solution level packages directory. This is so packages aren't tracked by the version control system. It is up to the developer to run the Restore NuGet Packages action in their IDE/manager. The packages directory is where NuGet packages should be installed to, do not install anywhere else and do not install or use a different version of NuGet packages in anything you develop/commit/push.

Documenting Your Projects

Generating XML Documentation

In the directory structure of the Behavior System project, there is a directory called documentation. The generated documentation is stored there. Doxygen parses the *.cs files and creates a readable documentation system. An option exists to generate xml documentation in the IDE's but that is not required with Doxygen. The IDE generated XML will go in the Project/bin/Debug/ directory. If you would like to get warnings in the IDEs related to XML documentation, turn on the xml documentation generation in the IDE.

Monodevelop

  1. Right click on the project in the solution explorer and click on "Options"
  2. Expand the "Build" option and choose "Compiler"
  3. Under "General Options" there is a box with the text "Generate xml documentation" next to it.
  4. Click the box to make sure it is checked
  5. The default path for the xml is in the build folder like Solution-Dir/maybe/other/dirs/Project-Dir/bin/Debug/Project-Doc.xml
  6. Once this is set, when you build the project, the xml documentation gets updated

Visual Studio 2015

This still needs to be tested and documented

Warnings

Once you enable xml documentation you may see thousands, more warnings. In Monodevelop, to disable XML comment related warnings go to Project Options -> Build -> Compiler and then under Warnings add 1591,1587,1574,1573,1572,1571,1570 to the warnings to ignore. This is the number for the "Mission XML comment for publicly visible type or member". When you are in the mood to get documenting go to the project you are in the mood to document and take the previous warning numbers out of the ignore list and rebuild the project. Or you can just enable/re-enable the xml documentation generation.

Recognized XML Comments

The documentation generator for monodevelop and VS will recognize a few blocks in your C# source code. These can be nested as well. If you write your class/method first and then start the xml comments with the triple back slash (///) monodevelop will auto fill the summary, returns, and param sections. Some useful ones are outlined here:

summary

Usually describes your class or function in a sentence or two. Example:

\<summary>
This function does a little of this. and some of that.
</summary>

c

Text you would like to indicate as code inline Example:

<c>vartype<\c>

returns

Describes what is being returned. Example:

<returns> <c>true</c>, if next tx message was sent, <c>false</c> otherwise.</returns>

param

Describes input parameters. Example:

<param name="wpMessage">Hops Waypoint Message.</param>

code

Text you would like to indicate as code multiline Example:

<code>
NewClass newc = new NewClass();
newc.initialize();
</code>

example

A description of the code sample

<example>
You need to use this member like so:
<code>
NewClass newc = new NewClass();
newc.initialize();
</code>
</example>

remarks

Usually contains additional information about a member. Example

<remarks> This is some more information that I don't want to show up in the summary </remarks>

see

Hyperlink to another member's docs Example:

\<summary>
This member does things
<remarks>
More information can be found in <see cref="DoMoarThings.Do"/>
</remarks>
</summary>

Generating Doxygen HTML Documentation

You must have doxygen and dot installed.

  1. Go to BehaviorSystem/documentation and run doxygen Doxyfile
  2. The output will be in falcon/documentation/doc/html
  3. View it in firefox with firefox doc/html/index.html

Contributing

Reporting bugs, suggesting features, helping with documentation, and adding to the code is very welcome.

License

Copyright (C) 2025 DireenTech Inc. (www.direentech.com) The Behavior System software is licensed under GNU General Public License, version 3, a copy of this license has been provided within the COPYING file in this directory, and can also be found at http://www.gnu.org/licenses/.

About

The state-based behavior processing system is both a design methodology and software architecture to support and implement re-configurable, complex, state-based control of systems such as UAVs (Unmanned Aerial Vehicles), robots and less exotic systems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published