Lines of Communication

version 1 by Aaron Reed

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Real-time file channels

    Include Real-Time Delays by Erik Temple.

    A real-time file channel is a kind of file channel.

    For reading a command when a real-time file channel is switched on (this is the process real-time file channels rule):
        let incoming commands be indexed text;
        now incoming commands is the merged inputs from the list of switched on real-time file channels;
        if incoming commands is empty:
            change the text of the player's command to "[ping command]";
        otherwise:
            change the text of the player's command to "[incoming commands]";
            now processing external commands is true;
            in the console say "[if the number of switched on real-time file channels is 1]real-time file channel [random switched on real-time file channel][otherwise]one or more real-time file channels[end if] caused command: *[the player's command]*";
        say "[ping output]".
        
    Before reading a command when a real-time file channel is switched on: wait the polling frequency in milliseconds ms before continuing.