Device::Audiotron

Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beach's Audiotron.
Download

Device::Audiotron Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dave Crawford
  • Publisher web site:
  • http://search.cpan.org/~dcrawford/Device-Audiotron-1.02/Audiotron.pm

Device::Audiotron Tags


Device::Audiotron Description

Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beach's Audiotron. Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beach's Audiotron.SYNOPSISuse Device::Audiotron; $at = new Device::Audiotron("Audiotron IP address","username","password"); if(!$at){die "Audiotron object failed to initialize.";}my ($ref_status, $ref_shares, $ref_hosts) = $at->GlobalInfo(); my $firmware_version = $ref_status->{"Version"};Device::Audiotron provides a tie-in into the API included in the latest firmware for Voyetra Turtle Beach's Audiotron.I highly suggest reading through the API documentation located at http://www.turtlebeach.com/site/products/audiotron/api/dl_api.asp before attempting to implement this module.The available methods for the Audiotron object and an example of usage for each are listed below. The native API call is listed in brackets below each method for informational purposes and for ease in referencing Voyetra's API documentation. GetInfo(Type,,) Returns a string containing the results from the command request. $type = "Global"; $info = $at->GetInfo($type); OR $type = "artist"; $count = 4; $criteria = "Staind"; $info = $at->GetInfo($type,$count,$criteria); Qfile(Type,Criteria) Returns a string containing the results from the command request. $type = "File"; $file = q|\LITHIUMMP3BushdeconstructedComedown.mp3|; $cmd_result = $at->Qfile($type, $file); AddFile(Full_File_Name) Returns a string containing the results from the command request. $file = q|\COBALTMP3new_song.mp3|; $cmd_result = $at->AddFile($file); Cmd(Command,) Returns a string containing the results from the command request. $cmd_name = "play"; $cmd_result = $at->Cmd($cmd_name); OR $cmd_name = "goto"; $cmd_arg = "18"; $cmd_result = $at->Cmd($cmd_name, $cmd_arg); GetStatus() Returns a hash containing element names equivalent to the 'field' names returned by the Audiotron. %status = $at->GetStatus(); print $status{'State'}; GlobalInfo() Returns references to a hash, an array, and an array of hashes. This is simply a call to GetInfo with "Global" passed as the type but has been customized to pre-parse the results. ($ref_status, $ref_shares, $ref_hosts) = $at->GlobalInfo(); In the above example '$ref_status' is a reference to a hash containing element names equivalent to the 'field' names returned from the "status" portion of the results. So for example, to get the version number of the firmware: $firmware_version = $ref_status->{"Version"}; Next, $ref_shares is a reference to an array where each element contains the UNC name for the share as listed in the Audiotron. Lastly, $ref_hosts is a reference to an array of hashes, one hash per host known by the Audiotron. Each hash in the array contains three elements named 'Host','IP', and 'State'. So for example, to get the IP address of the first host in the array: $ip_add = $ref_hosts->->{"IP"}; Msg(Text_line1,,) Returns a string containing the results from the command request. $line1 = "This is a test."; $line2 = "Just Another Perl Hacker"; $time_out = "5"; $cmd_result = $at->Msg($line1, $line2, $time_out); DumpToc(Share_name) Returns a (sometimes huge!) string containing the results from the command request. $share = q|\LITHIUMMP3|; $toc = $at->DumpToc($share); NOTE:This is here just as a 'placeholder', newer versions will allow the output to be written to a file instead of be handed back as a string. Very inefficient in it's current form. Requirements: · Perl


Device::Audiotron Related Software