/device/google/marlin/dataservices/datatop/src/ |
datatop_single_line_poll.c | 56 * Number of lines the file is that the dpg represents. 66 * @param dpg Struct that polled data is added to. 67 * @return DTOP_POLL_IO_ERR - Poll of dpg unsuccessful. 68 * @return DTOP_POLL_OK - Poll of dpg successful. 70 int dtop_single_line_poll(struct dtop_data_point_gatherer *dpg) 75 (dpg->priv))->line_count); 80 read = dt_read_file(dpg->file, &data, DTOP_SINGLE_SIZE); 87 (dpg->priv))->line_count; n++) { 89 (dpg->priv))->line[n], 93 (dpg->priv))->line_count - 1)) 152 struct dtop_data_point_gatherer *dpg = malloc local [all...] |
datatop_value_only_poll.c | 52 * @param dpg Struct that polled data is added to. 53 * @return DTOP_POLL_IO_ERR - Poll of dpg unsuccessful. 54 * @return DTOP_POLL_OK - Poll of dpg successful. 56 int dtop_value_only_poll(struct dtop_data_point_gatherer *dpg) 64 FILE *check = fopen(dpg->file, "r"); 67 read = dt_read_file(dpg->file, &data, DTOP_SINGLE_SIZE); 82 for (j = 0; j < dpg->data_points_len; j++) 83 dtop_store_dp(&(dpg->data_points[j]), dict.val[j]); 90 * @brief Frees dynamically allocated single line dpg. 92 * Frees the memory of the dpg along with it's data_point 121 struct dtop_data_point_gatherer *dpg = malloc local [all...] |
datatop_meminfo_file_poll.c | 52 * @brief Struct used to hold necessary variables for /proc/meminfo dpg 57 * Number of lines the file is that the dpg represents. 105 * @param dpg Struct that polled data is added to. 106 * @return DTOP_POLL_IO_ERR - Poll of dpg unsuccessful. 107 * @return DTOP_POLL_OK - Poll of dpg successful. 109 int dtop_meminfo_poll(struct dtop_data_point_gatherer *dpg) 114 (dpg->priv))->line_count); 119 read = dt_read_file(dpg->file, &data, DTOP_MEM_SIZE); 126 (dpg->priv))->line_count; n++) { 128 (dpg->priv))->line[n] 198 struct dtop_data_point_gatherer *dpg = malloc local [all...] |
datatop_polling.h | 45 int dtop_value_only_poll(struct dtop_data_point_gatherer *dpg);
|
datatop_dual_line_poll.c | 58 * Number of lines the file is that the dpg represents. 69 * @param dpg Struct that polled data is added to. 70 * @return DTOP_POLL_IO_ERR - Poll of dpg unsuccessful. 71 * @return DTOP_POLL_OK - Poll of dpg successful. 73 int dtop_dual_line_poll(struct dtop_data_point_gatherer *dpg) 78 (dpg->priv))->line_count); 81 (dpg->priv))->line_count); 86 (dpg->priv))->line_count/2)); 89 (dpg->priv))->line_count/2)); 92 read = dt_read_file(dpg->file, &data, DTOP_DUAL_SIZE) 196 struct dtop_data_point_gatherer *dpg = malloc local [all...] |
datatop_dev_poll.c | 50 * @brief Struct used to hold necessary variables for /proc/net/dev dpg 55 * Number of lines the file is that the dpg represents. 105 * @param dpg Struct that polled data is added to. 106 * @return DTOP_POLL_IO_ERR - Poll of dpg unsuccessful. 107 * @return DTOP_POLL_OK - Poll of dpg successful. 109 int dtop_dev_poll(struct dtop_data_point_gatherer *dpg) 114 (dpg->priv))->line_count); 118 (dpg->priv))->line_count-2); 123 read = dt_read_file(dpg->file, &data, DTOP_DEV_SIZE); 130 (dpg->priv))->line_count; n++) 208 struct dtop_data_point_gatherer *dpg = malloc local [all...] |
datatop_interface.h | 127 * int equals, DTOP_POLL_IO_ERR - Poll of dpg unsuccessful, or 128 * DTOP_POLL_OK - Poll of dpg successful. 132 * Number of elements in the array of dp's the dpg accesses. 137 int (*poll)(struct dtop_data_point_gatherer *dpg); 138 void (*deconstruct)(struct dtop_data_point_gatherer *dpg); 147 void dtop_register(struct dtop_data_point_gatherer *dpg); 149 void dtop_print_dpg(struct dtop_data_point_gatherer *dpg); 154 int dtop_print_dpg_names_csv(struct dtop_data_point_gatherer *dpg, FILE *fw);
|
datatop_gen_poll.c | 34 * Contains functions that search through a directory and create dpg's for any 58 * @param dpg The struct which contains the file to search. 61 static int get_number_of_values(struct dtop_data_point_gatherer *dpg) 69 read = dt_read_file(dpg->file, &data, DTOP_GEN_SIZE); 93 * @brief Stores the data collected from a dpg that was constructed during dtop_search. 95 * @param dpg Struct that polled data is added to. 96 * @return DTOP_POLL_IO_ERR - Poll of dpg unsuccessful. 97 * @return DTOP_POLL_OK - Poll of dpg successful. 99 int dtop_gen_poll(struct dtop_data_point_gatherer *dpg) 108 read = dt_read_file(dpg->file, &data, DTOP_GEN_SIZE) 161 struct dtop_data_point_gatherer *dpg = malloc local [all...] |
datatop_cpu_stats_poll.c | 106 * @brief Creates a dpg designed for CPU online and CPU scaling_cur_freq stats. 108 * @param name Name of file dpg represents. 115 struct dtop_data_point_gatherer *dpg = malloc local 129 dpg->prefix = file; 130 dpg->file = file; 131 dpg->poll = dtop_value_only_poll; 132 dpg->data_points = dp; 133 dpg->data_points_len = 1; 134 dpg->deconstruct = dtop_value_only_dpg_deconstructor; 136 dtop_register(dpg); [all...] |
datatop_stat_poll.c | 50 * @brief Struct used to hold necessary variables for /proc/stat dpg 55 * Number of lines the file is that the dpg represents. 112 * @param dpg Struct that polled data is added to. 113 * @return DTOP_POLL_IO_ERR - Poll of dpg unsuccessful. 114 * @return DTOP_POLL_OK - Poll of dpg successful. 116 int dtop_stat_poll(struct dtop_data_point_gatherer *dpg) 121 (dpg->priv))->line_count); 127 read = dt_read_file(dpg->file, &data, DTOP_STAT_SIZE); 134 (dpg->priv))->line_count; n++) { 136 (dpg->priv))->line[n] 199 struct dtop_data_point_gatherer *dpg = malloc local [all...] |
datatop_helpers.c | 230 * @brief Calls the dtop_print_dp_csv function for each data_point a dpg has access to. 232 * @param dpg A data_point_gatherer struct that is iterated through for each datapoint. 237 static int dtop_print_dpg_csv(struct dtop_data_point_gatherer *dpg, FILE *fw) 241 for (i = 0; i < dpg->data_points_len; i++) 242 if (dtop_print_dp_csv(&(dpg->data_points[i]), fw) == FILE_ERROR) 248 * @brief Calls the dtop_format_dp_names function for each data_point a dpg has access to. 250 * @param dpg A data_point_gatherer struct that is iterated through for each datapoint. 255 int dtop_print_dpg_names_csv(struct dtop_data_point_gatherer *dpg, FILE *fw) 259 for (i = 0; i < dpg->data_points_len; i++) 260 if (dtop_format_dp_names(&(dpg->data_points[i]) [all...] |
datatop.c | 273 * @brief Adds each dpg as a node to a linked list. 275 * Called when a dpg is initialized. 277 * @param dpg A pointer to a data_point_gatherer struct which is to be added to the linked list. 279 void dtop_register(struct dtop_data_point_gatherer *dpg) 281 if (dpg) 282 first_dpg_list = dtop_add_linked_list(dpg, first_dpg_list);
|