MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / THROWS

Function THROWS

src/GCodes/GCodeBuffer/BinaryParser.cpp:160–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160float BinaryParser::GetFValue() THROWS(GCodeException)
161{
162 if (seenParameter == nullptr)
163 {
164 THROW_INTERNAL_ERROR;
165 }
166
167 float value;
168 switch (seenParameter->type)
169 {
170 case DataType::Float:
171 value = seenParameter->floatValue;
172 break;
173 case DataType::Int:
174 value = seenParameter->intValue;
175 break;
176 case DataType::UInt:
177 value = seenParameter->uintValue;
178 break;
179 case DataType::Expression:
180 {
181 ExpressionParser parser(&gb, seenParameterValue, seenParameterValue + seenParameter->intValue, -1);
182 value = parser.ParseFloat();
183 parser.CheckForExtraCharacters();
184 }
185 break;
186 default:
187 throw ConstructParseException("expected number after '%c'", seenParameter->letter);
188 }
189 seenParameter = nullptr;
190 seenParameterValue = nullptr;
191 return value;
192}
193
194int32_t BinaryParser::GetIValue() THROWS(GCodeException)
195{

Callers

nothing calls this directly

Calls 8

SetFromBinaryMethod · 0.80
copyMethod · 0.80
AppendAsStringMethod · 0.80
SetStringHandleMethod · 0.80
SetIntMethod · 0.80
IsEmptyMethod · 0.45
SetFloatMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected