wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
ArduinoCodeGen Class Reference

Generates an Arduino sketch from a flattened list of circuit elements. More...

#include <ArduinoCodeGen.h>

Classes

struct  TestVector
 Describes a single test vector for testbench generation. More...

Public Member Functions

 ArduinoCodeGen (const QString &fileName, const QVector< GraphicElement * > &elements)
 Constructs the code generator targeting fileName.
void generate ()
 Generates the Arduino sketch and writes it to the output file.
void generateTestbench (const QString &tbFileName, const QVector< TestVector > &vectors)

Detailed Description

Generates an Arduino sketch from a flattened list of circuit elements.

Translates combinational and simple sequential logic into C++ code suitable for upload to an Arduino-compatible microcontroller.

Definition at line 76 of file ArduinoCodeGen.h.

Constructor & Destructor Documentation

◆ ArduinoCodeGen()

ArduinoCodeGen::ArduinoCodeGen ( const QString & fileName,
const QVector< GraphicElement * > & elements )

Constructs the code generator targeting fileName.

Parameters
fileNameOutput file path for the generated sketch.
elementsOrdered list of graphic elements to translate.

Definition at line 25 of file ArduinoCodeGen.cpp.

Member Function Documentation

◆ generate()

void ArduinoCodeGen::generate ( )

Generates the Arduino sketch and writes it to the output file.

Definition at line 135 of file ArduinoCodeGen.cpp.

References Scene::wirelessTxInputPorts().

Referenced by ExportController::exportToArduino().

◆ generateTestbench()

void ArduinoCodeGen::generateTestbench ( const QString & tbFileName,
const QVector< TestVector > & vectors )

Definition at line 1261 of file ArduinoCodeGen.cpp.

References Simulation::kMaxSettleIterations, and PANDACEPTION.


The documentation for this class was generated from the following files: