Select Git revision
N_PhotoVoltaique.cpp
-
Xavier ELATTAOUI authored
range values ordered set_range added
Xavier ELATTAOUI authoredrange values ordered set_range added
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;