resource-monitor: Add more detailed brief and details for function/enumeration 29/318729/2 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.231834 accepted/tizen/unified/20241011.010624 accepted/tizen/unified/toolchain/20241022.122526 accepted/tizen/unified/toolchain/20241022.122948 accepted/tizen/unified/x/20241011.021756 accepted/tizen/unified/x/asan/20241014.000127 tizen_9.0_m2_release
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 7 Oct 2024 12:35:26 +0000 (21:35 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 8 Oct 2024 00:40:58 +0000 (09:40 +0900)
In order to provide the more detailed description for resource-monitor,
add the additional brief and details tag of function/enumeration

Change-Id: I23b2ebf2d8d53ad0cb5ccdf17d1553495988c16c
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
include/resource-monitor.h

index 611a1b5aed8be910d7397c2f5bfe144f2eb8bafa..e391c7d390f7e726b5c7c51c2437b1dadda51a17 100644 (file)
@@ -27,7 +27,9 @@ extern "C" {
 
 /**
  * @file resource-monitor.h
- * @brief Provide resource C API for Resource Monitor
+ * @brief Provide resource C API for Resource Monitor which monitors physical
+ * and logical resource. Each resource provides various attribute for resource
+ * monitoring because each resource has the different characteristics.
  */
 
 /**
@@ -36,7 +38,8 @@ extern "C" {
  */
 
 /**
- * @brief Enumeration for resource monitor error value.
+ * @brief Enumeration for resource monitor error value to catch the accurate
+ * error reason.
  * @since_tizen 7.0
  */
 typedef enum {
@@ -50,7 +53,7 @@ typedef enum {
 } resource_monitor_error_e;
 
 /**
- * @brief Enumeration for resource type.
+ * @brief Enumeration for resource type which indicate physical and logical resource.
  * @since_tizen 7.0
  */
 typedef enum {
@@ -66,7 +69,8 @@ typedef enum {
 } resource_monitor_type_e;
 
 /**
- * @brief Enumeration for resource attribute ID.
+ * @brief Enumeration for resource attribute ID which indicates the attributes
+ * of each physical and logical resource.
  * @since_tizen 7.0
  */
 typedef enum {
@@ -140,7 +144,9 @@ typedef enum {
 } resource_monitor_attr_id_e;
 
 /**
- * @brief Enumeration for resource control ID.
+ * @brief Enumeration for resource control ID. The device board have the
+ * multiple resources with same resource type. The resource control ID
+ * indicates the identification of each resource among same resource type.
  * @since_tizen 7.0
  */
 typedef enum {
@@ -170,7 +176,9 @@ typedef enum {
  */
 
 /**
- * @brief  Initializes the resource monitor.
+ * @brief Initializes the resource monitor which monitors the physical and logical resource.
+ * @details A unique ID is required to use the resource monitor. A unique ID is
+ * required to use all functions in the resource monitor.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -207,7 +215,9 @@ typedef enum {
 int resource_monitor_init(void);
 
 /**
- * @brief Exits the resource monitor.
+ * @brief Exits the resource monitor to finish the monitoring of physical and logical resource.
+ * @details The resource monitor is terminated using the unique ID returned from
+ * the resource_monitor_init() function. The unique ID is no longer valid.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -224,6 +234,8 @@ int resource_monitor_exit(int monitor_id);
 
 /**
  * @brief Gets the count of supported resources according to resource type.
+ * @details Returns the number of resources when one hardware board contains
+ * multiple resources of the same type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -242,7 +254,11 @@ int resource_monitor_exit(int monitor_id);
 int resource_monitor_get_resource_count(int monitor_id, resource_monitor_type_e resource_type, int *resource_count);
 
 /**
- * @brief Creates resource for given resource_type.
+ * @brief Creates resource for given resource_type which indicates the one of
+ * various resource type.
+ * @details The various kinds of resources can be monitored using unique IDs
+ * generated using the resource_monitor_init function. Create the resource id
+ * required to monitor the resource.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -262,7 +278,11 @@ int resource_monitor_get_resource_count(int monitor_id, resource_monitor_type_e
 int resource_monitor_create_resource(int monitor_id, resource_monitor_type_e resource_type);
 
 /**
- * @brief Deletes resource of given resource ID.
+ * @brief Deletes resource of given resource ID which indicates the resource
+ * instance.
+ * @details Deletes the resource_id when monitoring of a specific resource
+ * is no longer performed using the resource_monitor_create_resource function.
+ * Resource_id is no longer valid.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -281,6 +301,8 @@ int resource_monitor_delete_resource(int monitor_id, int resource_id);
 
 /**
  * @brief Sets the resource control with value which is different according to resource control id.
+ * @details There may be multiple resources of the same type. A specific resource
+ * must be set to point to a specific resource by setting ctrl_id prior to the monitoring request.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -301,6 +323,9 @@ int resource_monitor_set_resource_ctrl(int monitor_id, int resource_id, resource
 
 /**
  * @brief Sets the resource attributes of interest for monitoring.
+ * @details The data that can be monitored for each individual resource is different.
+ * Each monitorable data is represented by a resource_monitor_attr_id_e.
+ * You must set the interest for the resource attribute you want to monitor before the monitoring request.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -322,6 +347,9 @@ int resource_monitor_set_resource_attr(int monitor_id, int resource_id, resource
 
 /**
  * @brief Unsets the resource attributes of interest for monitoring.
+ * @details The data that can be monitored for each individual resource is different.
+ * Each monitorable data is represented by a resource_monitor_attr_id_e.
+ * The interest must be removed for the resource attribute you want to remove from the monitoring target.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -343,6 +371,8 @@ int resource_monitor_unset_resource_attr(int monitor_id, int resource_id, resour
 
 /**
  * @brief Checks whether a resource attribute is supported or not.
+ * @details Each monitorable data is represented by a resource_monitor_attr_id_e.
+ * You can check if monitoring of a specific resource attribute is supported.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -364,6 +394,8 @@ int resource_monitor_is_resource_attr_supported(int monitor_id, int resource_id,
 
 /**
  * @brief Updates the value of attributes of interest for all created resource.
+ * @details Requests monitoring of all resource types generated using unique IDs
+ * generated using the resource_monitor_init function.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -383,6 +415,8 @@ int resource_monitor_update(int monitor_id);
 
 /**
  * @brief Updates the value of attributes of interest for a resource.
+ * @details Requests monitoring of specific resource instances generated using
+ * unique IDs generated using the resource_monitor_init function.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -402,7 +436,8 @@ int resource_monitor_update(int monitor_id);
 int resource_monitor_update_resource(int monitor_id, int resource_id);
 
 /**
- * @brief Gets the int value of resource attribute.
+ * @brief Gets the int value of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an integer 32-bit data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -427,7 +462,8 @@ int resource_monitor_update_resource(int monitor_id, int resource_id);
 int resource_monitor_get_value_int(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, int32_t *value);
 
 /**
- * @brief Gets the int64 value of resource attribute.
+ * @brief Gets the int64 value of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an integer 64-bit data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -452,7 +488,8 @@ int resource_monitor_get_value_int(int monitor_id, int resource_id, resource_mon
 int resource_monitor_get_value_int64(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, int64_t *value);
 
 /**
- * @brief Gets the uint32 value of resource attribute.
+ * @brief Gets the uint32 value of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an unsigned integer 32-bit data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -477,7 +514,8 @@ int resource_monitor_get_value_int64(int monitor_id, int resource_id, resource_m
 int resource_monitor_get_value_uint32(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, u_int32_t *value);
 
 /**
- * @brief Gets the uint64 value of resource attribute.
+ * @brief Gets the uint64 value of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an unsigned integer 64-bit data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -502,7 +540,8 @@ int resource_monitor_get_value_uint32(int monitor_id, int resource_id, resource_
 int resource_monitor_get_value_uint64(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, u_int64_t *value);
 
 /**
- * @brief Gets the double value of resource attribute.
+ * @brief Gets the double value of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an double data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -527,7 +566,8 @@ int resource_monitor_get_value_uint64(int monitor_id, int resource_id, resource_
 int resource_monitor_get_value_double(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, double *value);
 
 /**
- * @brief Gets the string value of resource attribute.
+ * @brief Gets the string value of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an double data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -553,7 +593,8 @@ int resource_monitor_get_value_double(int monitor_id, int resource_id, resource_
 int resource_monitor_get_value_string(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, char **value);
 
 /**
- * @brief Gets the int array of resource attribute.
+ * @brief Gets the int array of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an int-32bit array data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -580,7 +621,8 @@ int resource_monitor_get_value_string(int monitor_id, int resource_id, resource_
 int resource_monitor_get_array_int(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, int32_t **array, int *length);
 
 /**
- * @brief Gets the int64 array of resource attribute.
+ * @brief Gets the int64 array of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an int-64bit array data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -607,7 +649,8 @@ int resource_monitor_get_array_int(int monitor_id, int resource_id, resource_mon
 int resource_monitor_get_array_int64(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, int64_t **array, int *length);
 
 /**
- * @brief Gets the uint32 array of resource attribute.
+ * @brief Gets the uint32 array of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an unsigned int-32bit array data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -634,7 +677,8 @@ int resource_monitor_get_array_int64(int monitor_id, int resource_id, resource_m
 int resource_monitor_get_array_uint32(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, u_int32_t **array, int *length);
 
 /**
- * @brief Gets the uint64 array of resource attribute.
+ * @brief Gets the uint64 array of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an unsigned int-64bit array data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -661,7 +705,8 @@ int resource_monitor_get_array_uint32(int monitor_id, int resource_id, resource_
 int resource_monitor_get_array_uint64(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, u_int64_t **array, int *length);
 
 /**
- * @brief Gets the double array of resource attribute.
+ * @brief Gets the double array of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an double array data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor
@@ -688,7 +733,8 @@ int resource_monitor_get_array_uint64(int monitor_id, int resource_id, resource_
 int resource_monitor_get_array_double(int monitor_id, int resource_id, resource_monitor_attr_id_e attr_id, double **array, int *length);
 
 /**
- * @brief Gets the string array of resource attribute.
+ * @brief Gets the string array of resource attribute which indicates one characteristics of resource.
+ * @details Obtain a resource attribute value having an string array data type.
  * @since_tizen 7.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/systemmonitor