Giter VIP home page Giter VIP logo

cabpp's Introduction

CABPP

C++-implemented Automata Based Programming Pattern

Requirements

  • Windows OS
  • MinGW with g++ or clang++
  • tinyxml2 (included in this repo as a submodule)
  • yEd Graph Editor

Steps to install

  • Clone this git repository (recursively)
  • make all in main folder (Makefiles are included)
  • if everything went ok all binaries will be built in the ./build folder
  • settings and graphs are handled in the xmlsettings folder
  • Execute the code with ./build/framework.exe

Project Description

I already did something similar in Python which you can check in my other repo. This would be a good start to learn about how this programming pattern works.

Goal of this project would be to use the documentation as the code.

The graphs serve as the behaviour logic of each C++ dll module. Each module has its own states it executes when changed on a specific command.

Macros are included in the common folder headers.

Graphs

I included the possibility to add one of two types of graphs:

  • Directed : when your module must follow certain design flow. Every module starts from the _start_ state.
  • Fully connected : also called complete. When using this graph type it is best to follow the REST design principles. This kind of graph does not need to have edges as it assumes every node is connected to every other node. The command to execute the given node is the same as the name of the node.

Example included

The current example implements a completely simplicated TCP socket server, where one module handles all the socket connections while the other module handles the message to be sent to each client.

The TCP_Socket module must be handled as a directed graph while the Connection module is registered as fully connected.

Naturally this is a oversimplification of what can be done using this programming pattern.

TODO

I need to implement some more explanations here. In short this is a framework with makefile for building modules which it can handle.

Some code can also be improved (e.g. using futexes, headers to handle C code, even better makefile, ... )

LICENSE:

GPLv3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.