doc/code_debug.txt
author etisserant
Fri, 06 Apr 2007 16:49:28 +0200
changeset 149 fe50ada8020b
parent 0 4472ee7c6c3e
child 288 26015ee2c2c9
permissions -rw-r--r--
Changes in the API:
- No more mandatory callbacks declared for each node anymore
heartbeatError
SDOtimeoutError
initialisation
preOperational
operational
stopped
post_sync
post_TPDO
canSend

- Fill function ptr to declare callbacks
CO_Data.heartbeatError
CO_Data.SDOtimeoutError
CO_Data.initialisation
CO_Data.preOperational
CO_Data.operational
CO_Data.stopped
CO_Data.post_sync
CO_Data.post_TPDO

- CanClose now takes CO_Data* as parameter
- canSend is provided to the stack directly by OS interface, no specific callback.

# Debug and warning codes
-------------------------

Errors are managed by the macro 
MSG_ERR(nbr, string, value)

Warnings and Informations  are managed by the macro
MSG_WAR(nbr, string, value)



The format of nbr
++++++++++++++++++++
16 bits, writen in hexadecimal: 0xtfxx

t   : 1    -> Error
      2    -> Warning
      3    -> Information

f   : 0    -> In file sync.c
      1    ->         lifegrd.c
      2    ->         objacces.c
      3    ->         timer.c
      4    ->         nmtSlave.c
      5    ->         nmtMaster.c
      6    ->         canOpenDriver.c, interrupt.c, variahw.c (errors nb 20 .. 30)
      7    ->         initObjdict.c
      8    ->         Maps_module_utilisé.cpp
      9    ->         pdo.c
      A    ->         sdo.c
      B    ->         objacces.c
      D    ->         user's application
      E    ->         user's application
      F    ->         user's application

xx  : a number


The format of string
++++++++++++++++++++
A string, ended by a space, whithout a newline

The format of value
++++++++++++++++++++
Unsigned 32 bits or less