MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / rangeProp

Function rangeProp

app/src/API/SchemaBuilder.h:123–135  ·  view source on GitHub ↗

* @brief Build a SchemaProp constrained to a numeric range. */

Source from the content-addressed store, hash-verified

121 * @brief Build a SchemaProp constrained to a numeric range.
122 */
123[[nodiscard]] inline SchemaProp rangeProp(QString name,
124 QString description,
125 QJsonValue min,
126 QJsonValue max)
127{
128 SchemaProp p;
129 p.name = std::move(name);
130 p.type = QStringLiteral("integer");
131 p.description = std::move(description);
132 p.minimum = std::move(min);
133 p.maximum = std::move(max);
134 return p;
135}
136
137/**
138 * @brief Lower SchemaProp into the JSON object emitted under "properties".

Callers 2

registerCommandsMethod · 0.85
registerCommandsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected