Depending on the way the whistle is used, a trainer may simply gather a dog's attention or inflict pain for the purpose of behavior modification.
The name dog whistle is often used for both lung-powered whistles as well as electronic devices that emit ultrasonic sound via piezoelectric emitters. The electronic variety are sometimes coupled with bark detection circuits in an effort to curb barking behavior.