Public Member Functions | Public Attributes | Private Attributes | List of all members
sound_play.libsoundplay.SoundClient Class Reference

This class is a helper class for communicating with the sound_play node via the sound_play.SoundRequest message. More...

Inheritance diagram for sound_play.libsoundplay.SoundClient:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, blocking=False, sound_action='sound_play', sound_topic='robotsound')
 

Public Attributes

 actionclient
 
 pub
 
 sub
 

Private Attributes

 _blocking
 
 _playing
 

Detailed Description

This class is a helper class for communicating with the sound_play node via the sound_play.SoundRequest message.

There is a one-to-one mapping between methods and invocations of the sound_play.SoundRequest message.

Definition at line 92 of file libsoundplay.py.

Constructor & Destructor Documentation

◆ __init__()

def sound_play.libsoundplay.SoundClient.__init__ (   self,
  blocking = False,
  sound_action = 'sound_play',
  sound_topic = 'robotsound' 
)
The SoundClient can send SoundRequests in two modes: non-blocking mode
(by publishing a message to the soundplay_node directly) which will
return as soon as the sound request has been sent, or blocking mode (by
using the actionlib interface) which will wait until the sound has
finished playing completely.

The blocking parameter here is the standard behavior, but can be
over-ridden.  Each say/play/start/repeat method can take in an optional
`blocking=True|False` argument that will over-ride the class-wide
behavior. See soundclient_example.py for an example of this behavior.

:param blocking: Used as the default behavior unless over-ridden,
(default = false)

:param sound_action: Namespace of actionlib to play sound. The actionlib interface is used
only if blocking parameter is True. (default='sound_play')

:param sound_topic: Topic name to play sound. The topic interface is used only if blocking
parameter is False. (default='robotsound')

Definition at line 94 of file libsoundplay.py.

Member Data Documentation

◆ _blocking

sound_play.libsoundplay.SoundClient._blocking
private

Definition at line 118 of file libsoundplay.py.

◆ _playing

sound_play.libsoundplay.SoundClient._playing
private

Definition at line 119 of file libsoundplay.py.

◆ actionclient

sound_play.libsoundplay.SoundClient.actionclient

Definition at line 123 of file libsoundplay.py.

◆ pub

sound_play.libsoundplay.SoundClient.pub

Definition at line 125 of file libsoundplay.py.

◆ sub

sound_play.libsoundplay.SoundClient.sub

Definition at line 126 of file libsoundplay.py.


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


sound_play
Author(s): Blaise Gassend
autogenerated on Fri Aug 16 2024 02:42:13