Homepage Demos Overview Downloads Tutorials Reference
Credits

SegCamBehavior Class Reference

#include <SegCamBehavior.h>

Inheritance diagram for SegCamBehavior:

Inheritance graph
[legend]
List of all members.

Detailed Description

Forwards segmented images from camera over wireless.

Definition at line 12 of file SegCamBehavior.h.

Public Member Functions

 SegCamBehavior ()
 constructor

virtual void DoStart ()
 By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.

virtual void DoStop ()
 By default, subtracts from the reference counter, and deletes if zero; Note you should still call this when you override this; Warning call this at the end of your DoStop(), not beginning (it might delete this ).

virtual void processEvent (const EventBase &e)
 By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.

virtual std::string getName () const
 Identifies the behavior in menus and such.


Static Public Member Functions

std::string getClassDescription ()
 Gives a short description of what this class of behaviors does... you should override this (but don't have to).


Static Public Attributes

const unsigned int WIRELESS_BUFFER_SIZE = 85000
 85000 bytes for use up to 416x320 pixels / 8 min expected runs * 5 bytes per run + some padding


Protected Member Functions

bool openPacket (FilterBankGenerator &fbkgen, unsigned int time, unsigned int layer)
 opens a new packet, writes header info; returns true if open, false if otherwise open (check cur==NULL for error)

bool writeRLE (const FilterBankEvent &fbke)
 writes a color image

bool writeSeg (const FilterBankEvent &fbke)
 writes a color image

void closePacket ()
 closes and sends a packet, does nothing if no packet open


Protected Attributes

SocketvisRLE
 socket to send image stream over

char * packet
 buffer being filled out to be sent

char * cur
 current location in packet

unsigned int avail
 number of bytes remaining in packet


Private Member Functions

 SegCamBehavior (const SegCamBehavior &)
 don't call

SegCamBehavioroperator= (const SegCamBehavior &)
 don't call


Constructor & Destructor Documentation

SegCamBehavior::SegCamBehavior  ) 
 

constructor

Definition at line 11 of file SegCamBehavior.cc.

SegCamBehavior::SegCamBehavior const SegCamBehavior  )  [private]
 

don't call


Member Function Documentation

void SegCamBehavior::closePacket  )  [protected]
 

closes and sends a packet, does nothing if no packet open

Definition at line 147 of file SegCamBehavior.cc.

Referenced by writeRLE(), and writeSeg().

void SegCamBehavior::DoStart  )  [virtual]
 

By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.

Reimplemented from BehaviorBase.

Definition at line 17 of file SegCamBehavior.cc.

void SegCamBehavior::DoStop  )  [virtual]
 

By default, subtracts from the reference counter, and deletes if zero; Note you should still call this when you override this; Warning call this at the end of your DoStop(), not beginning (it might delete this ).

Reimplemented from BehaviorBase.

Definition at line 33 of file SegCamBehavior.cc.

std::string SegCamBehavior::getClassDescription  )  [inline, static]
 

Gives a short description of what this class of behaviors does... you should override this (but don't have to).

Reimplemented from BehaviorBase.

Definition at line 27 of file SegCamBehavior.h.

virtual std::string SegCamBehavior::getName  )  const [inline, virtual]
 

Identifies the behavior in menus and such.

Implements BehaviorBase.

Definition at line 25 of file SegCamBehavior.h.

bool SegCamBehavior::openPacket FilterBankGenerator fbkgen,
unsigned int  time,
unsigned int  layer
[protected]
 

opens a new packet, writes header info; returns true if open, false if otherwise open (check cur==NULL for error)

Definition at line 61 of file SegCamBehavior.cc.

Referenced by writeRLE(), and writeSeg().

SegCamBehavior& SegCamBehavior::operator= const SegCamBehavior  )  [private]
 

don't call

void SegCamBehavior::processEvent const EventBase e  )  [virtual]
 

By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.

Reimplemented from BehaviorBase.

Definition at line 45 of file SegCamBehavior.cc.

bool SegCamBehavior::writeRLE const FilterBankEvent fbke  )  [protected]
 

writes a color image

Definition at line 100 of file SegCamBehavior.cc.

Referenced by processEvent().

bool SegCamBehavior::writeSeg const FilterBankEvent fbke  )  [protected]
 

writes a color image

Definition at line 128 of file SegCamBehavior.cc.

Referenced by processEvent().


Member Data Documentation

unsigned int SegCamBehavior::avail [protected]
 

number of bytes remaining in packet

Definition at line 38 of file SegCamBehavior.h.

Referenced by closePacket(), openPacket(), writeRLE(), and writeSeg().

char* SegCamBehavior::cur [protected]
 

current location in packet

Definition at line 37 of file SegCamBehavior.h.

Referenced by closePacket(), openPacket(), writeRLE(), and writeSeg().

char* SegCamBehavior::packet [protected]
 

buffer being filled out to be sent

Definition at line 36 of file SegCamBehavior.h.

Referenced by closePacket(), and openPacket().

Socket* SegCamBehavior::visRLE [protected]
 

socket to send image stream over

Definition at line 35 of file SegCamBehavior.h.

Referenced by closePacket(), DoStart(), DoStop(), openPacket(), and processEvent().

const unsigned int SegCamBehavior::WIRELESS_BUFFER_SIZE = 85000 [static]
 

85000 bytes for use up to 416x320 pixels / 8 min expected runs * 5 bytes per run + some padding

Definition at line 17 of file SegCamBehavior.h.

Referenced by DoStart(), and openPacket().


The documentation for this class was generated from the following files:
Tekkotsu v2.0
Generated Wed Jan 21 03:23:25 2004 by Doxygen 1.3.4