src/objacces.c
changeset 594 17a171fe7c56
parent 588 ee181b4f177b
child 629 b9274b595650
equal deleted inserted replaced
593:44702aa24113 594:17a171fe7c56
   166                           *pExpectedSize, OD_LENGTH_DATA_INVALID);
   166                           *pExpectedSize, OD_LENGTH_DATA_INVALID);
   167     return OD_LENGTH_DATA_INVALID;
   167     return OD_LENGTH_DATA_INVALID;
   168   }
   168   }
   169 }
   169 }
   170 
   170 
   171 UNS32 getODentry( CO_Data* OD,
       
   172                   UNS16 wIndex,
       
   173                   UNS8 bSubindex,
       
   174                   void * pDestData,
       
   175                   UNS32 * pExpectedSize,
       
   176                   UNS8 * pDataType,
       
   177                   UNS8 checkAccess)
       
   178 {
       
   179 	return _getODentry( OD, wIndex, bSubindex, pDestData, pExpectedSize,
       
   180                         pDataType,  checkAccess, 1);
       
   181 }
       
   182 
       
   183 UNS32 readLocalDict( CO_Data* OD,
       
   184                      UNS16 wIndex,
       
   185                      UNS8 bSubindex,
       
   186                      void * pDestData,
       
   187                      UNS32 * pExpectedSize,
       
   188                      UNS8 * pDataType,
       
   189                      UNS8 checkAccess)
       
   190 {
       
   191   return _getODentry( OD, wIndex, bSubindex, pDestData, pExpectedSize,
       
   192                       pDataType,  checkAccess, 0);
       
   193 }
       
   194 
       
   195 UNS32 _setODentry( CO_Data* d,
   171 UNS32 _setODentry( CO_Data* d,
   196                    UNS16 wIndex,
   172                    UNS16 wIndex,
   197                    UNS8 bSubindex,
   173                    UNS8 bSubindex,
   198                    void * pSourceData,
   174                    void * pSourceData,
   199                    UNS32 * pExpectedSize,
   175                    UNS32 * pExpectedSize,
   283       accessDictionaryError(wIndex, bSubindex, szData, *pExpectedSize, OD_LENGTH_DATA_INVALID);
   259       accessDictionaryError(wIndex, bSubindex, szData, *pExpectedSize, OD_LENGTH_DATA_INVALID);
   284       return OD_LENGTH_DATA_INVALID;
   260       return OD_LENGTH_DATA_INVALID;
   285     }
   261     }
   286 }
   262 }
   287 
   263 
   288 UNS32 setODentry( CO_Data* d,
       
   289                   UNS16 wIndex,
       
   290                   UNS8 bSubindex,
       
   291                   void * pSourceData,
       
   292                   UNS32 * pExpectedSize,
       
   293                   UNS8 checkAccess)
       
   294 {
       
   295   return _setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize,
       
   296                       checkAccess, 1);
       
   297 }
       
   298 
       
   299 UNS32 writeLocalDict( CO_Data* d,
       
   300                      UNS16 wIndex,
       
   301                      UNS8 bSubindex,
       
   302                      void * pSourceData,
       
   303                      UNS32 * pExpectedSize,
       
   304                      UNS8 checkAccess)
       
   305 {
       
   306   return _setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess, 0);
       
   307 }
       
   308 
       
   309 const indextable * scanIndexOD (CO_Data* d, UNS16 wIndex, UNS32 *errorCode, ODCallback_t **Callback)
   264 const indextable * scanIndexOD (CO_Data* d, UNS16 wIndex, UNS32 *errorCode, ODCallback_t **Callback)
   310 {
   265 {
   311   return (*d->scanIndexOD)(wIndex, errorCode, Callback);
   266   return (*d->scanIndexOD)(wIndex, errorCode, Callback);
   312 }
   267 }
   313 
   268