Inheritance diagram for VisionOperator:
Only one runOperator function should be filled out, the other should return and possibly call g_warn to note that the incorrect operator function was called. Be sure to set the value of m_format so that the module knows what kind of image to pass in.
Definition at line 63 of file visionModule.H.
Public Member Functions | |
VisionOperator (std::string name) | |
~VisionOperator () | |
virtual void | initOperator ()=0 |
All Capability registration calls should be made in this operator, along with any other initialization. | |
virtual void | runOperator (WURDE::WURDEImage image)=0 |
The main method for the class if the operator is monocular. | |
virtual void | runOperator (WURDE::WURDEImage image1, WURDE::WURDEImage image2)=0 |
The main method for the class if the operator is stereo. | |
virtual void | quitOperator ()=0 |
Cleanup function. | |
std::list< WURDE::Capability * > * | getSuppliers () |
Function for use by the visionModule. | |
std::list< WURDE::Capability * > * | getConsumers () |
Function for use by the visionModule. | |
WURDE::RunState | getState () |
Function for use by the visionModule. | |
bool | isStereoModule () |
Function for use by the visionModule. | |
std::string | getName () |
Function for use by the visionModule. | |
void | setName (std::string name) |
Function for use by the visionModule. | |
void | setFormat (WURDE::ImageFormat format) |
Set the format of the image which is requested. | |
WURDE::ImageFormat | getFormat () |
Function for use by the visionModule. | |
void | setCameras (std::vector< WURDEVision::CameraConfig > cams) |
Function for use by the visionModule. | |
std::string | getCamera0 () |
Returns the name of the first (or only) camera. | |
std::string | getCamera1 () |
Returns the name of the second camera (if it exists). | |
Protected Member Functions | |
void | registerSupplier (WURDE::Capability *someObject) |
Use this method to register any supplier WURDE provided by this operator. | |
void | registerConsumer (WURDE::Capability *someObject) |
Use this method to register any consumer WURDE needed by this operator. | |
Protected Attributes | |
WURDE::RunState | m_state |
Current state of the module. | |
std::string | m_name |
bool | m_stereo |
This value should be set when the operator is initialized. | |
WURDE::ImageFormat | m_format |
This value should be set when the operator is initialized. | |
Private Attributes | |
std::vector< WURDEVision::CameraConfig > | m_cameras |
std::list< WURDE::Capability * > | m_supplierList |
std::list< WURDE::Capability * > | m_consumerList |
VisionOperator | ( | std::string | name | ) | [inline] |
~VisionOperator | ( | ) | [inline] |
Definition at line 66 of file visionModule.H.
virtual void initOperator | ( | ) | [pure virtual] |
All Capability registration calls should be made in this operator, along with any other initialization.
The visionModule will then register the objects with the CommsManager. All WURDE should be members of the class and *not* allocated dynamically.
Implemented in DataCollector, ImagePublisher, ImageWriter, and StereoDataCollector.
Referenced by WURDEVision::loadOperators().
virtual void runOperator | ( | WURDE::WURDEImage | image | ) | [pure virtual] |
The main method for the class if the operator is monocular.
All work should be done within this function, which will be called each loop. If the operator is stereo, this method should return without doing any work.
Implemented in DataCollector, ImagePublisher, ImageWriter, and StereoDataCollector.
virtual void runOperator | ( | WURDE::WURDEImage | image1, | |
WURDE::WURDEImage | image2 | |||
) | [pure virtual] |
The main method for the class if the operator is stereo.
All work should be done within this function, which will be called each loop. If the operator is monocular, this method should return without doing any work.
Implemented in DataCollector, ImagePublisher, ImageWriter, and StereoDataCollector.
virtual void quitOperator | ( | ) | [pure virtual] |
Cleanup function.
Free any memory you've allocated here.
Implemented in DataCollector, ImagePublisher, ImageWriter, and StereoDataCollector.
std::list<WURDE::Capability *>* getSuppliers | ( | ) | [inline] |
Function for use by the visionModule.
Definition at line 97 of file visionModule.H.
References WURDE::g_debug(), and VisionOperator::m_supplierList.
std::list<WURDE::Capability *>* getConsumers | ( | ) | [inline] |
Function for use by the visionModule.
Definition at line 102 of file visionModule.H.
References VisionOperator::m_consumerList.
WURDE::RunState getState | ( | ) | [inline] |
Function for use by the visionModule.
Definition at line 107 of file visionModule.H.
References VisionOperator::m_state.
bool isStereoModule | ( | ) | [inline] |
Function for use by the visionModule.
Definition at line 112 of file visionModule.H.
References VisionOperator::m_stereo.
std::string getName | ( | ) | [inline] |
Function for use by the visionModule.
Definition at line 117 of file visionModule.H.
References VisionOperator::m_name.
void setName | ( | std::string | name | ) | [inline] |
Function for use by the visionModule.
Definition at line 122 of file visionModule.H.
References VisionOperator::m_name.
Referenced by WURDEVision::loadOperators().
void setFormat | ( | WURDE::ImageFormat | format | ) | [inline] |
Set the format of the image which is requested.
Definition at line 127 of file visionModule.H.
References VisionOperator::m_format.
WURDE::ImageFormat getFormat | ( | ) | [inline] |
Function for use by the visionModule.
Definition at line 132 of file visionModule.H.
References VisionOperator::m_format.
void setCameras | ( | std::vector< WURDEVision::CameraConfig > | cams | ) | [inline] |
Function for use by the visionModule.
These cameras are controlled by the vision module config file.
Definition at line 137 of file visionModule.H.
References VisionOperator::m_cameras.
Referenced by WURDEVision::loadOperators().
std::string getCamera0 | ( | ) | [inline] |
Returns the name of the first (or only) camera.
Function for use by the visionModule.
Definition at line 142 of file visionModule.H.
References VisionOperator::m_cameras.
std::string getCamera1 | ( | ) | [inline] |
Returns the name of the second camera (if it exists).
Function for use by the visionModule.
Definition at line 147 of file visionModule.H.
References VisionOperator::m_cameras.
void registerSupplier | ( | WURDE::Capability * | someObject | ) | [inline, protected] |
Use this method to register any supplier WURDE provided by this operator.
Definition at line 156 of file visionModule.H.
References VisionOperator::m_supplierList.
Referenced by ImagePublisher::ImagePublisher().
void registerConsumer | ( | WURDE::Capability * | someObject | ) | [inline, protected] |
Use this method to register any consumer WURDE needed by this operator.
Definition at line 161 of file visionModule.H.
References VisionOperator::m_consumerList.
Referenced by DataCollector::DataCollector(), and StereoDataCollector::StereoDataCollector().
WURDE::RunState m_state [protected] |
Current state of the module.
Definition at line 152 of file visionModule.H.
Referenced by VisionOperator::getState(), StereoDataCollector::initOperator(), ImageWriter::initOperator(), ImagePublisher::initOperator(), DataCollector::initOperator(), and ImagePublisher::quitOperator().
std::string m_name [protected] |
Definition at line 162 of file visionModule.H.
Referenced by VisionOperator::getName(), StereoDataCollector::initOperator(), ImageWriter::initOperator(), ImagePublisher::initOperator(), DataCollector::initOperator(), VisionOperator::setName(), and VisionOperator::VisionOperator().
bool m_stereo [protected] |
This value should be set when the operator is initialized.
Definition at line 167 of file visionModule.H.
Referenced by StereoDataCollector::initOperator(), ImageWriter::initOperator(), ImagePublisher::initOperator(), and VisionOperator::isStereoModule().
WURDE::ImageFormat m_format [protected] |
This value should be set when the operator is initialized.
Definition at line 172 of file visionModule.H.
Referenced by VisionOperator::getFormat(), StereoDataCollector::initOperator(), ImageWriter::initOperator(), ImagePublisher::initOperator(), DataCollector::initOperator(), and VisionOperator::setFormat().
std::vector<WURDEVision::CameraConfig> m_cameras [private] |
Definition at line 175 of file visionModule.H.
Referenced by VisionOperator::getCamera0(), VisionOperator::getCamera1(), and VisionOperator::setCameras().
std::list<WURDE::Capability *> m_supplierList [private] |
Definition at line 176 of file visionModule.H.
Referenced by VisionOperator::getSuppliers(), and VisionOperator::registerSupplier().
std::list<WURDE::Capability *> m_consumerList [private] |
Definition at line 177 of file visionModule.H.
Referenced by VisionOperator::getConsumers(), and VisionOperator::registerConsumer().