home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / Docs / RISCOS-Library-Docs / ROMModule.pm < prev    next >
Text File  |  1999-04-17  |  2KB  |  75 lines

  1. NAME
  2.     RISCOS::ROMModule -- routines to enumerate the ROM modules
  3.  
  4. SYNOPSIS
  5.         use RISCOS::ROMModule;
  6.  
  7.         @rommods = rommodules;
  8.  
  9.         foreach $mod (@rommods) {
  10.             print $mod->Line();
  11.         }
  12.  
  13.  
  14. DESCRIPTION
  15.     `RISCOS::ROMModule' provides a class to hold details about a
  16.     module in ROM, and a subroutine `rommodules' to enumerate all
  17.     modules in ROM.
  18.  
  19.   Methods
  20.  
  21.     new [<number>, [<rom>]]
  22.         Returns a new `RISCOS::ROMModule' object with details of
  23.         module *number* in ROM *rom*. *number* defaults to `0',
  24.         *rom* to `-1'.
  25.  
  26.         Returns undefined if the specified module does not exist.
  27.  
  28.     Name
  29.         Returns the name of the module.
  30.  
  31.     State
  32.         Returns the state of the module - *i.e.* 'Unplugged',
  33.         'Dormant', 'Active', 'Running'
  34.  
  35.         Currently this is only a text string, but if the proposed
  36.         `DualVar' module becomes available this will return a dual-
  37.         valued scalar with the string and the `OS_Module 20' numeric
  38.         code (-1, 0, 1, 2 respectively).
  39.  
  40.     Chunk
  41.         Returns the chunk number for an expansion card module.
  42.  
  43.     Version
  44.         Returns the version number of the module.
  45.  
  46.     ROM Returns the ROM number of the module. (Not the ROM number + 1 as
  47.         returned by `OS_Module 20'.)
  48.  
  49.     Number
  50.         Returns the number of the module in its ROM. (Not the ROM
  51.         number + 1 as returned by `OS_Module 20'.)
  52.  
  53.         By calling new in turn with `ROM' and `Number' + 1 it is
  54.         possible to enumerate all the modules in ROM, which is
  55.         exactly what `rommodules' does.
  56.  
  57.     Line
  58.         Returns a line of text in the same format as the OS
  59.         `ROMModules' would, except that the formatting of the ROM
  60.         numbers is correct (compare with RISC OS 3.70).
  61.  
  62.  
  63.   rommodules
  64.  
  65.     `rommodules' returns an array of `RISCOS::RomModule' objects
  66.     corresponding to all modules in the System ROMs and any
  67.     expansion cards, in the order returned by `OS_Module 20'.
  68.  
  69. BUGS
  70.     None known.
  71.  
  72. AUTHOR
  73.     Nicholas Clark <nick@unfortu.net>
  74.  
  75.