Select Git revision
Keithley_6485.cpp
-
Xavier ELATTAOUI authoredXavier ELATTAOUI authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Keithley_6485.cpp 10.35 KiB
// ============================================================================
//
// = CONTEXT
// TANGO Project - SCPI KeithleyElectrometer Support Library
//
// = FILENAME
// Keithley_6485.cpp
//
// = AUTHOR
// X. Elattaoui
//
// ============================================================================
// ============================================================================
// DEPENDENCIES
// ============================================================================
#include <iostream>
#include <sstream>
#include <string>
#include <math.h> //- for ceil
#include <Xstring.h>
#include "Keithley_6485.h"
#include "KeithleySCPIProtocol.h"
/*
* Valid Range values for a K_6485
*/
static const std::string K6485_rangeValue[] = {"2E-9","2E-8","2E-7","2E-6","2E-5","2E-4","2E-3","2E-2"};
/*
* Max Index Range value for a K_6485
*/
static const short K6485_rangeLimit = 7;
// ============================================================================
// Keithley_6485::Keithley_6485
// ============================================================================
Keithley_6485::Keithley_6485 (std::string& comLink_device_name)
: AbstractElectrometerClass(comLink_device_name)
{
std::cout << "Keithley_6485::Keithley_6485 <-" << std::endl;
_numPLC = 0;
_trigCounts = 0;
_size = 0;
std::cout << "Keithley_6485::Keithley_6485 ->" << std::endl;
}
// ============================================================================
// Keithley_6485::~Keithley_6485
// ============================================================================
Keithley_6485::~Keithley_6485 (void)
{
std::cout << "Keithley_6485::~Keithley_6485 <-" << std::endl;
std::cout << "Keithley_6485::~Keithley_6485 ->" << std::endl;
}
// ============================================================================
// Keithley_6485::init_protocol
// ============================================================================
bool Keithley_6485::init_protocol (void)
{
std::string description("");
bool success = false;
try
{
//- build the keithley Electrometer protocol obj
_electrometerProtocol = new KeithleySCPIProtocol(_device_proxy_name);