Skip to content
Snippets Groups Projects
Select Git revision
  • 0779db1d9c228f19825b501f0f037da07d5034a2
  • 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

KeithleySCPIProtocol.cpp

  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    KeithleySCPIProtocol.cpp 31.98 KiB
    // ============================================================================
    //
    // = CONTEXT
    //    TANGO Project - SCPI KeithleySCPIProtocol Support Library
    //
    // = FILENAME
    //    KeithleySCPIProtocol.cpp
    //
    // = AUTHOR
    //    X. Elattaoui
    //
    // ============================================================================
    
    // ============================================================================
    // DEPENDENCIES
    // ============================================================================
    #include <iostream>
    #include <sstream>
    #include <string>
    #include <Xstring.h>
    #ifndef WIN32
    # include <unistd.h>
    #endif
    //# include 
    //#endif
    #include "KeithleySCPIProtocol.h"
    #include "TangoGpibLink.h"
    
    // ============================================================================
    // KeithleySCPIProtocol::KeithleySCPIProtocol
    // ============================================================================
    KeithleySCPIProtocol::KeithleySCPIProtocol (std::string& gpib_device_name)
    :	ElectrometerProtocol(),
    	isDiffSuportedMode(false),
    	trigCountStr("")
    {
    	std::cout << "KeithleySCPIProtocol::KeithleySCPIProtocol <-" << std::endl;
    
    	_communication_link = new TangoGpibLink (gpib_device_name);
    
    std::string cmd_to_send("");
      //- Select reading only
      cmd_to_send = "FORM:ELEM READ";
    	_communication_link->write(cmd_to_send);
      //- Select control source : IMMediate
      cmd_to_send = "ARM:SOUR IMM";
    	_communication_link->write(cmd_to_send);
      //- Set measure count
      cmd_to_send = "ARM:COUNT 1";
    	_communication_link->write(cmd_to_send);
    
    	std::cout << "KeithleySCPIProtocol::KeithleySCPIProtocol ->" << std::endl;
    }
    
    // ============================================================================
    // KeithleySCPIProtocol::~KeithleySCPIProtocol
    // ============================================================================
    KeithleySCPIProtocol::~KeithleySCPIProtocol (void)
    {
    	std::cout << "KeithleySCPIProtocol::~KeithleySCPIProtocol <-" << std::endl;
    
    	std::cout << "KeithleySCPIProtocol::~KeithleySCPIProtocol ->" << std::endl;
    }
    
    // ============================================================================
    // KeithleySCPIProtocol::set_range
    // ============================================================================
    void KeithleySCPIProtocol::set_range (std::string value) 
    {
    std::string cmd_to_send("");