filter core:
authorsiboud <siboud@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 10 Apr 2005 02:58:50 +0000 (02:58 +0000)
committersiboud <siboud@04897980-b3bd-0310-b5e0-8ef037075253>
Sun, 10 Apr 2005 02:58:50 +0000 (02:58 +0000)
- minor modification to integrate enum values in tree
  for state.execution_mode, state.execution_submode and state.process_status

git-svn-id: http://ltt.polymtl.ca/svn@923 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/filter.c

index bed1b48978f495349ed42251fefffc4cc6237b8a..8f3fea185a49d76c6702ba1f24a0fc1431e20c25 100644 (file)
@@ -262,9 +262,6 @@ gboolean lttv_simple_expression_assign_operator(LttvSimpleExpression* se, LttvEx
       */
      case LTTV_FILTER_STATE_PID:
      case LTTV_FILTER_STATE_PPID:
-     case LTTV_FILTER_STATE_EX_MODE:
-     case LTTV_FILTER_STATE_EX_SUBMODE:
-     case LTTV_FILTER_STATE_P_STATUS:
      case LTTV_FILTER_EVENT_TSC:
        switch(op) {
          case LTTV_FIELD_EQ:
@@ -290,6 +287,28 @@ gboolean lttv_simple_expression_assign_operator(LttvSimpleExpression* se, LttvEx
            return FALSE;
        }
        break;
+     /*
+      * Enums
+      * can only be compared with 'equal' or 'not equal' operators
+      *
+      * unsigned int of 16 bits are used here since enums 
+      * should not over 2^16-1 values
+      */
+     case LTTV_FILTER_STATE_EX_MODE:
+     case LTTV_FILTER_STATE_EX_SUBMODE:
+     case LTTV_FILTER_STATE_P_STATUS:
+       switch(op) {
+         case LTTV_FIELD_EQ:
+           se->op = lttv_apply_op_eq_uint16;
+           break;
+         case LTTV_FIELD_NE:
+           se->op = lttv_apply_op_ne_uint16;
+           break;
+         default:
+           g_warning("Error encountered in operator assignment = or != expected");
+           return FALSE;
+       }
+       break;
      /*
       * Ltttime
       */
This page took 0.025164 seconds and 4 git commands to generate.