Loading conf/telemetry.xsd +2 −1 Original line number Diff line number Diff line Loading @@ -104,8 +104,9 @@ but it could also be referenced using idrefs. --> <xs:attribute name="id" type="xs:ID" /> <xs:attribute name="numberofblocksoffset" type="xs:integer" default="0" /> <xs:attribute name="default" /> <xs:attribute name="description" /> <!-- Use constvalue to defined the field as a constant --> <xs:attribute name="constvalue" /> </xs:complexType> </xs:element> Loading src/XmlConfig.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -148,12 +148,12 @@ void XmlConfig::_writeFields(xml_node parent, fstream& fs) int nbits = atoi(typeStr.substr(spos, epos+1).c_str()); fs << nbits << endl; xml_attribute defaultt = it->attribute("default"); if(!defaultt) xml_attribute constvalue = it->attribute("constvalue"); if(!constvalue) fs << "none" << endl; else { bitset<64> x(atoi(defaultt.value())); bitset<64> x(atoi(constvalue.value())); fs << "0b" << x.to_string().substr(64-nbits, 64) << endl; } index++; Loading Loading
conf/telemetry.xsd +2 −1 Original line number Diff line number Diff line Loading @@ -104,8 +104,9 @@ but it could also be referenced using idrefs. --> <xs:attribute name="id" type="xs:ID" /> <xs:attribute name="numberofblocksoffset" type="xs:integer" default="0" /> <xs:attribute name="default" /> <xs:attribute name="description" /> <!-- Use constvalue to defined the field as a constant --> <xs:attribute name="constvalue" /> </xs:complexType> </xs:element> Loading
src/XmlConfig.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -148,12 +148,12 @@ void XmlConfig::_writeFields(xml_node parent, fstream& fs) int nbits = atoi(typeStr.substr(spos, epos+1).c_str()); fs << nbits << endl; xml_attribute defaultt = it->attribute("default"); if(!defaultt) xml_attribute constvalue = it->attribute("constvalue"); if(!constvalue) fs << "none" << endl; else { bitset<64> x(atoi(defaultt.value())); bitset<64> x(atoi(constvalue.value())); fs << "0b" << x.to_string().substr(64-nbits, 64) << endl; } index++; Loading