123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- function AlarmPoints(tagName,alarmAreaId,delayTime,deadBand,alarmFilterSetting){
- this.TagName=tagName;
- this.AlarmAreaId=alarmAreaId;
- this.DelayTime=delayTime;
- this.DeadBand=deadBand;
- this.AlarmFilterSetting=alarmFilterSetting;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function AlarmFilterSetting(alarmCategoryId,alarmLevelId,alarmGroupId,alarmException,limitValue){
- this.AlarmCategoryId=alarmCategoryId;
- this.AlarmLevelId=alarmLevelId;
- this.AlarmGroupId=alarmGroupId;
- this.AlarmException=alarmException;
- this.LimitValue=limitValue;
- this.getJson=function(){
- return objJson(this);
- }
- }
- var objJson=function(obj){
- return JSON.stringify(obj);
- }
- function ResultData(TagName,ErrorCode,Message){
- this.TagName=TagName;
- this.ErrorCode=ErrorCode;
- this.Message=Message;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function AlarmLevels(Id,Name,WavFile,WavNoticeCount,AlarmColor,ResetColor,EnsureColor,IsSpangled,LevelValue,FinallyColor){
- this.Id=Id;
- this.Name=Name;
- this.WavFile=WavFile;
- this.WavNoticeCount=WavNoticeCount;
- this.AlarmColor=AlarmColor;
- this.ResetColor=ResetColor;
- this.EnsureColor=EnsureColor;
- this.IsSpangled=IsSpangled;
- this.LevelValue=LevelValue;
- this.FinallyColor=FinallyColor;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function AlarmCategories(Id,Name,Desc,LevelValue){
- this.Id=Id;
- this.Name=Name;
- this.Desc=Desc;
- this.LevelValue=LevelValue;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function AlarmGroup(Id,Name,Desc){
- this.Id=Id;
- this.Name=Name;
- this.Desc=Desc;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function AlarmArea(Name,ParentAreaId){
- this.Name=Name;
- this.ParentAreaId=ParentAreaId;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function AlarmRules(TagName,DeadBand,DelayTime,AlarmFilterSettings){
- this.TagName=TagName;
- this.DeadBand=DeadBand;
- this.DelayTime=DelayTime;
- this.AlarmFilterSettings=AlarmFilterSettings;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function SearchCondition(pageIndex,pageSize,condition,orderby,ascending){
- this.pageIndex=pageIndex;
- this.pageSize=pageSize;
- this.condition=condition;
- this.orderby=orderby;
- this.ascending=ascending;
- this.getJson=function(){
- return objJson(this);
- }
- }
- function FieldCondition(field,value,method){
- this.field=field;
- this.value=value;
- this.method=method;
- this.getJson=function(){
- return objJson(this);
- }
- }
- var ErrorCode = {
- Ok: 1,
- ArgumentIllegal: 2,
- OpreateFailed: 3,
- UnkownException: 4
- }
- var TagOptCode={
- Sucess : 0,
- TagUnExsit:1,
- TagTypeIllage:2,
- AlarmTagUnExsit:3,
- AlarmTagHasExsit:4,
- AlarmTagLoadFailed:5,
- AlarmSnapshotUnExsit:6,
- Other:7
- }
- var DataType={
- BOOL : 0,
- UINT8 :1,
- INT8 : 2,
- UINT16 : 4,
- INT16 : 5,
- UINT32 : 6,
- INT32 : 7,
- INT64 : 8,
- REAL16 : 9,
- REAL32 : 10,
- REAL64 : 11
- }
|