Example: RteGenerateDeviceName

In the following example, the RteGenerateDeviceName function generates unique device names with the format "TERMx". The first name is TERM0, followed by TERM0, TERM2, etc.

RteGenerateDeviceName(char buf[32])

{    

    static int n=0;

    sprintf(buf, "TERM%d", n);

    n=n+1;

}