naoqidriver
Public Member Functions | Private Member Functions | Private Attributes
naoqi::AudioEventRegister Class Reference

GlobalRecorder concept interface. More...

#include <audio.hpp>

Inheritance diagram for naoqi::AudioEventRegister:

Public Member Functions

 AudioEventRegister ()
 Constructor for recorder interface. More...
 
 AudioEventRegister (const std::string &name, const float &frequency, const qi::SessionPtr &session)
 
 ~AudioEventRegister ()
 
void resetPublisher (ros::NodeHandle &nh)
 
void resetRecorder (boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr)
 
void startProcess ()
 
void stopProcess ()
 
void writeDump (const ros::Time &time)
 
void setBufferDuration (float duration)
 
void isRecording (bool state)
 
void isPublishing (bool state)
 
void isDumping (bool state)
 
void processRemote (int nbOfChannels, int samplesByChannel, qi::AnyValue altimestamp, qi::AnyValue buffer)
 

Private Member Functions

void registerCallback ()
 
void unregisterCallback ()
 
void onEvent ()
 

Private Attributes

boost::shared_ptr< converter::AudioEventConverterconverter_
 
boost::shared_ptr< publisher::BasicPublisher< naoqi_bridge_msgs::AudioBuffer > > publisher_
 
boost::shared_ptr< recorder::BasicEventRecorder< naoqi_bridge_msgs::AudioBuffer > > recorder_
 
qi::SessionPtr session_
 
qi::AnyObject p_audio_
 
qi::AnyObject p_robot_model_
 
qi::FutureSync< qi::AnyObject > p_audio_extractor_request
 
std::vector< uint8_t > channelMap
 
unsigned int serviceId
 
boost::mutex mutex_
 
bool isStarted_
 
bool isPublishing_
 
bool isRecording_
 
bool isDumping_
 

Detailed Description

GlobalRecorder concept interface.

Note
this defines an private concept struct, which each instance has to implement
a type erasure pattern in implemented here to avoid strict inheritance, thus each possible publisher instance has to implement the virtual functions mentioned in the concept

Constructor & Destructor Documentation

naoqi::AudioEventRegister::AudioEventRegister ( )

Constructor for recorder interface.

naoqi::AudioEventRegister::AudioEventRegister ( const std::string &  name,
const float &  frequency,
const qi::SessionPtr &  session 
)
naoqi::AudioEventRegister::~AudioEventRegister ( )

Member Function Documentation

void naoqi::AudioEventRegister::isDumping ( bool  state)
void naoqi::AudioEventRegister::isPublishing ( bool  state)
void naoqi::AudioEventRegister::isRecording ( bool  state)
void naoqi::AudioEventRegister::onEvent ( )
private
void naoqi::AudioEventRegister::processRemote ( int  nbOfChannels,
int  samplesByChannel,
qi::AnyValue  altimestamp,
qi::AnyValue  buffer 
)
void naoqi::AudioEventRegister::registerCallback ( )
private
void naoqi::AudioEventRegister::resetPublisher ( ros::NodeHandle &  nh)
void naoqi::AudioEventRegister::resetRecorder ( boost::shared_ptr< naoqi::recorder::GlobalRecorder gr)
void naoqi::AudioEventRegister::setBufferDuration ( float  duration)
void naoqi::AudioEventRegister::startProcess ( )
void naoqi::AudioEventRegister::stopProcess ( )
void naoqi::AudioEventRegister::unregisterCallback ( )
private
void naoqi::AudioEventRegister::writeDump ( const ros::Time &  time)

Field Documentation

std::vector<uint8_t> naoqi::AudioEventRegister::channelMap
private
boost::shared_ptr<converter::AudioEventConverter> naoqi::AudioEventRegister::converter_
private
bool naoqi::AudioEventRegister::isDumping_
private
bool naoqi::AudioEventRegister::isPublishing_
private
bool naoqi::AudioEventRegister::isRecording_
private
bool naoqi::AudioEventRegister::isStarted_
private
boost::mutex naoqi::AudioEventRegister::mutex_
private
qi::AnyObject naoqi::AudioEventRegister::p_audio_
private
qi::FutureSync<qi::AnyObject> naoqi::AudioEventRegister::p_audio_extractor_request
private
qi::AnyObject naoqi::AudioEventRegister::p_robot_model_
private
boost::shared_ptr<publisher::BasicPublisher<naoqi_bridge_msgs::AudioBuffer> > naoqi::AudioEventRegister::publisher_
private
boost::shared_ptr<recorder::BasicEventRecorder<naoqi_bridge_msgs::AudioBuffer> > naoqi::AudioEventRegister::recorder_
private
unsigned int naoqi::AudioEventRegister::serviceId
private
qi::SessionPtr naoqi::AudioEventRegister::session_
private

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