| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
RawCamBehavior Class Reference#include <RawCamBehavior.h>
Inheritance diagram for RawCamBehavior: ![]() Detailed DescriptionForwards images from camera over wireless.The format used for serialization is basically defined by the subclass of FilterBankGenerator being used. I suggest looking at that classes's documentation to determine the format used. (Generally either RawCameraGenerator or JPEGGenerator) However, RawCamBehavior will add a few fields at the beginning of each packet to assist in processing the image stream. I emphasize: beginning of each Vision packet, before the FilterBankGenerator header.
Alternatively, RawCameraGenerator may send a "Close Connection" packet when the server is shutting down. This is to help UDP connections, which otherwise wouldn't realize that they need to start trying to reconnect.
This is exactly the same protocol that is followed by the SegCamBehavior as well - the same code can parse either stream. This is a binary protocol -- the fields listed indicate binary values in the AIBO's byte order (little endian). Strings are encoded using the LoadSave::encode(char*,unsigned int, unsigned int) method.
Definition at line 41 of file RawCamBehavior.h.
Constructor & Destructor Documentation
don't call
Member Function Documentation
closes and sends a packet, does nothing if no packet open
Definition at line 315 of file RawCamBehavior.cc. Referenced by processEvent(), writeColor(), and writeSingleChannel().
tear down the server socket (visRaw)
Definition at line 129 of file RawCamBehavior.cc. Referenced by DoStop(), and processEvent().
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 20 of file RawCamBehavior.cc.
By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might
Reimplemented from BehaviorBase. Definition at line 29 of file RawCamBehavior.cc. Referenced by processEvent().
Gives a short description of what this class of behaviors does... you should override this (but don't have to). If you do override this, also consider overriding getDescription() to return it Reimplemented from CameraStreamBehavior. Definition at line 58 of file RawCamBehavior.h. Referenced by getDescription().
Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis). By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~getClassDescription(), because static functions can't be virtual in C++ (doh!) This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so. Reimplemented from CameraStreamBehavior. Definition at line 63 of file RawCamBehavior.h.
returns the layer which will be used out of the source, based on current config settings (i.e. compression, skip, etc)
Definition at line 93 of file RawCamBehavior.cc. Referenced by getSourceULayer(), getSourceVLayer(), and getSourceYLayer().
returns the layer which will be used out of the source, based on current config settings (i.e. compression, skip, etc)
Definition at line 121 of file RawCamBehavior.cc.
returns the layer which will be used out of the source, based on current config settings (i.e. compression, skip, etc)
Definition at line 124 of file RawCamBehavior.cc.
returns the layer which will be used out of the source, based on current config settings (i.e. compression, skip, etc)
Definition at line 118 of file RawCamBehavior.cc.
function for network data to be sent to -- forwards to theOne's receiveData()
Definition at line 73 of file RawCamBehavior.h. Referenced by setupServer().
opens a new packet, writes header info; returns true if open, false if otherwise open (check cur==NULL for error) see the class documentation for RawCamBehavior for the protocol documentation Definition at line 167 of file RawCamBehavior.cc. Referenced by writeColor(), and writeSingleChannel().
don't call
By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.
Reimplemented from CameraStreamBehavior. Definition at line 36 of file RawCamBehavior.cc.
sends a packet signaling the server is closing the connection (good for UDP connections)
Definition at line 331 of file RawCamBehavior.cc. Referenced by closeServer().
setup the server socket (visRaw)
Definition at line 141 of file RawCamBehavior.cc. Referenced by DoStart(), and processEvent().
writes a color image
Definition at line 191 of file RawCamBehavior.cc. Referenced by processEvent().
writes a single channel
Definition at line 290 of file RawCamBehavior.cc. Referenced by processEvent().
Member Data Documentation
the number of bytes remaining in the buffer
Definition at line 91 of file RawCamBehavior.h. Referenced by closePacket(), openPacket(), writeColor(), and writeSingleChannel().
current location within that buffer
Definition at line 90 of file RawCamBehavior.h. Referenced by closePacket(), openPacket(), processEvent(), writeColor(), and writeSingleChannel().
the time that the last event was processed
Reimplemented from CameraStreamBehavior. Definition at line 93 of file RawCamBehavior.h. Referenced by closePacket(), and processEvent().
the buffer size requested from Wireless when the socket was allocated
Definition at line 92 of file RawCamBehavior.h. Referenced by openPacket(), and setupServer().
point to the current buffer being prepared to be sent
Definition at line 89 of file RawCamBehavior.h. Referenced by closePacket(), openPacket(), and processEvent().
200000 bytes for use up to 416x320 + 2*208x160 (double res Y, full res UV on ERS-7)
Definition at line 49 of file RawCamBehavior.h. Referenced by setupServer().
global instance of RawCamBehavior acting as server Definition at line 71 of file RawCamBehavior.h. Referenced by networkCallback(), RawCamBehavior(), and ~RawCamBehavior().
64KB is the max udp packet size
Definition at line 50 of file RawCamBehavior.h. Referenced by setupServer().
socket for sending the image stream
Definition at line 88 of file RawCamBehavior.h. Referenced by closePacket(), closeServer(), openPacket(), processEvent(), sendCloseConnectionPacket(), and setupServer().
The documentation for this class was generated from the following files: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tekkotsu v3.0 |
Generated Wed Oct 4 00:05:11 2006 by Doxygen 1.4.7 |