diff options
Diffstat (limited to 'veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java')
-rw-r--r-- | veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java index d7c91b3..35685d8 100644 --- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java +++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java @@ -145,10 +145,10 @@ public class EvelFault extends EvelHeader { event_domain = EvelHeader.DOMAINS.EVEL_DOMAIN_FAULT;
//Validate inputs
assert( condition != null);
- assert( specific_problem != null);
- assert(EvelHeader.PRIORITIES.EVEL_MAX_PRIORITIES.compareTo(tpriority) < 0 );
- assert(EVEL_SEVERITIES.EVEL_MAX_SEVERITIES.compareTo(severity) < 0 );
- assert(EVEL_VF_STATUSES.EVEL_MAX_VF_STATUSES.compareTo(status) < 0 );
+ assert( specproblem != null);
+ assert(EvelHeader.PRIORITIES.EVEL_MAX_PRIORITIES.compareTo(tpriority) >= 0 );
+ assert(EVEL_SEVERITIES.EVEL_MAX_SEVERITIES.compareTo(severity) >= 0 );
+ assert(EVEL_VF_STATUSES.EVEL_MAX_VF_STATUSES.compareTo(status) >= 0 );
//Init mandatory fields
event_severity = severity;
event_source_type = ev_source_type;
@@ -161,6 +161,7 @@ public class EvelFault extends EvelHeader { alarm_interface_a = new EvelOptionString(false, null);
+
additional_inf = null;
@@ -303,7 +304,7 @@ public class EvelFault extends EvelHeader { * @param source_type The source type to convert.
* @returns The equivalent string.
*****************************************************************************/
- String evel_source_type(EVEL_SOURCE_TYPES source_type)
+ static String evel_source_type(EVEL_SOURCE_TYPES source_type)
{
String result;
@@ -561,6 +562,22 @@ public class EvelFault extends EvelHeader { return obj;
}
+
+ JsonObject evel_json_encode_event_batch()
+ {
+ assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_FAULT);
+ //encode common event header and body
+ JsonObject obj = Json.createObjectBuilder()
+ // .add("event", Json.createObjectBuilder()
+ .add( "commonEventHeader",eventHeaderObject() )
+ .add( "faultFields",evelFaultObject() )
+ .build();
+
+ EVEL_EXIT();
+
+ return obj;
+
+ }
}
|