35 << "--type option. If the slave does not support the SDO" << endl |
35 << "--type option. If the slave does not support the SDO" << endl |
36 << "information service or the SDO is not in the dictionary," << endl |
36 << "information service or the SDO is not in the dictionary," << endl |
37 << "the --type option is mandatory." << endl |
37 << "the --type option is mandatory." << endl |
38 << endl |
38 << endl |
39 << "These are the valid SDO entry data types:" << endl |
39 << "These are the valid SDO entry data types:" << endl |
40 << " int8, int16, int32, uint8, uint16, uint32, string." << endl |
40 << " int8, int16, int32, uint8, uint16, uint32, string," << endl |
|
41 << " octet_string." << endl |
41 << endl |
42 << endl |
42 << "Arguments:" << endl |
43 << "Arguments:" << endl |
43 << " INDEX is the SDO index and must be an unsigned" << endl |
44 << " INDEX is the SDO index and must be an unsigned" << endl |
44 << " 16 bit number." << endl |
45 << " 16 bit number." << endl |
45 << " SUBINDEX is the SDO entry subindex and must be an" << endl |
46 << " SUBINDEX is the SDO entry subindex and must be an" << endl |
182 strValue >> val; |
183 strValue >> val; |
183 *(uint32_t *) data.data = cputole32(val); |
184 *(uint32_t *) data.data = cputole32(val); |
184 break; |
185 break; |
185 } |
186 } |
186 case 0x0009: // string |
187 case 0x0009: // string |
|
188 if (strValue.str().size() >= data.data_size) { |
|
189 err << "String too large"; |
|
190 throwCommandException(err); |
|
191 } |
|
192 data.data_size = strValue.str().size(); |
|
193 strValue >> (char *) data.data; |
|
194 break; |
|
195 case 0x000a: // octet_string |
187 if (strValue.str().size() >= data.data_size) { |
196 if (strValue.str().size() >= data.data_size) { |
188 err << "String too large"; |
197 err << "String too large"; |
189 throwCommandException(err); |
198 throwCommandException(err); |
190 } |
199 } |
191 data.data_size = strValue.str().size(); |
200 data.data_size = strValue.str().size(); |