Classes | Public Member Functions | Protected Member Functions

PanTiltSonyEviD100PThread Class Reference

PanTilt act thread for the PTU part of the Sony EviD100P camera. More...

#include "evid100p_thread.h"

Inheritance diagram for PanTiltSonyEviD100PThread:
Inheritance graph
[legend]

List of all members.

Classes

class  WorkerThread
 Worker thread for the PanTiltSonyEviD100PThread.

Public Member Functions

 PanTiltSonyEviD100PThread (std::string &pantilt_cfg_prefix, std::string &ptu_cfg_prefix, std::string &ptu_name)
 Constructor.
virtual void init ()
virtual void finalize ()
virtual void loop ()
virtual bool bb_interface_message_received (fawkes::Interface *interface, fawkes::Message *message) throw ()
 BlackBoard message received notification.
void update_sensor_values ()
 Update sensor values as necessary.

Protected Member Functions

virtual void run ()
 Stub to see name in backtrace for easier debugging.

Detailed Description

PanTilt act thread for the PTU part of the Sony EviD100P camera.

This thread integrates into the Fawkes main loop at the ACT_EXEC hook and interacts via the Visca protocol with the controller of the Sony EviD100P.

Author:
Tim Niemueller

Definition at line 42 of file evid100p_thread.h.


Constructor & Destructor Documentation

PanTiltSonyEviD100PThread::PanTiltSonyEviD100PThread ( std::string &  pantilt_cfg_prefix,
std::string &  ptu_cfg_prefix,
std::string &  ptu_name 
)

Constructor.

Parameters:
pantilt_cfg_prefix pantilt plugin configuration prefix
ptu_cfg_prefix configuration prefix specific for the PTU
ptu_name name of the PTU configuration

Definition at line 46 of file evid100p_thread.cpp.

References fawkes::Thread::set_name().


Member Function Documentation

bool PanTiltSonyEviD100PThread::bb_interface_message_received ( fawkes::Interface interface,
fawkes::Message message 
) throw () [virtual]

BlackBoard message received notification.

This is called whenever a message is received for this interface. This method is only called for writing instances of an interface, never on reading instances. If you have processed the message already, you can order that the message is not enqueued by returning false. Returning true will enqueue the message as usual. You should only do very (very!) quick tasks directly in this method, as it is out of the regular thread context and can harm performance of other plugins and the system as a whole. Note that if you decide to return false the message is not referenced. If you want to keep it longer you have to ref() it by yourself. An example where this would really make sense is a "STOP" message for the motor, which needs to be processed ASAP and maybe even waiting a couple of miliseconds for the next cycle is not acceptable.

Parameters:
interface interface instance that you supplied to bbil_add_message_interface()
message the message that was sent
Returns:
true to get the message enqueued afterwards as usual, false to prevent queuing of the message.

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 211 of file evid100p_thread.cpp.

virtual void PanTiltSonyEviD100PThread::run (  )  [inline, protected, virtual]

Stub to see name in backtrace for easier debugging.

See also:
Thread::run()

Definition at line 62 of file evid100p_thread.h.

void PanTiltSonyEviD100PThread::update_sensor_values (  ) 

Update sensor values as necessary.

To be called only from PanTiltSensorThread. Writes the current pan/tilt data into the interface.

Definition at line 137 of file evid100p_thread.cpp.

References fawkes::PanTiltInterface::set_final(), fawkes::PanTiltInterface::set_pan(), fawkes::PanTiltInterface::set_tilt(), and fawkes::Interface::write().


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