cic_transmit

Synopsis

    
    #include "nortlib.h"
    void cic_transmit(char *buf, int n_chars, int transmit);
    

Description

cic_transmit() is called by keyboard command clients to transmit them as required to the command server using the nortlib routine ci_sendcmd(). Commands are only actually transmitted if the transmit argument is non-zero. Since the client and server share source code, it is easy for cmdgen to determine whether a particular command will result in an action at the far end.

cic_transmit also keeps track of the command parser states, recording the commands required to get to a particular state. For example, in the HOX command configuration, entering "OH\r" will cause the parser to change to a new state (submemu) which expects OH commands. This does not require transmission, but it does need to be recorded because of the new state. Subsequent commands will be transmitted prefixed by the "OH\r" until a "\r" is entered, returning the parser to the base state.

The command in buf is not ASCIIZ. Spaces may be represented by NULs and the terminating newline should be universally represented by a NUL. These must be translated back to their original representation before actual transmission.

This is an internal function and should not be called casually. ci_sendcmd() is a better choice for sending commands.

Returns

Nothing

See Also

ci_sendcmd(), Command Server and Client Functions.

Source File

/usr/local/src/nortlib/cictrans.c

Alphabetical List
Subject List
Return to Manuals Page
webmaster@huarp.harvard.edu
Copyright 2001 by the President and Fellows of Harvard College