This section will explain the main observing modes used at HartRAO and try to list the main features which are necessary and have to be supported by the NCCS.
They must be written in a pseudo control language which resembles a mixture of C and English. The algorithms must be broken down into short atomic actions. Control flow must be indicated by means of the following control statements :
if ( condition ) then { statement(s) } else { statement(s) } while ( condition ) do { statement(s) } repeat { statement(s) } until ( condition ) for ( i = 0 ; i < N ; i++ ) do { statement(s) } switch ( condition ) { case (1) : { statement(s) ; break } . . . case (n) : { statement(s) ; break } default : { statement(s) } }Comments can be specified in the standard C or C++ style i.e.
/* this is a short comment */ // the whole line is a comment
Here is an example of using this language to specify an algorithm one of the authors uses for waking up in the morning :
repeat { sleep alarm rings switch off alarm if ( first time ) then { sleep } else { wakeup } } until ( awake) wash face brush teeth while ( not really awake ) { make coffee drink coffee meditate on life } if ( dirty ) then { take a shower } get dressed go to work
The NCCS must support the observing algorithms below either as they are described here or in an equivalent manner.