Homepage Demos Overview Downloads Tutorials Reference
Credits

RawCamBehavior Class Reference

#include <RawCamBehavior.h>

Inheritance diagram for RawCamBehavior:

Inheritance graph
[legend]
List of all members.

Detailed Description

Forwards images from camera over wireless.

Definition at line 12 of file RawCamBehavior.h.

Public Member Functions

 RawCamBehavior ()
 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 = 200000
 200000 bytes for use up to 416x320 + 2*208x160 (double res Y, full res UV on ERS-7)


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 writeColor (const FilterBankEvent &fbke)
 writes a color image

bool writeSingleChannel (const FilterBankEvent &fbke)
 writes a single channel

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


Protected Attributes

SocketvisRaw
 socket for sending the image stream

char * packet
 point to the current buffer being prepared to be sent

char * cur
 current location within that buffer

unsigned int avail
 the number of bytes remaining in the buffer


Private Member Functions

 RawCamBehavior (const RawCamBehavior &)
 don't call

RawCamBehavioroperator= (const RawCamBehavior &)
 don't call


Constructor & Destructor Documentation

RawCamBehavior::RawCamBehavior  ) 
 

constructor

Definition at line 11 of file RawCamBehavior.cc.

RawCamBehavior::RawCamBehavior const RawCamBehavior  )  [private]
 

don't call


Member Function Documentation

void RawCamBehavior::closePacket  )  [protected]
 

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

Definition at line 261 of file RawCamBehavior.cc.

Referenced by writeColor(), and writeSingleChannel().

void RawCamBehavior::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 16 of file RawCamBehavior.cc.

void RawCamBehavior::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 RawCamBehavior.cc.

std::string RawCamBehavior::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 RawCamBehavior.h.

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

Identifies the behavior in menus and such.

Implements BehaviorBase.

Definition at line 25 of file RawCamBehavior.h.

bool RawCamBehavior::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 65 of file RawCamBehavior.cc.

Referenced by writeColor(), and writeSingleChannel().

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

don't call

void RawCamBehavior::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 RawCamBehavior.cc.

bool RawCamBehavior::writeColor const FilterBankEvent fbke  )  [protected]
 

writes a color image

Definition at line 104 of file RawCamBehavior.cc.

Referenced by processEvent().

bool RawCamBehavior::writeSingleChannel const FilterBankEvent fbke  )  [protected]
 

writes a single channel

Definition at line 236 of file RawCamBehavior.cc.

Referenced by processEvent().


Member Data Documentation

unsigned int RawCamBehavior::avail [protected]
 

the number of bytes remaining in the buffer

Definition at line 38 of file RawCamBehavior.h.

Referenced by closePacket(), openPacket(), writeColor(), and writeSingleChannel().

char* RawCamBehavior::cur [protected]
 

current location within that buffer

Definition at line 37 of file RawCamBehavior.h.

Referenced by closePacket(), openPacket(), writeColor(), and writeSingleChannel().

char* RawCamBehavior::packet [protected]
 

point to the current buffer being prepared to be sent

Definition at line 36 of file RawCamBehavior.h.

Referenced by closePacket(), and openPacket().

Socket* RawCamBehavior::visRaw [protected]
 

socket for sending the image stream

Definition at line 35 of file RawCamBehavior.h.

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

const unsigned int RawCamBehavior::WIRELESS_BUFFER_SIZE = 200000 [static]
 

200000 bytes for use up to 416x320 + 2*208x160 (double res Y, full res UV on ERS-7)

Definition at line 17 of file RawCamBehavior.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:22 2004 by Doxygen 1.3.4