RadiSys 6200plus Series Manual de usuario Pagina 135

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 275
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 134
Appendix
A
Sample
Applications
A-13
/***************************************************************************/
/***************************** DISPLAY_STATUS ******************************/
/***************************************************************************/
void display_status(PLC540V_STATUS_TYPE *status)
{
// This function determines if the status was an error. If so, it will
// display a specific error type to the screen. Three areas can create
// errors: The PLC–5/VME Processor, the EPC Driver or PCCC commands.
char buf[80+1];
if (status–>plc540vStatus != 0)
{
cprintf(”\7\7\7”);
switch(status–>statusCategory)
{
case kPLC540V_STATUS:
sprintf(buf, ”%s: 0x%04x”, status–>plc540vStatus);
show_error(buf);
break;
case kEPC_STATUS:
sprintf(buf, ”%s: %04d”, status–>epcStatus);
show_error(buf);
break;
case kPCCC_STATUS:
sprintf(buf, ”%s: 0x%04x”, status–>pcccStatus.value);
show_error(buf);
break;
default:
show_error(”Unknown error!”);
}
}
}
.AUTODEPEND
# *Translator Definitions*
CC = bcc +VMEDEMO.CFG
TASM = TASM
TLIB = tlib
TLINK = tlink
LIBPATH = C:\BORLANDC\LIB
INCLUDEPATH = C:\BORLANDC\INCLUDE
# *Implicit Rules*
.c.obj:
$(CC) –c {$< }
.cpp.obj:
$(CC) –c {$< }
# *List Macros*
VMEDEMO.MAK
Vista de pagina 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 274 275

Comentarios a estos manuales

Sin comentarios