Changed tree view fields and filtering to use integers in place of strings comparison.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4374 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
winckel
2013-11-13 07:42:20 +00:00
parent 45f52474c4
commit 3dbf9c4e3d
7 changed files with 61 additions and 64 deletions
@@ -74,7 +74,7 @@ int locate_type(const char *type_name, types_t *head, types_t **type) {
return (next_type == NULL) ? RC_FAIL : RC_OK;
}
int get_message_id(types_t *head, buffer_t *buffer, uint32_t *message_id) {
uint32_t get_message_id(types_t *head, buffer_t *buffer, uint32_t *message_id) {
uint32_t value;
g_assert(message_id != NULL);
@@ -87,32 +87,28 @@ int get_message_id(types_t *head, buffer_t *buffer, uint32_t *message_id) {
return RC_OK;
}
char *get_origin_task_id(buffer_t *buffer) {
char *origin_task_id = "UNKNOWN";
uint32_t origin_task_id_value;
uint32_t get_task_id(buffer_t *buffer, types_t *task_id_type) {
uint32_t task_id_value;
/* Fetch task id value */
if (buffer_fetch_bits(buffer, origin_task_id_type->offset,
origin_task_id_type->child->size, &origin_task_id_value) == RC_OK) {
origin_task_id = enum_type_get_name_from_value(origin_task_id_type->child,
origin_task_id_value);
if (buffer_fetch_bits (buffer, task_id_type->offset, task_id_type->child->size, &task_id_value) != RC_OK)
{
return ~0;
}
return origin_task_id;
return task_id_value;
}
char *get_destination_task_id(buffer_t *buffer) {
char *destination_task_id = "UNKNOWN";
uint32_t destination_task_id_value;
char *task_id_to_string(uint32_t task_id_value, types_t *task_id_type) {
char *task_id = "UNKNOWN";
/* Fetch task id value */
if (buffer_fetch_bits(buffer, destination_task_id_type->offset,
destination_task_id_type->child->size, &destination_task_id_value) == RC_OK) {
destination_task_id = enum_type_get_name_from_value(destination_task_id_type->child,
destination_task_id_value);
if (task_id_value < ((uint32_t) ~0))
{
/* Search task id name */
task_id = enum_type_get_name_from_value (task_id_type->child, task_id_value);
}
return destination_task_id;
return task_id;
}
uint32_t get_instance(buffer_t *buffer) {
@@ -10,13 +10,13 @@ int locate_root(const char *root_name, types_t *head, types_t **root);
int locate_type(const char *type_name, types_t *head, types_t **type);
int get_message_id(types_t *head, buffer_t *buffer, uint32_t *message_id);
uint32_t get_message_id(types_t *head, buffer_t *buffer, uint32_t *message_id);
char *message_id_to_string(uint32_t message_id);
char *get_origin_task_id(buffer_t *buffer);
uint32_t get_task_id(buffer_t *buffer, types_t *task_id_type);
char *get_destination_task_id(buffer_t *buffer);
char *task_id_to_string(uint32_t task_id_value, types_t *task_id_type);
uint32_t get_instance(buffer_t *buffer);