VES EVEL Library VES 5.4.1 enhancements
[demo.git] / vnfs / VES5.0 / evel / evel-library / code / evel_library / evel_heartbeat_fields.c
index 73773ed..be8527c 100644 (file)
@@ -2,6 +2,7 @@
  *
  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
  *
+ * Unless otherwise specified, all software contained herein is
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -12,7 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and 
  * limitations under the License.
- *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  ****************************************************************************/
 
 /**************************************************************************//**
  *          this factory function and are immutable once set.  Optional fields
  *          have explicit setter functions, but again values may only be set
  *          once so that the event has immutable properties.
- * @param vendor_id     The vendor id to encode in the event instance id.
- * @param event_id      The vendor event id to encode in the event instance id.
+ * @param ev_name  Unique Event Name confirming Domain AsdcModel Description
+ * @param ev_id    A universal identifier of the event for: troubleshooting correlation, analysis, etc
+ * @param interval    heartbeat interval
  * @returns pointer to the newly manufactured ::EVENT_HEARTBEAT_FIELD.  If the event
  *          is not used (i.e. posted) it must be released using
  *          ::evel_free_hrtbt_field.
  * @retval  NULL  Failed to create the event.
  *****************************************************************************/
-EVENT_HEARTBEAT_FIELD * evel_new_heartbeat_field(int interval)
+EVENT_HEARTBEAT_FIELD * evel_new_heartbeat_field(int interval,const char* ev_name, const char *ev_id)
 {
   EVENT_HEARTBEAT_FIELD * event = NULL;
 
@@ -68,7 +70,7 @@ EVENT_HEARTBEAT_FIELD * evel_new_heartbeat_field(int interval)
   /***************************************************************************/
   /* Initialize the header & the Heartbeat fields fields.                           */
   /***************************************************************************/
-  evel_init_header(&event->header,"HeartbeatFields");
+  evel_init_header_nameid(&event->header,ev_name,ev_id);
   event->header.event_domain = EVEL_DOMAIN_HEARTBEAT_FIELD;
   event->major_version = EVEL_HEARTBEAT_FIELD_MAJOR_VERSION;
   event->minor_version = EVEL_HEARTBEAT_FIELD_MINOR_VERSION;