[ C++ RCOS Home | RCOS.java Home | RCOS Home | David's Home ]

RCOS C++ CRC for class LnDrv

Name:

LnDrv

Comment:

This class processes user input commands from a terminal running in full duplex mode. It performs simple input editing by destructive backspace, echoing the user's input and passing on the owner processes output. Edited input is held in a chain of CBLOCK structs (like Unix) from which delimited blocks can be retrieved to satisfy data requests.

This (initial) version performs line (CR delimited) buffering only and does not expand TAB characters.

Collaborators:

Responsibilities:

 class LnDrv : public port {
    Cblock  Cblk;
    UINT16  uPid, uTerm;                // who makes 'em and who eats 'em
    INT16   nBlkReq, nChReq;            // outstanding request counts.
    char    cDelim;                     // Data block delimiter char
    BOOL    bBreakOn;                   // control break detection
    void LnReq (void);                  // process User Process request
    void LnEdit (char);                 // process data from terminal
  public:
    LnDrv (UINT16, UINT16, Knl*);       // constructor
    ~LnDrv ();                          // destructor
    void RxPort (PMSG);                 // Receive port body for virtual
  };