Skip to content
Snippets Groups Projects
Commit 11f818ac authored by Xavier ELATTAOUI's avatar Xavier ELATTAOUI
Browse files

xavier :

minor change
parent 9d0fa065
Branches
Tags
No related merge requests found
......@@ -16,7 +16,9 @@
#define _SocketLecroy_H
//- necessary includes
#ifdef WIN32
#include <winsock2.h>
#endif
#include "SocketException.h"
......@@ -26,14 +28,14 @@
//
////////////////////////////////////////////////////////////////////
static int hSocket;
static int sTimeout = 15;
static int sWinsockInitFlag = FALSE;
static char sCurrentAddress[256];
static int sConnectedFlag = FALSE;
//static int hSocket;
//static int sTimeout = 15;
//static int sWinsockInitFlag = FALSE;
//static char sCurrentAddress[256];
//static int sConnectedFlag = FALSE;
const int CMD_BUF_LEN = 8192;
static char sCommandBuffer[CMD_BUF_LEN];
//const int CMD_BUF_LEN = 8192;
//static char sCommandBuffer[CMD_BUF_LEN];
//- Structure of the command Header
typedef struct
......@@ -74,11 +76,11 @@ public:
static SocketLecroy* get_instance(void);
static void delete_instance(SocketLecroy*);
void TCP_WriteDevice (char *buf, int length,BOOL eoi_flag) throw (lecroy::LecroyException); //- send a cmd to the device
void TCP_ReadDevice (char *buf, int length, int* nb_byte_received) throw (lecroy::LecroyException); //- read the device replie
void TCP_Connect (char *ip_address) throw (lecroy::LecroyException); //- build TCP/IP connection
void TCP_Disconnect (void) throw (lecroy::LecroyException); //- disconnect the device
void TCP_ClearDevice (void) throw (lecroy::LecroyException); //- disconnect and reconnect the device
void TCP_WriteDevice (char *buf, int length,bool eoi_flag) throw (lecroy::SocketException); //- send a cmd to the device
void TCP_ReadDevice (char *buf, int length, int* nb_byte_received) throw (lecroy::SocketException); //- read the device replie
void TCP_Connect (char *ip_address) throw (lecroy::SocketException); //- build TCP/IP connection
void TCP_Disconnect (void) throw (lecroy::SocketException); //- disconnect the device
void TCP_ClearDevice (void) throw (lecroy::SocketException); //- disconnect and reconnect the device
};
......
......@@ -15,8 +15,8 @@
#define _WaveForm_data_H
#include <string>
#include "..\include\WaveformException.h"
#include "..\include\Xstring.h"
#include "WaveformException.h"
#include <Xstring.h>
const long MAX_WAVEFORM_DATA_LENGTH = 150000;
......@@ -113,12 +113,12 @@ public:
//- DTOR
~WaveForm_data();
std::string get_channel_name (void) throw (lecroy::LecroyException);
std::string get_channel_name (void) throw (lecroy::WaveformException);
void set_channel_name (std::string);
WAVEDESC_BLOCK *get_wavedesc_descriptor (void) throw (lecroy::WaveformException);
void get_waveform_data (void) throw (lecroy::LecroyException); //- acquire the waveform data from the scope
short* get_raw_waveform_data (void) throw (lecroy::LecroyException); //- return the ptr on sh_raw_waveform_data
double* get_vertical_scaled_waveform_data (void) throw (lecroy::LecroyException);
void get_waveform_data (void) throw (lecroy::WaveformException); //- acquire the waveform data from the scope
short* get_raw_waveform_data (void) throw (lecroy::WaveformException); //- return the ptr on sh_raw_waveform_data
double* get_vertical_scaled_waveform_data (void) throw (lecroy::WaveformException);
std::string get_trigger_time_value (void);
......
......@@ -18,7 +18,7 @@
// ============================================================================
// DEPENDENCIES
// ============================================================================
#include "..\include\LecroyException.h"
#include "LecroyException.h"
namespace lecroy {
......
......@@ -14,7 +14,7 @@
// ============================================================================
// DEPENDENCIES
#include "..\include\LecroyException.h"
#include "LecroyException.h"
namespace lecroy {
......
......@@ -80,7 +80,7 @@ SocketLecroy::~SocketLecroy()
//- Build the connection
void SocketLecroy::TCP_Connect(char *ip_address) throw (lecroy::LecroyException)
void SocketLecroy::TCP_Connect(char *ip_address) throw (lecroy::SocketException)
{
struct sockaddr_in serverAddr;
int result;
......@@ -182,7 +182,7 @@ char tmpStr[256];
//- DisconnectFromScope: disconnect from a network device
void SocketLecroy::TCP_Disconnect(void)
void SocketLecroy::TCP_Disconnect(void) throw (lecroy::SocketException)
{
if (sConnectedFlag)
......@@ -194,7 +194,7 @@ void SocketLecroy::TCP_Disconnect(void)
}
//- Clear a connection
void SocketLecroy::TCP_ClearDevice(void) throw (lecroy::LecroyException)
void SocketLecroy::TCP_ClearDevice(void) throw (lecroy::SocketException)
{
if ( !sConnectedFlag )
......@@ -208,7 +208,7 @@ void SocketLecroy::TCP_ClearDevice(void) throw (lecroy::LecroyException)
}
//- Send commands to the remote device
void SocketLecroy::TCP_WriteDevice(char *buf, int len, bool eoi_flag) throw (lecroy::LecroyException)
void SocketLecroy::TCP_WriteDevice(char *buf, int len, bool eoi_flag) throw (lecroy::SocketException)
{
TCP_HEADER header;
......@@ -265,7 +265,7 @@ char *idxPtr;
}
//- Read the device answer
void SocketLecroy::TCP_ReadDevice(char *buf, int len, int *recv_count) throw (lecroy::LecroyException)
void SocketLecroy::TCP_ReadDevice(char *buf, int len, int *recv_count) throw (lecroy::SocketException)
{
TCP_HEADER header;
......
......@@ -15,7 +15,7 @@
// ============================================================================
// DEPENDENCIES
// ============================================================================
#include "..\include\SocketException.h"
#include "SocketException.h"
namespace lecroy {
......
......@@ -51,7 +51,7 @@ SocketLecroy::~SocketLecroy()
}
//- Build the connection
void SocketLecroy::TCP_Connect(char *ip_address) throw (lecroy::LecroyException)
void SocketLecroy::TCP_Connect(char *ip_address) throw (lecroy::SocketException)
{
SOCKADDR_IN serverAddr;
......@@ -163,7 +163,7 @@ void SocketLecroy::TCP_Disconnect(void)
}
//- Clear a connection
void SocketLecroy::TCP_ClearDevice(void) throw (lecroy::LecroyException)
void SocketLecroy::TCP_ClearDevice(void) throw (lecroy::SocketException)
{
if (sConnectedFlag != TRUE)
......@@ -177,7 +177,7 @@ void SocketLecroy::TCP_ClearDevice(void) throw (lecroy::LecroyException)
}
//- Send commands to the remote device
void SocketLecroy::TCP_WriteDevice(char *buf, int len, BOOL eoi_flag) throw (lecroy::LecroyException)
void SocketLecroy::TCP_WriteDevice(char *buf, int len, BOOL eoi_flag) throw (lecroy::SocketException)
{
TCP_HEADER header;
......@@ -234,7 +234,7 @@ char *idxPtr;
}
//- Read the device answer
void SocketLecroy::TCP_ReadDevice(char *buf, int len, int *recv_count) throw (lecroy::LecroyException)
void SocketLecroy::TCP_ReadDevice(char *buf, int len, int *recv_count) throw (lecroy::SocketException)
{
TCP_HEADER header;
......
......@@ -80,7 +80,7 @@ WAVEDESC_BLOCK* WaveForm_data::get_wavedesc_descriptor( ) throw (lecroy::Wavefor
}
//- Method to return the raw data of the acquired waveform
void WaveForm_data::get_waveform_data( ) throw (lecroy::LecroyException)
void WaveForm_data::get_waveform_data( ) throw (lecroy::WaveformException)
{
std::string cmd("");
char* cmdStr = 0;
......@@ -202,7 +202,7 @@ short OFFSET_STRUCT = 0;
}
//- return the ptr on sh_raw_waveform_data ( = the waveform data acquired)
short* WaveForm_data::get_raw_waveform_data () throw (lecroy::LecroyException)
short* WaveForm_data::get_raw_waveform_data () throw (lecroy::WaveformException)
{
if(sh_raw_waveform_data)
return sh_raw_waveform_data;
......@@ -215,7 +215,7 @@ short* WaveForm_data::get_raw_waveform_data () throw (lecroy::LecroyException)
//- Method to return the scaled data of the acquired waveform
double* WaveForm_data::get_vertical_scaled_waveform_data( ) throw (lecroy::LecroyException)
double* WaveForm_data::get_vertical_scaled_waveform_data( ) throw (lecroy::WaveformException)
{
if(vertical_scaled_waveform_data)
......
......@@ -15,7 +15,7 @@
// ============================================================================
// DEPENDENCIES
// ============================================================================
#include "..\include\WaveformException.h"
#include "WaveformException.h"
namespace lecroy {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment