Share via


BumpBar.BumpBarSound Method

2/27/2008

Sounds the bump bar enunciator for the bump bar(s) specified by the units parameter.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Syntax

'Declaration
Public MustOverride Sub BumpBarSound ( _
    units As DeviceUnits, _
    frequency As Integer, _
    duration As Integer, _
    numberOfCycles As Integer, _
    interSoundWait As Integer _
)
public abstract void BumpBarSound (
    DeviceUnits units,
    int frequency,
    int duration,
    int numberOfCycles,
    int interSoundWait
)
public:
virtual void BumpBarSound (
    DeviceUnits units, 
    int frequency, 
    int duration, 
    int numberOfCycles, 
    int interSoundWait
) abstract
public abstract void BumpBarSound (
    DeviceUnits units, 
    int frequency, 
    int duration, 
    int numberOfCycles, 
    int interSoundWait
)
public abstract function BumpBarSound (
    units : DeviceUnits, 
    frequency : int, 
    duration : int, 
    numberOfCycles : int, 
    interSoundWait : int
)

Parameters

  • units
    Bitwise mask that indicates which bump bar unit(s) to operate on.
  • frequency
    Tone frequency in Hertz.
  • duration
    Tone duration in milliseconds.
  • numberOfCycles
    If WaitForever, starts bump bar sounding and, repeats continuously. Else performs the specified number of cycles.
  • interSoundWait
    When numberOfCycles is not one, pauses for interSoundWait milliseconds before repeating the tone cycle, that is before playing the tone again.

Remarks

BumpBarSound is performed synchronously if AsyncMode is false, and asynchronously if AsyncMode is true.

The duration of a tone cycle is as follows:

duration parameter +

After the bump bar has started an asynchronous sound, you can stop the sound by using the ClearOutput method. When an interSoundWait value of WaitForever is used to start the sound, an application must use ClearOutput to stop the continuous sounding of tones.

If the CapTone property is false for the selected unit(s), an Illegal exception is thrown.

The following code example sounds one tone on unit ID 1 and unit ID 4. The frequency is set to 64 Hertz and will sound for 100 milliseconds:

BB.BumpBarSound( Unit1 | Unit4, 64, 100, 1, 0 )

BumpBarSound may throw a PosControlException with the following ErrorCodes.

Value

Meaning

Illegal

One of the following errors occurred:

  • numberOfCycles is neither a positive, nonzero value nor WaitForever.

  • numberOfCycles is WaitForever when AsyncMode is false.

  • A negative interSoundWait is specified.

  • units is zero or a nonexistent unit is specified.

  • A unit in units does not support the CapTone capability.

The ErrorUnits and ErrorCodeExtended properties may be updated before return.

Failure

An error occurred while communicating with one of the bump bar units specified by the units parameter. The ErrorUnits and ErrorCodeExtended properties are updated before return. (Can only be returned if AsyncMode is false.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

BumpBar Class
BumpBar Members
Microsoft.PointOfService Namespace
AsyncMode
ErrorString
ErrorUnits
CapTone
ClearOutput