Update License text
[vnfsdk/compliance.git] / veslibrary / ves_javalibrary / evel_javalib2 / src / evel_javalibrary / att / com / EvelMobileFlow.java
1 package evel_javalibrary.att.com;\r
2 /**************************************************************************//**\r
3  * @file\r
4  * Evel Mobile Flow class\r
5  *\r
6  * This file implements the Evel Mobile Flow Event class which is intended to provide a\r
7  * simple wrapper around the complexity of AT&T's Vendor Event Listener API so\r
8  * that VNFs can use it to send Mobile flow events.\r
9  *\r
10  * License\r
11  * -------\r
12  * Unless otherwise specified, all software contained herein is\r
13  * Licensed under the Apache License, Version 2.0 (the "License");\r
14  * you may not use this file except in compliance with the License.\r
15  * You may obtain a copy of the License at\r
16  *        http://www.apache.org/licenses/LICENSE-2.0\r
17  *\r
18  * Unless required by applicable law or agreed to in writing, software\r
19  * distributed under the License is distributed on an "AS IS" BASIS,\r
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
21  * See the License for the specific language governing permissions and\r
22  * limitations under the License.\r
23  *****************************************************************************/\r
24 \r
25 import java.text.MessageFormat;\r
26 import java.util.ArrayList;\r
27 import java.util.Date;\r
28 import java.util.HashMap;\r
29 \r
30 import javax.json.Json;\r
31 import javax.json.JsonArrayBuilder;\r
32 import javax.json.JsonObject;\r
33 import javax.json.JsonObjectBuilder;\r
34 \r
35 import org.apache.log4j.Logger;\r
36 \r
37 \r
38 \r
39 public class EvelMobileFlow extends EvelHeader {\r
40         \r
41         int major_version = 1;\r
42         int minor_version = 2;\r
43         \r
44         static int EVEL_TOS_SUPPORTED    =  256;\r
45         /**************************************************************************//**\r
46          * TCP flags.\r
47          * JSON equivalent fields: tcpFlagCountList, tcpFlagList\r
48          *****************************************************************************/\r
49         public enum EVEL_TCP_FLAGS {\r
50           EVEL_TCP_NS,\r
51           EVEL_TCP_CWR,\r
52           EVEL_TCP_ECE,\r
53           EVEL_TCP_URG,\r
54           EVEL_TCP_ACK,\r
55           EVEL_TCP_PSH,\r
56           EVEL_TCP_RST,\r
57           EVEL_TCP_SYN,\r
58           EVEL_TCP_FIN,\r
59           EVEL_MAX_TCP_FLAGS\r
60         }\r
61         static int EVEL_MAX_TCP_FLAGS    =  10;\r
62         /**************************************************************************//**\r
63          * Mobile QCI Classes of Service.\r
64          * JSON equivalent fields: mobileQciCosCountList, mobileQciCosList\r
65          *****************************************************************************/\r
66         public enum EVEL_QCI_COS_TYPES {\r
67 \r
68           /***************************************************************************/\r
69           /* UMTS Classes of Service.                                                */\r
70           /***************************************************************************/\r
71           EVEL_QCI_COS_UMTS_CONVERSATIONAL,\r
72           EVEL_QCI_COS_UMTS_STREAMING,\r
73           EVEL_QCI_COS_UMTS_INTERACTIVE,\r
74           EVEL_QCI_COS_UMTS_BACKGROUND,\r
75 \r
76           /***************************************************************************/\r
77           /* LTE Classes of Service.                                                 */\r
78           /***************************************************************************/\r
79           EVEL_QCI_COS_LTE_1,\r
80           EVEL_QCI_COS_LTE_2,\r
81           EVEL_QCI_COS_LTE_3,\r
82           EVEL_QCI_COS_LTE_4,\r
83           EVEL_QCI_COS_LTE_65,\r
84           EVEL_QCI_COS_LTE_66,\r
85           EVEL_QCI_COS_LTE_5,\r
86           EVEL_QCI_COS_LTE_6,\r
87           EVEL_QCI_COS_LTE_7,\r
88           EVEL_QCI_COS_LTE_8,\r
89           EVEL_QCI_COS_LTE_9,\r
90           EVEL_QCI_COS_LTE_69,\r
91           EVEL_QCI_COS_LTE_70,\r
92           EVEL_MAX_QCI_COS_TYPES\r
93         }\r
94         static int EVEL_MAX_QCI_COS_TYPES = 18;\r
95         \r
96           private static final Logger LOGGER = Logger.getLogger( EvelMobileFlow.class.getName() );\r
97 \r
98           \r
99           /*****************************************************************************/\r
100           /* Array of strings to use when encoding TCP flags.                          */\r
101           /*****************************************************************************/\r
102           static final String[/*EVEL_MAX_TCP_FLAGS*/] evel_tcp_flag_strings = {\r
103             "NS",\r
104             "CWR",\r
105             "ECE",\r
106             "URG",\r
107             "ACK",\r
108             "PSH",\r
109             "RST",\r
110             "SYN",\r
111             "FIN"\r
112           };\r
113 \r
114           /*****************************************************************************/\r
115           /* Array of strings to use when encoding QCI COS.                            */\r
116           /*****************************************************************************/\r
117           static final String[/*EVEL_MAX_QCI_COS_TYPES*/] evel_qci_cos_strings = {\r
118             "conversational",\r
119             "streaming",\r
120             "interactive",\r
121             "background",\r
122             "1",\r
123             "2",\r
124             "3",\r
125             "4",\r
126             "65",\r
127             "66",\r
128             "5",\r
129             "6",\r
130             "7",\r
131             "8",\r
132             "9",\r
133             "69",\r
134             "70"\r
135           };\r
136 \r
137         \r
138         /**************************************************************************//**\r
139          * Vendor VNF Name fields.\r
140          * JSON equivalent field: vendorVnfNameFields\r
141          *****************************************************************************/\r
142         /**************************************************************************//**\r
143          * Mobile GTP Per Flow Metrics.\r
144          * JSON equivalent field: gtpPerFlowMetrics\r
145          *****************************************************************************/\r
146         public class MOBILE_GTP_PER_FLOW_METRICS {\r
147                   double avg_bit_error_rate;\r
148                   double avg_packet_delay_variation;\r
149                   int avg_packet_latency;\r
150                   int avg_receive_throughput;\r
151                   int avg_transmit_throughput;\r
152                   \r
153                   int flow_activation_epoch;\r
154                   int flow_activation_microsec;\r
155                   \r
156                   int flow_deactivation_epoch;\r
157                   int flow_deactivation_microsec;\r
158                   Date flow_deactivation_time;\r
159                   String flow_status;\r
160                   int max_packet_delay_variation;\r
161                   int num_activation_failures;\r
162                   int num_bit_errors;\r
163                   int num_bytes_received;\r
164                   int num_bytes_transmitted;\r
165                   int num_dropped_packets;\r
166                   int num_l7_bytes_received;\r
167                   int num_l7_bytes_transmitted;\r
168                   int num_lost_packets;\r
169                   int num_out_of_order_packets;\r
170                   int num_packet_errors;\r
171                   int num_packets_received_excl_retrans;\r
172                   int num_packets_received_incl_retrans;\r
173                   int num_packets_transmitted_incl_retrans;\r
174                   int num_retries;\r
175                   int num_timeouts;\r
176                   int num_tunneled_l7_bytes_received;\r
177                   int round_trip_time;\r
178                   int time_to_first_byte;\r
179 \r
180                   /***************************************************************************/\r
181                   /* Optional fields                                                         */\r
182                   /***************************************************************************/\r
183                   EvelOptionInt ip_tos_counts[/*EVEL_TOS_SUPPORTED*/];\r
184                   EvelOptionInt tcp_flag_counts[/*EVEL_MAX_TCP_FLAGS*/];\r
185                   EvelOptionInt qci_cos_counts[/*EVEL_MAX_QCI_COS_TYPES*/];\r
186                   \r
187                   EvelOptionInt dur_connection_failed_status;\r
188                   EvelOptionInt dur_tunnel_failed_status;\r
189                   EvelOptionString flow_activated_by;\r
190                   \r
191                   EvelOptionTime flow_activation_time;\r
192                   EvelOptionString flow_deactivated_by;\r
193                   \r
194                   EvelOptionString gtp_connection_status;\r
195                   EvelOptionString gtp_tunnel_status;\r
196                   EvelOptionInt large_packet_rtt;\r
197                   EvelOptionDouble large_packet_threshold;\r
198                   EvelOptionInt max_receive_bit_rate;\r
199                   EvelOptionInt max_transmit_bit_rate;\r
200                   EvelOptionInt num_gtp_echo_failures;\r
201                   EvelOptionInt num_gtp_tunnel_errors;\r
202                   EvelOptionInt num_http_errors;\r
203 \r
204           /**************************************************************************//**\r
205            * Create a new Mobile GTP Per Flow Metrics.\r
206            *\r
207            * @note    The mandatory fields on the Mobile GTP Per Flow Metrics must be\r
208            *          supplied to this factory function and are immutable once set.\r
209            *          Optional fields have explicit setter functions, but again values\r
210            *          may only be set once so that the Mobile GTP Per Flow Metrics has\r
211            *          immutable properties.\r
212            *\r
213            * @param   avg_bit_error_rate          Average bit error rate.\r
214            * @param   avg_packet_delay_variation  Average delay or jitter in ms.\r
215            * @param   avg_packet_latency          Average delivery latency.\r
216            * @param   avg_receive_throughput      Average receive throughput.\r
217            * @param   avg_transmit_throughput     Average transmit throughput.\r
218            * @param   flow_activation_epoch       Time the connection is activated.\r
219            * @param   flow_activation_microsec    Microseconds for the start of the flow\r
220            *                                      connection.\r
221            * @param   flow_deactivation_epoch     Time for the end of the connection.\r
222            * @param   flow_deactivation_microsec  Microseconds for the end of the flow\r
223            *                                      connection.\r
224            * @param   flow_deactivation_time      Transmission time of the first packet.\r
225            * @param   flow_status                 Connection status.\r
226            * @param   max_packet_delay_variation  Maximum packet delay or jitter in ms.\r
227            * @param   num_activation_failures     Number of failed activation requests.\r
228            * @param   num_bit_errors              Number of errored bits.\r
229            * @param   num_bytes_received          Number of bytes received.\r
230            * @param   num_bytes_transmitted       Number of bytes transmitted.\r
231            * @param   num_dropped_packets         Number of received packets dropped.\r
232            * @param   num_l7_bytes_received       Number of tunneled Layer 7 bytes\r
233            *                                      received.\r
234            * @param   num_l7_bytes_transmitted    Number of tunneled Layer 7 bytes\r
235            *                                      transmitted.\r
236            * @param   num_lost_packets            Number of lost packets.\r
237            * @param   num_out_of_order_packets    Number of out-of-order packets.\r
238            * @param   num_packet_errors           Number of errored packets.\r
239            * @param   num_packets_received_excl_retrans  Number of packets received,\r
240            *                                             excluding retransmits.\r
241            * @param   num_packets_received_incl_retrans  Number of packets received.\r
242            * @param   num_packets_transmitted_incl_retrans  Number of packets\r
243            *                                                transmitted.\r
244            * @param   num_retries                 Number of packet retries.\r
245            * @param   num_timeouts                Number of packet timeouts.\r
246            * @param   num_tunneled_l7_bytes_received  Number of tunneled Layer 7 bytes\r
247            *                                          received, excluding retransmits.\r
248            * @param   round_trip_time             Round trip time.\r
249            * @param   time_to_first_byte          Time in ms between connection\r
250            *                                      activation and first byte received.\r
251            *\r
252            * @returns pointer to the newly manufactured ::MOBILE_GTP_PER_FLOW_METRICS.\r
253            *          If the structure is not used it must be released using\r
254            *          ::evel_free_mobile_gtp_flow_metrics.\r
255            * @retval  null  Failed to create the event.\r
256            *****************************************************************************/\r
257           public MOBILE_GTP_PER_FLOW_METRICS(\r
258                                                 double tavg_bit_error_rate,\r
259                                                 double tavg_packet_delay_variation,\r
260                                                 int tavg_packet_latency,\r
261                                                 int tavg_receive_throughput,\r
262                                                 int tavg_transmit_throughput,\r
263                                                 int tflow_activation_epoch,\r
264                                                 int tflow_activation_microsec,\r
265                                                 int tflow_deactivation_epoch,\r
266                                                 int tflow_deactivation_microsec,\r
267                                                 Date tflow_deactivation_time,\r
268                                                 String tflow_status,\r
269                                                 int tmax_packet_delay_variation,\r
270                                                 int tnum_activation_failures,\r
271                                                 int tnum_bit_errors,\r
272                                                 int tnum_bytes_received,\r
273                                                 int tnum_bytes_transmitted,\r
274                                                 int tnum_dropped_packets,\r
275                                                 int tnum_l7_bytes_received,\r
276                                                 int tnum_l7_bytes_transmitted,\r
277                                                 int tnum_lost_packets,\r
278                                                 int tnum_out_of_order_packets,\r
279                                                 int tnum_packet_errors,\r
280                                                 int tnum_packets_received_excl_retrans,\r
281                                                 int tnum_packets_received_incl_retrans,\r
282                                                 int tnum_packets_transmitted_incl_retrans,\r
283                                                 int tnum_retries,\r
284                                                 int tnum_timeouts,\r
285                                                 int tnum_tunneled_l7_bytes_received,\r
286                                                 int tround_trip_time,\r
287                                                 int ttime_to_first_byte)\r
288           {\r
289             int ii;\r
290 \r
291             EVEL_ENTER();\r
292 \r
293             /***************************************************************************/\r
294             /* Check preconditions.                                                    */\r
295             /***************************************************************************/\r
296             assert(tavg_bit_error_rate >= 0.0);\r
297             assert(tavg_packet_delay_variation >= 0.0);\r
298             assert(tavg_packet_latency >= 0);\r
299             assert(tavg_receive_throughput >= 0);\r
300             assert(tavg_transmit_throughput >= 0);\r
301             assert(tflow_activation_epoch > 0);\r
302             assert(tflow_activation_microsec >= 0);\r
303             assert(tflow_deactivation_epoch > 0);\r
304             assert(tflow_deactivation_microsec >= 0);\r
305             assert(tflow_status != null);\r
306             assert(tmax_packet_delay_variation >= 0);\r
307             assert(tnum_activation_failures >= 0);\r
308             assert(tnum_bit_errors >= 0);\r
309             assert(tnum_bytes_received >= 0);\r
310             assert(tnum_bytes_transmitted >= 0);\r
311             assert(tnum_dropped_packets >= 0);\r
312             assert(tnum_l7_bytes_received >= 0);\r
313             assert(tnum_l7_bytes_transmitted >= 0);\r
314             assert(tnum_lost_packets >= 0);\r
315             assert(tnum_out_of_order_packets >= 0);\r
316             assert(tnum_packet_errors >= 0);\r
317             assert(tnum_packets_received_excl_retrans >= 0);\r
318             assert(tnum_packets_received_incl_retrans >= 0);\r
319             assert(tnum_packets_transmitted_incl_retrans >= 0);\r
320             assert(tnum_retries >= 0);\r
321             assert(tnum_timeouts >= 0);\r
322             assert(tnum_tunneled_l7_bytes_received >= 0);\r
323             assert(tround_trip_time >= 0);\r
324             assert(ttime_to_first_byte >= 0);\r
325 \r
326             /***************************************************************************/\r
327             /* Allocate the Mobile Flow GTP Per Flow Metrics.                          */\r
328             /***************************************************************************/\r
329             LOGGER.debug("New Mobile Flow GTP Per Flow Metrics");\r
330 \r
331             /***************************************************************************/\r
332             /* Initialize the Mobile Flow GTP Per Flow Metrics fields.  Optional       */\r
333             /* string values are uninitialized (null).                                 */\r
334             /***************************************************************************/\r
335             avg_bit_error_rate = tavg_bit_error_rate;\r
336             avg_packet_delay_variation = tavg_packet_delay_variation;\r
337             avg_packet_latency = tavg_packet_latency;\r
338             avg_receive_throughput = tavg_receive_throughput;\r
339             avg_transmit_throughput = tavg_transmit_throughput;\r
340             flow_activation_epoch = tflow_activation_epoch;\r
341             flow_activation_microsec = tflow_activation_microsec;\r
342             flow_deactivation_epoch = tflow_deactivation_epoch;\r
343             flow_deactivation_microsec = tflow_deactivation_microsec;\r
344             flow_deactivation_time = tflow_deactivation_time;\r
345             flow_status = tflow_status;\r
346             max_packet_delay_variation = tmax_packet_delay_variation;\r
347             num_activation_failures = tnum_activation_failures;\r
348             num_bit_errors = tnum_bit_errors;\r
349             num_bytes_received = tnum_bytes_received;\r
350             num_bytes_transmitted = tnum_bytes_transmitted;\r
351             num_dropped_packets = tnum_dropped_packets;\r
352             num_l7_bytes_received = tnum_l7_bytes_received;\r
353             num_l7_bytes_transmitted = tnum_l7_bytes_transmitted;\r
354             num_lost_packets = tnum_lost_packets;\r
355             num_out_of_order_packets = tnum_out_of_order_packets;\r
356             num_packet_errors = tnum_packet_errors;\r
357             num_packets_received_excl_retrans =\r
358                                                        tnum_packets_received_excl_retrans;\r
359             num_packets_received_incl_retrans =\r
360                                                        tnum_packets_received_incl_retrans;\r
361             num_packets_transmitted_incl_retrans =\r
362                                                     tnum_packets_transmitted_incl_retrans;\r
363             num_retries = tnum_retries;\r
364             num_timeouts = tnum_timeouts;\r
365             num_tunneled_l7_bytes_received = tnum_tunneled_l7_bytes_received;\r
366             round_trip_time = tround_trip_time;\r
367             time_to_first_byte = ttime_to_first_byte;\r
368             ip_tos_counts = new EvelOptionInt[EVEL_TOS_SUPPORTED];\r
369             for (ii = 0; ii < EVEL_TOS_SUPPORTED; ii++)\r
370             {\r
371               ip_tos_counts[ii] = new EvelOptionInt();\r
372             }\r
373             tcp_flag_counts = new EvelOptionInt[EVEL_MAX_TCP_FLAGS];\r
374             for (ii = 0; ii < EVEL_MAX_TCP_FLAGS; ii++)\r
375             {\r
376               tcp_flag_counts[ii] = new EvelOptionInt();\r
377             }\r
378             qci_cos_counts = new EvelOptionInt[EVEL_MAX_QCI_COS_TYPES];\r
379             for (ii = 0; ii < EVEL_MAX_QCI_COS_TYPES; ii++)\r
380             {\r
381               qci_cos_counts[ii] = new EvelOptionInt();\r
382             }\r
383             dur_connection_failed_status = new EvelOptionInt();\r
384             dur_tunnel_failed_status = new EvelOptionInt();\r
385             flow_activated_by = new EvelOptionString();\r
386             flow_activation_time = new EvelOptionTime();\r
387             flow_deactivated_by = new EvelOptionString();\r
388             gtp_connection_status = new EvelOptionString();\r
389             gtp_tunnel_status = new EvelOptionString();\r
390             large_packet_rtt = new EvelOptionInt();\r
391             large_packet_threshold = new EvelOptionDouble();\r
392             max_receive_bit_rate = new EvelOptionInt();\r
393             max_transmit_bit_rate = new EvelOptionInt();\r
394             num_gtp_echo_failures = new EvelOptionInt();\r
395             num_gtp_tunnel_errors = new EvelOptionInt();\r
396             num_http_errors = new EvelOptionInt();\r
397 \r
398             EVEL_EXIT();\r
399           }\r
400         }\r
401         \r
402         /***************************************************************************/\r
403         /* Mandatory fields                                                        */\r
404         /***************************************************************************/     \r
405           String flow_direction;\r
406           public MOBILE_GTP_PER_FLOW_METRICS gtp_per_flow_metrics;\r
407           String ip_protocol_type;\r
408           String ip_version;\r
409           String other_endpoint_ip_address;\r
410           int other_endpoint_port;\r
411           String reporting_endpoint_ip_addr;\r
412           int reporting_endpoint_port;\r
413                   \r
414           /***************************************************************************/\r
415           /* Optional fields                                                         */\r
416           /***************************************************************************/\r
417           ArrayList<String[]> additional_info;\r
418           EvelOptionString application_type;\r
419           EvelOptionString app_protocol_type;\r
420           EvelOptionString app_protocol_version;\r
421           EvelOptionString cid;\r
422           EvelOptionString connection_type;\r
423           EvelOptionString ecgi;\r
424           EvelOptionString gtp_protocol_type;\r
425           EvelOptionString gtp_version;\r
426           EvelOptionString http_header;\r
427           EvelOptionString imei;\r
428           EvelOptionString imsi;\r
429           EvelOptionString lac;\r
430           EvelOptionString mcc;\r
431           EvelOptionString mnc;\r
432           EvelOptionString msisdn;\r
433           EvelOptionString other_functional_role;\r
434           EvelOptionString rac;\r
435           EvelOptionString radio_access_technology;\r
436           EvelOptionString sac;\r
437           EvelOptionInt    sampling_algorithm;\r
438           EvelOptionString tac;\r
439           EvelOptionString tunnel_id;\r
440           EvelOptionString vlan_id;\r
441 \r
442         /***************************************************************************/\r
443         /* Optional fields                                                         */\r
444         /***************************************************************************/\r
445 \r
446 \r
447           /*****************************************************************************/\r
448           /* Local prototypes                                                          */\r
449           /*****************************************************************************/\r
450           \r
451          \r
452           /**************************************************************************//**\r
453            * Create a new Mobile Flow event.\r
454            *\r
455            * @note    The mandatory fields on the Mobile Flow must be supplied to this\r
456            *          factory function and are immutable once set.  Optional fields have\r
457            *          explicit setter functions, but again values may only be set once so\r
458            *          that the Mobile Flow has immutable properties.\r
459            * @param   flow_direction              Flow direction.\r
460            * @param   gtp_per_flow_metrics        GTP per-flow metrics.\r
461            * @param   ip_protocol_type            IP protocol type.\r
462            * @param   ip_version                  IP protocol version.\r
463            * @param   other_endpoint_ip_address   IP address of the other endpoint.\r
464            * @param   other_endpoint_port         IP port of the other endpoint.\r
465            * @param   reporting_endpoint_ip_addr  IP address of the reporting endpoint.\r
466            \r
467            * @param   reporting_endpoint_port     IP port of the reporting endpoint.\r
468            *****************************************************************************/\r
469           public EvelMobileFlow(      String evname, String evid,\r
470                                       String flow_dir,\r
471                                       MOBILE_GTP_PER_FLOW_METRICS gtp_per_flow_metr,\r
472                                       String ip_protocol_typ,\r
473                                       String ip_vers,\r
474                                       String other_endpoint_ip_addr,\r
475                                       int other_endpoint_pt,\r
476                                       String reporting_endpoint_ipaddr,\r
477                                       int reporting_endpoint_pt)\r
478           {\r
479             super(evname,evid);\r
480 \r
481             EVEL_ENTER();\r
482 \r
483             /***************************************************************************/\r
484             /* Check preconditions.                                                    */\r
485             /***************************************************************************/\r
486             assert(flow_dir != null);\r
487             assert(gtp_per_flow_metr != null);\r
488             assert(ip_protocol_typ != null);\r
489             assert(ip_vers != null);\r
490             assert(other_endpoint_ip_addr != null);\r
491             assert(other_endpoint_pt > 0);\r
492             assert(reporting_endpoint_ipaddr != null);\r
493             assert(reporting_endpoint_pt > 0);\r
494 \r
495             /***************************************************************************/\r
496             /* Allocate the Mobile Flow.                                               */\r
497             /***************************************************************************/\r
498             LOGGER.debug("New Mobile Flow created");\r
499 \r
500             /***************************************************************************/\r
501             /* Initialize the header & the Mobile Flow fields.  Optional string values */\r
502             /* are uninitialized (null).                                               */\r
503             /***************************************************************************/\r
504             event_domain = EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW;\r
505             flow_direction = flow_dir;\r
506             gtp_per_flow_metrics = gtp_per_flow_metr;\r
507             ip_protocol_type = ip_protocol_typ;\r
508             ip_version = ip_vers;\r
509             other_endpoint_ip_address = other_endpoint_ip_addr;\r
510             other_endpoint_port = other_endpoint_pt;\r
511             reporting_endpoint_ip_addr = reporting_endpoint_ipaddr;\r
512             reporting_endpoint_port = reporting_endpoint_pt;\r
513             \r
514             application_type = new EvelOptionString();\r
515             app_protocol_type = new EvelOptionString();\r
516             app_protocol_version = new EvelOptionString();\r
517             cid = new EvelOptionString();\r
518             connection_type = new EvelOptionString();\r
519             ecgi = new EvelOptionString();\r
520             gtp_protocol_type = new EvelOptionString();\r
521             gtp_version = new EvelOptionString();\r
522             http_header = new EvelOptionString();\r
523             imei = new EvelOptionString();\r
524             imsi = new EvelOptionString();\r
525             lac = new EvelOptionString();\r
526             mcc = new EvelOptionString();\r
527             mnc = new EvelOptionString();\r
528             msisdn = new EvelOptionString();\r
529             other_functional_role = new EvelOptionString();\r
530             rac = new EvelOptionString();\r
531             radio_access_technology = new EvelOptionString();\r
532             sac = new EvelOptionString();\r
533             sampling_algorithm = new EvelOptionInt();\r
534             tac = new EvelOptionString();\r
535             tunnel_id = new EvelOptionString();\r
536             vlan_id = new EvelOptionString();\r
537             additional_info = null;\r
538 \r
539             EVEL_EXIT();\r
540 \r
541           }\r
542 \r
543 \r
544 \r
545         /**************************************************************************//**\r
546            * Add an additional value name/value pair to the Mobile flow.\r
547            *\r
548            * The name and value are null delimited ASCII strings.  The library takes\r
549            * a copy so the caller does not have to preserve values after the function\r
550            * returns.\r
551            *\r
552            * @param name      ASCIIZ string with the attribute's name.  The caller\r
553            *                  does not need to preserve the value once the function\r
554            *                  returns.\r
555            * @param value     ASCIIZ string with the attribute's value.  The caller\r
556            *                  does not need to preserve the value once the function\r
557            *                  returns.\r
558            *****************************************************************************/\r
559           public void evel_mobile_flow_addl_field_add(String name, String value)\r
560                 {\r
561                   String[] addl_info = null;\r
562                   EVEL_ENTER();\r
563 \r
564                   /***************************************************************************/\r
565                   /* Check preconditions.                                                    */\r
566                   /***************************************************************************/\r
567                   assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
568                   assert(name != null);\r
569                   assert(value != null);\r
570                   \r
571                   if( additional_info == null )\r
572                   {\r
573                           additional_info = new ArrayList<String[]>();\r
574                   }\r
575 \r
576                   LOGGER.debug(MessageFormat.format("Adding name={0} value={1}", name, value));\r
577                   addl_info = new String[2];\r
578                   assert(addl_info != null);\r
579                   addl_info[0] = name;\r
580                   addl_info[1] = value;\r
581 \r
582                   additional_info.add(addl_info);\r
583 \r
584                   EVEL_EXIT();\r
585                 }\r
586 \r
587 \r
588           /**************************************************************************//**\r
589            * Set the Event Type property of the Mobile Flow.\r
590            *\r
591            * @note  The property is treated as immutable: it is only valid to call\r
592            *        the setter once.  However, we don't assert if the caller tries to\r
593            *        overwrite, just ignoring the update instead.\r
594            *\r
595            * @param type        The Event Type to be set. ASCIIZ string. The caller\r
596            *                    does not need to preserve the value once the function\r
597            *                    returns.\r
598            *****************************************************************************/\r
599           public void evel_mobile_flow_type_set(String typ)\r
600           {\r
601                     EVEL_ENTER();\r
602                     assert(typ != null);\r
603 \r
604                     /***************************************************************************/\r
605                     /* Check preconditions and call evel_header_type_set.                      */\r
606                     /***************************************************************************/\r
607                     assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
608                     evel_header_type_set(typ);\r
609 \r
610                     EVEL_EXIT();\r
611           }\r
612           \r
613           /**************************************************************************//**\r
614            * Set the Application Type property of the Mobile Flow.\r
615            *\r
616            * @note  The property is treated as immutable: it is only valid to call\r
617            *        the setter once.  However, we don't assert if the caller tries to\r
618            *        overwrite, just ignoring the update instead.\r
619            *\r
620            * @param type        The Application Type to be set. ASCIIZ string. The caller\r
621            *                    does not need to preserve the value once the function\r
622            *                    returns.\r
623            *****************************************************************************/\r
624           public void evel_mobile_flow_app_type_set(String type)\r
625           {\r
626             EVEL_ENTER();\r
627 \r
628             /***************************************************************************/\r
629             /* Check preconditions.                                                    */\r
630             /***************************************************************************/\r
631             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
632             assert(type != null);\r
633 \r
634             application_type.SetValuePr(\r
635                                    type,\r
636                                    "Application Type");\r
637             EVEL_EXIT();\r
638           }\r
639 \r
640           /**************************************************************************//**\r
641            * Set the Application Protocol Type property of the Mobile Flow.\r
642            *\r
643            * @note  The property is treated as immutable: it is only valid to call\r
644            *        the setter once.  However, we don't assert if the caller tries to\r
645            *        overwrite, just ignoring the update instead.\r
646            *\r
647            * @param type        The Application Protocol Type to be set. ASCIIZ string.\r
648            *                    The caller does not need to preserve the value once the\r
649            *                    function returns.\r
650            *****************************************************************************/\r
651           public void evel_mobile_flow_app_prot_type_set(String type)\r
652           {\r
653             EVEL_ENTER();\r
654 \r
655             /***************************************************************************/\r
656             /* Check preconditions.                                                    */\r
657             /***************************************************************************/\r
658             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
659             assert(type != null);\r
660 \r
661             app_protocol_type.SetValuePr(\r
662                                    type,\r
663                                    "Application Protocol Type");\r
664             EVEL_EXIT();\r
665           }\r
666 \r
667           /**************************************************************************//**\r
668            * Set the Application Protocol Version property of the Mobile Flow.\r
669            *\r
670            * @note  The property is treated as immutable: it is only valid to call\r
671            *        the setter once.  However, we don't assert if the caller tries to\r
672            *        overwrite, just ignoring the update instead.\r
673            *\r
674            * @param version     The Application Protocol Version to be set. ASCIIZ\r
675            *                    string.  The caller does not need to preserve the value\r
676            *                    once the function returns.\r
677            *****************************************************************************/\r
678           void evel_mobile_flow_app_prot_ver_set(String version)\r
679           {\r
680             EVEL_ENTER();\r
681 \r
682             /***************************************************************************/\r
683             /* Check preconditions.                                                    */\r
684             /***************************************************************************/\r
685             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
686             assert(version != null);\r
687 \r
688             app_protocol_version.SetValuePr(\r
689                                    version,\r
690                                    "Application Protocol Version");\r
691             EVEL_EXIT();\r
692           }\r
693 \r
694           /**************************************************************************//**\r
695            * Set the CID property of the Mobile Flow.\r
696            *\r
697            * @note  The property is treated as immutable: it is only valid to call\r
698            *        the setter once.  However, we don't assert if the caller tries to\r
699            *        overwrite, just ignoring the update instead.\r
700            *\r
701            * @param cid         The CID to be set. ASCIIZ string.  The caller does not\r
702            *                    need to preserve the value once the function returns.\r
703            *****************************************************************************/\r
704           public void evel_mobile_flow_cid_set(String cd)\r
705           {\r
706             EVEL_ENTER();\r
707 \r
708             /***************************************************************************/\r
709             /* Check preconditions.                                                    */\r
710             /***************************************************************************/\r
711             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
712             assert(cid != null);\r
713 \r
714             cid.SetValuePr(\r
715                                    cd,\r
716                                    "CID");\r
717             EVEL_EXIT();\r
718           }\r
719 \r
720           /**************************************************************************//**\r
721            * Set the Connection Type property of the Mobile Flow.\r
722            *\r
723            * @note  The property is treated as immutable: it is only valid to call\r
724            *        the setter once.  However, we don't assert if the caller tries to\r
725            *        overwrite, just ignoring the update instead.\r
726            *\r
727            * @param type        The Connection Type to be set. ASCIIZ string. The caller\r
728            *                    does not need to preserve the value once the function\r
729            *                    returns.\r
730            *****************************************************************************/\r
731           public void evel_mobile_flow_con_type_set(String type)\r
732           {\r
733             EVEL_ENTER();\r
734 \r
735             /***************************************************************************/\r
736             /* Check preconditions.                                                    */\r
737             /***************************************************************************/\r
738             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
739             assert(type != null);\r
740 \r
741             connection_type.SetValuePr(\r
742                                    type,\r
743                                    "Connection Type");\r
744             EVEL_EXIT();\r
745           }\r
746 \r
747           /**************************************************************************//**\r
748            * Set the ECGI property of the Mobile Flow.\r
749            *\r
750            * @note  The property is treated as immutable: it is only valid to call\r
751            *        the setter once.  However, we don't assert if the caller tries to\r
752            *        overwrite, just ignoring the update instead.\r
753            *\r
754            * @param ecgi        The ECGI to be set. ASCIIZ string.  The caller does not\r
755            *                    need to preserve the value once the function returns.\r
756            *****************************************************************************/\r
757           public void evel_mobile_flow_ecgi_set(String ecgit)\r
758           {\r
759             EVEL_ENTER();\r
760 \r
761             /***************************************************************************/\r
762             /* Check preconditions.                                                    */\r
763             /***************************************************************************/\r
764             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
765             assert(ecgit != null);\r
766 \r
767             ecgi.SetValuePr(\r
768                                    ecgit,\r
769                                    "ECGI");\r
770             EVEL_EXIT();\r
771           }\r
772 \r
773           /**************************************************************************//**\r
774            * Set the GTP Protocol Type property of the Mobile Flow.\r
775            *\r
776            * @note  The property is treated as immutable: it is only valid to call\r
777            *        the setter once.  However, we don't assert if the caller tries to\r
778            *        overwrite, just ignoring the update instead.\r
779            *\r
780 \r
781            * @param type        The GTP Protocol Type to be set. ASCIIZ string.  The\r
782            *                    caller does not need to preserve the value once the\r
783            *                    function returns.\r
784            *****************************************************************************/\r
785           public void evel_mobile_flow_gtp_prot_type_set(String type)\r
786           {\r
787             EVEL_ENTER();\r
788 \r
789             /***************************************************************************/\r
790             /* Check preconditions.                                                    */\r
791             /***************************************************************************/\r
792             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
793             assert(type != null);\r
794 \r
795             gtp_protocol_type.SetValuePr(\r
796                                    type,\r
797                                    "GTP Protocol Type");\r
798             EVEL_EXIT();\r
799           }\r
800 \r
801           /**************************************************************************//**\r
802            * Set the GTP Protocol Version property of the Mobile Flow.\r
803            *\r
804            * @note  The property is treated as immutable: it is only valid to call\r
805            *        the setter once.  However, we don't assert if the caller tries to\r
806            *        overwrite, just ignoring the update instead.\r
807            *\r
808 \r
809            * @param version     The GTP Protocol Version to be set. ASCIIZ string.  The\r
810            *                    caller does not need to preserve the value once the\r
811            *                    function returns.\r
812            *****************************************************************************/\r
813           public void evel_mobile_flow_gtp_prot_ver_set(String version)\r
814           {\r
815             EVEL_ENTER();\r
816 \r
817             /***************************************************************************/\r
818             /* Check preconditions.                                                    */\r
819             /***************************************************************************/\r
820             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
821             assert(version != null);\r
822 \r
823             gtp_version.SetValuePr(\r
824                                    version,\r
825                                    "GTP Protocol Version");\r
826             EVEL_EXIT();\r
827           }\r
828 \r
829           /**************************************************************************//**\r
830            * Set the HTTP Header property of the Mobile Flow.\r
831            *\r
832            * @note  The property is treated as immutable: it is only valid to call\r
833            *        the setter once.  However, we don't assert if the caller tries to\r
834            *        overwrite, just ignoring the update instead.\r
835            *\r
836 \r
837            * @param header      The HTTP header to be set. ASCIIZ string. The caller does\r
838            *                    not need to preserve the value once the function returns.\r
839            *****************************************************************************/\r
840           public void evel_mobile_flow_http_header_set(String header)\r
841           {\r
842             EVEL_ENTER();\r
843 \r
844             /***************************************************************************/\r
845             /* Check preconditions.                                                    */\r
846             /***************************************************************************/\r
847             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
848             \r
849             assert(header != null);\r
850 \r
851             http_header.SetValuePr(\r
852                                    header,\r
853                                    "HTTP Header");\r
854             EVEL_EXIT();\r
855           }\r
856 \r
857           /**************************************************************************//**\r
858            * Set the IMEI property of the Mobile Flow.\r
859            *\r
860            * @note  The property is treated as immutable: it is only valid to call\r
861            *        the setter once.  However, we don't assert if the caller tries to\r
862            *        overwrite, just ignoring the update instead.\r
863            *\r
864 \r
865            * @param imei        The IMEI to be set. ASCIIZ string.  The caller does not\r
866            *                    need to preserve the value once the function returns.\r
867            *****************************************************************************/\r
868           public void evel_mobile_flow_imei_set(String imeit)\r
869           {\r
870             EVEL_ENTER();\r
871 \r
872             /***************************************************************************/\r
873             /* Check preconditions.                                                    */\r
874             /***************************************************************************/\r
875             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
876             assert(imeit != null);\r
877 \r
878             imei.SetValuePr(\r
879                                    imeit,\r
880                                    "IMEI");\r
881             EVEL_EXIT();\r
882           }\r
883 \r
884           /**************************************************************************//**\r
885            * Set the IMSI property of the Mobile Flow.\r
886            *\r
887            * @note  The property is treated as immutable: it is only valid to call\r
888            *        the setter once.  However, we don't assert if the caller tries to\r
889            *        overwrite, just ignoring the update instead.\r
890            *\r
891 \r
892            * @param imsi        The IMSI to be set. ASCIIZ string.  The caller does not\r
893            *                    need to preserve the value once the function returns.\r
894            *****************************************************************************/\r
895           public void evel_mobile_flow_imsi_set(String imsit)\r
896           {\r
897             EVEL_ENTER();\r
898 \r
899             /***************************************************************************/\r
900             /* Check preconditions.                                                    */\r
901             /***************************************************************************/\r
902             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
903             assert(imsit != null);\r
904 \r
905             imsi.SetValuePr(\r
906                                    imsit,\r
907                                    "IMSI");\r
908             EVEL_EXIT();\r
909           }\r
910 \r
911           /**************************************************************************//**\r
912            * Set the LAC property of the Mobile Flow.\r
913            *\r
914            * @note  The property is treated as immutable: it is only valid to call\r
915            *        the setter once.  However, we don't assert if the caller tries to\r
916            *        overwrite, just ignoring the update instead.\r
917            *\r
918 \r
919            * @param lac         The LAC to be set. ASCIIZ string.  The caller does not\r
920            *                    need to preserve the value once the function returns.\r
921            *****************************************************************************/\r
922           public void evel_mobile_flow_lac_set(String lact)\r
923           {\r
924             EVEL_ENTER();\r
925 \r
926             /***************************************************************************/\r
927             /* Check preconditions.                                                    */\r
928             /***************************************************************************/\r
929 \r
930             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
931             assert(lact != null);\r
932 \r
933             lac.SetValuePr(\r
934                                    lact,\r
935                                    "LAC");\r
936             EVEL_EXIT();\r
937           }\r
938 \r
939           /**************************************************************************//**\r
940            * Set the MCC property of the Mobile Flow.\r
941            *\r
942            * @note  The property is treated as immutable: it is only valid to call\r
943            *        the setter once.  However, we don't assert if the caller tries to\r
944            *        overwrite, just ignoring the update instead.\r
945            *\r
946 \r
947            * @param mcc         The MCC to be set. ASCIIZ string.  The caller does not\r
948            *                    need to preserve the value once the function returns.\r
949            *****************************************************************************/\r
950           public void evel_mobile_flow_mcc_set(String mcct)\r
951           {\r
952             EVEL_ENTER();\r
953 \r
954             /***************************************************************************/\r
955             /* Check preconditions.                                                    */\r
956             /***************************************************************************/\r
957             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
958             \r
959             assert(mcct != null);\r
960 \r
961             mcc.SetValuePr(\r
962                                    mcct,\r
963                                    "MCC");\r
964             EVEL_EXIT();\r
965           }\r
966 \r
967           /**************************************************************************//**\r
968            * Set the MNC property of the Mobile Flow.\r
969            *\r
970            * @note  The property is treated as immutable: it is only valid to call\r
971            *        the setter once.  However, we don't assert if the caller tries to\r
972            *        overwrite, just ignoring the update instead.\r
973            *\r
974 \r
975            * @param mnc         The MNC to be set. ASCIIZ string.  The caller does not\r
976            *                    need to preserve the value once the function returns.\r
977            *****************************************************************************/\r
978           public void evel_mobile_flow_mnc_set(String mnct)\r
979           {\r
980             EVEL_ENTER();\r
981 \r
982             /***************************************************************************/\r
983             /* Check preconditions.                                                    */\r
984             /***************************************************************************/\r
985             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
986             \r
987             assert(mnct != null);\r
988 \r
989             mnc.SetValuePr(\r
990                                    mnct,\r
991                                    "MNC");\r
992             EVEL_EXIT();\r
993           }\r
994 \r
995           /**************************************************************************//**\r
996            * Set the MSISDN property of the Mobile Flow.\r
997            *\r
998            * @note  The property is treated as immutable: it is only valid to call\r
999            *        the setter once.  However, we don't assert if the caller tries to\r
1000            *        overwrite, just ignoring the update instead.\r
1001            *\r
1002 \r
1003            * @param msisdn      The MSISDN to be set. ASCIIZ string.  The caller does not\r
1004            *                    need to preserve the value once the function returns.\r
1005            *****************************************************************************/\r
1006           public void evel_mobile_flow_msisdn_set(String msisdnt)\r
1007           {\r
1008             EVEL_ENTER();\r
1009 \r
1010             /***************************************************************************/\r
1011             /* Check preconditions.                                                    */\r
1012             /***************************************************************************/\r
1013             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1014             \r
1015             assert(msisdnt != null);\r
1016 \r
1017             msisdn.SetValuePr(\r
1018                                    msisdnt,\r
1019                                    "MSISDN");\r
1020             EVEL_EXIT();\r
1021           }\r
1022 \r
1023           /**************************************************************************//**\r
1024            * Set the Other Functional Role property of the Mobile Flow.\r
1025            *\r
1026            * @note  The property is treated as immutable: it is only valid to call\r
1027            *        the setter once.  However, we don't assert if the caller tries to\r
1028            *        overwrite, just ignoring the update instead.\r
1029            *\r
1030 \r
1031            * @param role        The Other Functional Role to be set. ASCIIZ string. The\r
1032            *                    caller does not need to preserve the value once the\r
1033            *                    function returns.\r
1034            *****************************************************************************/\r
1035           public void evel_mobile_flow_other_func_role_set(String role)\r
1036           {\r
1037             EVEL_ENTER();\r
1038 \r
1039             /***************************************************************************/\r
1040             /* Check preconditions.                                                    */\r
1041             /***************************************************************************/\r
1042             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1043             \r
1044             assert(role != null);\r
1045 \r
1046             other_functional_role.SetValuePr(\r
1047                                    role,\r
1048                                    "Other Functional Role");\r
1049             EVEL_EXIT();\r
1050           }\r
1051 \r
1052           /**************************************************************************//**\r
1053            * Set the RAC property of the Mobile Flow.\r
1054            *\r
1055            * @note  The property is treated as immutable: it is only valid to call\r
1056            *        the setter once.  However, we don't assert if the caller tries to\r
1057            *        overwrite, just ignoring the update instead.\r
1058            *\r
1059 \r
1060            * @param rac         The RAC to be set. ASCIIZ string.  The caller does not\r
1061            *                    need to preserve the value once the function returns.\r
1062            *****************************************************************************/\r
1063           public void evel_mobile_flow_rac_set(String ract)\r
1064           {\r
1065             EVEL_ENTER();\r
1066 \r
1067             /***************************************************************************/\r
1068             /* Check preconditions.                                                    */\r
1069             /***************************************************************************/\r
1070             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1071             \r
1072             assert(ract != null);\r
1073 \r
1074             rac.SetValuePr(\r
1075                                    ract,\r
1076                                    "RAC");\r
1077             EVEL_EXIT();\r
1078           }\r
1079 \r
1080           /**************************************************************************//**\r
1081            * Set the Radio Access Technology property of the Mobile Flow.\r
1082            *\r
1083            * @note  The property is treated as immutable: it is only valid to call\r
1084            *        the setter once.  However, we don't assert if the caller tries to\r
1085            *        overwrite, just ignoring the update instead.\r
1086            *\r
1087 \r
1088            * @param tech        The Radio Access Technology to be set. ASCIIZ string. The\r
1089            *                    caller does not need to preserve the value once the\r
1090            *                    function returns.\r
1091            *****************************************************************************/\r
1092           public void evel_mobile_flow_radio_acc_tech_set(String tech)\r
1093           {\r
1094             EVEL_ENTER();\r
1095 \r
1096             /***************************************************************************/\r
1097             /* Check preconditions.                                                    */\r
1098             /***************************************************************************/\r
1099             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1100             \r
1101             assert(tech != null);\r
1102 \r
1103             radio_access_technology.SetValuePr(\r
1104                                    tech,\r
1105                                    "Radio Access Technology");\r
1106             EVEL_EXIT();\r
1107           }\r
1108 \r
1109           /**************************************************************************//**\r
1110            * Set the SAC property of the Mobile Flow.\r
1111            *\r
1112            * @note  The property is treated as immutable: it is only valid to call\r
1113            *        the setter once.  However, we don't assert if the caller tries to\r
1114            *        overwrite, just ignoring the update instead.\r
1115            *\r
1116 \r
1117            * @param sac         The SAC to be set. ASCIIZ string.  The caller does not\r
1118            *                    need to preserve the value once the function returns.\r
1119            *****************************************************************************/\r
1120           public void evel_mobile_flow_sac_set(String sact)\r
1121           {\r
1122             EVEL_ENTER();\r
1123 \r
1124             /***************************************************************************/\r
1125             /* Check preconditions.                                                    */\r
1126             /***************************************************************************/\r
1127             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1128             \r
1129             assert(sact != null);\r
1130 \r
1131             sac.SetValuePr(\r
1132                                    sact,\r
1133                                    "SAC");\r
1134             EVEL_EXIT();\r
1135           }\r
1136 \r
1137           /**************************************************************************//**\r
1138            * Set the Sampling Algorithm property of the Mobile Flow.\r
1139            *\r
1140            * @note  The property is treated as immutable: it is only valid to call\r
1141            *        the setter once.  However, we don't assert if the caller tries to\r
1142            *        overwrite, just ignoring the update instead.\r
1143            *\r
1144 \r
1145            * @param algorithm   The Sampling Algorithm to be set.\r
1146            *****************************************************************************/\r
1147           public void evel_mobile_flow_samp_alg_set(\r
1148                                              int algorithm)\r
1149           {\r
1150             EVEL_ENTER();\r
1151 \r
1152             /***************************************************************************/\r
1153             /* Check preconditions.                                                    */\r
1154             /***************************************************************************/\r
1155             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1156             \r
1157             assert(algorithm >= 0);\r
1158 \r
1159             sampling_algorithm.SetValuePr(\r
1160                                 algorithm,\r
1161                                 "Sampling Algorithm");\r
1162             EVEL_EXIT();\r
1163           }\r
1164 \r
1165           /**************************************************************************//**\r
1166            * Set the TAC property of the Mobile Flow.\r
1167            *\r
1168            * @note  The property is treated as immutable: it is only valid to call\r
1169            *        the setter once.  However, we don't assert if the caller tries to\r
1170            *        overwrite, just ignoring the update instead.\r
1171            *\r
1172 \r
1173            * @param tac         The TAC to be set. ASCIIZ string.  The caller does not\r
1174            *                    need to preserve the value once the function returns.\r
1175            *****************************************************************************/\r
1176           public void evel_mobile_flow_tac_set(String tact)\r
1177           {\r
1178             EVEL_ENTER();\r
1179 \r
1180             /***************************************************************************/\r
1181             /* Check preconditions.                                                    */\r
1182             /***************************************************************************/\r
1183             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1184             \r
1185             assert(tact != null);\r
1186 \r
1187             tac.SetValuePr(\r
1188                                    tact,\r
1189                                    "TAC");\r
1190             EVEL_EXIT();\r
1191           }\r
1192 \r
1193           /**************************************************************************//**\r
1194            * Set the Tunnel ID property of the Mobile Flow.\r
1195            *\r
1196            * @note  The property is treated as immutable: it is only valid to call\r
1197            *        the setter once.  However, we don't assert if the caller tries to\r
1198            *        overwrite, just ignoring the update instead.\r
1199            *\r
1200 \r
1201            * @param tunnel_id   The Tunnel ID to be set. ASCIIZ string.  The caller does\r
1202            *                    not need to preserve the value once the function returns.\r
1203            *****************************************************************************/\r
1204           public void evel_mobile_flow_tunnel_id_set(String tunnel_idt)\r
1205           {\r
1206             EVEL_ENTER();\r
1207 \r
1208             /***************************************************************************/\r
1209             /* Check preconditions.                                                    */\r
1210             /***************************************************************************/\r
1211             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1212             \r
1213             assert(tunnel_idt != null);\r
1214 \r
1215             tunnel_id.SetValuePr(\r
1216                                    tunnel_idt,\r
1217                                    "Tunnel ID");\r
1218             EVEL_EXIT();\r
1219           }\r
1220 \r
1221           /**************************************************************************//**\r
1222            * Set the VLAN ID property of the Mobile Flow.\r
1223            *\r
1224            * @note  The property is treated as immutable: it is only valid to call\r
1225            *        the setter once.  However, we don't assert if the caller tries to\r
1226            *        overwrite, just ignoring the update instead.\r
1227            *\r
1228 \r
1229            * @param vlan_id     The VLAN ID to be set. ASCIIZ string.  The caller does\r
1230            *                    not need to preserve the value once the function returns.\r
1231            *****************************************************************************/\r
1232           public void evel_mobile_flow_vlan_id_set(String vlan_idt)\r
1233           {\r
1234             EVEL_ENTER();\r
1235 \r
1236             /***************************************************************************/\r
1237             /* Check preconditions.                                                    */\r
1238             /***************************************************************************/\r
1239             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1240             \r
1241             assert(vlan_idt != null);\r
1242 \r
1243             vlan_id.SetValuePr(\r
1244                                    vlan_idt,\r
1245                                    "VLAN ID");\r
1246             EVEL_EXIT();\r
1247           }\r
1248 \r
1249 \r
1250 \r
1251           /**************************************************************************//**\r
1252            * Set the Duration of Connection Failed Status property of the Mobile GTP Per\r
1253            * Flow Metrics.\r
1254            *\r
1255            * @note  The property is treated as immutable: it is only valid to call\r
1256            *        the setter once.  However, we don't assert if the caller tries to\r
1257            *        overwrite, just ignoring the update instead.\r
1258            *\r
1259            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1260            * @param duration    The Duration of Connection Failed Status to be set.\r
1261            *****************************************************************************/\r
1262           public void evel_mobile_gtp_metrics_dur_con_fail_set(\r
1263                                                    MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1264                                                    int duration)\r
1265           {\r
1266             EVEL_ENTER();\r
1267 \r
1268             /***************************************************************************/\r
1269             /* Check preconditions.                                                    */\r
1270             /***************************************************************************/\r
1271             assert(metrics != null);\r
1272             assert(duration >= 0);\r
1273 \r
1274             metrics.dur_connection_failed_status.SetValuePr(\r
1275                                 duration,\r
1276                                 "Duration of Connection Failed Status");\r
1277             EVEL_EXIT();\r
1278           }\r
1279 \r
1280           /**************************************************************************//**\r
1281            * Set the Duration of Tunnel Failed Status property of the Mobile GTP Per Flow\r
1282            * Metrics.\r
1283            *\r
1284            * @note  The property is treated as immutable: it is only valid to call\r
1285            *        the setter once.  However, we don't assert if the caller tries to\r
1286            *        overwrite, just ignoring the update instead.\r
1287            *\r
1288            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1289            * @param duration    The Duration of Tunnel Failed Status to be set.\r
1290            *****************************************************************************/\r
1291           public void evel_mobile_gtp_metrics_dur_tun_fail_set(\r
1292                                                    MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1293                                                    int duration)\r
1294           {\r
1295             EVEL_ENTER();\r
1296 \r
1297             /***************************************************************************/\r
1298             /* Check preconditions.                                                    */\r
1299             /***************************************************************************/\r
1300             assert(metrics != null);\r
1301             assert(duration >= 0);\r
1302 \r
1303             metrics.dur_tunnel_failed_status.SetValuePr(\r
1304                                 duration,\r
1305                                 "Duration of Tunnel Failed Status");\r
1306             EVEL_EXIT();\r
1307           }\r
1308 \r
1309           /**************************************************************************//**\r
1310            * Set the Activated By property of the Mobile GTP Per Flow metrics.\r
1311            *\r
1312            * @note  The property is treated as immutable: it is only valid to call\r
1313            *        the setter once.  However, we don't assert if the caller tries to\r
1314            *        overwrite, just ignoring the update instead.\r
1315            *\r
1316            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1317            * @param act_by      The Activated By to be set.  ASCIIZ string. The caller\r
1318            *                    does not need to preserve the value once the function\r
1319            *                    returns.\r
1320            *****************************************************************************/\r
1321           public void evel_mobile_gtp_metrics_act_by_set(MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1322                                                   String act_by)\r
1323           {\r
1324             EVEL_ENTER();\r
1325 \r
1326             /***************************************************************************/\r
1327             /* Check preconditions.                                                    */\r
1328             /***************************************************************************/\r
1329             assert(metrics != null);\r
1330             assert(act_by != null);\r
1331 \r
1332             metrics.flow_activated_by.SetValuePr(\r
1333                                    act_by,\r
1334                                    "Activated By");\r
1335             EVEL_EXIT();\r
1336           }\r
1337 \r
1338           /**************************************************************************//**\r
1339            * Set the Activation Time property of the Mobile GTP Per Flow metrics.\r
1340            *\r
1341            * @note  The property is treated as immutable: it is only valid to call\r
1342            *        the setter once.  However, we don't assert if the caller tries to\r
1343            *        overwrite, just ignoring the update instead.\r
1344            *\r
1345            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1346            * @param act_time    The Activation Time to be set.  ASCIIZ string. The caller\r
1347            *                    does not need to preserve the value once the function\r
1348            *                    returns.\r
1349            *****************************************************************************/\r
1350           public  void evel_mobile_gtp_metrics_act_time_set(\r
1351                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1352                                                    Date act_time)\r
1353           {\r
1354             EVEL_ENTER();\r
1355 \r
1356             /***************************************************************************/\r
1357             /* Check preconditions.                                                    */\r
1358             /***************************************************************************/\r
1359             assert(metrics != null);\r
1360 \r
1361             metrics.flow_activation_time.SetValuePr(\r
1362                                  act_time,\r
1363                                  "Activation Time");\r
1364             EVEL_EXIT();\r
1365           }\r
1366 \r
1367           /**************************************************************************//**\r
1368            * Set the Deactivated By property of the Mobile GTP Per Flow metrics.\r
1369            *\r
1370            * @note  The property is treated as immutable: it is only valid to call\r
1371            *        the setter once.  However, we don't assert if the caller tries to\r
1372            *        overwrite, just ignoring the update instead.\r
1373            *\r
1374            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1375            * @param deact_by    The Deactivated By to be set.  ASCIIZ string. The caller\r
1376            *                    does not need to preserve the value once the function\r
1377            *                    returns.\r
1378            *****************************************************************************/\r
1379           public void evel_mobile_gtp_metrics_deact_by_set(\r
1380                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1381                                                    String deact_by)\r
1382           {\r
1383             EVEL_ENTER();\r
1384 \r
1385             /***************************************************************************/\r
1386             /* Check preconditions.                                                    */\r
1387             /***************************************************************************/\r
1388             assert(metrics != null);\r
1389             assert(deact_by != null);\r
1390 \r
1391             metrics.flow_deactivated_by.SetValuePr(\r
1392                                    deact_by,\r
1393                                    "Deactivated By");\r
1394             EVEL_EXIT();\r
1395           }\r
1396 \r
1397           /**************************************************************************//**\r
1398            * Set the GTP Connection Status property of the Mobile GTP Per Flow metrics.\r
1399            *\r
1400            * @note  The property is treated as immutable: it is only valid to call\r
1401            *        the setter once.  However, we don't assert if the caller tries to\r
1402            *        overwrite, just ignoring the update instead.\r
1403            *\r
1404            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1405            * @param status      The GTP Connection Status to be set.  ASCIIZ string. The\r
1406            *                    caller does not need to preserve the value once the\r
1407            *                    function returns.\r
1408            *****************************************************************************/\r
1409           public void evel_mobile_gtp_metrics_con_status_set(\r
1410                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1411                                                    String status)\r
1412           {\r
1413             EVEL_ENTER();\r
1414 \r
1415             /***************************************************************************/\r
1416             /* Check preconditions.                                                    */\r
1417             /***************************************************************************/\r
1418             assert(metrics != null);\r
1419             assert(status != null);\r
1420 \r
1421             metrics.gtp_connection_status.SetValuePr(\r
1422                                    status,\r
1423                                    "GTP Connection Status");\r
1424             EVEL_EXIT();\r
1425           }\r
1426 \r
1427           /**************************************************************************//**\r
1428            * Set the GTP Tunnel Status property of the Mobile GTP Per Flow metrics.\r
1429            *\r
1430            * @note  The property is treated as immutable: it is only valid to call\r
1431            *        the setter once.  However, we don't assert if the caller tries to\r
1432            *        overwrite, just ignoring the update instead.\r
1433            *\r
1434            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1435            * @param status      The GTP Tunnel Status to be set.  ASCIIZ string. The\r
1436            *                    caller does not need to preserve the value once the\r
1437            *                    function returns.\r
1438            *****************************************************************************/\r
1439           public void evel_mobile_gtp_metrics_tun_status_set(\r
1440                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1441                                                    String status)\r
1442           {\r
1443             EVEL_ENTER();\r
1444 \r
1445             /***************************************************************************/\r
1446             /* Check preconditions.                                                    */\r
1447             /***************************************************************************/\r
1448             assert(metrics != null);\r
1449             assert(status != null);\r
1450 \r
1451             metrics.gtp_tunnel_status.SetValuePr(\r
1452                                    status,\r
1453                                    "GTP Tunnel Status");\r
1454             EVEL_EXIT();\r
1455           }\r
1456 \r
1457           /**************************************************************************//**\r
1458            * Set an IP Type-of-Service count property of the Mobile GTP Per Flow metrics.\r
1459            *\r
1460            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1461            * @param index       The index of the IP Type-of-Service.\r
1462            * @param count       The count.\r
1463            *****************************************************************************/\r
1464           public void evel_mobile_gtp_metrics_iptos_set(MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1465                                                  int index,\r
1466                                                  int count)\r
1467           {\r
1468             EVEL_ENTER();\r
1469 \r
1470             /***************************************************************************/\r
1471             /* Check preconditions.                                                    */\r
1472             /***************************************************************************/\r
1473             assert(metrics != null);\r
1474             assert(index >= 0);\r
1475             assert(index < EVEL_TOS_SUPPORTED);\r
1476             assert(count >= 0);\r
1477             assert(count <= 255);\r
1478 \r
1479             LOGGER.debug("IP Type-of-Service "+index);\r
1480             metrics.ip_tos_counts[index].SetValuePr(\r
1481                                 count,\r
1482                                 "IP Type-of-Service");\r
1483             EVEL_EXIT();\r
1484           }\r
1485 \r
1486           /**************************************************************************//**\r
1487            * Set the Large Packet Round-Trip Time property of the Mobile GTP Per Flow\r
1488            * Metrics.\r
1489            *\r
1490            * @note  The property is treated as immutable: it is only valid to call\r
1491            *        the setter once.  However, we don't assert if the caller tries to\r
1492            *        overwrite, just ignoring the update instead.\r
1493            *\r
1494            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1495            * @param rtt         The Large Packet Round-Trip Time to be set.\r
1496            *****************************************************************************/\r
1497           public void evel_mobile_gtp_metrics_large_pkt_rtt_set(\r
1498                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1499                                                    int rtt)\r
1500           {\r
1501             EVEL_ENTER();\r
1502 \r
1503             /***************************************************************************/\r
1504             /* Check preconditions.                                                    */\r
1505             /***************************************************************************/\r
1506             assert(metrics != null);\r
1507             assert(rtt >= 0);\r
1508 \r
1509             metrics.large_packet_rtt.SetValuePr(\r
1510                                 rtt,\r
1511                                 "Large Packet Round-Trip Time");\r
1512             EVEL_EXIT();\r
1513           }\r
1514 \r
1515           /**************************************************************************//**\r
1516            * Set the Large Packet Threshold property of the Mobile GTP Per Flow Metrics.\r
1517            *\r
1518            * @note  The property is treated as immutable: it is only valid to call\r
1519            *        the setter once.  However, we don't assert if the caller tries to\r
1520            *        overwrite, just ignoring the update instead.\r
1521            *\r
1522            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1523            * @param threshold   The Large Packet Threshold to be set.\r
1524            *****************************************************************************/\r
1525           public void evel_mobile_gtp_metrics_large_pkt_thresh_set(\r
1526                                                    MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1527                                                    double threshold)\r
1528           {\r
1529             EVEL_ENTER();\r
1530 \r
1531             /***************************************************************************/\r
1532             /* Check preconditions.                                                    */\r
1533             /***************************************************************************/\r
1534             assert(metrics != null);\r
1535             assert(threshold >= 0.0);\r
1536 \r
1537             metrics.large_packet_threshold.SetValuePr(\r
1538                                    threshold,\r
1539                                    "Large Packet Threshold");\r
1540             EVEL_EXIT();\r
1541           }\r
1542 \r
1543           /**************************************************************************//**\r
1544            * Set the Max Receive Bit Rate property of the Mobile GTP Per Flow Metrics.\r
1545            *\r
1546            * @note  The property is treated as immutable: it is only valid to call\r
1547            *        the setter once.  However, we don't assert if the caller tries to\r
1548            *        overwrite, just ignoring the update instead.\r
1549            *\r
1550            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1551            * @param rate        The Max Receive Bit Rate to be set.\r
1552            *****************************************************************************/\r
1553           public void evel_mobile_gtp_metrics_max_rcv_bit_rate_set(\r
1554                                                    MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1555                                                    int rate)\r
1556           {\r
1557             EVEL_ENTER();\r
1558 \r
1559             /***************************************************************************/\r
1560             /* Check preconditions.                                                    */\r
1561             /***************************************************************************/\r
1562             assert(metrics != null);\r
1563             assert(rate >= 0);\r
1564 \r
1565             metrics.max_receive_bit_rate.SetValuePr(\r
1566                                 rate,\r
1567                                 "Max Receive Bit Rate");\r
1568             EVEL_EXIT();\r
1569           }\r
1570 \r
1571           /**************************************************************************//**\r
1572            * Set the Max Transmit Bit Rate property of the Mobile GTP Per Flow Metrics.\r
1573            *\r
1574            * @note  The property is treated as immutable: it is only valid to call\r
1575            *        the setter once.  However, we don't assert if the caller tries to\r
1576            *        overwrite, just ignoring the update instead.\r
1577            *\r
1578            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1579            * @param rate        The Max Transmit Bit Rate to be set.\r
1580            *****************************************************************************/\r
1581           public  void evel_mobile_gtp_metrics_max_trx_bit_rate_set(\r
1582                                                    MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1583                                                    int rate)\r
1584           {\r
1585             EVEL_ENTER();\r
1586 \r
1587             /***************************************************************************/\r
1588             /* Check preconditions.                                                    */\r
1589             /***************************************************************************/\r
1590             assert(metrics != null);\r
1591             assert(rate >= 0);\r
1592 \r
1593             metrics.max_transmit_bit_rate.SetValuePr(\r
1594                                 rate,\r
1595                                 "Max Transmit Bit Rate");\r
1596             EVEL_EXIT();\r
1597           }\r
1598 \r
1599           /**************************************************************************//**\r
1600            * Set the Number of GTP Echo Failures property of the Mobile GTP Per Flow\r
1601            * Metrics.\r
1602            *\r
1603            * @note  The property is treated as immutable: it is only valid to call\r
1604            *        the setter once.  However, we don't assert if the caller tries to\r
1605            *        overwrite, just ignoring the update instead.\r
1606            *\r
1607            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1608            * @param num         The Number of GTP Echo Failures to be set.\r
1609            *****************************************************************************/\r
1610           public  void evel_mobile_gtp_metrics_num_echo_fail_set(\r
1611                                                    MOBILE_GTP_PER_FLOW_METRICS metrics,\r
1612                                                    int num)\r
1613           {\r
1614             EVEL_ENTER();\r
1615 \r
1616             /***************************************************************************/\r
1617             /* Check preconditions.                                                    */\r
1618             /***************************************************************************/\r
1619             assert(metrics != null);\r
1620             assert(num >= 0);\r
1621 \r
1622             metrics.num_gtp_echo_failures.SetValuePr(\r
1623                                 num,\r
1624                                 "Number of GTP Echo Failures");\r
1625             EVEL_EXIT();\r
1626           }\r
1627 \r
1628           /**************************************************************************//**\r
1629            * Set the Number of GTP Tunnel Errors property of the Mobile GTP Per Flow\r
1630            * Metrics.\r
1631            *\r
1632            * @note  The property is treated as immutable: it is only valid to call\r
1633            *        the setter once.  However, we don't assert if the caller tries to\r
1634            *        overwrite, just ignoring the update instead.\r
1635            *\r
1636            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1637            * @param num         The Number of GTP Tunnel Errors to be set.\r
1638            *****************************************************************************/\r
1639           public   void evel_mobile_gtp_metrics_num_tun_fail_set(\r
1640                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1641                                                    int num)\r
1642           {\r
1643             EVEL_ENTER();\r
1644 \r
1645             /***************************************************************************/\r
1646             /* Check preconditions.                                                    */\r
1647             /***************************************************************************/\r
1648             assert(metrics != null);\r
1649             assert(num >= 0);\r
1650 \r
1651             metrics.num_gtp_tunnel_errors.SetValuePr(\r
1652                                 num,\r
1653                                 "Number of GTP Tunnel Errors");\r
1654             EVEL_EXIT();\r
1655           }\r
1656 \r
1657           /**************************************************************************//**\r
1658            * Set the Number of HTTP Errors property of the Mobile GTP Per Flow Metrics.\r
1659            *\r
1660            * @note  The property is treated as immutable: it is only valid to call\r
1661            *        the setter once.  However, we don't assert if the caller tries to\r
1662            *        overwrite, just ignoring the update instead.\r
1663            *\r
1664            * @param metrics     Pointer to the Mobile GTP Per Flow Metrics.\r
1665            * @param num         The Number of HTTP Errors to be set.\r
1666            *****************************************************************************/\r
1667           public  void evel_mobile_gtp_metrics_num_http_errors_set(\r
1668                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1669                                                    int num)\r
1670           {\r
1671             EVEL_ENTER();\r
1672 \r
1673             /***************************************************************************/\r
1674             /* Check preconditions.                                                    */\r
1675             /***************************************************************************/\r
1676             assert(metrics != null);\r
1677             assert(num >= 0);\r
1678 \r
1679             metrics.num_http_errors.SetValuePr(\r
1680                                 num,\r
1681                                 "Number of HTTP Errors");\r
1682             EVEL_EXIT();\r
1683           }\r
1684 \r
1685           /**************************************************************************//**\r
1686            * Add a TCP flag count to the metrics.\r
1687            *\r
1688            * @note  The property is treated as immutable: it is only valid to call\r
1689            *        the setter once.  However, we don't assert if the caller tries to\r
1690            *        overwrite, just ignoring the update instead.\r
1691            *\r
1692            * @param metrics       Pointer to the Mobile GTP Per Flow Metrics.\r
1693            * @param tcp_flag      The TCP flag to be updated.\r
1694            * @param count         The associated flag count, which must be nonzero.\r
1695            *****************************************************************************/\r
1696           public  void evel_mobile_gtp_metrics_tcp_flag_count_add(\r
1697                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1698                                                    int tcp_flag,\r
1699                                                    int count)\r
1700           {\r
1701             EVEL_ENTER();\r
1702 \r
1703             /***************************************************************************/\r
1704             /* Check preconditions.                                                    */\r
1705             /***************************************************************************/\r
1706             assert(metrics != null);\r
1707             assert(tcp_flag >= 0 && tcp_flag < EVEL_MAX_TCP_FLAGS);\r
1708             assert(count >= 0);\r
1709 \r
1710             LOGGER.debug("TCP Flag: "+tcp_flag);\r
1711             metrics.tcp_flag_counts[tcp_flag].SetValuePr(\r
1712                                 count,\r
1713                                 "TCP flag");\r
1714             EVEL_EXIT();\r
1715           }\r
1716 \r
1717           /**************************************************************************//**\r
1718            * Add a QCI COS count to the metrics.\r
1719            *\r
1720            * @note  The property is treated as immutable: it is only valid to call\r
1721            *        the setter once.  However, we don't assert if the caller tries to\r
1722            *        overwrite, just ignoring the update instead.\r
1723            *\r
1724            * @param metrics       Pointer to the Mobile GTP Per Flow Metrics.\r
1725            * @param qci_cos       The QCI COS count to be updated.\r
1726            * @param count         The associated QCI COS count.\r
1727            *****************************************************************************/\r
1728           public  void evel_mobile_gtp_metrics_qci_cos_count_add(\r
1729                                                    MOBILE_GTP_PER_FLOW_METRICS  metrics,\r
1730                                                    int qci_cos,\r
1731                                                    int count)\r
1732           {\r
1733             EVEL_ENTER();\r
1734 \r
1735             /***************************************************************************/\r
1736             /* Check preconditions.                                                    */\r
1737             /***************************************************************************/\r
1738             assert(metrics != null);\r
1739             assert(qci_cos >= 0);\r
1740             assert(qci_cos < EVEL_MAX_QCI_COS_TYPES);\r
1741             assert(count >= 0);\r
1742 \r
1743             LOGGER.debug("QCI COS: "+ qci_cos);\r
1744             metrics.qci_cos_counts[qci_cos].SetValuePr(\r
1745                                 count,\r
1746                                 "QCI COS");\r
1747             EVEL_EXIT();\r
1748           }\r
1749 \r
1750 \r
1751                 /**************************************************************************//**\r
1752                  * Encode the GTP Per Flow Object in JSON according to AT&T's schema.\r
1753                  *\r
1754                  * @retval JsonObjectBuilder of GTP Flow body portion of message   \r
1755                  *****************************************************************************/\r
1756           JsonObjectBuilder evelGtpPerFlowObject()\r
1757           {\r
1758                     int index;\r
1759                     boolean found_ip_tos;\r
1760                     boolean found_tcp_flag;\r
1761                     boolean found_qci_cos;\r
1762 \r
1763                     EVEL_ENTER();\r
1764                     \r
1765             /***************************************************************************/\r
1766             /* Mandatory parameters.                                                   */\r
1767             /***************************************************************************/\r
1768                 MOBILE_GTP_PER_FLOW_METRICS metrics = gtp_per_flow_metrics;\r
1769                     \r
1770                 JsonObjectBuilder obj =  Json.createObjectBuilder()\r
1771                                                   .add("avgBitErrorRate", metrics.avg_bit_error_rate)\r
1772                                                   .add("avgPacketDelayVariation", metrics.avg_packet_delay_variation)\r
1773                                                   .add("avgPacketLatency", metrics.avg_packet_latency)\r
1774                                                   .add("avgReceiveThroughput", metrics.avg_receive_throughput)\r
1775                                                   .add("avgTransmitThroughput", metrics.avg_transmit_throughput)\r
1776                                                   .add("flowActivationEpoch", metrics.flow_activation_epoch)\r
1777                                                   .add("flowActivationMicrosec", metrics.flow_activation_microsec)\r
1778                                                   .add("flowDeactivationEpoch", metrics.flow_deactivation_epoch)\r
1779                                                   .add("flowDeactivationMicrosec", metrics.flow_deactivation_microsec)\r
1780                                                   .add("flowDeactivationTime", metrics.flow_deactivation_time.toString())\r
1781                                                   .add("flowStatus", metrics.flow_status)\r
1782                                                   .add("maxPacketDelayVariation", metrics.max_packet_delay_variation)\r
1783                                                   .add("numActivationFailures", metrics.num_activation_failures)\r
1784                 .add( "numBitErrors", metrics.num_bit_errors)\r
1785                 .add( "numBytesReceived", metrics.num_bytes_received)\r
1786                 .add( "numBytesTransmitted", metrics.num_bytes_transmitted)\r
1787                 .add( "numDroppedPackets", metrics.num_dropped_packets)\r
1788                 .add( "numL7BytesReceived", metrics.num_l7_bytes_received)\r
1789                 .add( "numL7BytesTransmitted", metrics.num_l7_bytes_transmitted)\r
1790                 .add( "numLostPackets", metrics.num_lost_packets)\r
1791                 .add( "numOutOfOrderPackets", metrics.num_out_of_order_packets)\r
1792                 .add( "numPacketErrors", metrics.num_packet_errors)\r
1793                 .add( "numPacketsReceivedExclRetrans",\r
1794                                     metrics.num_packets_received_excl_retrans)\r
1795                 .add(\r
1796                                     "numPacketsReceivedInclRetrans",\r
1797                                     metrics.num_packets_received_incl_retrans)\r
1798                 .add(\r
1799                                     "numPacketsTransmittedInclRetrans",\r
1800                                     metrics.num_packets_transmitted_incl_retrans)\r
1801                 .add( "numRetries", metrics.num_retries)\r
1802                 .add( "numTimeouts", metrics.num_timeouts)\r
1803                 .add(\r
1804                                     "numTunneledL7BytesReceived",\r
1805                                     metrics.num_tunneled_l7_bytes_received)\r
1806                 .add( "roundTripTime", metrics.round_trip_time)\r
1807                 .add( "timeToFirstByte", metrics.time_to_first_byte);\r
1808 \r
1809                     /***************************************************************************/\r
1810                     /* Optional parameters.                                                    */\r
1811                     /***************************************************************************/\r
1812                     found_ip_tos = false;\r
1813                     for (index = 0; index < EVEL_TOS_SUPPORTED; index++)\r
1814                     {\r
1815                       if (metrics.ip_tos_counts[index].is_set)\r
1816                       {\r
1817                         found_ip_tos = true;\r
1818                         break;\r
1819                       }\r
1820                     }\r
1821 \r
1822                     if (found_ip_tos)\r
1823                     {\r
1824                       JsonArrayBuilder builder = Json.createArrayBuilder();\r
1825                       for (index = 0; index < EVEL_TOS_SUPPORTED; index++)\r
1826                       {\r
1827                         if (metrics.ip_tos_counts[index].is_set)\r
1828                         {\r
1829                                   JsonObjectBuilder obj2 = Json.createObjectBuilder()\r
1830                                              .add(Integer.toString(index), metrics.ip_tos_counts[index].value);\r
1831                                       builder.add(obj2);\r
1832                         }\r
1833                       }\r
1834                       obj.add("ipTosCountList", builder);\r
1835                     }\r
1836 \r
1837 \r
1838                     /***************************************************************************/\r
1839                     /* Make some compile-time assertions about EVEL_TCP_FLAGS.  If you update  */\r
1840                     /* these, make sure you update evel_tcp_flag_strings to match the enum.    */\r
1841                     /***************************************************************************/\r
1842 \r
1843                     found_tcp_flag = false;\r
1844                     for (index = 0; index < EVEL_MAX_TCP_FLAGS; index++)\r
1845                     {\r
1846                       if (metrics.tcp_flag_counts[index].is_set)\r
1847                       {\r
1848                         found_tcp_flag = true;\r
1849                         break;\r
1850                       }\r
1851                     }\r
1852 \r
1853                     if (found_tcp_flag)\r
1854                     {\r
1855                       JsonArrayBuilder builder = Json.createArrayBuilder();\r
1856                       for (index = 0; index < EVEL_MAX_TCP_FLAGS; index++)\r
1857                       {\r
1858                         if (metrics.tcp_flag_counts[index].is_set)\r
1859                         {\r
1860                                   JsonObjectBuilder obj2 = Json.createObjectBuilder()\r
1861                                                      .add(Integer.toString(index), evel_tcp_flag_strings[index]);\r
1862                                           builder.add(obj2);\r
1863                         }\r
1864                       }\r
1865                       obj.add("tcpFlagList", builder);\r
1866                     }\r
1867 \r
1868                     if (found_tcp_flag)\r
1869                     {\r
1870                       JsonArrayBuilder builder = Json.createArrayBuilder();\r
1871                       for (index = 0; index < EVEL_MAX_TCP_FLAGS; index++)\r
1872                       {\r
1873                         if (metrics.tcp_flag_counts[index].is_set)\r
1874                         {\r
1875                                    JsonObjectBuilder obj2 = Json.createObjectBuilder()\r
1876                                                              .add(evel_tcp_flag_strings[index], metrics.tcp_flag_counts[index].value);\r
1877                                            builder.add(obj2);\r
1878                         }\r
1879                       }\r
1880                       obj.add("tcpFlagCountList", builder);\r
1881                     }\r
1882 \r
1883                     /***************************************************************************/\r
1884                     /* Make some compile-time assertions about EVEL_QCI_COS_TYPES.  If you     */\r
1885                     /* update these, make sure you update evel_qci_cos_strings to match the    */\r
1886                     /* enum.                                                                   */\r
1887                     /***************************************************************************/\r
1888 \r
1889                     found_qci_cos = false;\r
1890                     for (index = 0; index < EVEL_MAX_QCI_COS_TYPES; index++)\r
1891                     {\r
1892                       if (metrics.qci_cos_counts[index].is_set)\r
1893                       {\r
1894                         found_qci_cos = true;\r
1895                         break;\r
1896                       }\r
1897                     }\r
1898 \r
1899                     if (found_qci_cos)\r
1900                     {\r
1901                       JsonArrayBuilder builder = Json.createArrayBuilder();\r
1902                       for (index = 0; index < EVEL_MAX_QCI_COS_TYPES; index++)\r
1903                       {\r
1904                         if (metrics.qci_cos_counts[index].is_set)\r
1905                         {\r
1906                                   JsonObjectBuilder obj2 = Json.createObjectBuilder()\r
1907                                                              .add(Integer.toString(index), evel_qci_cos_strings[index]);\r
1908                                           builder.add(obj2);\r
1909                         }\r
1910                       }\r
1911                       obj.add("mobileQciCosList", builder);\r
1912                     }\r
1913 \r
1914                     if (found_qci_cos)\r
1915                     {\r
1916                         JsonArrayBuilder builder = Json.createArrayBuilder();\r
1917                       for (index = 0; index < EVEL_MAX_QCI_COS_TYPES; index++)\r
1918                       {\r
1919                         if (metrics.qci_cos_counts[index].is_set)\r
1920                         {\r
1921                                           JsonObjectBuilder obj2 = Json.createObjectBuilder()\r
1922                                                              .add(evel_qci_cos_strings[index], metrics.qci_cos_counts[index].value);\r
1923                                               builder.add(obj2);\r
1924                         }\r
1925                       }\r
1926                       obj.add("mobileQciCosCountList", builder);\r
1927                     }\r
1928 \r
1929                     metrics.dur_connection_failed_status.encJsonValue(obj, "durConnectionFailedStatus");\r
1930                     metrics.dur_tunnel_failed_status.encJsonValue(obj, "durTunnelFailedStatus");\r
1931                     metrics.flow_activated_by.encJsonValue(obj, "flowActivatedBy");\r
1932                     metrics.flow_activation_time.encJsonValue(obj,"flowActivationTime");\r
1933                     metrics.flow_deactivated_by.encJsonValue(obj, "flowDeactivatedBy");\r
1934                     metrics.gtp_connection_status.encJsonValue(obj, "gtpConnectionStatus");\r
1935                     metrics.gtp_tunnel_status.encJsonValue(obj, "gtpTunnelStatus");\r
1936                     metrics.large_packet_rtt.encJsonValue(obj, "largePacketRtt");\r
1937                     metrics.large_packet_threshold.encJsonValue(obj, "largePacketThreshold");\r
1938                     metrics.max_receive_bit_rate.encJsonValue(obj, "maxReceiveBitRate");\r
1939                     metrics.max_transmit_bit_rate.encJsonValue(obj, "maxTransmitBitRate");\r
1940                     metrics.num_gtp_echo_failures.encJsonValue(obj, "numGtpEchoFailures");\r
1941                     metrics.num_gtp_tunnel_errors.encJsonValue(obj, "numGtpTunnelErrors");\r
1942                     metrics.num_http_errors.encJsonValue(obj, "numHttpErrors");\r
1943                     \r
1944                     return obj;       \r
1945                     \r
1946           }\r
1947           \r
1948 \r
1949           /**************************************************************************//**\r
1950            * Encode Mobile Flow Object according to VES schema\r
1951            *\r
1952            * @retval JSON Object of Mobile Flow event\r
1953            *****************************************************************************/\r
1954           JsonObjectBuilder evelMobileFlowObject()\r
1955           {\r
1956 \r
1957             double version = major_version+(double)minor_version/10;\r
1958 \r
1959             EVEL_ENTER();\r
1960 \r
1961             /***************************************************************************/\r
1962             /* Check preconditions.                                                    */\r
1963             /***************************************************************************/\r
1964             assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_MOBILE_FLOW);\r
1965 \r
1966             /***************************************************************************/\r
1967             /* Mandatory fields.                                                       */\r
1968             /***************************************************************************/\r
1969             JsonObjectBuilder evelmf = Json.createObjectBuilder()\r
1970                                           .add("flowDirection", flow_direction)\r
1971                                           .add("ipProtocolType", ip_protocol_type)\r
1972                                           .add("ipVersion", ip_version)\r
1973                                   .add("otherEndpointIpAddress", other_endpoint_ip_address)\r
1974                                   .add("otherEndpointPort", other_endpoint_port)\r
1975                                           .add("reportingEndpointIpAddr", reporting_endpoint_ip_addr)\r
1976                                           .add("reportingEndpointPort", reporting_endpoint_port);\r
1977             \r
1978             //call gtp per flow object encoding function\r
1979             if(gtp_per_flow_metrics != null)\r
1980                                   evelmf.add("gtpPerFlowMetrics", evelGtpPerFlowObject());\r
1981                                   \r
1982 \r
1983 \r
1984             /***************************************************************************/\r
1985             /* Optional fields.                                                        */\r
1986             /***************************************************************************/\r
1987             // additional fields\r
1988                   if( additional_info != null )\r
1989                   {\r
1990                     JsonArrayBuilder builder = Json.createArrayBuilder();\r
1991                     for(int i=0;i<additional_info.size();i++) {\r
1992                           String[] addl_info = additional_info.get(i);\r
1993                           JsonObject obj = Json.createObjectBuilder()\r
1994                                      .add("name", addl_info[0])\r
1995                                      .add("value", addl_info[1]).build();\r
1996                           builder.add(obj);\r
1997                     }\r
1998                         evelmf.add("additionalFields", builder);\r
1999                   }\r
2000                   \r
2001 \r
2002                     /***************************************************************************/\r
2003                     /* Optional parameters.                                                    */\r
2004                     /***************************************************************************/\r
2005                     application_type.encJsonValue(evelmf, "applicationType");\r
2006                     app_protocol_type.encJsonValue(evelmf, "appProtocolType");\r
2007                     app_protocol_version.encJsonValue(evelmf, "appProtocolVersion");\r
2008                     cid.encJsonValue(evelmf,"cid");\r
2009                     connection_type.encJsonValue(evelmf, "connectionType");\r
2010                     ecgi.encJsonValue(evelmf, "ecgi");\r
2011                     gtp_protocol_type.encJsonValue(evelmf, "gtpProtocolType");\r
2012                     gtp_version.encJsonValue(evelmf, "gtpVersion");\r
2013                     http_header.encJsonValue(evelmf, "httpHeader");\r
2014                     imei.encJsonValue(evelmf, "imei");\r
2015                     imsi.encJsonValue(evelmf, "imsi");\r
2016                     lac.encJsonValue(evelmf, "lac");\r
2017                     mcc.encJsonValue(evelmf, "mcc");\r
2018                     mnc.encJsonValue(evelmf, "mnc");\r
2019                     msisdn.encJsonValue(evelmf, "msisdn");\r
2020                     other_functional_role.encJsonValue(evelmf,"otherFunctionalRole");\r
2021                     rac.encJsonValue(evelmf, "rac");\r
2022                     radio_access_technology.encJsonValue(evelmf, "radioAccessTechnology");\r
2023                     sac.encJsonValue(evelmf, "sac");\r
2024                     sampling_algorithm.encJsonValue(evelmf, "samplingAlgorithm");\r
2025                     tac.encJsonValue(evelmf, "tac");\r
2026                     tunnel_id.encJsonValue(evelmf,"tunnelId");\r
2027                     vlan_id.encJsonValue(evelmf,"vlanId");\r
2028 \r
2029 \r
2030             /***************************************************************************/\r
2031             /* Although optional, we always generate the version.  Note that this      */\r
2032             /* closes the object, too.                                                 */\r
2033             /***************************************************************************/\r
2034             evelmf.add("mobileFlowFieldsVersion", version);\r
2035 \r
2036             EVEL_EXIT();\r
2037             \r
2038             return evelmf;\r
2039           }\r
2040           \r
2041           /**************************************************************************//**\r
2042            * Encode the event as a JSON event object according to AT&T's schema.\r
2043            * retval : String of JSON event message\r
2044            *****************************************************************************/\r
2045           String evel_json_encode_event()\r
2046           {\r
2047                 EVEL_ENTER();\r
2048                 \r
2049                 assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_STATE_CHANGE);\r
2050                 //encode common event header and mobile flow body    \r
2051             JsonObject obj = Json.createObjectBuilder()\r
2052                      .add("event", Json.createObjectBuilder()\r
2053                                  .add( "commonEventHeader",eventHeaderObject() )\r
2054                                  .add( "mobileFlowFields",evelMobileFlowObject() )\r
2055                                  ).build();\r
2056 \r
2057             EVEL_EXIT();\r
2058             \r
2059             return obj.toString();\r
2060 \r
2061           }\r
2062 \r
2063 \r
2064 }\r