ostinato/client/streamconfigdialog.h
Srivats P. 2ec7fb30c2 Protocol Framework basic code in place now. Cleanup pending.
- New Classes:
  o ProtocolManager - singleton with which all protocols register
  o ProtocolCollection - Aggregates all registered protocols; exports methods to work on all protocols
  o StreamBase - aggregates ProtocolCollection with Stream Core and Control; the client/server side stream classes now derive from StreamBase leading to major reduction in their code (more cleanup pending)
- AbstractProtocol now supports the additional methods
  o createInstance()
  o protocolFrameSize()
  o protocolFrameOffset(), protocolFramePayloadSize()
  o protocolId(), payloadProtocolId()
  o protocolFrameCksum(), protocolFramePayloadCksum()
  0 constructor takes an extra param - frameProtoList
- Specific protocols - eth2, llc, snap, ip4, udp, tcp now return length, protocol id and cksums correctly (tcp/udp cksum pending)
- StreamConfigDialog - protocol controls for length, cksum and protocolid are automatically updated (not fully working yet)
2009-05-10 06:27:17 +00:00

71 lines
1.5 KiB
C++

#ifndef _STREAM_CONFIG_DIALOG_H
#define _STREAM_CONFIG_DIALOG_H
#include <QDialog>
#include "ui_streamconfigdialog.h"
#include "port.h"
#include "stream.h"
#include "packetmodel.h"
#include "modeltest.h"
#define MAX_MAC_ITER_COUNT 256
#define MIN_PKT_LEN 64
#define MAX_PKT_LEN 1522
/*
** TODO
** \todo Improve HexStr handling
**
*/
class StreamConfigDialog : public QDialog, public Ui::StreamConfigDialog
{
Q_OBJECT
public:
StreamConfigDialog(Port &port, uint streamIndex, QWidget *parent = 0);
~StreamConfigDialog();
private:
//QList<Stream> *mpStreamList;
QButtonGroup *bgFrameType;
QButtonGroup *bgL3Proto;
QButtonGroup *bgL4Proto;
Port& mPort;
uint mCurrentStreamIndex;
Stream *mpStream;
QList<int> mSelectedProtocols;
PacketModel *mpPacketModel;
ModelTest *mpPacketModelTester;
// The following static variables are used to track the "selected" tab
// for the various tab widgets so that it can be restored when the dialog
// is opened the next time
static int lastTopLevelTabIndex;
static int lastProtoTabIndex;
void setupUiExtra();
void LoadCurrentStream();
void StoreCurrentStream(Stream *pStream);
private slots:
void on_cmbPktLenMode_currentIndexChanged(QString mode);
void on_pbPrev_clicked();
void on_pbNext_clicked();
void updateSelectedProtocols();
void on_twTopLevel_currentChanged(int index);
void on_twProto_currentChanged(int index);
void update_NumPacketsAndNumBursts();
void on_pbOk_clicked();
};
#endif