cornelluniversity::PacketExplorer Class Reference

Creates and manages a sub-class of wxListCtrl that is specifically configured to display dissections of vetsim serial packets. Currently, the display is limited to row-based interpretations of the data carried; nothing is yet done to examine data for protocol correctedness. Since this is a sub-class of wxListCtrl which has a ton of its own members, I've prefixed all PacketExplorer members with PE. More...

#include <pcktexplr.h>

List of all members.

Public Member Functions

 PacketExplorer (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_ICON, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListCtrlNameStr)
 constructor
virtual ~PacketExplorer (void)
 frees the rows_ vector if it is currently allocated. Since the control is drawn with data discerned through refrences, we also clear the control before deleting the dynamic memory.
void PESetColumnWidths (int c1, int c2, int c3)
 The PE window needs to display three columns of data, this routine allows you to set the widths of those columns.
void PEDisplayHeader (int colwidth_1, int colwidth_2, int colwidth_3)
 A thin wrapper of the PEDisplayHeader(void) routine allowing you to express column widths prior to actually invoking the display.
void PEDisplayHeader (void)
 inserts three columns into the wxListCtrl; setting labels to currently hard-coded values for use with vetsim proitocol packets. Widths are also established at this point based on the values of the appropriate memebers.
void PEDisplayPacket (cornelluniversity::vetserial::base_command *bc)
 a thin wrapper of PEDisplayPacket() allowing you to submit a vetsim serial base_command pointer (convenience wrapper).
void PEDisplayPacket (const unsigned char *pkt, unsigned int nbytes)
 does the heavy lifting of displaying a packet on screen. Iterates through the packets byte-by-byte, translating the numerical data into string representations that are somewhat more human readable (corresponds to packet object consts). previously displayed data is removed before adding new rows.

Classes

struct  PERow
 A data structure representation of wxListCtrl row. More...


Detailed Description

Creates and manages a sub-class of wxListCtrl that is specifically configured to display dissections of vetsim serial packets. Currently, the display is limited to row-based interpretations of the data carried; nothing is yet done to examine data for protocol correctedness. Since this is a sub-class of wxListCtrl which has a ton of its own members, I've prefixed all PacketExplorer members with PE.


Constructor & Destructor Documentation

cornelluniversity::PacketExplorer::PacketExplorer ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxLC_ICON,
const wxValidator &  validator = wxDefaultValidator,
const wxString &  name = wxListCtrlNameStr 
) [inline]

constructor

Parameters:
parent - pointer to wxWindow parent object (if there is one)
id - enumerated wxWindowID value for identifying the window/control
pos - wxPoint refrence indicating starting position of the window/control
size - wxSize refrence indicating the starting size of the window/control
style - long int value of OR'd style flags
validator - refrence to the controls wxValidator object
name - wxString name of the control

virtual cornelluniversity::PacketExplorer::~PacketExplorer ( void   )  [virtual]

frees the rows_ vector if it is currently allocated. Since the control is drawn with data discerned through refrences, we also clear the control before deleting the dynamic memory.


Member Function Documentation

void cornelluniversity::PacketExplorer::PEDisplayHeader ( void   ) 

inserts three columns into the wxListCtrl; setting labels to currently hard-coded values for use with vetsim proitocol packets. Widths are also established at this point based on the values of the appropriate memebers.

void cornelluniversity::PacketExplorer::PEDisplayHeader ( int  colwidth_1,
int  colwidth_2,
int  colwidth_3 
)

A thin wrapper of the PEDisplayHeader(void) routine allowing you to express column widths prior to actually invoking the display.

Parameters:
colwidth_1 - int value of the first columns width expressed in pixels
colwidth_2 - int value of the second columns width expressed in pixels
colwidth_3 - int value of the third columns width expressed in pixels
See also:
void PEDisplayHeader( void )

void cornelluniversity::PacketExplorer::PEDisplayPacket ( const unsigned char *  pkt,
unsigned int  nbytes 
)

does the heavy lifting of displaying a packet on screen. Iterates through the packets byte-by-byte, translating the numerical data into string representations that are somewhat more human readable (corresponds to packet object consts). previously displayed data is removed before adding new rows.

Parameters:
pkt - pointer to an unsigned char buffer representing a vetsim serial protocol packet
nbytes - unsigned int count of the number of bytes in the pkt buffer

void cornelluniversity::PacketExplorer::PEDisplayPacket ( cornelluniversity::vetserial::base_command bc  )  [inline]

a thin wrapper of PEDisplayPacket() allowing you to submit a vetsim serial base_command pointer (convenience wrapper).

Parameters:
bc - pointer to cornelluniversity::vetserial::base_command object

void cornelluniversity::PacketExplorer::PESetColumnWidths ( int  c1,
int  c2,
int  c3 
) [inline]

The PE window needs to display three columns of data, this routine allows you to set the widths of those columns.

Parameters:
c1 - int value of the first columns width expressed in pixels
c2 - int value of the second columns width expressed in pixels
c3 - int value of the third columns width expressed in pixels


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 10:03:36 2012 for Vet Serial Interfaces (w/ proof-of-concept application) by  doxygen 1.4.7