For some time now I've been looking around for the rules about how to use bell codes for block working.
I have found various references in books and on the Web that list the common British bell codes. Most of these give a general description along the line of, "A sends 'Attention' to B. B acknowledges by ringing 'Attention' back. A offers train by ringing appropriate code. B acknowledges by repeating code.'. They then go on to mention codes other than 'Attention' and 'Is line clear for ...'.
What I'm having trouble finding is a clear description of which codes need to be proceeded by 'Attention' and which don't, I assume certain emergency and information codes (e.g. "Train entering section") don't require to be proceeded by 'Attention'.
Similarly what codes don't require acknowledgement by repeating, or might be acknowledged by a different code (which itself must sometimes be repeated by the box that started the exchange). I have seen a mention of 'Restricted Acceptance'.
I ask because I have written a program that can ring and recognise bell codes but I want to build it up with the rules such that it can behave like a Signalman in adjacent box (in computing terms I suppose I should call it "The Chinese Signalbox" :-)