Sample communication application – Beijer Electronics SCOM Protocol EN User Manual
Page 139
Sample Communication Application
Elektronik-Systeme Lauer, MAEN976
139
/*=======================================================================
A local version of strupr.
*/
char*
mystrupr(char *pc)
{
char *pcu;
/*========*/
for (pcu=pc;*pcu!=0;pcu++)
*pcu=toupper(*pcu);
return pc;
}
/*=======================================================================
Displays the given message and software usage.
*/
void
printUsage(char *pucMessage)
{
printf(">>> ");
printf(pucMessage);
printf("."_ _);
printf(_
"Usage:"_
"------"_
" lscom
_
"
"
"
_
" Numeric values can be written either in decimal or hexadecimal."_
" The type of all numeric values is BYTE."_
_
" This application uses the UDP ports 10000/10001."_
_
_
"Examples:"_
"---------"_
" Set digital output port bit 1 of monitor at address 7 (0.7):"_
" lscom 0x07 LAU 0x02 0x03 0x02"_
_
" Set brightness of monitor at address 1.5 to 200:"_
" lscom 0x15 BRT 200"_
_
" Query manufacturer ID of monitor at address 3.14:"_
" lscom 0x3E MAN"_
_);
}
/*=======================================================================
Displays the given error message in a formatted style.
*/
void
printError(char *pucError)
{
printf("> ERROR: ");
printf(pucError);
printf("."_);
}
/*=======================================================================