diff -r f45fd4cd3832 -r 34654679f262 doc/doxygen/html/dcf_8c-source.html --- a/doc/doxygen/html/dcf_8c-source.html Fri Jul 06 10:53:15 2007 +0200 +++ b/doc/doxygen/html/dcf_8c-source.html Mon Jul 16 08:56:03 2007 +0200 @@ -18,7 +18,7 @@
  • Globals
  • +src

    dcf.c

    Go to the documentation of this file.
    00001 /*
     00002   This file is part of CanFestival, a library implementing CanOpen
     00003   Stack.
    @@ -49,92 +49,92 @@
     00039 #include "dcf.h"
     00040 #include "sysdep.h"
     00041 
    -00042 extern UNS8 _writeNetworkDict (CO_Data* d, UNS8 nodeId, UNS16 index,
    -00043                                UNS8 subIndex, UNS8 count, UNS8 dataType, void *data, SDOCallback_t Callback, UNS8 endianize);
    +00042 extern UNS8 _writeNetworkDict (CO_Data* d, UNS8 nodeId, UNS16 index,
    +00043                                UNS8 subIndex, UNS8 count, UNS8 dataType, void *data, SDOCallback_t Callback, UNS8 endianize);
     00044 
    -00045 const indextable *ptrTable;
    +00045 const indextable *ptrTable;
     00046 
    -00053 static void CheckSDOAndContinue(CO_Data* d, UNS8 nodeId)
    +00053 static void CheckSDOAndContinue(CO_Data* d, UNS8 nodeId)
     00054 {
    -00055   UNS32 abortCode;
    +00055   UNS32 abortCode;
     00056 
    -00057   if(getWriteResultNetworkDict (d, nodeId, &abortCode) != SDO_FINISHED)
    +00057   if(getWriteResultNetworkDict (d, nodeId, &abortCode) != SDO_FINISHED)
     00058     {
    -00059       MSG_ERR(0x1A01, "SDO error in consise DCF", abortCode);
    -00060       MSG_WAR(0x2A02, "server node : ", nodeId);
    +00059       MSG_ERR(0x1A01, "SDO error in consise DCF", abortCode);
    +00060       MSG_WAR(0x2A02, "server node : ", nodeId);
     00061     }
     00062 
    -00063   closeSDOtransfer(d, nodeId, SDO_CLIENT);
    -00064   decompo_dcf(d,nodeId);
    +00063   closeSDOtransfer(d, nodeId, SDO_CLIENT);
    +00064   decompo_dcf(d,nodeId);
     00065 }
     00066 
    -00075 UNS32 decompo_dcf(CO_Data* d,UNS8 nodeId)
    +00075 UNS32 decompo_dcf(CO_Data* d,UNS8 nodeId)
     00076 {
    -00077   UNS32 errorCode;
    -00078   UNS16 target_Index;
    -00079   UNS8 target_Subindex;
    -00080   UNS32 target_Size;
    -00081   UNS32 res;
    -00082   ODCallback_t *Callback;
    +00077   UNS32 errorCode;
    +00078   UNS16 target_Index;
    +00079   UNS8 target_Subindex;
    +00080   UNS32 target_Size;
    +00081   UNS32 res;
    +00082   ODCallback_t *Callback;
     00083 
    -00084   ptrTable = (*d->scanIndexOD)(0x1F22, &errorCode, &Callback);
    -00085   if (errorCode != OD_SUCCESSFUL)
    +00084   ptrTable = (*d->scanIndexOD)(0x1F22, &errorCode, &Callback);
    +00085   if (errorCode != OD_SUCCESSFUL)
     00086     {
     00087       return errorCode;
     00088     }
     00089 
     00090   /* Loop on all Nodes supported in DCF subindexes*/
     00091   while (nodeId < ptrTable->bSubCount){
    -00092     UNS32 nb_targets;
    +00092     UNS32 nb_targets;
     00093 
    -00094     UNS8 szData = ptrTable->pSubindex[nodeId].size;
    -00095     UNS8* dcfend;
    +00094     UNS8 szData = ptrTable->pSubindex[nodeId].size;
    +00095     UNS8* dcfend;
     00096 
     00097     {
    -00098       UNS8* dcf = *((UNS8**)ptrTable->pSubindex[nodeId].pObject);
    +00098       UNS8* dcf = *((UNS8**)ptrTable->pSubindex[nodeId].pObject);
     00099       dcfend = dcf + szData;
    -00100       if (!d->dcf_cursor){
    -00101         d->dcf_cursor = (UNS8*)dcf + 4;
    -00102         d->dcf_count_targets = 0;
    +00100       if (!d->dcf_cursor){
    +00101         d->dcf_cursor = (UNS8*)dcf + 4;
    +00102         d->dcf_count_targets = 0;
     00103       }
    -00104       nb_targets = UNS32_LE(*((UNS32*)dcf));
    +00104       nb_targets = UNS32_LE(*((UNS32*)dcf));
     00105     }
     00106 
     00107     /* condition on consise DCF string for NodeID, if big enough */
    -00108     if((UNS8*)d->dcf_cursor + 7 < (UNS8*)dcfend && d->dcf_count_targets < nb_targets)
    +00108     if((UNS8*)d->dcf_cursor + 7 < (UNS8*)dcfend && d->dcf_count_targets < nb_targets)
     00109       {
     00110         /* pointer to the DCF string for NodeID */
    -00111         target_Index = UNS16_LE(*((UNS16*)(d->dcf_cursor))); d->dcf_cursor += 2;
    -00112         target_Subindex = *((UNS8*)(((UNS8*)d->dcf_cursor)++));
    -00113         target_Size = UNS32_LE(*((UNS32*)(d->dcf_cursor))); d->dcf_cursor += 4;
    +00111         target_Index = UNS16_LE(*((UNS16*)(d->dcf_cursor))); d->dcf_cursor += 2;
    +00112         target_Subindex = *((UNS8*)(((UNS8*)d->dcf_cursor)++));
    +00113         target_Size = UNS32_LE(*((UNS32*)(d->dcf_cursor))); d->dcf_cursor += 4;
     00114 
     00115         /* printf("Master : ConfigureSlaveNode %2.2x (Concise
     00116           DCF)\n",nodeId);*/
    -00117         res = _writeNetworkDict(d, /* CO_Data* d*/
    +00117         res = _writeNetworkDict(d, /* CO_Data* d*/
     00118                                 nodeId, /* UNS8 nodeId*/
     00119                                 target_Index, /* UNS16 index*/
     00120                                 target_Subindex, /* UNS8 subindex*/
     00121                                 target_Size, /* UNS8 count*/
     00122                                 0, /* UNS8 dataType*/
    -00123                                 d->dcf_cursor,/* void *data*/
    +00123                                 d->dcf_cursor,/* void *data*/
     00124                                 CheckSDOAndContinue,/* SDOCallback_t
     00125                                                       Callback*/
     00126                                 0); /* no endianize*/
     00127         /* Push d->dcf_cursor to the end of data*/
     00128 
    -00129         d->dcf_cursor += target_Size;
    -00130         d->dcf_count_targets++;
    +00129         d->dcf_cursor += target_Size;
    +00130         d->dcf_count_targets++;
     00131 
     00132         return ;
     00133       }
     00134     nodeId++;
    -00135     d->dcf_cursor = NULL;
    +00135     d->dcf_cursor = NULL;
     00136   }
     00137   /*  Switch Master to preOperational state */
    -00138   (*d->preOperational)();
    +00138   (*d->preOperational)();
     00139 
     00140 }
    -

    Generated on Fri Jun 8 08:51:39 2007 for CanFestival by  +
    Generated on Mon Jul 2 19:10:16 2007 for CanFestival by  doxygen 1.5.1