projet crepp_git/crepp-projects/simplecdbot · branche main
/*
 * Copyright (c) 2012 by Xavier HINAULT - support@mon-club-elec.fr
 *
 * This file is free software; you can redistribute it and/or modify
 * it under the terms of either the GNU General Public License version 3
 * or the GNU Lesser General Public License version 3, both as
 * published by the Free Software Foundation.
 */

/* Cette librairie contient plusieurs fonctions générales utiles
notamment pour la réception et le décodage d'instruction en réception sur le port série
pour la conversion de chaines en valeurs numériques, 
etc...
Ces fonctions ont pour but d'être facilement réutilisées par d'autres librairies 
ou au sein d'un programme Arduino. 
*/

#ifndef Utils_h
#define Utils_h

#include "Arduino.h"



class Utils {

  private : // variables internes
  
  public :

  //String paramString; 
  
  public :
  	Utils(); // constructeur
  
	String waitingString(boolean debugIn); 
	String waitingString(); 

	void waitForString(String stringForWaitIn);

	String testInstructionString (String chaineTest, String  chaineRefIn);
	String testInstructionString (String chaineTest, String  chaineRefIn, boolean debugIn);

	boolean testInstruction2(String chaineReception,String chaineTest, int nbParam, long paramsIn[]);
	long stringToLong(String chaineLong); 

  private : // fonctions internes


};


#endif