home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 3 / AUCD3.iso / airport / utils / freecost / !FreeCost / !Help < prev    next >
Text File  |  1997-06-24  |  18KB  |  449 lines

  1. FreeCost 0.43 Help file - 24 Jun 1997
  2.  
  3. Contents:
  4.  
  5. 0: Introduction
  6. 1: Installation
  7. 2: Configuration
  8. 3: Running
  9. 4: The last call option
  10. 5: The online timer
  11. 6: Bugs, limitations, contacting the author
  12.  
  13.  
  14.  
  15. 0: Introduction
  16.  
  17.           FreeCost is a simple little utility that tells you how much
  18.   money you have spent on phone calls to your internet service provider.
  19.   It does this by looking at the log files produced by the dialler
  20.   program (eg FreeDial) which record when the calls started and
  21.   finished. The information is saved as a text file, which you can
  22.   browse at your leisure.
  23.           At the present time, three dialler programs are
  24.   properly supported. These are SlipDial (version 0.35+), FreeDial
  25.   (version 0.23+) and the ANT Internet Suite (version 2?).
  26.  
  27.      Licence
  28.      ~~~~~~~
  29.      FreeCost is Copyright © Rik Griffin of Squeaky Software 1996 and 1997.
  30.  
  31.      This application may be distributed freely, as long as no charge is
  32.      made, except for reasonable media costs. No modifications may be
  33.      made to versions being distributed, except for alterations made to
  34.      the configuration files as instructed below.
  35.  
  36.      BBSs or FTP sites wishing to distribute FreeCost should ensure that
  37.      the 'Toolbx.zip' archive containing the Toolbox modules is also
  38.      available from the same place. I would also appreciate being told
  39.      that a site is carrying my program, so I can send out updates when
  40.      they become available.
  41.  
  42. 1: Installation
  43.  
  44.   This is very simple. Just copy FreeCost to a directory of your choice.
  45.   If you wish to run FreeCost from a read only filing system, You'll
  46.   need to edit the !Run file, and redefine the variable FreeCost$Options
  47.   to point to somewhere writable.
  48.  
  49.   FreeCost needs Acorn's ToolBox modules, and if you haven't got them
  50.   loaded already, will look for them in System:Modules.Toolbox. The
  51.   required modules will not have been supplied in the same archive as
  52.   the main program, due to their size. They should be available from the
  53.   same place that you got FreeCost from, in an archive called
  54.   'Toolbx.zip'.
  55.  
  56.   Use the SysMerge application to update your !System directory, unless
  57.   you have RISC OS 3.5 or greater, in which case open the configuration
  58.   window (by running !Boot) and click on the System icon. Drag the
  59.   supplied !System directory to the window that opens.
  60.  
  61.  
  62. 2: Configuration
  63.  
  64.   FreeCost comes preconfigured for customers of British Telecom. If you
  65.   don't use BT, you have to edit the !FreeCost.Resources.UK.Config file.
  66.   If you want to calculate costs for non-local calls, you'll also have
  67.   to edit at least some of the config file.
  68.  
  69.   The config file consists of comments and tokens. The comments start
  70.   with a # character, and everything else is a token. When you edit the
  71.   file, you must only change whatever comes after the colon (:) in a
  72.   token. FreeCost only uses one currency unit, in the UK this would be
  73.   pence, however as long as you are consistent, it can be anything you
  74.   want.
  75.   If your phone company also charges you some form of tax on top of
  76.   the basic rate, this is configured separately, so enter all the cost
  77.   information WITHOUT tax added.
  78.   For example, BT has to charge VAT at 17.5%, so don't add this to any of
  79.   the charges you input, but set the TAX_RATE token to 0.175.
  80.  
  81.   The first tokens that you should change are listed below:
  82.  
  83.     MIN_CHARGE: The minimum charge for a single call. For BT, this is
  84.                 4.2 pence (before tax).
  85.  
  86.     TAX_RATE:   The local rate of tax on the charges. In the UK, this is
  87.                 17.5%, so set the token to 0.175.
  88.  
  89.     EXTRA_TIME: When you dial up a service provider, your modem spends a
  90.                 few seconds talking to their modem, before the dialler
  91.                 program sees that a connection has been made, and logs
  92.                 the call. This takes about 20 seconds for calls to Demon
  93.                 Internet. This token's value is added to the length of
  94.                 all the logged calls, to partially compensate for this
  95.                 inaccuracy in the logs.
  96.  
  97.   The next set of tokens are of the form "BAND_t_n" where t represents
  98.   the time band and n represents the number-related band. These tokens
  99.   are used to define all the different possible call costs. The number
  100.   related band can be used to apply different costs for diffent dialing
  101.   codes, and the time band is selected depending on the time of day that
  102.   the call was made. The costs are expressed per unit, and you define
  103.   what a unit is in the next section. For BT, it would be 1 second.
  104.  
  105.   So, the phone company might have three different time-based charges
  106.   (BT has weekend, weekday off-peak and weekday peak) and three
  107.   different distance bands. Also you might make some calls via another
  108.   phone company, such as Mercury, which can be recognised as they start
  109.   with a special code.
  110.  
  111.   At the moment the program only supports three time bands and five number
  112.   bands, but if you don't need this many, just set the unused ones to
  113.   zero. They all have to be set to something though. If you think you
  114.   need more, mail the author!
  115.  
  116.   So, for the above example, you would set the tokens as follows:
  117.  
  118.     BAND_1_1:0.01500
  119.     BAND_2_1:0.02333
  120.     BAND_3_1:0.05667
  121.  
  122.     BAND_1_2:0.04667
  123.     BAND_2_2:0.05667
  124.     BAND_3_2:0.11667
  125.  
  126.     BAND_1_3:0.04667
  127.     BAND_2_3:0.08333
  128.     BAND_3_3:0.14000
  129.  
  130.     BAND_1_4:<mercury_weekend_charge>
  131.     BAND_2_4:<mercury_offpeak_charge>
  132.     BAND_3_4:<mercury_peak_charge>
  133.  
  134.     BAND_1_5:0.0
  135.     BAND_2_5:0.0
  136.     BAND_3_5:0.0
  137.  
  138.   A limitation of this is that the same time bands are applied to all the
  139.   numbers, whereas in fact, the two phone companies might not use the same
  140.   time bands. I'll try to provide a solution for this in a future version.
  141.  
  142.   Now, you have to set up the tokens that define the length of a unit
  143.   during each time band. The tokens for this are of the form UNIT_t_n.
  144.   For BT use, set them all to 1.
  145.  
  146.   For example, if your phone company charged 5p for 100 seconds at cheap
  147.   rate, and 4p for 30 seconds at peak rate, you would use these tokens:
  148.  
  149.   BAND_1_1:5
  150.   BAND_2_1:4
  151.  
  152.   UNIT_1_1:100
  153.   UNIT_2_1:30
  154.  
  155.   and of course the tokens for the different number based bands as well.
  156.  
  157.   Some phone companies charge varying amounts of money for a constant
  158.   length of time (like BT). Others charge a constant amount of money for
  159.   a varying length of time. This is why you have to set both of these
  160.   sets of tokens. I don't know of any that vary both the price and the
  161.   unit length, but FreeCost can cope with that as well.
  162.  
  163.   Next you need to specify when each time band is in force. The next 7
  164.   tokens define a 'map' of all the hours in a week, and specify which
  165.   charge band is applied to each individual hour. The one below is for BT:
  166.  
  167.     DAY_0:111111111111111111111111
  168.     DAY_1:222222223333333333222222
  169.     DAY_2:222222223333333333222222
  170.     DAY_3:222222223333333333222222
  171.     DAY_4:222222223333333333222222
  172.     DAY_5:222222223333333333222222
  173.     DAY_6:111111111111111111111111
  174.  
  175.   This means that band 1 applies all day on DAY_0 (Sunday) and DAY_6
  176.   (Saturday).
  177.   Band 2 applies from midnight to 8am on all weekdays.
  178.   Band 3 applies from 8am to 6pm all weekdays.
  179.   Then Band 2 applies from 6pm to midnight all weekdays.
  180.  
  181.  
  182.   Next, you configure any phone numbers that you want to be in a number
  183.   band other than band 1. All numbers except those in the list you define
  184.   here default to using rate 1. (The rates defined above with tokens
  185.   BAND_1_1, BAND_2_1 and BAND_3_1)
  186.  
  187.   To define these tokens, use a pattern of digits to be matched, and use a
  188.   * character as a wildcard that matches exactly one digit. Each string
  189.   must be followed by a comma. For example:
  190.  
  191.     NUM_BAND_1:0151*******,
  192.     NUM_BAND_2:01274******,
  193.     NUM_BAND_3:0181*******,0171*******,
  194.     NUM_BAND_4:131***********,132***********,
  195.     NUM_BAND_5:
  196.  
  197.   Thus any numbers starting with 0151 and containing exactly 7 more digits
  198.   will be charged at rate 1. Numbers starting 01274 with another 6 digits
  199.   will be charged at rate 2. And so on. You can leave these five tokens
  200.   blank if you like, and all numbers will be charged at rate 1.
  201.   You can't define a token larger than 255 characters, so bear this in
  202.   mind when making up these lists.
  203.  
  204.  
  205.   Now you should set up the tokens that name the various bands. Set
  206.   any unused tokens to be blank.
  207.   First, the TIME_NAME_t tokens set the names of the three time bands, for
  208.   example:
  209.     TIME_NAME_1:Weekend
  210.     TIME_NAME_2:Off peak
  211.     TIME_NAME_3:Peak
  212.  
  213.   And the NUM_NAME_n tokens set the names of the number related bands. eg:
  214.     NUM_NAME_1:Local
  215.     NUM_NAME_2:Regional
  216.     NUM_NAME_3:National
  217.     NUM_NAME_4:Mercury
  218.     NUM_NAME_5:
  219.  
  220.  
  221.   When you've done all this (gasp pant), you are ready to run FreeCost !
  222.  
  223.   Last minute note: I lied! You have to edit one more thing if you don't
  224.   live in the UK. In the !Run file, the last line will be something like
  225.   this:
  226.  
  227.     run <FreeCost$Dir>.!RunImage -terr UK
  228.  
  229.   Change the UK to the name of the territory you want to use. The other
  230.   two provided in this release are:
  231.   NL - Netherlands
  232.   SA - South Africa
  233.  
  234.   This territory name is used to find the resource files. So if you run
  235.   FreeCost with 'UK' as the territory, the resource files needed are:
  236.   <FreeCost$Dir>.Resources.UK.Res
  237.   <FreeCost$Dir>.Resources.UK.Messages
  238.   <FreeCost$Dir>.Resources.UK.Config
  239.  
  240.   So if you wanted to translate the files into German, for example, you
  241.   would make a directory <FreeCost$Dir>.Resources.DE, and put copies of
  242.   the 3 files into there. Messages and Config are text files. Res is a
  243.   toolbox resources file, and you need !ResEd to edit it.
  244.  
  245.   If you translate my files into another language, please mail me a
  246.   copy, so I can include this in the next release. Also, note that the
  247.   NL and SA files are incompletely translated. I would be very grateful
  248.   for complete versions!
  249.  
  250.   If you wish to use the last call option (see later) you will have to
  251.   change the !FreeCost.!Last file in the same way as the !Run file.
  252.  
  253.  
  254. 3: Running FreeCost
  255.  
  256.   To run the program, just double click the !FreeCost icon. It will be
  257.   installed on the icon bar.
  258.  
  259.   Click MENU over the iconbar icon, and the main menu will be shown. There
  260.   are 4 entries, Info and Quit are obvious, the other two are explained
  261.   below:
  262.  
  263.     Options... Opens the options window. See below for details.
  264.  
  265.     Auto... Select this option to auto detect which dialler program you
  266.         use, and read in its log file. If this fails you will have to
  267.         find the log file yourself, and drag it to the iconbar icon.
  268.  
  269.   To start processing a log file, either select Auto... from the menu, or
  270.   drag the log file to the FreeCost iconbar icon. The results window will
  271.   open. This contains a short summary of the call costs, grouped by time
  272.   band, plus the overall cost.
  273.  
  274.   There is also a save dialogue in this window. Drag the file icon to a
  275.   directory display to save the detailed results file. This file contains
  276.   an entry for each call you made, detailing the length of the call, and
  277.   its cost. If you turned on the 'Add tax' option, then an extra column
  278.   details the tax added to the cost of each call. A total is shown at the
  279.   bottom.
  280.  
  281.   Clicking SELECT on the icon bar icon is a short cut to the Auto ...
  282.   option.
  283.  
  284.   The Options window.
  285.  
  286.   This window contains four groups of options. The first is 'Logging
  287.   options', and there are 2 option buttons. 'Add VAT' causes the
  288.   configuraed tax rate to be added to the cost of calls. 'Count bad
  289.   calls' causes badly logged calls to be included in the cost
  290.   calculations, at the minimum charge. Calls can get badly logged if
  291.   your internet software crashed whilst online, for example
  292.  
  293.   In the section titled 'Log file type' are several radio icons.
  294.   Normally you should leave 'Autodetect' selected. However, if FreeCost
  295.   does not accept a file that you think is a valid log file, try
  296.   changing this setting to override the autodetection. Note that this
  297.   may produce erroneous results if the file is not actually a valid log
  298.   file, but FreeCost will not reject it.
  299.  
  300.   The 'Process since' section contains three controls for setting a
  301.   date. When processing log files, FreeCost ignores all calls before
  302.   this date. So you could set this to the date of you last phone bill,
  303.   for example, and find out how much the next bill would be.
  304.  
  305.   Finally, there is 'Online timer'. If the 'Show timer' option is
  306.   ticked, the timer window will be shown when you are online. If 'Add
  307.   VAT' is ticked, the cost shown in the timer window will include tax.
  308.   If 'Extra time' is ticked, the timer will take into account the extra
  309.   time that you configured in section 2.
  310.  
  311.   The timer window can be shown in one of 5 default places, select which
  312.   you want from the pop up menu labelled 'Default position'. To allow
  313.   the online timer to properly calculate the cost of a call, it needs to
  314.   know the charge rate of the number you are calling. Select the number
  315.   band from the next pop up menu. FreeDial sets a variable Inet$Phone
  316.   which holds the phone number dialed, so FreeDial users can select this
  317.   option.
  318.  
  319.   The final option is 'Poll every' which sets how often (in seconds) the
  320.   online timer is updated. If you have a slow machine, you may find it
  321.   beneficial to update less frequently. I haven't investigated this in
  322.   much detail, feedback on performance issues is most welcome.
  323.  
  324.   Please see section 5 for more details about the online timer,
  325.   especially if you don't use FreeDial.
  326.  
  327.   Clicking 'Save' will save the options the the file pointed to by
  328.   FreeCost$Options. Clicking 'Cancel' will restore the previous
  329.   settings.
  330.  
  331.  
  332. 4: The last call option.
  333.  
  334.   There is a second way of running FreeCost, which is to run the file
  335.   <FreeCost$Dir>.!Last. This will output the length and cost of the last
  336.   call in the logfile to a message box, then FreeCost will quit. The
  337.   idea of this is to call FreeCost in this way when your internet
  338.   software hangs up the phone, thus you will know how much money you
  339.   just spent.
  340.  
  341.   For example, FreeDial users could put the following line at the end of
  342.   the !FreeUser.Files.FreeDial.Stacks.FreeNet.!ShutDown file:
  343.  
  344.   Filer_Run <FreeCost$Dir>.!Last
  345.  
  346.   Users of other dialer software (SlipDial, ANT) will have to work out
  347.   where to put the command themselves, sorry! Please let me know if you
  348.   do this, so I can put the information in the next Help file.
  349.  
  350.   What the !Last file actually does is call !FreeCost.!RunImage with
  351.   the -last switch. By default, when called with the -last option,
  352.   FreeCost will attempt to autodetect the log file. To override this,
  353.   use the -file <filename> switch.
  354.  
  355.   For example:
  356.  
  357.   Filer_Run <FreeCost$Dir>.!RunImage -terr UK -last -file <Inet$Dir>.CallLog
  358.  
  359.   or more simply:
  360.  
  361.   Filer_Run <FreeCost$Dir>.!Last -file <Inet$Dir>.CallLog
  362.  
  363. 5: The online timer
  364.  
  365.   If you have selected the 'Online timer' option in the options window,
  366.   then FreeCost keeps a look out for a system variable called
  367.   Inet$Timer. This variable is set by FreeDial when it dials, and it is
  368.   a code variable that simply counts the elapsed time. FreeDial also
  369.   sets Inet$Phone to the phone number dialled, and if you have selected
  370.   the appropriate option, FreeCost will use this variable to work out
  371.   the rate of the call.
  372.  
  373.   This variable might be set by other software also, you'll have to try
  374.   it out. Note that if the variable is invalid in any way, or the
  375.   number is not in your config file, the call is treated as band 1
  376.   (local), which for most people will be correct anyway.
  377.  
  378.   If you don't use FreeDial, but would like to use the online timer,
  379.   then you will have to arrange to set the Inet$Timer variable yourself,
  380.   as described below.
  381.  
  382.   When you go online, the command
  383.  
  384.     <FreeCost$Dir>.SetTimer Inet$Timer
  385.  
  386.   needs to be issued. This starts the timer.
  387.  
  388.   When you go offline, issue the command
  389.  
  390.     <FreeCost$Dir>.UnsetCV Inet$Timer
  391.  
  392.   which stops the timer.
  393.  
  394.   These two utility programs are included with FreeCost, but were
  395.   written by Gert-Jan de Vos, author of FreeDial. Many thanks to him for
  396.   permission to distribute them with FreeCost.
  397.  
  398.   If you lose the timer window, click Adjust on the iconbar icon.
  399.  
  400. 6: Bugs etc.
  401.  
  402.   There may be problems with ANT logs, I haven't tested this part very
  403.   much yet. Reports of successes and failures are welcome. If reporting
  404.   a problem, please send me the log file that causes the problem.
  405.  
  406.   The online timer needs more testing, and is not guaranteed bug free.
  407.   Again, reports of any sort are always welcome.
  408.  
  409.   The time taken by the timing algorithm to calculate the cost of any
  410.   call is proportional to the length of that call. If the online timer
  411.   is in use, the call cost is normally recalculated every second. It is
  412.   possible that a really long call would take so long to cost that
  413.   FreeCost would place a significant load on the system.
  414.  
  415.   If you find this is the case, reduce the frequency of polling in the
  416.   options window. However, Ran Mokady's !Usage application shows
  417.   FreeCost as using 2% of CPU time when costing a 1 hour call, and 7%
  418.   for a 12 hour call, when polling every second (RiscPC, ARM 610, RISCOS
  419.   3.60). Also, note that this is only an issue when the online timer is
  420.   active.
  421.  
  422. Limitations:
  423.  
  424.   Only a single set of time bands, despite the fact that different
  425.   numbers might have different time charges associated with them.
  426.  
  427.   I don't really know what to do when a time based charge band changes
  428.   part way through a time unit. For 1 second units, this isn't a problem
  429.   obviously. The present solution is merely to switch unit lengths
  430.   immediately, and count the time expired so far (against the old unit
  431.   length) against the first new unit length.
  432.  
  433.   FreeCost can't cope with call charges that change part way through a
  434.   call (except for changing of time bands of course), for example BT
  435.   customers who get a "surprise saver".
  436.  
  437. Contacting the author
  438.  
  439.   FreeCost was written by Rik Griffin of Squeaky Software.
  440.  
  441.   Feel free to email me with any comments about this program, especially
  442.   if you find any bugs.
  443.   Mail to: mouse@cheesey.demon.co.uk
  444.  
  445.   Why not check out TANKS from Werewolf Software? It's a multi player
  446.   game of skill and cunning. See http://www.werewlf.demon.co.uk/
  447.  
  448.   And watch out for the next Squeaky Software game ... coming (not very) soon!
  449.