181 MSG_WAR(0x3050, " at index : ", 0x1A00 + pdoNum); |
181 MSG_WAR(0x3050, " at index : ", 0x1A00 + pdoNum); |
182 MSG_WAR(0x3051, " sub-index : ", prp_j + 1); |
182 MSG_WAR(0x3051, " sub-index : ", prp_j + 1); |
183 status = state9; |
183 status = state9; |
184 |
184 |
185 case state9: /* get data to transmit */ |
185 case state9: /* get data to transmit */ |
186 index = (UNS16)((*pMappingParameter) >> 16); |
186 { |
187 subIndex = (UNS8)(( (*pMappingParameter) >> (UNS8)8 ) & (UNS32)0x000000FF); |
|
188 UNS8 ByteSize; |
187 UNS8 ByteSize; |
189 UNS8 tmp[]= {0,0,0,0,0,0,0,0}; |
188 UNS8 tmp[]= {0,0,0,0,0,0,0,0}; |
|
189 index = (UNS16)((*pMappingParameter) >> 16); |
|
190 subIndex = (UNS8)(( (*pMappingParameter) >> (UNS8)8 ) & (UNS32)0x000000FF); |
190 Size = (UNS8)(*pMappingParameter); /* Size in bits */ |
191 Size = (UNS8)(*pMappingParameter); /* Size in bits */ |
191 ByteSize = 1 + ((Size - 1) >> 3); /*1->8 => 1 ; 9->16 => 2, ... */ |
192 ByteSize = 1 + ((Size - 1) >> 3); /*1->8 => 1 ; 9->16 => 2, ... */ |
192 objDict = getODentry(d, index, subIndex, tmp, &ByteSize, &dataType, 0 ); |
193 objDict = getODentry(d, index, subIndex, tmp, &ByteSize, &dataType, 0 ); |
193 /* copy bit per bit in little endian*/ |
194 /* copy bit per bit in little endian*/ |
194 CopyBits(Size, ((UNS8*)tmp), 0 , 0, (UNS8*)&d->process_var.data[offset>>3], offset%8, 0); |
195 CopyBits(Size, ((UNS8*)tmp), 0 , 0, (UNS8*)&d->process_var.data[offset>>3], offset%8, 0); |
195 |
196 } |
196 if( objDict != OD_SUCCESSFUL ){ |
197 if( objDict != OD_SUCCESSFUL ){ |
197 MSG_ERR(0x1013, " Couldn't find mapped variable at index-subindex-size : ", (UNS16)(*pMappingParameter)); |
198 MSG_ERR(0x1013, " Couldn't find mapped variable at index-subindex-size : ", (UNS16)(*pMappingParameter)); |
198 return 0xFF; |
199 return 0xFF; |
199 } |
200 } |
200 |
201 |