Classes | Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
WGE100CameraDriver Class Reference
Inheritance diagram for WGE100CameraDriver:
Inheritance graph
[legend]

Classes

struct  ImagerSettings
 

Public Types

typedef wge100_camera::WGE100CameraConfig Config
 
- Public Types inherited from driver_base::Driver
typedef char state_t
 

Public Member Functions

void config_update (const Config &new_cfg, uint32_t level=0)
 
void doClose ()
 
void doOpen ()
 
void doStart ()
 
void doStop ()
 
int get_rmem_max ()
 
std::string getID ()
 
int setTestMode (uint16_t mode, diagnostic_updater::DiagnosticStatusWrapper &status)
 
 WGE100CameraDriver ()
 
 ~WGE100CameraDriver ()
 
- Public Member Functions inherited from driver_base::Driver
void clearRecoveryComplete ()
 
bool close ()
 
 Driver ()
 
bool getRecoveryComplete ()
 
state_t getState ()
 
const std::string getStateName ()
 
const std::string getStatusMessage ()
 
bool getStatusOk ()
 
bool goClosed ()
 
bool goOpened ()
 
bool goRunning ()
 
bool goState (state_t target)
 
bool isClosed ()
 
bool isOpened ()
 
bool isRunning ()
 
bool isStopped ()
 
bool lowerState (state_t target)
 
bool open ()
 
bool raiseState (state_t target)
 
void setPostOpenHook (hookFunction f)
 
void setStatusMessage (const std::string &msg, bool ok=false, bool recovery_complete=false)
 
void setStatusMessagef (const char *format,...)
 
bool start ()
 
bool stop ()
 
virtual ~Driver ()
 

Public Attributes

Config config_
 
- Public Attributes inherited from driver_base::Driver
boost::recursive_mutex mutex_
 

Private Types

typedef boost::function< int(size_t, size_t, uint8_t *, ros::Time, bool)> UseFrameFunction
 

Private Member Functions

bool boardConfig (wge100_camera::BoardConfig::Request &req, wge100_camera::BoardConfig::Response &rsp)
 
void cameraStatus (diagnostic_updater::DiagnosticStatusWrapper &stat)
 
int frameHandler (wge100FrameInfo *frame_info)
 
double getExternallyTriggeredFrameTime (double firstPacketTime)
 
double getFreeRunningFrameTime (double firstPacketTime)
 
double getTriggeredFrameTime (double firstPacketTime)
 
void imageThread ()
 
uint16_t intrinsicsChecksum (uint16_t *data, int words)
 
bool isColor ()
 
bool loadIntrinsics (sensor_msgs::CameraInfo &cam_info)
 
bool saveIntrinsics (const sensor_msgs::CameraInfo &cam_info)
 
int setImagerSettings (MT9VImager &imager, ImagerSettings &cfg)
 

Static Private Member Functions

static int frameHandler (wge100FrameInfo *frameInfo, void *userData)
 

Private Attributes

MT9VImagerPtr alternate_imager_
 
IpCamList camera_
 
double desired_freq_
 
double driver_start_time_
 
bool dropped_packet_event_
 
int dropped_packets_
 
bool enable_alternate_
 
bool enable_primary_
 
bool first_frame_
 
FrameTimeFilter frame_time_filter_
 
std::string hwinfo_
 
std::string image_encoding_
 
boost::shared_ptr< boost::thread > image_thread_
 
MT9VImagerPtr imager_
 
double last_camera_ok_time_
 
unsigned int last_frame_number_
 
double last_image_time_
 
unsigned int last_partial_frame_number_
 
in_addr localIp_
 
sockaddr localMac_
 
int lost_image_thread_count_
 
int massive_frame_losses_
 
int missed_eof_count_
 
int missed_line_count_
 
bool next_is_alternate_
 
SlowTriggerFilter no_timestamp_warning_filter_
 
int rmem_max_
 
ros::ServiceClient trig_service_
 
timestamp_tools::TriggerMatcher trigger_matcher_
 
int trigger_matcher_drop_count_
 
UseFrameFunction useFrame_
 

Friends

class WGE100CameraNode
 

Additional Inherited Members

- Static Public Member Functions inherited from driver_base::Driver
static const std::stringgetStateName (state_t s)
 
- Static Public Attributes inherited from driver_base::Driver
static const state_t CLOSED
 
static const state_t OPENED
 
static const state_t RUNNING
 
- Protected Types inherited from driver_base::Driver
typedef boost::function< void() > hookFunction
 
- Protected Attributes inherited from driver_base::Driver
hookFunction postOpenHook
 
state_t state_
 

Detailed Description

Definition at line 288 of file wge100_camera_node.cpp.

Member Typedef Documentation

typedef wge100_camera::WGE100CameraConfig WGE100CameraDriver::Config

Definition at line 293 of file wge100_camera_node.cpp.

typedef boost::function<int(size_t, size_t, uint8_t*, ros::Time, bool)> WGE100CameraDriver::UseFrameFunction
private

Definition at line 341 of file wge100_camera_node.cpp.

Constructor & Destructor Documentation

WGE100CameraDriver::WGE100CameraDriver ( )
inline

Definition at line 433 of file wge100_camera_node.cpp.

WGE100CameraDriver::~WGE100CameraDriver ( )
inline

Definition at line 500 of file wge100_camera_node.cpp.

Member Function Documentation

bool WGE100CameraDriver::boardConfig ( wge100_camera::BoardConfig::Request &  req,
wge100_camera::BoardConfig::Response &  rsp 
)
inlineprivate

Definition at line 1189 of file wge100_camera_node.cpp.

void WGE100CameraDriver::cameraStatus ( diagnostic_updater::DiagnosticStatusWrapper stat)
inlineprivate

Definition at line 839 of file wge100_camera_node.cpp.

void WGE100CameraDriver::config_update ( const Config new_cfg,
uint32_t  level = 0 
)
inline
Todo:
add more checks here for video mode and image offset.

Definition at line 453 of file wge100_camera_node.cpp.

void WGE100CameraDriver::doClose ( )
inlinevirtual

Implements driver_base::Driver.

Definition at line 704 of file wge100_camera_node.cpp.

void WGE100CameraDriver::doOpen ( )
inlinevirtual

Implements driver_base::Driver.

Definition at line 516 of file wge100_camera_node.cpp.

void WGE100CameraDriver::doStart ( )
inlinevirtual

Implements driver_base::Driver.

Definition at line 712 of file wge100_camera_node.cpp.

void WGE100CameraDriver::doStop ( )
inlinevirtual
Todo:
race condition here. Need to think more.

Implements driver_base::Driver.

Definition at line 750 of file wge100_camera_node.cpp.

int WGE100CameraDriver::frameHandler ( wge100FrameInfo frame_info)
inlineprivate

Do we want to support rates less than 1 Hz?

Todo:
Could a deadlock happen here if the thread is

Definition at line 968 of file wge100_camera_node.cpp.

static int WGE100CameraDriver::frameHandler ( wge100FrameInfo frameInfo,
void *  userData 
)
inlinestaticprivate

Definition at line 1106 of file wge100_camera_node.cpp.

int WGE100CameraDriver::get_rmem_max ( )
inline

Definition at line 506 of file wge100_camera_node.cpp.

double WGE100CameraDriver::getExternallyTriggeredFrameTime ( double  firstPacketTime)
inlineprivate

Definition at line 931 of file wge100_camera_node.cpp.

double WGE100CameraDriver::getFreeRunningFrameTime ( double  firstPacketTime)
inlineprivate

Definition at line 944 of file wge100_camera_node.cpp.

std::string WGE100CameraDriver::getID ( )
inlinevirtual

Implements driver_base::Driver.

Definition at line 806 of file wge100_camera_node.cpp.

double WGE100CameraDriver::getTriggeredFrameTime ( double  firstPacketTime)
inlineprivate

Definition at line 911 of file wge100_camera_node.cpp.

void WGE100CameraDriver::imageThread ( )
inlineprivate

Definition at line 815 of file wge100_camera_node.cpp.

uint16_t WGE100CameraDriver::intrinsicsChecksum ( uint16_t *  data,
int  words 
)
inlineprivate

Definition at line 1112 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::isColor ( )
inlineprivate

Definition at line 1097 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::loadIntrinsics ( sensor_msgs::CameraInfo &  cam_info)
inlineprivate

Definition at line 1120 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::saveIntrinsics ( const sensor_msgs::CameraInfo &  cam_info)
inlineprivate

Definition at line 1153 of file wge100_camera_node.cpp.

int WGE100CameraDriver::setImagerSettings ( MT9VImager imager,
ImagerSettings cfg 
)
inlineprivate

Definition at line 369 of file wge100_camera_node.cpp.

int WGE100CameraDriver::setTestMode ( uint16_t  mode,
diagnostic_updater::DiagnosticStatusWrapper status 
)
inline

Definition at line 769 of file wge100_camera_node.cpp.

Friends And Related Function Documentation

friend class WGE100CameraNode
friend

Definition at line 290 of file wge100_camera_node.cpp.

Member Data Documentation

MT9VImagerPtr WGE100CameraDriver::alternate_imager_
private

Definition at line 329 of file wge100_camera_node.cpp.

IpCamList WGE100CameraDriver::camera_
private

Definition at line 327 of file wge100_camera_node.cpp.

Config WGE100CameraDriver::config_

Definition at line 294 of file wge100_camera_node.cpp.

double WGE100CameraDriver::desired_freq_
private

Definition at line 301 of file wge100_camera_node.cpp.

double WGE100CameraDriver::driver_start_time_
private

Definition at line 312 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::dropped_packet_event_
private

Definition at line 308 of file wge100_camera_node.cpp.

int WGE100CameraDriver::dropped_packets_
private

Definition at line 306 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::enable_alternate_
private

Definition at line 334 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::enable_primary_
private

Definition at line 335 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::first_frame_
private

Definition at line 333 of file wge100_camera_node.cpp.

FrameTimeFilter WGE100CameraDriver::frame_time_filter_
private

Definition at line 318 of file wge100_camera_node.cpp.

std::string WGE100CameraDriver::hwinfo_
private

Definition at line 326 of file wge100_camera_node.cpp.

std::string WGE100CameraDriver::image_encoding_
private

Definition at line 331 of file wge100_camera_node.cpp.

boost::shared_ptr<boost::thread> WGE100CameraDriver::image_thread_
private

Definition at line 338 of file wge100_camera_node.cpp.

MT9VImagerPtr WGE100CameraDriver::imager_
private

Definition at line 328 of file wge100_camera_node.cpp.

double WGE100CameraDriver::last_camera_ok_time_
private

Definition at line 330 of file wge100_camera_node.cpp.

unsigned int WGE100CameraDriver::last_frame_number_
private

Definition at line 313 of file wge100_camera_node.cpp.

double WGE100CameraDriver::last_image_time_
private

Definition at line 311 of file wge100_camera_node.cpp.

unsigned int WGE100CameraDriver::last_partial_frame_number_
private

Definition at line 314 of file wge100_camera_node.cpp.

in_addr WGE100CameraDriver::localIp_
private

Definition at line 323 of file wge100_camera_node.cpp.

sockaddr WGE100CameraDriver::localMac_
private

Definition at line 322 of file wge100_camera_node.cpp.

int WGE100CameraDriver::lost_image_thread_count_
private

Definition at line 315 of file wge100_camera_node.cpp.

int WGE100CameraDriver::massive_frame_losses_
private

Definition at line 307 of file wge100_camera_node.cpp.

int WGE100CameraDriver::missed_eof_count_
private

Definition at line 305 of file wge100_camera_node.cpp.

int WGE100CameraDriver::missed_line_count_
private

Definition at line 309 of file wge100_camera_node.cpp.

bool WGE100CameraDriver::next_is_alternate_
private

Definition at line 332 of file wge100_camera_node.cpp.

SlowTriggerFilter WGE100CameraDriver::no_timestamp_warning_filter_
private

Definition at line 966 of file wge100_camera_node.cpp.

int WGE100CameraDriver::rmem_max_
private

Definition at line 304 of file wge100_camera_node.cpp.

ros::ServiceClient WGE100CameraDriver::trig_service_
private

Definition at line 298 of file wge100_camera_node.cpp.

timestamp_tools::TriggerMatcher WGE100CameraDriver::trigger_matcher_
private

Definition at line 319 of file wge100_camera_node.cpp.

int WGE100CameraDriver::trigger_matcher_drop_count_
private

Definition at line 310 of file wge100_camera_node.cpp.

UseFrameFunction WGE100CameraDriver::useFrame_
private

Definition at line 342 of file wge100_camera_node.cpp.


The documentation for this class was generated from the following file:


wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Mon Jun 10 2019 15:44:16