56 const char *
const event_id)
65 assert(vendor_id != NULL);
66 assert(event_id != NULL);
78 EVEL_DEBUG(
"New Service event is at %lp", event);
136 const char *
const type)
143 assert(event != NULL);
164 const char *
const name,
165 const char *
const value)
174 assert(event != NULL);
176 assert(name != NULL);
177 assert(value != NULL);
179 EVEL_DEBUG(
"Adding name=%s value=%s", name, value);
181 assert(nv_pair != NULL);
182 nv_pair->
name = strdup(name);
183 nv_pair->
value = strdup(value);
184 assert(nv_pair->
name != NULL);
185 assert(nv_pair->
value != NULL);
205 const char *
const product_id)
212 assert(event != NULL);
234 const char *
const subsystem_id)
241 assert(event != NULL);
263 const char *
const friendly_name)
270 assert(event != NULL);
292 const char *
const correlator)
299 assert(event != NULL);
320 const char *
const codec)
327 assert(event != NULL);
348 const char *
const codec)
355 assert(event != NULL);
359 "Callee Side Codec");
376 const char *
const codec)
383 assert(event != NULL);
387 "Caller Side Codec");
405 const char *
const rtcp_data)
412 assert(event != NULL);
435 const char *
const adjacency_name)
442 assert(event != NULL);
470 assert(event != NULL);
474 "Endpoint Description");
497 assert(event != NULL);
517 const int rtp_oct_disc)
524 assert(event != NULL);
528 "Endpoint Rtp Octets Discarded");
544 const int rtp_oct_recv)
551 assert(event != NULL);
555 "Endpoint Rtp Octets Received");
571 const int rtp_oct_sent)
578 assert(event != NULL);
582 "Endpoint Rtp Octets Sent");
598 const int rtp_pkt_disc)
605 assert(event != NULL);
609 "Endpoint Rtp Packets Discarded");
625 const int rtp_pkt_recv)
632 assert(event != NULL);
636 "Endpoint Rtp Packets Received");
652 const int rtp_pkt_sent)
659 assert(event != NULL);
663 "Endpoint Rtp Packets Sent");
686 assert(event != NULL);
706 const int rtp_oct_disc)
713 assert(event != NULL);
717 "Local Rtp Octets Discarded");
733 const int rtp_oct_recv)
740 assert(event != NULL);
744 "Local Rtp Octets Received");
760 const int rtp_oct_sent)
767 assert(event != NULL);
771 "Local Rtp Octets Sent");
787 const int rtp_pkt_disc)
794 assert(event != NULL);
798 "Local Rtp Packets Discarded");
814 const int rtp_pkt_recv)
821 assert(event != NULL);
825 "Local Rtp Packets Received");
841 const int rtp_pkt_sent)
848 assert(event != NULL);
852 "Local Rtp Packets Sent");
868 const double mos_cqe)
875 assert(event != NULL);
895 const int packets_lost)
902 assert(event != NULL);
923 const double packet_loss_percent)
930 assert(event != NULL);
934 "Packet Loss Percent");
957 assert(event != NULL);
978 const int round_trip_delay)
985 assert(event != NULL);
1007 const char *
const phone_number)
1014 assert(event != NULL);
1041 assert(event != NULL);
1052 "serviceEventsFieldsVersion",
1070 while (dlist_item != NULL)
1073 assert(nv_pair != NULL);
1175 "endpointDescription",
1181 "endpointRtpOctetsDiscarded",
1184 "endpointRtpOctetsReceived",
1187 "endpointRtpOctetsSent",
1190 "endpointRtpPacketsDiscarded",
1193 "endpointRtpPacketsReceived",
1196 "endpointRtpPacketsSent",
1202 "localRtpOctetsDiscarded",
1205 "localRtpOctetsReceived",
1208 "localRtpOctetsSent",
1211 "localRtpPacketsDiscarded",
1214 "localRtpPacketsReceived",
1217 "localRtpPacketsSent",
1226 "packetLossPercent",
1286 assert(event != NULL);
1293 while (nv_pair != NULL)
1296 free(nv_pair->
name);
1297 free(nv_pair->
value);
EVEL_OPTION_STRING adjacency_name
void evel_init_option_int(EVEL_OPTION_INT *const option)
Initialize an EVEL_OPTION_INT to a not-set state.
void evel_set_option_string(EVEL_OPTION_STRING *const option, const char *const value, const char *const description)
Set the value of an EVEL_OPTION_STRING.
#define EVEL_DEBUG(FMT,...)
EVENT_SERVICE * evel_new_service(const char *const vendor_id, const char *const event_id)
Create a new Service event.
void evel_service_endpoint_desc_set(EVENT_SERVICE *const event, const EVEL_SERVICE_ENDPOINT_DESC endpoint_desc)
Set the Endpoint Descriptor property of the Service event.
void evel_service_r_factor_set(EVENT_SERVICE *const event, const int r_factor)
Set the R Factor property of the Service event.
char * evel_service_endpoint_desc(const EVEL_ENTITY_STATE endpoint_desc)
Convert a EVEL_SERVICE_ENDPOINT_DESC to string form for JSON encoding.
void evel_service_friendly_name_set(EVENT_SERVICE *const event, const char *const friendly_name)
Set the Friendly Name property of the Service event.
DLIST_ITEM * dlist_get_first(DLIST *list)
void evel_service_adjacency_name_set(EVENT_SERVICE *const event, const char *const adjacency_name)
Set the Adjacency Name property of the Service event.
void evel_set_option_int(EVEL_OPTION_INT *const option, const int value, const char *const description)
Set the value of an EVEL_OPTION_INT.
void evel_service_addl_field_add(EVENT_SERVICE *const event, const char *const name, const char *const value)
Add a name/value pair to the Service, under the additionalFields array.
EVEL_OPTION_INT local_rtp_oct_recv
void dlist_initialize(DLIST *list)
List initialization.
bool evel_json_open_opt_named_object(EVEL_JSON_BUFFER *jbuf, const char *const key)
Add the opening bracket of an optional named object to a JSON buffer.
void evel_service_type_set(EVENT_SERVICE *const event, const char *const type)
Set the Event Type property of the Service event.
#define EVEL_SERVICE_MINOR_VERSION
EVEL_OPTION_STRING callee_side_codec
void evel_service_caller_codec_set(EVENT_SERVICE *const event, const char *const codec)
Set the Caller Side Codec property of the Service event.
void evel_json_encode_service(EVEL_JSON_BUFFER *const jbuf, EVENT_SERVICE *const event)
Encode the Service in JSON according to AT&T's schema for the event type.
EVEL_OPTION_INT endpoint_rtp_oct_sent
void evel_service_local_rtp_pkt_disc_set(EVENT_SERVICE *const event, const int rtp_pkt_disc)
Set the Local Rtp Packets Discarded property of the Service event.
void evel_service_correlator_set(EVENT_SERVICE *const event, const char *const correlator)
Set the Correlator property of the Service event.
void evel_service_endpoint_rtp_oct_recv_set(EVENT_SERVICE *const event, const int rtp_oct_recv)
Set the Endpoint Rtp Octets Received property of the Service event.
void evel_service_endpoint_jitter_set(EVENT_SERVICE *const event, const int jitter)
Set the Endpoint Jitter property of the Service event.
EVEL_THROTTLE_SPEC * throttle_spec
EVEL_OPTION_INT endpoint_rtp_oct_disc
void evel_service_round_trip_delay_set(EVENT_SERVICE *const event, const int round_trip_delay)
Set the Round Trip Delay property of the Service event.
void evel_service_endpoint_rtp_pkt_recv_set(EVENT_SERVICE *const event, const int rtp_pkt_recv)
Set the Endpoint Rtp Packets Received property of the Service event.
void evel_service_local_rtp_pkt_sent_set(EVENT_SERVICE *const event, const int rtp_pkt_sent)
Set the Local Rtp Packets Sent property of the Service event.
bool evel_enc_kv_opt_double(EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_DOUBLE *const option)
Encode a string key and double value to a EVEL_JSON_BUFFER.
EVEL_OPTION_STRING endpoint_description
EVEL_EVENT_INSTANCE_ID instance_id
EVEL_OPTION_STRING rtcp_data
void evel_json_close_list(EVEL_JSON_BUFFER *jbuf)
Add the closing bracket of a list to a JSON buffer.
EVEL_OPTION_INT endpoint_rtp_pkt_disc
void evel_init_option_string(EVEL_OPTION_STRING *const option)
Initialize an EVEL_OPTION_STRING to a not-set state.
A Measurement for VF Reporting event.
void evel_service_local_rtp_pkt_recv_set(EVENT_SERVICE *const event, const int rtp_pkt_recv)
Set the Local Rtp Packets Received property of the Service event.
EVEL_OPTION_INT local_jitter
void evel_set_option_double(EVEL_OPTION_DOUBLE *const option, const double value, const char *const description)
Set the value of an EVEL_OPTION_DOUBLE.
EVEL_OPTION_STRING caller_side_codec
void evel_json_encode_instance_id(EVEL_JSON_BUFFER *jbuf, EVEL_EVENT_INSTANCE_ID *instance_id)
Encode the instance id as a JSON object according to AT&T's schema.
void evel_service_endpoint_rtp_oct_disc_set(EVENT_SERVICE *const event, const int rtp_oct_disc)
Set the Endpoint Rtp Octets Discarded property of the Service event.
void evel_service_endpoint_rtp_pkt_disc_set(EVENT_SERVICE *const event, const int rtp_pkt_disc)
Set the Endpoint Rtp Packets Discarded property of the Service event.
void evel_service_mos_cqe_set(EVENT_SERVICE *const event, const double mos_cqe)
Set the Mos Cqe property of the Service event.
void evel_service_local_rtp_oct_recv_set(EVENT_SERVICE *const event, const int rtp_oct_recv)
Set the Local Rtp Octets Received property of the Service event.
EVEL_OPTION_INT round_trip_delay
void evel_service_local_jitter_set(EVENT_SERVICE *const event, const int jitter)
Set the Local Jitter property of the Service event.
EVEL_OPTION_INT endpoint_rtp_pkt_sent
void evel_enc_kv_string(EVEL_JSON_BUFFER *jbuf, const char *const key, const char *const value)
Encode a string key and string value to a EVEL_JSON_BUFFER.
EVEL_OPTION_INT local_rtp_pkt_recv
void evel_json_close_object(EVEL_JSON_BUFFER *jbuf)
Add the closing bracket of an object to a JSON buffer.
EVEL_OPTION_INT endpoint_rtp_pkt_recv
void evel_init_option_double(EVEL_OPTION_DOUBLE *const option)
Initialize an EVEL_OPTION_DOUBLE to a not-set state.
void evel_service_endpoint_rtp_oct_sent_set(EVENT_SERVICE *const event, const int rtp_oct_sent)
Set the Endpoint Rtp Octets Sent property of the Service event.
EVEL_OPTION_STRING phone_number
void evel_service_product_id_set(EVENT_SERVICE *const event, const char *const product_id)
Set the Product Id property of the Service event.
void evel_json_open_named_object(EVEL_JSON_BUFFER *jbuf, const char *const key)
Add the opening bracket of an object to a JSON buffer.
void evel_service_packets_lost_set(EVENT_SERVICE *const event, const int packets_lost)
Set the Packets Lost property of the Service event.
EVEL_OPTION_INT endpoint_rtp_oct_recv
void evel_json_open_object(EVEL_JSON_BUFFER *jbuf)
Add the opening bracket of an object to a JSON buffer.
EVEL_OPTION_INT local_rtp_pkt_sent
EVEL_OPTION_DOUBLE mos_cqe
EVEL_OPTION_INT packets_lost
void evel_json_checkpoint(EVEL_JSON_BUFFER *jbuf)
Add a checkpoint - a stake in the ground to which we can rewind.
EVEL_OPTION_STRING event_friendly_name
void evel_service_local_rtp_oct_sent_set(EVENT_SERVICE *const event, const int rtp_oct_sent)
Set the Local Rtp Octets Sent property of the Service event.
void evel_service_packet_loss_percent_set(EVENT_SERVICE *const event, const double packet_loss_percent)
Set the packet Loss Percent property of the Service event.
EVEL_OPTION_STRING product_id
void evel_json_encode_header(EVEL_JSON_BUFFER *jbuf, EVENT_HEADER *event)
Encode the event as a JSON event object according to AT&T's schema.
#define EVEL_SERVICE_MAJOR_VERSION
EVEL_OPTION_STRING subsystem_id
EVEL_OPTION_DOUBLE packet_loss_percent
void evel_service_codec_set(EVENT_SERVICE *const event, const char *const codec)
Set the Codec property of the Service event.
void evel_free_header(EVENT_HEADER *const event)
Free an event header.
void evel_service_subsystem_id_set(EVENT_SERVICE *const event, const char *const subsystem_id)
Set the Subsystem Id property of the Service event.
void * dlist_pop_last(DLIST *list)
void dlist_push_last(DLIST *list, void *item)
bool evel_json_open_opt_named_list(EVEL_JSON_BUFFER *jbuf, const char *const key)
Add the key and opening bracket of an optional named list to a JSON buffer.
void log_error_state(char *format,...)
EVEL_OPTION_INT endpoint_jitter
EVEL_SERVICE_ENDPOINT_DESC
Service Event endpoint description JSON equivalent field: endpointDesc.
void evel_free_service(EVENT_SERVICE *const event)
Free a Service event.
void evel_free_option_string(EVEL_OPTION_STRING *const option)
Free the underlying resources of an EVEL_OPTION_STRING.
EVEL_OPTION_INT local_rtp_oct_disc
bool evel_enc_kv_opt_string(EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_STRING *const option)
Encode a string key and string value to a EVEL_JSON_BUFFER.
DLIST_ITEM * dlist_get_next(DLIST_ITEM *item)
void evel_service_local_rtp_oct_disc_set(EVENT_SERVICE *const event, const int rtp_oct_disc)
Set the Local Rtp Octets Discarded property of the Service event.
bool evel_enc_kv_opt_int(EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_INT *const option)
Encode a string key and integer value to a EVEL_JSON_BUFFER.
void evel_json_rewind(EVEL_JSON_BUFFER *jbuf)
Rewind to the latest checkoint.
void evel_header_type_set(EVENT_HEADER *const header, const char *const type)
Set the Event Type property of the event header.
EVEL throttle definitions.
void evel_service_endpoint_rtp_pkt_sent_set(EVENT_SERVICE *const event, const int rtp_pkt_sent)
Set the Endpoint Rtp Packets Sent property of the Service event.
void evel_init_event_instance_id(EVEL_EVENT_INSTANCE_ID *const instance_id, const char *const vendor_id, const char *const event_id)
Initialize an event instance id.
void evel_enc_version(EVEL_JSON_BUFFER *jbuf, const char *const key, const int major_version, const int minor_version)
Encode a key and version.
void evel_init_header(EVENT_HEADER *const header)
Initialize a newly created event header.
void evel_service_rtcp_data_set(EVENT_SERVICE *const event, const char *const rtcp_data)
Set the RTCP Data property of the Service event.
bool evel_throttle_suppress_nv_pair(EVEL_THROTTLE_SPEC *throttle_spec, const char *const field_name, const char *const name)
Determine whether a name-value pair should be allowed (not suppressed).
void evel_free_event_instance_id(EVEL_EVENT_INSTANCE_ID *const instance_id)
Free an event instance id.
void evel_service_phone_number_set(EVENT_SERVICE *const event, const char *const phone_number)
Set the Phone Number property of the Service event.
EVEL_OPTION_INT local_rtp_oct_sent
void evel_service_callee_codec_set(EVENT_SERVICE *const event, const char *const codec)
Set the Callee Side Codec property of the Service event.
EVEL_OPTION_INT local_rtp_pkt_disc
EVEL_OPTION_STRING correlator