Boatswain's call
A boatswain's call, pipe or bosun's whistle is a pipe or a non-diaphragm type whistle used on naval ships by a boatswain.
The pipe consists of a narrow tube (the gun) which directs air over a metal sphere (the buoy) with a hole in the top. The player opens and closes the hand over the hole to change the pitch. The rest of the pipe consists of a "keel", a flat piece of metal beneath the gun that holds the call together, and the "shackle", a keyring that connects a long silver or brass chain that sits around the collar, when in ceremonial uniform.

History and usage
Historically the boatswain's call was used to pass commands to the crew when the voice could not be heard over the sounds of the sea. Because of its high pitch, it could be heard over the activities of the crew and bad weather. It is now used in traditional bugle calls such as Evening Colors/Sunset, and in other ceremonies in most modern navies. It is sometimes accompanied by other auditive features such as ruffles and flourishes, voice commands and announcements, or even a gun salute.
It was first used as a badge of rank for the Lord High Admiral of England in 1485.

Honouring
Pipe Aboard/Ashore: Flag-rank officers or an important guest is boarding or departing a Navy ship; also used to mark the final departure of a sailor retiring from active duty. This is part of a ceremony called "manning the side" which includes a party of sailors known as "side boys". It has its origins in the need to hoist visiting senior officers aboard using a bosun's chair when the weather was too rough for the use of ladders. The bosun would use his call to direct the side boys in the hoisting of the chair.)
Funerals: When the body of a person entitled to honours in their lifetime is taken aboard a Navy ship, the same ceremony is observed.

Commands
The following are the commands that are passed with the help of a bosun's pipe.
Haul: The most basic of calls. Crews of warships were not allowed to sing work songs or shanties, so the pipe coordinated the sailors. The low note was for the pause and preparatory; the high for pulling on the line.
The Side or Away Galley: Descends from the tradition of hoisting officers aboard ship in a chair. It is a combination of haul, and then a command to lower. This call remains in use as an honour given to officers when embarking or disembarking.
Away Boats: Used to order a ship's boats to leave the ship's side.
Call the Boatswain's Mates: The boatswain's gang to report.
All Hands on Deck: Crews were split into three (or earlier, two) rotating watches that stood for two to four hours at a time. This call signals the entire crew to assemble on deck.
Word to be Passed: Command for silence, an order to follow.
Pipe Down: Dismissal of all the crew not on watch.
Sweepers: End of the work day. Ostensibly sailors would "sweep up" prior to departure in preparation for the following day.
Pipe to any meal: Pipe All Hands, followed by long Heave Around (Mess gear), and long Pipe Down.
Still: Used to call the crew to attention.  This would be done, for example, when two warships meet, the still being piped as the junior ship salutes the senior ship (the seniority of a warship is the seniority of her captain); a less common alternative to the still being piped is a bugle call.
Carry On: Used after the still, to dismiss the crew back to their duties.
General Call: Piped before an announcement.
Officer of the Day: Call the Officer of the Day to the Gangway.

In popular culture
In the entertainment franchise Star Trek, the boatswain's call can be heard many times when the commanding officer initiates communication with the crew. The call can also be heard in the movie Battleship, when the commanding officer comes on deck.

References
External links

The Boatswain's Call – Photos and Diagrams ReadyAyeReady.com
Bosun's Call MP3s by the US Navy Band
A guide to the Robert S. Benner photographs of boatswains' whistles, 1976–1995