TwiceAsNice
2019-02-18
|
The class AgilentOsci6k provides all functions to create a connection to the oscilloscope and send and recieve specific commands. More...
#include <AgilentOsci6k.h>
Public Member Functions | |
AgilentOsci6k () | |
standard constructor for this class. More... | |
AgilentOsci6k (std::string dev, bool create) | |
constructor to set the device adress and create connection on demand More... | |
virtual | ~AgilentOsci6k () |
standard destructor ( slightly modified to close the port also ) More... | |
void | createChatLine (const std::string &conConfig) |
this function creates the chatline and starts the connection with the oscilloscope. More... | |
void | createChatLine (void) |
creates the chatline with m_IpInfo More... | |
void | closeChatLine (void) |
this function closes the chatline and ends the connection to the Device More... | |
std::string | getAnswer (void) |
returns the answer string More... | |
void | setCLS (void) |
command to clear the interface of the device More... | |
void | setESE (int _weight) |
sets the Standard Event Status register More... | |
void | getESE (void) |
gets the configuration of status reports in the event status register More... | |
void | getESR (void) |
gets the standard event status register More... | |
void | getIDN (void) |
gets the identification of the device More... | |
void | setOPC (void) |
sets operation complete command More... | |
void | getOPC (void) |
query operation complete. More... | |
void | setRST (void) |
reset the instrument More... | |
void | setSRE (int weight) |
set the status reports in the service request enable register More... | |
void | getSRE (void) |
query the configuration of status reports in the service request enable register More... | |
void | getSTB (void) |
query the status byte More... | |
void | getTST (void) |
enable selftest of the device More... | |
void | autoscale () |
evaluates all the input signals and sets the correct conditions to display all of the active signals More... | |
void | setChannelProbe (int channel, double attenuation) |
Sets the probe attenuation factor for the selected channel. More... | |
void | setChannelRange (int channel, double verticalRange) |
Sets the full scale vertical range in volts. More... | |
void | setChannelOffset (int channel, double offset) |
sets the voltage or vertical value represented at center screen for the selected function. More... | |
void | setTimeRange (double horizontalRange) |
Sets the full scale horizontal time in seconds. More... | |
void | setTimeReference (std::string reference) |
void | setTimeDelay (double timeDelay) |
sets the main time base delay. More... | |
void | setTriggerLevel (double triggerLevel) |
sets the main trigger level. More... | |
void | digitize (int channel) |
void | setAcquireMode (std::string mode) |
void | setAcquireComplete (int percentage) |
void | setTriggerSource (std::string source) |
void | setTriggerMode (std::string mode) |
void | setTriggerSlope (std::string slope) |
void | getWaveform () |
void | getWavePreamble (int channel, int points, std::string type) |
void | getTriggerSource () |
void | getTriggerLevel () |
void | getTriggerMode () |
void | getTriggerSlope () |
void | getTimeDelay () |
void | getTimeRange () |
void | getChannelRange (int channel) |
void | getChannelVoltagePTP (int channel) |
void | getChannelVoltageAverage (int channel) |
void | getChannelOffset (int channel) |
void | getTimeReference () |
AgilentOsci6k () | |
standard constructor for this class. More... | |
AgilentOsci6k (std::string dev, bool create) | |
constructor to set the device adress and create connection on demand More... | |
virtual | ~AgilentOsci6k () |
standard destructor ( slightly modified to close the port also ) More... | |
void | createChatLine (const std::string &conConfig) |
this function creates the chatline and starts the connection with the oscilloscope. More... | |
void | createChatLine (void) |
creates the chatline with m_IpInfo More... | |
void | closeChatLine (void) |
this function closes the chatline and ends the connection to the Device More... | |
std::string | getAnswer (void) |
returns the answer string More... | |
void | setCLS (void) |
command to clear the interface of the device More... | |
void | setESE (int _weight) |
sets the Standard Event Status register More... | |
void | getESE (void) |
gets the configuration of status reports in the event status register More... | |
void | getESR (void) |
gets the standard event status register More... | |
void | getIDN (void) |
gets the identification of the device More... | |
void | setOPC (void) |
sets operation complete command More... | |
void | getOPC (void) |
query operation complete. More... | |
void | setRST (void) |
reset the instrument More... | |
void | setSRE (int weight) |
set the status reports in the service request enable register More... | |
void | getSRE (void) |
query the configuration of status reports in the service request enable register More... | |
void | getSTB (void) |
query the status byte More... | |
void | getTST (void) |
enable selftest of the device More... | |
void | autoscale () |
evaluates all the input signals and sets the correct conditions to display all of the active signals More... | |
void | setChannelProbe (int channel, double attenuation) |
Sets the probe attenuation factor for the selected channel. More... | |
void | setChannelRange (int channel, double verticalRange) |
Sets the full scale vertical range in volts. More... | |
void | setChannelOffset (int channel, double offset) |
sets the voltage or vertical value represented at center screen for the selected function. More... | |
void | setTimeRange (double horizontalRange) |
Sets the full scale horizontal time in seconds. More... | |
void | setTimeReference (std::string reference) |
void | setTimeDelay (double timeDelay) |
sets the main time base delay. More... | |
void | setTriggerLevel (double triggerLevel) |
sets the main trigger level. More... | |
void | digitize (int channel) |
void | setAcquireMode (std::string mode) |
void | setAcquireComplete (int percentage) |
void | setTriggerSource (std::string source) |
void | setTriggerMode (std::string mode) |
void | setTriggerSlope (std::string slope) |
void | getWaveform () |
void | getWavePreamble (int channel, int points, std::string type) |
void | getTriggerSource () |
void | getTriggerLevel () |
void | getTriggerMode () |
void | getTriggerSlope () |
void | getTimeDelay () |
void | getTimeRange () |
void | getChannelRange (int channel) |
void | getChannelVoltagePTP (int channel) |
void | getChannelVoltageAverage (int channel) |
void | getChannelOffset (int channel) |
void | getTimeReference () |
Protected Member Functions | |
int | sendMsg (const std::string &cmd) |
this function sends a specific command to the device More... | |
void | readMsg (std::string &rcv) |
this function reads the answer from the device More... | |
int | sendMsg (const std::string &cmd) |
this function sends a specific command to the device More... | |
void | readMsg (std::string &rcv) |
this function reads the answer from the device More... | |
Private Member Functions | |
void | setInfo (std::string info) |
this function is used to set the m_IpInfo variable to a specific string More... | |
void | readEcho () |
read the echo from the oscilloscope More... | |
void | setInfo (std::string info) |
this function is used to set the m_IpInfo variable to a specific string More... | |
void | readEcho () |
read the echo from the oscilloscope More... | |
Private Attributes | |
Nice::ChatLine | m_chat |
this is the chatline that is used to comunicate with the device More... | |
std::string | m_IpInfo |
this string contains the connection informations (ip adress, port) to build the chatLine More... | |
bool | m_isConnected |
this boolean indicates if there is an active connection to a device More... | |
std::string | m_answer |
this string contains the latest answer from the device More... | |
std::string | m_term |
this string contains the current terminators for the sending of the commands More... | |
The class AgilentOsci6k provides all functions to create a connection to the oscilloscope and send and recieve specific commands.
Communication and connection is done by Chatline().
AgilentOsci6k::AgilentOsci6k | ( | ) |
standard constructor for this class.
It creates the command list.
AgilentOsci6k::AgilentOsci6k | ( | std::string | dev, |
bool | create | ||
) |
constructor to set the device adress and create connection on demand
dev | adress of the device |
create | true if a connection should be created at once |
|
virtual |
standard destructor ( slightly modified to close the port also )
Basda::osci::AgilentOsci6k::AgilentOsci6k | ( | ) |
standard constructor for this class.
It creates the command list.
Basda::osci::AgilentOsci6k::AgilentOsci6k | ( | std::string | dev, |
bool | create | ||
) |
constructor to set the device adress and create connection on demand
dev | adress of the device |
create | true if a connection should be created at once |
|
virtual |
standard destructor ( slightly modified to close the port also )
void AgilentOsci6k::autoscale | ( | ) |
evaluates all the input signals and sets the correct conditions to display all of the active signals
void Basda::osci::AgilentOsci6k::autoscale | ( | ) |
evaluates all the input signals and sets the correct conditions to display all of the active signals
void AgilentOsci6k::closeChatLine | ( | void | ) |
this function closes the chatline and ends the connection to the Device
void Basda::osci::AgilentOsci6k::closeChatLine | ( | void | ) |
this function closes the chatline and ends the connection to the Device
void AgilentOsci6k::createChatLine | ( | const std::string & | conConfig | ) |
this function creates the chatline and starts the connection with the oscilloscope.
conConfig | configuration and identification needed by chatline |
void Basda::osci::AgilentOsci6k::createChatLine | ( | const std::string & | conConfig | ) |
this function creates the chatline and starts the connection with the oscilloscope.
conConfig | configuration and identification needed by chatline |
void AgilentOsci6k::createChatLine | ( | void | ) |
creates the chatline with m_IpInfo
void Basda::osci::AgilentOsci6k::createChatLine | ( | void | ) |
creates the chatline with m_IpInfo
void Basda::osci::AgilentOsci6k::digitize | ( | int | channel | ) |
void AgilentOsci6k::digitize | ( | int | channel | ) |
|
inline |
returns the answer string
|
inline |
returns the answer string
void AgilentOsci6k::getChannelOffset | ( | int | channel | ) |
void Basda::osci::AgilentOsci6k::getChannelOffset | ( | int | channel | ) |
void AgilentOsci6k::getChannelRange | ( | int | channel | ) |
void Basda::osci::AgilentOsci6k::getChannelRange | ( | int | channel | ) |
void AgilentOsci6k::getChannelVoltageAverage | ( | int | channel | ) |
void Basda::osci::AgilentOsci6k::getChannelVoltageAverage | ( | int | channel | ) |
void Basda::osci::AgilentOsci6k::getChannelVoltagePTP | ( | int | channel | ) |
void AgilentOsci6k::getChannelVoltagePTP | ( | int | channel | ) |
void Basda::osci::AgilentOsci6k::getESE | ( | void | ) |
gets the configuration of status reports in the event status register
void AgilentOsci6k::getESE | ( | void | ) |
gets the configuration of status reports in the event status register
void AgilentOsci6k::getESR | ( | void | ) |
gets the standard event status register
void Basda::osci::AgilentOsci6k::getESR | ( | void | ) |
gets the standard event status register
void AgilentOsci6k::getIDN | ( | void | ) |
gets the identification of the device
void Basda::osci::AgilentOsci6k::getIDN | ( | void | ) |
gets the identification of the device
void AgilentOsci6k::getOPC | ( | void | ) |
query operation complete.
void Basda::osci::AgilentOsci6k::getOPC | ( | void | ) |
query operation complete.
void AgilentOsci6k::getSRE | ( | void | ) |
query the configuration of status reports in the service request enable register
void Basda::osci::AgilentOsci6k::getSRE | ( | void | ) |
query the configuration of status reports in the service request enable register
void AgilentOsci6k::getSTB | ( | void | ) |
query the status byte
void Basda::osci::AgilentOsci6k::getSTB | ( | void | ) |
query the status byte
void AgilentOsci6k::getTimeDelay | ( | ) |
void Basda::osci::AgilentOsci6k::getTimeDelay | ( | ) |
void AgilentOsci6k::getTimeRange | ( | ) |
void Basda::osci::AgilentOsci6k::getTimeRange | ( | ) |
void Basda::osci::AgilentOsci6k::getTimeReference | ( | ) |
void AgilentOsci6k::getTimeReference | ( | ) |
void AgilentOsci6k::getTriggerLevel | ( | ) |
void Basda::osci::AgilentOsci6k::getTriggerLevel | ( | ) |
void AgilentOsci6k::getTriggerMode | ( | ) |
void Basda::osci::AgilentOsci6k::getTriggerMode | ( | ) |
void AgilentOsci6k::getTriggerSlope | ( | ) |
void Basda::osci::AgilentOsci6k::getTriggerSlope | ( | ) |
void AgilentOsci6k::getTriggerSource | ( | ) |
void Basda::osci::AgilentOsci6k::getTriggerSource | ( | ) |
void AgilentOsci6k::getTST | ( | void | ) |
enable selftest of the device
void Basda::osci::AgilentOsci6k::getTST | ( | void | ) |
enable selftest of the device
void Basda::osci::AgilentOsci6k::getWaveform | ( | ) |
void AgilentOsci6k::getWaveform | ( | ) |
void AgilentOsci6k::getWavePreamble | ( | int | channel, |
int | points, | ||
std::string | type | ||
) |
void Basda::osci::AgilentOsci6k::getWavePreamble | ( | int | channel, |
int | points, | ||
std::string | type | ||
) |
|
private |
read the echo from the oscilloscope
|
private |
read the echo from the oscilloscope
|
protected |
this function reads the answer from the device
rcv | answer from the device |
|
protected |
this function reads the answer from the device
rcv | answer from the device |
|
protected |
this function sends a specific command to the device
cmd | command to send |
|
protected |
this function sends a specific command to the device
cmd | command to send |
void Basda::osci::AgilentOsci6k::setAcquireComplete | ( | int | percentage | ) |
void AgilentOsci6k::setAcquireComplete | ( | int | percentage | ) |
void Basda::osci::AgilentOsci6k::setAcquireMode | ( | std::string | mode | ) |
void AgilentOsci6k::setAcquireMode | ( | std::string | mode | ) |
void AgilentOsci6k::setChannelOffset | ( | int | channel, |
double | offset | ||
) |
sets the voltage or vertical value represented at center screen for the selected function.
The range of legal values is generally +/- 10 times the current scale of the selected function
channel | channel |
offset | voltage represented at center of screen. |
void Basda::osci::AgilentOsci6k::setChannelOffset | ( | int | channel, |
double | offset | ||
) |
sets the voltage or vertical value represented at center screen for the selected function.
The range of legal values is generally +/- 10 times the current scale of the selected function
channel | channel |
offset | voltage represented at center of screen. |
void Basda::osci::AgilentOsci6k::setChannelProbe | ( | int | channel, |
double | attenuation | ||
) |
Sets the probe attenuation factor for the selected channel.
The probe attenuation factor may be from 0.1 to 1000.
channel | channel |
attenuation | probe attenuation |
void AgilentOsci6k::setChannelProbe | ( | int | channel, |
double | attenuation | ||
) |
Sets the probe attenuation factor for the selected channel.
The probe attenuation factor may be from 0.1 to 1000.
channel | channel |
attenuation | probe attenuation |
void Basda::osci::AgilentOsci6k::setChannelRange | ( | int | channel, |
double | verticalRange | ||
) |
Sets the full scale vertical range in volts.
The range value is eight times the volts per division.
channel | channel |
verticalRange | full vertical scale |
void AgilentOsci6k::setChannelRange | ( | int | channel, |
double | verticalRange | ||
) |
Sets the full scale vertical range in volts.
The range value is eight times the volts per division.
channel | channel |
verticalRange | full vertical scale |
void AgilentOsci6k::setCLS | ( | void | ) |
command to clear the interface of the device
void Basda::osci::AgilentOsci6k::setCLS | ( | void | ) |
command to clear the interface of the device
void Basda::osci::AgilentOsci6k::setESE | ( | int | _weight | ) |
sets the Standard Event Status register
_weight | bit weighting |
void AgilentOsci6k::setESE | ( | int | _weight | ) |
sets the Standard Event Status register
_weight | bit weighting |
|
private |
this function is used to set the m_IpInfo variable to a specific string
|
private |
this function is used to set the m_IpInfo variable to a specific string
void AgilentOsci6k::setOPC | ( | void | ) |
sets operation complete command
void Basda::osci::AgilentOsci6k::setOPC | ( | void | ) |
sets operation complete command
void AgilentOsci6k::setRST | ( | void | ) |
reset the instrument
void Basda::osci::AgilentOsci6k::setRST | ( | void | ) |
reset the instrument
void AgilentOsci6k::setSRE | ( | int | weight | ) |
set the status reports in the service request enable register
_weight | bit weighting |
void Basda::osci::AgilentOsci6k::setSRE | ( | int | weight | ) |
set the status reports in the service request enable register
_weight | bit weighting |
void AgilentOsci6k::setTimeDelay | ( | double | timeDelay | ) |
sets the main time base delay.
This delay is the time between the trigger event and the delay reference point on the screen. The delay reference point is set with the :TIMebase:REFerence
timeDelay | main time base delay in second |
void Basda::osci::AgilentOsci6k::setTimeDelay | ( | double | timeDelay | ) |
sets the main time base delay.
This delay is the time between the trigger event and the delay reference point on the screen. The delay reference point is set with the :TIMebase:REFerence
timeDelay | main time base delay in second |
void AgilentOsci6k::setTimeRange | ( | double | horizontalRange | ) |
Sets the full scale horizontal time in seconds.
The range value is ten times the time per division.
horizontalRange | full horizontal scale in seconds |
void Basda::osci::AgilentOsci6k::setTimeRange | ( | double | horizontalRange | ) |
Sets the full scale horizontal time in seconds.
The range value is ten times the time per division.
horizontalRange | full horizontal scale in seconds |
void AgilentOsci6k::setTimeReference | ( | std::string | reference | ) |
void Basda::osci::AgilentOsci6k::setTimeReference | ( | std::string | reference | ) |
void AgilentOsci6k::setTriggerLevel | ( | double | triggerLevel | ) |
sets the main trigger level.
triggerLevel | the trigger level in volts |
void Basda::osci::AgilentOsci6k::setTriggerLevel | ( | double | triggerLevel | ) |
sets the main trigger level.
triggerLevel | the trigger level in volts |
void Basda::osci::AgilentOsci6k::setTriggerMode | ( | std::string | mode | ) |
void AgilentOsci6k::setTriggerMode | ( | std::string | mode | ) |
void Basda::osci::AgilentOsci6k::setTriggerSlope | ( | std::string | slope | ) |
void AgilentOsci6k::setTriggerSlope | ( | std::string | slope | ) |
void Basda::osci::AgilentOsci6k::setTriggerSource | ( | std::string | source | ) |
void AgilentOsci6k::setTriggerSource | ( | std::string | source | ) |
|
private |
this string contains the latest answer from the device
|
private |
this is the chatline that is used to comunicate with the device
|
private |
this string contains the connection informations (ip adress, port) to build the chatLine
|
private |
this boolean indicates if there is an active connection to a device
|
private |
this string contains the current terminators for the sending of the commands