Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
Socket Class ReferenceTekkotsu wireless Socket class. More...
Inheritance diagram for Socket:
Detailed DescriptionTekkotsu wireless Socket class. For more information on using wireless, please read the following tutorials: The networking interface needs more documentation. It also needs a cleanup. In the mean time, take a look at the TekkotsuMon objects in Tekkotsu Definition at line 72 of file Socket.h.
Member Typedef Documentation
Member Enumeration Documentation
Chooses between blocking and non-blocking Wireless Input, Output. Blocking wireless output from the main process will affect the performance of the Aibo, and should only be used for debugging purposes.
Constructor & Destructor Documentation
copy constructor, don't call Member Function Documentation
Initiate blocking or nonblocking write transfer depending on the type of socket. All write commands on the socket will implicity call this. You don't need to call it, unless you're implementing your own write Reimplemented in DummySocket. Definition at line 156 of file Socket.cc. Referenced by Wireless::close(), flush(), Wireless::pollProcess(), Wireless::send(), vprintf(), and write().
returns the address of the remote host in local host byte order Definition at line 238 of file Socket.h. Referenced by EventRouter::processData(), and RemoteEvents::remoteIPInt().
getReadBuffer is used with blocking read's NOT IMPLEMENTED The read(void) and getReadBuffer combo eliminates one buffer copy. You don't need to use getReadBuffer with read(byte*, int) Blocking read is currently broken - it will be fixed in the next release
Reimplemented in DummySocket.
returns the transport in use Definition at line 174 of file Socket.h. Referenced by SegCam::doEvent(), RegionCam::doEvent(), RawCam::doEvent(), and DepthCam::doEvent().
use getWriteBuffer to get a memory address to write bytes to, for subsequent writing to a connection. The getWriteBuffer-write(int) combo eliminates one buffer copy. You don't need to use getWriteBuffer with write(byte*, int)
Reimplemented in DummySocket. Definition at line 45 of file Socket.cc. Referenced by LGmixin::displayHtmlText(), WorldStateSerializerBehavior::doEvent(), EventLogger::dumpNode(), getWriteBuffer(), SegCam::openPacket(), RegionCam::openPacket(), RawCam::openPacket(), DepthCam::openPacket(), EventLogger::processEvent(), WMMonitorBehavior::report(), DumpFileControl::selectedFile(), SegCam::sendCloseConnectionPacket(), RawCam::sendCloseConnectionPacket(), DepthCam::sendCloseConnectionPacket(), CameraStreamBehavior::sendSensors(), LGmixin::uploadCameraImage(), LGmixin::uploadFile(), LGmixin::uploadSketch(), and write().
initialize socket member variables. This is different from the constructor since sockets are reused Reimplemented in DummySocket. Definition at line 109 of file Socket.cc. Referenced by Wireless::close(), Wireless::connect(), Wireless::listen(), and setTransport().
Similar to printf, except it takes an extra first argument. If vlevel is than or equal to the current verbosity level, the string will be printed else it will be ignored.
Reimplemented in DummySocket.
It's standard stuff. man 3 printf on most systems should give you more information Reimplemented in DummySocket. Definition at line 199 of file Socket.cc. Referenced by HelpControl::activate(), WalkCalibration::addSample(), ArmMC::armJointValue(), PNGGenerator::calcImage(), JPEGGenerator::calcImage(), SensorObserverControl::checkLogFile(), EventLogger::checkLogFile(), ControlBase::clearMenu(), Controller::closeGUI(), ArmController::connect(), LGmixin::displayHtmlFile(), LGmixin::displayHtmlText(), LGmixin::displayImageFile(), SegCam::doEvent(), RegionGenerator::doEvent(), RawCameraGenerator::doEvent(), RawCam::doEvent(), FreeMemReportControl::doEvent(), FlashIPAddrBehavior::doEvent(), FilterBankGenerator::doEvent(), EStopController::doEvent(), EchoBehavior::doEvent(), DepthCam::doEvent(), CDTGenerator::doEvent(), CameraBehavior::doEvent(), BufferedImageGenerator::doEvent(), BallDetectionGenerator::doEvent(), ArmController::doEvent(), Transition::doFire(), ControlBase::doReadStdIn(), WalkCalibration::doSelect(), ValueEditControl< T >::doSelect(), ControlBase::doSelect(), Controller::doStop(), Controller::dumpStack(), HeadPointerMC::ensureValidJoint(), ArmMC::ensureValidJoint(), WalkCalibration::err(), FreeMemReportControl::freeMem(), PNGGenerator::getBinSize(), JPEGGenerator::getBinSize(), CameraBehavior::getNextName(), ArmController::gripper(), EventLogger::indent(), CameraBehavior::initIndex(), ControlBase::invalidInput(), PostureMC::isAlive(), HeadPointerMC::isAlive(), ArmMC::isAlive(), SegmentedColorGenerator::loadBuffer(), RLEGenerator::loadBuffer(), RegionGenerator::loadBuffer(), RawCameraGenerator::loadBuffer(), PNGGenerator::loadBuffer(), JPEGGenerator::loadBuffer(), InterleavedYUVGenerator::loadBuffer(), CDTGenerator::loadBuffer(), BufferedImageGenerator::loadBuffer(), SegmentedColorGenerator::loadColorInfo(), WalkCalibration::loadData(), SegmentedColorGenerator::loadThresholdMap(), CameraBehavior::openNextFile(), ArmController::pointPicked(), Controller::pop(), pprintf(), EchoBehavior::processCallback(), WalkCalibration::processEvent(), ValueEditControl< T >::processEvent(), SensorObserverControl::processEvent(), PostureEditor::processEvent(), EventLogger::processEvent(), EventLogger::processStateMachineEvent(), Controller::push(), LoadCalibration::readData(), LoadCalibration::readMaxs(), CameraStreamBehavior::receiveData(), TorqueCalibrate::record(), WaypointWalkControl::refresh(), WalkCalibration::refresh(), ValueEditControl< T >::refresh(), TorqueCalibrate::refresh(), FilterBankGenerator::refresh(), ControlBase::refresh(), ConfigurationEditor::NamedEnumerationEditor::refresh(), Controller::refreshSketchCamera(), Controller::refreshSketchLocal(), Controller::refreshSketchWorld(), RegionGenerator::RegionGenerator(), WMMonitorBehavior::registerData(), WMMonitorBehavior::report(), WalkCalibration::report(), HelpControl::report(), FreeMemReportControl::report(), EventLogger::runCommand(), EStopController::runCommand(), SegmentedColorGenerator::saveBuffer(), RLEGenerator::saveBuffer(), RegionGenerator::saveBuffer(), RawCameraGenerator::saveBuffer(), PNGGenerator::saveBuffer(), JPEGGenerator::saveBuffer(), InterleavedYUVGenerator::saveBuffer(), CDTGenerator::saveBuffer(), BufferedImageGenerator::saveBuffer(), WalkCalibration::saveData(), RawCameraGenerator::saveFileStream(), BufferedImageGenerator::saveFileStream(), LoadWalkControl::selectedFile(), DumpFileControl::selectedFile(), LGmixin::sendCommand(), ArmController::sendCoords(), ArmController::sendReachablePoints(), CameraStreamBehavior::sendSensors(), ArmController::setJoint(), WalkCalibration::setupMoving(), SegCam::setupServer(), RegionCam::setupServer(), RawCam::setupServer(), DepthCam::setupServer(), StateNode::start(), BatteryMonitorBehavior::startWarning(), StateNode::stop(), BatteryMonitorBehavior::stopWarning(), SaveWalkControl::takeInput(), ControlBase::takeInput(), Controller::takeLine(), LGmixin::uploadCameraImage(), LGmixin::uploadFile(), LGmixin::uploadSketch(), write(), and StateNode::~StateNode().
Blocking read (NOT IMPLEMENTED). You might want to consider the read(void) and getReadBuffer combo if you call this often Blocking read is currently broken - it will be fixed in the next release
Reimplemented in DummySocket.
Blocking read. NOT IMPLEMENTED. Tries to read upto receive buffer size worth of data from this socket. Blocking read is currently broken - it will be fixed in the next release
Reimplemented in DummySocket.
Chooses between blocking and non-blocking input, output. This function can only be called when a socket is disconnected, since it is a bad idea to mix blocking and non-blocking input, output. The default for a socket is non-blocking
Reimplemented in DummySocket.
causes this socket to forward output to stdout if it is not connected, call setForward(NULL) to unset Reimplemented in DummySocket.
Picks a level of verbosity for filtering pprintf commands. The higher the verbosity, the more the number of messages printed. This is useful for filtering out non-important messages with very little processor cost. Default is 0.
Reimplemented in DummySocket.
It's standard stuff. man 3 printf on most systems should give you more information Reimplemented in DummySocket.
Standard write - writes specified amount of data from a buffer to a connection You might want to consider the getWriteBuffer-write(int) combo if you call this often
Reimplemented in DummySocket.
writes the specified number of bytes starting at the pointer returned. in a (prior) call to getWriteBufer
Reimplemented in DummySocket. Definition at line 70 of file Socket.cc. Referenced by SegCam::closePacket(), RegionCam::closePacket(), RawCam::closePacket(), DepthCam::closePacket(), LGmixin::displayHtmlText(), WorldStateSerializerBehavior::doEvent(), StringInputControl::doReadStdIn(), EventLogger::dumpNode(), Controller::loadGUI(), EventRouter::processData(), RemoteRouter::processEvent(), KoduDiscover::processEvent(), EventLogger::processEvent(), ControlBase::refresh(), WMMonitorBehavior::report(), DumpFileControl::selectedFile(), NetworkBuffer::send(), SegCam::sendCloseConnectionPacket(), RawCam::sendCloseConnectionPacket(), DepthCam::sendCloseConnectionPacket(), CameraStreamBehavior::sendSensors(), LGmixin::uploadCameraImage(), LGmixin::uploadFile(), LGmixin::uploadSketch(), and write(). Friends And Related Function Documentation
Reimplemented in DummySocket. Member Data Documentation
if true, the socket will automatically be reopened after any closure (manual or otherwise) Definition at line 287 of file Socket.h. Referenced by Wireless::getDaemon(), getDaemon(), and Wireless::setDaemon().
holds the endpoint data structure for the host OS Definition at line 256 of file Socket.h. Referenced by Wireless::blockingSend(), Wireless::connect(), init(), Wireless::listen(), Wireless::pollProcess(), Wireless::pollSetup(), Wireless::send(), setTransport(), Socket(), and ~Socket().
blocking or non-blocking flushes... note that blocking flushes only block on the handoff to the system, not actual transmission (at least under aperios) Definition at line 244 of file Socket.h. Referenced by flush(), getFlushType(), and setFlushType().
if non-NULL, output will be sent to this socket if the current socket is not otherwise connected (overrides textForward) Definition at line 285 of file Socket.h. Referenced by flush(), getWriteBuffer(), setForward(), setTextForward(), vprintf(), and write().
inet address of peer (if connected) or last message sender (if udp and bound); -1 otherwise (in host byte-order, not network byte-order!) Definition at line 280 of file Socket.h. Referenced by Wireless::close(), Wireless::connect(), getPeerAddress(), getPeerAddressAsString(), init(), and Wireless::pollProcess().
port of peer (if connected) or last message sender (if udp and bound); -1 otherwise Definition at line 281 of file Socket.h. Referenced by Wireless::close(), Wireless::connect(), getPeerPort(), init(), and Wireless::pollProcess().
pointer to callback function, called after recvData has been filled in Definition at line 278 of file Socket.h. Referenced by Wireless::pollProcess(), and Wireless::setReceiver().
the size of the buffer for readData and recvData Definition at line 260 of file Socket.h. Referenced by getAvailableReceiveSize(), and getMaxReceiveSize().
a region within recvBuffer, holding data either just filled in by ip stack (during call to rcvcbckfn), or in the process of being filled in (any other time)
the size of recvData (total amount of data returned by system) Definition at line 263 of file Socket.h. Referenced by Wireless::pollProcess().
if non-null, class based callback interface to provide notification when new data is available for reading Definition at line 289 of file Socket.h. Referenced by Wireless::pollProcess(), and Wireless::setReceiver().
under aperios, a pointer to a shared region with the ip stack; under other OS, a pointer to a normal char * buffer Definition at line 269 of file Socket.h. Referenced by Wireless::socket(), and ~Socket().
the size of the buffer for sendData and writeData Definition at line 259 of file Socket.h. Referenced by getAvailableSendSize(), getMaxSendSize(), getWriteBuffer(), Wireless::socket(), and vprintf().
a region within sendBuffer, holding data in the process of being sent Definition at line 270 of file Socket.h. Referenced by Wireless::blockingSend(), flush(), Wireless::pollProcess(), and Wireless::send().
the size of sendData (total amount of data from last flush) Definition at line 261 of file Socket.h. Referenced by Wireless::blockingSend(), flush(), init(), Wireless::pollProcess(), and Wireless::send().
the sent portion of sendData (amount of data which has been sent to system so far) Definition at line 262 of file Socket.h. Referenced by Wireless::blockingSend(), Wireless::pollProcess(), and Wireless::send().
if the socket is a server socket, this is the port it is listening on Definition at line 277 of file Socket.h. Referenced by Wireless::listen().
unique non-negative integer representing socket. Serves as index into socket Objects array Definition at line 76 of file Socket.h. Referenced by Wireless::close(), SegCam::closeServer(), RegionCam::closeServer(), RawCam::closeServer(), DepthCam::closeServer(), Wireless::connect(), Controller::console_callback(), WorldStateSerializerBehavior::doEvent(), SegCam::doEvent(), RegionCam::doEvent(), RawCam::doEvent(), EchoBehavior::doEvent(), DepthCam::doEvent(), ConnectionMadeTrans::doEvent(), StringInputControl::doReadStdIn(), ControlBase::doReadStdIn(), WMMonitorBehavior::doStart(), HeadController::doStart(), EStopController::doStart(), Controller::doStart(), ArmController::doStart(), flush(), Wireless::getDaemon(), RemoteEvents::isConnected(), KoduDiscover::KoduDiscover(), Wireless::listen(), EventLogger::logImage(), EventLogger::logMessage(), EventLogger::logWebcam(), KoduDiscover::processEvent(), EventLogger::processEvent(), EventLogger::processStateMachineEvent(), WalkCalibration::refresh(), ValueEditControl< T >::refresh(), ControlBase::refresh(), ConfigurationEditor::NamedEnumerationEditor::refresh(), Wireless::setDaemon(), Wireless::setReceiver(), EchoBehavior::setupNetwork(), GamepadController::start(), LGmixin::uploadFile(), KoduDiscover::~KoduDiscover(), and LGmixin::~LGmixin().
an enum representing the current state of the socket Definition at line 257 of file Socket.h. Referenced by Wireless::connect(), flush(), getWriteBuffer(), init(), Wireless::isConnected(), Wireless::isError(), Wireless::listen(), Wireless::pollProcess(), setFlushType(), vprintf(), and write().
if true, when data is sent to the socket and the socket is not current connected, the data will be sent to stdout (overridden by forwardSock) Definition at line 283 of file Socket.h. Referenced by getWriteBuffer(), setForward(), setTextForward(), vprintf(), and write().
temporary buffer allocated in getWriteBuffer() and freed in write(), if the output is destined for stdout (textForward) Definition at line 284 of file Socket.h. Referenced by getWriteBuffer(), and write().
stores choice between transports (UDP or TCP (aka Datagram or Stream)) Definition at line 243 of file Socket.h. Referenced by getTransport(), init(), and setTransport().
a flag set when sendData is in the process of being sent to the system Definition at line 266 of file Socket.h. Referenced by Wireless::blockingSend(), flush(), Wireless::isReady(), Wireless::pollProcess(), and Wireless::send().
can be used to filter calls to pprintf Definition at line 246 of file Socket.h. Referenced by pprintf(), and setVerbosity().
a region within sendBuffer, holds data still being filled in by user code, not yet flushed Definition at line 271 of file Socket.h. Referenced by flush(), getWriteBuffer(), and vprintf().
the size of writeData (amount of data so far ready to be flushed) Definition at line 264 of file Socket.h. Referenced by flush(), getAvailableSendSize(), getWriteBuffer(), init(), vprintf(), and write(). The documentation for this class was generated from the following files: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:17 2016 by Doxygen 1.6.3 |