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

Keithley_6485.cpp

Blame
  • 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);