mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-02-06 20:01:44 +08:00
Allow BITx types in XML output.
This commit is contained in:
@@ -191,18 +191,18 @@ void CommandXml::generateSlaveXml(
|
||||
if (entry.bit_length == 1) {
|
||||
cout << "BOOL";
|
||||
} else if (!(entry.bit_length % 8)) {
|
||||
if (entry.bit_length <= 64)
|
||||
if (entry.bit_length <= 64) {
|
||||
cout << "UINT" << (unsigned int) entry.bit_length;
|
||||
else
|
||||
} else {
|
||||
cout << "STRING("
|
||||
<< (unsigned int) (entry.bit_length / 8)
|
||||
<< ")";
|
||||
}
|
||||
} else {
|
||||
cerr << "Invalid bit length "
|
||||
<< (unsigned int) entry.bit_length << endl;
|
||||
cout << "BIT" << (unsigned int) entry.bit_length;
|
||||
}
|
||||
|
||||
cout << "</DataType>" << endl;
|
||||
cout << "</DataType>" << endl;
|
||||
}
|
||||
|
||||
cout << in << " </Entry>" << endl;
|
||||
|
||||
Reference in New Issue
Block a user