Skip to content
Snippets Groups Projects
syringe.h 1.13 KiB
Newer Older
#include <interrupts.h> // InterruptLock
using InterruptLock = esp8266::InterruptLock;

#include <iostream>
using namespace std;

  String _name; //Would be used as the key
  float _total_volume_mL;
  float _internal_diameter_mm;
  //JSON DOCUMENT
  StaticJsonDocument<200> syringe_json;  //200 = RAM allocated to this document
  Syringe(); //There is no arguments because we add the generic syringe to use
  void set_syringe(String name, float total_volume_mL, float internal_diameter_mm);
  void set_total_volume_mL(String name, float total_volume_mL);
  void set_internal_diameter_mm(String name, float internal_diameter_mm);
  float get_total_volume_mL(String name);
  float get_internal_diameter_mm(String name);
  const StaticJsonDocument<200>& get_syringe_database();
  const JsonObject get_syringe_database_object();

  void write_Json ();
  void read_Json ();

extern Syringe syringe;