Skip to content
Snippets Groups Projects
Select Git revision
  • 1174b201dc85f8f6201e0cc96b8bdfad2efd16de
  • main default protected
  • develop
  • release_2_8_3
  • release_2_8_2
  • release_2_8_1
  • release_2_8_0
  • release_2_7_1
  • release_2_7_0
  • release_2_6_0
  • release_2_5_29
  • release_2_5_28
  • release_2_5_27
  • release_2_5_26
  • release_2_5_25
  • release_2_5_24
  • release_2_5_23
  • release_2_5_22
  • release_2_5_21
  • release_2_5_20
  • release_2_5_18
  • release_2_5_17
  • release_2_5_16
23 results

N_PhotoVoltaique.cpp

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    N_PhotoVoltaique.cpp 5.36 KiB
    // ============================================================================
    //
    // = CONTEXT
    //    TANGO Project - NovelecElectrometer Support Library
    //			PhotoVoltaique Types are Type 1, 2 & 3
    //
    // = FILENAME
    //    N_PhotoVoltaique.cpp
    //
    // = AUTHOR
    //    X. Elattaoui
    //
    // ============================================================================
    
    // ============================================================================
    // DEPENDENCIES
    // ============================================================================
    #include <iostream>
    #include <sstream>
    #include <string>
    #include <Xstring.h>
    #include "N_PhotoVoltaique.h"
    #include "NovelecProtocol.h"
    /*
    * Valid Range values for a N_PhotoVoltaique
    */
    static const std::string NType1_rangeValue[] = {"3e-11","1e-11","3e-10","1e-10"};
    static const std::string NType2_rangeValue[] = {"3e-10","1e-10","3e-9","1e-9","3e-8","1e-8","3e-7","1e-7"};
    static const std::string NType3_rangeValue[] = {"3e-8","1e-8","3e-7","1e-7","3e-6","1e-6","3e-5","1e-5"};
    
    
    // ============================================================================
    // N_PhotoVoltaique::N_PhotoVoltaique
    // ============================================================================
    N_PhotoVoltaique::N_PhotoVoltaique (std::string comLink_device_name, short address, short novTypeNumber)
    :	Novelec_MCCE2(comLink_device_name, address, novTypeNumber)
    {
    	//std::cout << "N_PhotoVoltaique::N_PhotoVoltaique <-" << std::endl;
    
    	//- init range limit
    	switch(novTypeNumber)
    	{
    	case 1 :	_rangeLimit = 3;
    		break;
    	case 2 :
    	case 3 :	_rangeLimit = 7;
    		break;
    	}
    	
    	//std::cout << "N_PhotoVoltaique::N_PhotoVoltaique ->" << std::endl;
    }
    
    // ============================================================================
    // N_PhotoVoltaique::~N_PhotoVoltaique
    // ============================================================================
    N_PhotoVoltaique::~N_PhotoVoltaique (void)
    {
    	//std::cout << "N_PhotoVoltaique::~N_PhotoVoltaique <-" << std::endl;
    
    	//std::cout << "N_PhotoVoltaique::~N_PhotoVoltaique ->" << std::endl;
    }
    
    // ============================================================================
    // N_PhotoVoltaique::range_up
    // ============================================================================
    void N_PhotoVoltaique::range_up (void) 
    {
    
    std::stringstream cmd_to_send;