Skip to content
Snippets Groups Projects
Select Git revision
  • main
  • upgrade-cpp
  • addsymbolinfo
  • Duration
  • YAT-1.21.3
  • YAT-1.21.2
  • YAT-1.21.1
  • YAT-1.21.0
  • YAT-1.20.3
  • YAT-1.20.2
  • YAT-1.20.1
  • YAT-1.20.0
  • YAT-1.19.5
  • YAY-1.19.3
  • YAT-1.19.2
  • YAT-1.19.1
  • YAT-1.19.0
  • YAT-1.18.9
  • YAT-1.18.8
  • YAT-1.18.7
  • YAT-1.18.6
  • YAT-1.18.5
  • YAT-1.18.4
  • YAT-1.18.3
24 results

pom.xml

  • 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("");