Added an instance column.
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4370 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
types_t *messages_id_enum = NULL;
|
||||
types_t *origin_task_id_type = NULL;
|
||||
types_t *destination_task_id_type = NULL;
|
||||
types_t *instance_type = NULL;
|
||||
|
||||
int locate_root(const char *root_name, types_t *head, types_t **root_elm) {
|
||||
types_t *next_type;
|
||||
@@ -114,6 +115,15 @@ char *get_destination_task_id(buffer_t *buffer) {
|
||||
return destination_task_id;
|
||||
}
|
||||
|
||||
uint32_t get_instance(buffer_t *buffer) {
|
||||
uint32_t instance_value;
|
||||
|
||||
/* Fetch instance value */
|
||||
buffer_fetch_bits (buffer, instance_type->offset, instance_type->child->child->child->size, &instance_value);
|
||||
|
||||
return instance_value;
|
||||
}
|
||||
|
||||
char *message_id_to_string(uint32_t message_id)
|
||||
{
|
||||
return enum_type_get_name_from_value(messages_id_enum, message_id);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
extern types_t *messages_id_enum;
|
||||
extern types_t *origin_task_id_type;
|
||||
extern types_t *destination_task_id_type;
|
||||
extern types_t *instance_type;
|
||||
|
||||
int locate_root(const char *root_name, types_t *head, types_t **root);
|
||||
|
||||
@@ -17,4 +18,6 @@ char *get_origin_task_id(buffer_t *buffer);
|
||||
|
||||
char *get_destination_task_id(buffer_t *buffer);
|
||||
|
||||
uint32_t get_instance(buffer_t *buffer);
|
||||
|
||||
#endif /* LOCATE_ROOT_H_ */
|
||||
|
||||
Reference in New Issue
Block a user