mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fixed doxygen warnings
This commit is contained in:
@@ -47,6 +47,7 @@ public:
|
||||
///
|
||||
/// Determines the led colors of the image in the buffer.
|
||||
///
|
||||
/// @param[in] image The image to translate to led values
|
||||
/// @param[out] ledColors The color value per led
|
||||
///
|
||||
void process(const RgbImage& image, std::vector<RgbColor>& ledColors);
|
||||
|
@@ -13,18 +13,20 @@ class LedDevice
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Empty virtual destructor for pure virtual base class
|
||||
*/
|
||||
///
|
||||
/// Empty virtual destructor for pure virtual base class
|
||||
///
|
||||
virtual ~LedDevice()
|
||||
{
|
||||
// empty
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the RGB-Color values to the leds.
|
||||
*
|
||||
* @param[in] ledValues The RGB-color per led
|
||||
*/
|
||||
///
|
||||
/// Writes the RGB-Color values to the leds.
|
||||
///
|
||||
/// @param[in] ledValues The RGB-color per led
|
||||
///
|
||||
/// @return Zero on success else negative
|
||||
///
|
||||
virtual int write(const std::vector<RgbColor>& ledValues) = 0;
|
||||
};
|
||||
|
@@ -15,7 +15,7 @@ namespace Json { class Value; }
|
||||
///
|
||||
/// The Led structure contains the definition of the image portion used to determine a single led's
|
||||
/// color.
|
||||
/// <pre>
|
||||
/// @verbatim
|
||||
/// |--------------------image--|
|
||||
/// | minX maxX |
|
||||
/// | |-----|minY |
|
||||
@@ -25,7 +25,7 @@ namespace Json { class Value; }
|
||||
/// | |
|
||||
/// | |
|
||||
/// |---------------------------|
|
||||
/// <endpre>
|
||||
/// @endverbatim
|
||||
///
|
||||
struct Led
|
||||
{
|
||||
|
@@ -43,7 +43,7 @@ private slots:
|
||||
|
||||
///
|
||||
/// Slot which is called when a client closes a connection
|
||||
/// @param The Connection object which is being closed
|
||||
/// @param connection The Connection object which is being closed
|
||||
///
|
||||
void closedConnection(JsonClientConnection * connection);
|
||||
|
||||
|
@@ -67,11 +67,35 @@ public:
|
||||
void transform(uint8_t & red, uint8_t & green, uint8_t & blue) const;
|
||||
|
||||
///
|
||||
/// integer version of the conversion are faster, but a little less accurate
|
||||
/// all values are unsigned 8 bit values and scaled between 0 and 255 except
|
||||
/// for the hue which is a 16 bit number and scaled between 0 and 360
|
||||
/// Translates an RGB (red, green, blue) color to an HSV (hue, saturation, value) color
|
||||
///
|
||||
/// @param[in] red The red RGB-component
|
||||
/// @param[in] green The green RGB-component
|
||||
/// @param[in] blue The blue RGB-component
|
||||
/// @param[out] hue The hue HSV-component
|
||||
/// @param[out] saturation The saturation HSV-component
|
||||
/// @param[out] value The value HSV-component
|
||||
///
|
||||
/// @note Integer version of the conversion are faster, but a little less accurate all values
|
||||
/// are unsigned 8 bit values and scaled between 0 and 255 except for the hue which is a 16 bit
|
||||
/// number and scaled between 0 and 360
|
||||
///
|
||||
static void rgb2hsv(uint8_t red, uint8_t green, uint8_t blue, uint16_t & hue, uint8_t & saturation, uint8_t & value);
|
||||
|
||||
///
|
||||
/// Translates an HSV (hue, saturation, value) color to an RGB (red, green, blue) color
|
||||
///
|
||||
/// @param[in] hue The hue HSV-component
|
||||
/// @param[in] saturation The saturation HSV-component
|
||||
/// @param[in] value The value HSV-component
|
||||
/// @param[out] red The red RGB-component
|
||||
/// @param[out] green The green RGB-component
|
||||
/// @param[out] blue The blue RGB-component
|
||||
///
|
||||
/// @note Integer version of the conversion are faster, but a little less accurate all values
|
||||
/// are unsigned 8 bit values and scaled between 0 and 255 except for the hue which is a 16 bit
|
||||
/// number and scaled between 0 and 360
|
||||
///
|
||||
static void hsv2rgb(uint16_t hue, uint8_t saturation, uint8_t value, uint8_t & red, uint8_t & green, uint8_t & blue);
|
||||
|
||||
private:
|
||||
|
@@ -33,14 +33,14 @@ public:
|
||||
virtual ~JsonSchemaChecker();
|
||||
|
||||
///
|
||||
/// @param The schema to use
|
||||
/// @param schema The schema to use
|
||||
/// @return true upon succes
|
||||
///
|
||||
bool setSchema(const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// @brief Validate a JSON structure
|
||||
/// @param The JSON value to check
|
||||
/// @param value The JSON value to check
|
||||
/// @return true when the arguments is valid according to the schema
|
||||
///
|
||||
bool validate(const Json::Value & value);
|
||||
@@ -51,34 +51,142 @@ public:
|
||||
const std::list<std::string> & getMessages() const;
|
||||
|
||||
private:
|
||||
void collectReferences(const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Validates a json-value against a given schema. Results are stored in the members of this
|
||||
/// class (_error & _messages)
|
||||
///
|
||||
/// @param[in] value The value to validate
|
||||
/// @param[in] schema The schema against which the value is validated
|
||||
///
|
||||
void validate(const Json::Value &value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Adds the given message to the message-queue (with reference to current line-number)
|
||||
///
|
||||
/// @param[in] message The message to add to the queue
|
||||
///
|
||||
void setMessage(const std::string & message);
|
||||
|
||||
///
|
||||
/// Retrieves all references from the json-value as specified by the schema
|
||||
///
|
||||
/// @param[in] value The json-value
|
||||
/// @param[in] schema The schema
|
||||
///
|
||||
void collectDependencies(const Json::Value & value, const Json::Value &schema);
|
||||
|
||||
private:
|
||||
// attribute check functions
|
||||
///
|
||||
/// Checks if the given value is of the specified type. If the type does not match _error is set
|
||||
/// to true and an error-message is added to the message-queue
|
||||
///
|
||||
/// @param[in] value The given value
|
||||
/// @param[in] schema The specified type (as json-value)
|
||||
///
|
||||
void checkType(const Json::Value & value, const Json::Value & schema);
|
||||
///
|
||||
/// Checks is required properties of an json-object exist and if all properties are of the
|
||||
/// correct format. If this is not the case _error is set to true and an error-message is added
|
||||
/// to the message-queue.
|
||||
///
|
||||
/// @param[in] value The given json-object
|
||||
/// @param[in] schema The schema of the json-object
|
||||
///
|
||||
void checkProperties(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Verifies the additional configured properties of an json-object. If this is not the case
|
||||
/// _error is set to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param value The given json-object
|
||||
/// @param schema The schema for the json-object
|
||||
/// @param ignoredProperties The properties that were ignored
|
||||
///
|
||||
void checkAdditionalProperties(const Json::Value & value, const Json::Value & schema, const Json::Value::Members & ignoredProperties);
|
||||
|
||||
///
|
||||
/// Checks if references are configued and used correctly. If this is not the case _error is set
|
||||
/// to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param value The given json-object
|
||||
/// @param schemaLink The schema of the json-object
|
||||
///
|
||||
void checkDependencies(const Json::Value & value, const Json::Value & schemaLink);
|
||||
|
||||
///
|
||||
/// Checks if the given value is larger or equal to the specified value. If this is not the case
|
||||
/// _error is set to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param[in] value The given value
|
||||
/// @param[in] schema The minimum value (as json-value)
|
||||
///
|
||||
void checkMinimum(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Checks if the given value is smaller or equal to the specified value. If this is not the
|
||||
/// case _error is set to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param[in] value The given value
|
||||
/// @param[in] schema The maximum value (as json-value)
|
||||
///
|
||||
void checkMaximum(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Validates all the items of an array.
|
||||
///
|
||||
/// @param value The json-array
|
||||
/// @param schema The schema for the items in the array
|
||||
///
|
||||
void checkItems(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Checks if a given array has at least a minimum number of items. If this is not the case
|
||||
/// _error is set to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param value The json-array
|
||||
/// @param schema The minimum size specification (as json-value)
|
||||
///
|
||||
void checkMinItems(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Checks if a given array has at most a maximum number of items. If this is not the case
|
||||
/// _error is set to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param value The json-array
|
||||
/// @param schema The maximum size specification (as json-value)
|
||||
///
|
||||
void checkMaxItems(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Checks if a given array contains only unique items. If this is not the case
|
||||
/// _error is set to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param value The json-array
|
||||
/// @param schema Bool to enable the check (as json-value)
|
||||
///
|
||||
void checkUniqueItems(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
///
|
||||
/// Checks if an enum value is actually a valid value for that enum. If this is not the case
|
||||
/// _error is set to true and an error-message is added to the message-queue.
|
||||
///
|
||||
/// @param value The enum value
|
||||
/// @param schema The enum schema definition
|
||||
///
|
||||
void checkEnum(const Json::Value & value, const Json::Value & schema);
|
||||
|
||||
private:
|
||||
/// The schema of the entire json-configuration
|
||||
Json::Value _schema;
|
||||
|
||||
/// The current location into a json-configuration structure being checked
|
||||
std::list<std::string> _currentPath;
|
||||
/// The result messages collected during the schema verification
|
||||
std::list<std::string> _messages;
|
||||
/// Flag indicating an error occured during validation
|
||||
bool _error;
|
||||
|
||||
/// A list with references (string => json-value)
|
||||
std::map<std::string, const Json::Value *> _references; // ref 2 value
|
||||
};
|
||||
|
Reference in New Issue
Block a user