diff options
Diffstat (limited to 'veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java')
-rw-r--r-- | veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java index 90df4d6..25ffef5 100644 --- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java +++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java @@ -92,8 +92,8 @@ public class EvelStateChange extends EvelHeader { {
super(evname,evid);
event_domain = EvelHeader.DOMAINS.EVEL_DOMAIN_STATE_CHANGE;
- assert(EVEL_ENTITY_STATE.EVEL_MAX_ENTITY_STATES.compareTo(newstate) < 0 );
- assert(EVEL_ENTITY_STATE.EVEL_MAX_ENTITY_STATES.compareTo(oldstate) < 0 );
+ assert(EVEL_ENTITY_STATE.EVEL_MAX_ENTITY_STATES.compareTo(newstate) >= 0 );
+ assert(EVEL_ENTITY_STATE.EVEL_MAX_ENTITY_STATES.compareTo(oldstate) >= 0 );
assert( interfce != null);
new_state = newstate;
@@ -276,6 +276,24 @@ public class EvelStateChange extends EvelHeader { return obj;
}
+
+ JsonObject evel_json_encode_event_batch()
+ {
+ EVEL_ENTER();
+
+ assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_STATE_CHANGE);
+ //encode header and state change fields
+ JsonObject obj = Json.createObjectBuilder()
+ // .add("event", Json.createObjectBuilder()
+ .add( "commonEventHeader",eventHeaderObject() )
+ .add( "stateChangeFields",evelStateChangeObject() )
+ .build();
+
+ EVEL_EXIT();
+
+ return obj;
+
+ }
}
|