TELKOM NIKA Indonesia n  Journal of  Electrical En gineering   Vol. 12, No. 10, Octobe r 20 14, pp. 7395  ~ 740 3   DOI: 10.115 9 1 /telkomni ka. v 12i8.535 2          7395     Re cei v ed  De cem ber 1 3 , 2013; Re vi sed  Jun e  24, 201 4; Acce pted July 20, 20 14   Networked  Automatic T est System Based on  Message- Oriented Middleware      Xiong Fengg uang*, Ha n Xie  North Un iversit y  of Ch ina C o mputer an d Co ntrol Eng i n eeri ng, T a i y ua n 03 005 1, Chi n a   *Corres p o ndi n g  author, e-ma i l : xfgnc it98@s i na.com       A b st r a ct  Aim  at the c u rrent status  of automatic test system  that foc u ses only on  a single or the s a me type  of w eapons'  perfor m a n ce t e sting, a  net w o rked auto m atic test system b a se d on  mess ag e-ori e n t e d   mi ddl ew are is  prop osed  in th i s  pap er, an d in ner arc h it ectur e  an d pr ocess  of pus/sub  in  mess ag e-ori e n t e d   mi ddl ew are ar e describ ed. B a sin g  on the mess ag e-or i e n t ed mi ddl ew ar e, the net w o rked auto m atic test  system  c an s h ield the c o m p lexity  and diver s ity of the bottom  t e st  system  and t e st equipment, and  can  reali z e  cross-p l atform c o mmunic a tion  of vario u s te st data abo ut w eap ons. Exper i m e n ts show  that the   netw o rked  aut omatic test sy stem  bas ed  o n   messa ge- ori ented   mid d lew a re is  an  int e g r ated test  platf o rm  w h ich can prov ide co mpreh e n s ive perfor m an ce test fo r coordin a ted e nga g e ment  on a v a r i ety of w eapon s.    Ke y w ords :  n e tw orked aut o m atic test sy stem, test  da ta, mess age- o r iente d   mid d l e w a re, mess ag e   pub lish i ng,  me ssage rec e ivi n g, mess age su bscripti on     Co p y rig h t   ©  2014 In stitu t e o f  Ad van ced  En g i n eerin g and  Scien ce. All  rig h t s reser ve d .       1. Introduc tion    Ra pid deve l opment a n d  application  of key  inform ation technol ogy prom ote s  a ne revolution i n   military affairs an d develo p ment of  info rmation warfa r e, and p r omo t es devel opm ent  and revol u tio n  of modern  military theory and ope rational mod e l , such a s  a network-ce n t ric   warfa r e. The  prerequi site  of winning  in the  future  wars dep en ds on  wheth e r co ope rativ e   enga geme n betwe en  wea pon  platform s ca n b e  impl e m ented. T herefore, b u ildin g an  integ r at ed  test platform  for co mpre hen sive pe rforma nce test of a varie t y of weapo ns'  coo p e r ati v e   enga geme n t is a cru c ial task.  Gene ral  spe a kin g , the in tegrated  me asu r em ent a nd device which a r as core of  comp uter  an d ca n autom atically  pe rform ce rtain te st task u nde the co ntrol of  pro c ed ure a r calle d autom atic test syste m  [1, 2] (ATS). In or der to i m prove the m odernization l e vel of airborne  equipm ent m a intena nce, the re se arch  of automati c  test  syst e m  has be co me the fo cu s of  developm ent  in the world  military equipment [3 ]. Current ATS has bee n wid e ly applied to a  variety of we apon  and  eq uipment te st s an d ha b e com e  n e ce ssary a s sura nce  of weap on'   reliabl e ope ration. Ho wev e r, the cu rre nt ATS is  different from  the military, and is la ck o f   interop e rability betwee n  d i fferent sy ste m s. So, ATS can't a dap t to the mo dern j o intne s s' deman d on m u lti-we apo n systems, multi - level mainte nan ce.   This  pap er ai ms to b u ild a  netwo rked A T S based  on  messa ge-ori ented mi ddle w are [4,   5] (MOM ). T he me ssag e-based mid d le ware i s  bet ween the  botto m equi pment  and a ppli c ati o n   system s, and  shiel d com p lexity and di versity of  the  bottom test  system, an achi eves  dat a's  effective tran smissio n  an d  wide  sha r in g on the  int e rnet th roug h MOM' s st rong fun c tion  of  sen d ing an d  receivin g d a ta, and enh ances inte ra ction of net worke d  ATS and relia bility o f   wea pon s' coo r dinatio n test.      2. Architectu r e of Au tom a tic Tes t  Sy s t em   In general, ATS is mad e  of hard w a r e and  software. Ha rdware is m ade  of host  comp uter ge neral b oard test instru me nt and mea s ured o b je ct. Board a nd test instru ment  are  respon sibl e to control equ ipment or for si gnal a c qui sition, and can be ba sed  on various  data   bus,  su ch  as PCI, PXI, GPIB. The me asu r ed  obj ect  refe rs to  an y test equi p m ent, syste m s o r   sub s ystem s prod uctio n  lin es, etc. In th e proc ess of  putting up te st syst em, user u s u a lly pa ys  Evaluation Warning : The document was created with Spire.PDF for Python.
                               ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 12, No. 10, Octobe r 2014:  739 5  – 7403   7396 attention to th e ope ration  of test boa rd  an d inst ru me nt. Software i s  m ade of I/O int e rface, drive r of board an d  instrume nt, executa b le a pplication.  I/O interface provide s  the  interface of  the   bottom h a rd ware  drive r  a n d  is respon si ble fo comm unication s b e t ween  the  ho st comp uter  and  the physi cal instru ment. Instrum ent driv er is  a software a s sembly  betwee n  the upper  software   and  spe c ifi c  in stru ment,  and i s   re spo n s ible  for t r an sferrin g  in stru ction bet wee n   appli c ation  a n d   instru ment,  and i s  a  mi ddle  comm u n icatio n laye r bet wee n  I/O interfa c e   and a ppli c ati o n .   Executable a pplication pro m otes u s e r-friendly intera ction interface  to execute test ope ration  by  instru ment d r i v er, and p r o m otes  data a nalysi s , dat pro c e ssi ng, a nd data  sto r a ge. I/O interfa c e,  board and in strum ent driv er, executa b l e  appli c ati on  con s titutes th e entire software a r chitectu re  of automatic t e st syste m . The arch ite c ture is sh own as Figure 1.         Figure 1. Architecture of Automatic Te st  System      3. Arc h itec ture o f   Netw o r ke Automatic T est Sy stem Based  on M essag e-o r ie nte d   Mid d l e w ar Network e d automatic tes t   s y s t em  [6] (NATS) i s  a  ki n d  of  automati c  te st  system   built  on   netwo rk. T h rough m e ssa ge-o r ie nted  middle w a r and n e two r k,  NATS ba se d on me ssa ge- oriente d  mid d leware  can  build a net worked te st  system. Each  node in the  netwo rk i s  a  host  comp uter  whi c h obtai ns te st informatio n  throug h the test bus  co nn ecting te st eq uipment. Each  host  comp uter can  re cei v e additional  informatio sent by the  other h o st  compute r  thro ugh   messag e-orie nted mi ddle w are, a nd  al so  publi s h e inform ation  to othe r h o st  co mpute r  th at  sub s crib es th e informatio n. Its archite c tu re is  sho w n a s  Figu re 2.           Figure 2. Architecture of Networke d Automa tic Te st System Base d on Messa g e - oriente d   Mid d l ew ar     Ho st comput er, conn ecte d to the  sp ecific  test in strum ent in  orde r to  obt ain te st   informatio n of  variou s test i n stru ment s, i s  a  no de i n  t he  NATS. After  obtainin g  t e st info rmatio n,  host  co mpute r  al so  ne ed t o  an alyze,  sh ow,  stor e a n d  se nd th ose i n formatio n. O t her, e a ch h o s comp uter  ca n sub s cri be test inform atio n of other  ho st com puter.  That is to sa y, different host  comp uter  ca n reali z e inte ractio n with real in form ation and  can  compl e te coo r dinatio n test  of  wea pon. M e ssage -o riente d  middl ew are is a  bri d g e  for test i n formation  ex cha nge,  and  is  Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Networked A u tom a tic Test  System  Bas ed on Me ssa ge-O r ie nted … (Xiong Fe nggu ang 7397 respon sibl e for re ceivin g data publi s h ed by hos comp uter a n d  distri buting  information  to  sub s crib ers which in clu de  host comp ute r  s o r  integr ated test platform. Integrated  test platform  is  a set  of appli c ation  syste m  in the  serve r .  Thro ugh  me ssage -o riente d  middle w a r e ,  integrate d  te st  platform  ca n  re ceive te st  inform ation  of ea ch   ho st com pute r  in  the n e two r k acco rdin g t o   deman d, and  also  ca n sen d  co mman d  to ea ch h o st  co mpute r  to m a ke it te st sp ecific i n form a t ion  for integrate d  test platform. Throug h amount of  test data [7] from different  host comput er,  integrate d  te st platform  can  reali z e  coord i nation  te st of  we apon whi c h i n clu d e s  a nalysi s  of te st  data, simulati on of test pro c e ss, real-tim e displ a y and  so on.       4. De sign a nd Impleme n ta tion o f   Automa tic  Te st Sy stem  Bas e d o n  M essag e-o r ie nted  Mid d l e w ar Messagi ng  m i ddle w are i s   resp on sible  fo sen d ing  an d receiving m e ssag es on  d i fferent  appli c ation  systems, an d  can  reali z e  platform-i nd epen dent dat a excha nge.  Comm unica ting   partie s  sen d  and re ceive messag in   synchrono us  o r   a s yn chrono us mode,   so actual   phy sical   acce ss i s  un n e ce ssary. Th erefo r e, the  messag e- orie nted middl eware i s  ada pte d  to cou p le lo ose  host compute r  up in order t o  intera ctive comm uni cati on and  coo r di nated test.     4.1.  Design a nd Implementa tion of Mes s a g e-orie nte d  Middle w a r e ' s Archi t ec tu re  The key technolo g y of messag e-orie nted  middl e w are is m e ssag e tran sfer, and the  model of me ssag e tran sfer  inclu d e s  point  to point and publi s h-su bscribe.   a) Point-to -po i nt model   In this mod e l, the pro d u c er of messag e is  called  sen d e r, and th e consume r  of messag e   is calle d re cei v er. The sen der send s a messag e to a queue an d is stored in the  queue, and t he  receiver  obtai ns me ssag e from the  que u e . The di sadv antage s of thi s  mod e l is t h at the me ssa g e   sent by  sen d e can  only b e  re ceived  by only a re ceiver, and  it sev e rely limits th e use range   and  make s info rm ation sh arin g poor.   b) Pub/sub m odel [8]   In this model,  con s um er of  messag e is  called a s  publi s he r an d co n s ume r  of me ssag e is  calle d as d e scrib e r. Th e di fference with  point-t o - poi nt is that a me ssage p ubli s hed to a subj ect  can  be  re ceiv ed by mo re  d e scrib e rs. Pu b/sub  mod e l i s  a m odel  ba sed  on p u sh, and m e ssa g e   can  autom atically b r oad ca st to con s um ers.  Th is mo del can e n su re that m e ssage i s   sha r e d   widely an d is able to ada pt for transfe r of te st data betwe en di fferent  ho st comp uters. T he  architectu re o f  message -ori ented middl e w are ba sed o n  pub/sub mo del is sho w as Figu re 3.           Figure 3. Architecture of Messag e-o r ient ed Middle w a r     c) Me ssag e q ueue   Messag e qu eue is  a co mmuni cation  model of a s y n ch ron o u s  transfe r mod e  betwee n   different appli c ation s , and i n clu d e s  two conception s : messag e and  queue.   Messag e is a  carrier of test data, and  mainly con s ist s  of messa ge  head an d me ssage  body. The a r chite c tu re of  messag e is sho w as  Figure 4. M e ssag e he ad  is metad a ta  of  messag e, an d is  ne ce ssa r y inform atio n wh en m e ssag e delive r s, and in clu d e s : ID, flag, type,  publi s hing  da te, expire  dat e, persi sten ce, prio rity , pu blish e r, recei v er, length,  a nd  so o n . The   cod e  is sho w n as follo wing :   Evaluation Warning : The document was created with Spire.PDF for Python.
                               ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 12, No. 10, Octobe r 2014:  739 5  – 7403   7398 publi c  cla s s Messag e {   publi c  long ID;        //Message' s ID   publi c   int  flag;      //Message' Flag   publi c   int  type;     //Message' type  publi c  Date p ublishing_ dat e;    //Message' s p ublishing dat    publi c  Date e x pire_d ate;    //Message' e x pire  data   publi c  boole a n  persiste n ce   //Message' state of persi st ence, the value is  true/fals publi c   byte  priority;     //Message' p r iority   publi c  Socket Cha nnel pu bli s he r;  //Publishe r of Messag e   publi c  Socket Cha nnel rece iver //Subscribe r  of Message   publi c   int  leng th;     //Message' l ength   publi c   byte[]  data;     //Message' content     Messag ca n be  divide d  into  event  messag an d no rmal  m e ssag e, an d  we   can  disting u ish th em by the val ue of "flag", in the  me ssag e hea d, wh ose value i s  0 t hat den otes t he  messag e i s   event me ssa ge a nd i s  1   that den ot es the me ssag e is no rmal  messag e. Event  messag e is di vided into reg i ster an d un re gister of ap pli c ation, sub s cription an d un sub s criptio n  of  distrib u tion st rategy, and we can di sting u ish them  by  the value of "type", in the  messag e hea d,  who s e  value  is 0 th at d enote s   regi st er  of ap p lica t ion, and  i s   1 that  den otes un regi ster  of  appli c ation, and  i s   2 de notes su bscription  of  di stribution  strategy, and i s   3 that de not es  unsub scriptio n of di strib u tion  st rategy.  Normal m e ssage  en cap s ul ates te st d a ta of info rmati o n   excha nge, an d ha s 256  kin d s of type s, a nd we ca al so di sting u ish  them by the  value of "type"  in the me ssa ge he ad. In g eneral, we  ca n distin gui sh  any kin d s of  messag e a c cordin g to "fla g"  and "type" in  the me ssage  head. In  addit i on, "data" i s   messag e b o d y  and its cont ent is te st d a ta  whi c h can be  text information, voice,  image an d othe r bina ry information.  Queu e is al so a p ubli c  st orag spa c e  and it  exist s  in  memo ry  or  physi cal  file, but  gene rally it exists in mem o ry in orde r to ens u r e the  spe ed of message tra n sfe r . Queue  can  be   divided into sende r que ue,  event queue  and waiti ng  queu e. Send er que ue is  use d  to stori n g   norm a l message. On the one han d, messag e-o r ient ed middle w a r e pushe s the norm a l message   received f r o m  the p ubli s h e r of  normal  messag e in to  the  send er q ueue,  but on   the othe r h a n d messag e-orie nted middle w are al so obtai ns me ssage  f r om the send er que ue an d  send s it to the  sub s crib ers i n  ord e r to  rea lize me ssag transfe r.  Eve n t queu e is  u s ed to  stori n g  event messa ge.  On the  on e h and, me ssag e-o r iente d  mi ddle w are  p u shes the  even t messag re ceived  from  the   publi s he r of event messa ge into the e v ent  queue,  but on the ot her h and, m e ssag e-o r ient ed  middle w a r e a l so obtai ns  e v ent messag e and ma ke  it  handle d  by e v ent manag er. Waiting qu e u e   is u s ed to  st oring  no rmal  messag e u n succe ssfully   sent to sub s cribers. The  m a in rea s on th at  norm a l message can't be sent to sub s crib ers  is tha t  communi cat i on betwe en  host compute r discon ne cts.  So, on ce  co n nectio n   re su mes,  normal  messag e in   waiting  qu eu e can  be  sen t  to   the subscribers in order to ensure  the  rel i ability of message transfer.   d) Que ue ma nage Queu e mana ger is respon sible for ma n aging all eve n t queue s which in clud es pushin g   the messa g e  into que ue, poppi ng me ssag e from  q ueue. In a d d i tion, in ord e r to en su re t h e   efficien cy of  pushing  and  poppi ng m e ssage, m u lt i-thread  is  used to ma nag ing qu eue; t he  method  of p u shi ng a nd  poppi ng me ssag e is  syn c hroni ze d in  orde r to e n sure  pu shing   and  poppi ng me ssag e in ord e at the same ti me.  e) Di strib u tio n  strate gy manage Ho w to distri bute normal  messag e to subscri b e r s i s  determi ned b y  distribution  strategy.  So, according to the diff erence  of  requirement for  message, different  NA TS will  subscribe  different di stribution  strategy whi c h  form s a  table of distrib u tion  strategy n a m ed   "T_Di s tributio nStrategy". Class of distri bution s t rategy is  s h own as  following.     publi c  cla s s Distri butionSt r ategy {      S o cket C ha n nel so c k et ;      int[]  types Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Networked A u tom a tic Test  System  Bas ed on Me ssa ge-O r ie nted … (Xiong Fe nggu ang 7399 In this  cla ss,  "so c ket" obj ect i s  a  so cket  con necti ng NA TS wit h  me ssage -o riented   middle w a r e, and is u s ed t o  descri b ing IP and port of  a sub s crib er; "types" is an array in which all  sub s crib ed  messag e type of a su bscribe r  are in cl uded. Th e fu nction  of dist ribution  strat egy  manag er i s  t o  insert a  di stributio strategy in to "T _Di s tributio n S trategy", an d upd ate dat e in   "T_Di s tributio nStrategy" throug h a  dist ributio n strategy,  and del ete data from  "T_Di s tributio nStrategy" thr ough a di strib u tion strate gy.  f) Event manager  Event mana g e r i s  m a inly u s ed  to p r o c e s sing  the  appli c ation' s event  re que sts, i n cluding   event re ceiv er, se cu rity detecto r, eve n t handle r a nd re sp on se  notifier. The  pro c e ss flo w  is   gene rally divided into the followin g  step s:  Step 1: event receive r  obt ains a n  event   message fro m  event que ue, and then  se curity  detecto ch ecks whethe r t he eve n t me ssage  me et the  system' s   se curity; if th e dete c tion  d oes  not pass, re spon se notifier notifie s the result to the a pplication,  an d if the detection passe s, the   pro c e ss fo rward s  step 2;   Step 2: Pa rsing the  value  of "type" fro m   the  event  me ssa ge; if  the valu e i s  0 that  denote s  the  event is re gister a nd process forwards st ep 3; if the value is 1  that denote s  the  event is  unre g ister an d p r oce s s forwa r ds  step  4;  if the value i s   2 that de not es the  event  is   sub s cript i o n   of  dist ribut io n  st r a t egy a n d  process fo rward s   step  5;  i f  the valu e i s  3 th at de not es   the event is u n su bscri p tion  of distributio n strate gy and pro c e ss fo rwards  step 6;    Step 3: Gene rating a n  obje c t of distrib u tion st rategy that contain s  a  "socket" obj e c t, and   a "types" va ri able  who s e  value i s  n u ll; a nd then,   calli ng di strib u tio n  strategy ma nage r to  add  the  obje c t into "T_Di s tributio n S trategy", and pro c e ss fo rwards  step 7;   Step 4: Co mpari ng on e  by one "socket"  obje c t in distrib u t ion strate gy from  "T_Di s tributio nStrategy" with "socket"  obje c in the event message; if the comp ari s o n  is  successful, the mat c hed  di stribution strategy  fr om  "T_Distri butionSt r ategy"  will be del eted f r om  the table a ccordin g to  call ing del ete fu nction  of dist ribution  strategy man age r, and p r o c e s s   fo r w ar ds  s t ep 7 ) Step 5: Co mpari ng on e  by one "socket"  obje c t in distrib u t ion strate gy from  "T_Di s tributio nStrategy" with "socket"  obje c in the event message; if the comp ari s o n  is  su ccessful, t he mat c he distrib u tion  st rategy from " T _Di s trib utio nStrategy" wi ll be u pdate d  b y   the event m e ssage obj ect  accordin g to  calling updat e function  of  distribution st rategy  m anager  to add  the "d ata" in the  ev ent me ssage   to the "t ype"  variable  in th e matc hed  di stributio stra tegy  obje c t, and proce s s forwards ste p  7);   Step 6: Co mpari ng on e  by one "socket"  obje c t in distrib u t ion strate gy from  "T_Di s tributio nStrategy" with "socket"  obje c in the event message; if the comp ari s o n  is  su ccessful, t he mat c he distrib u tion  st rategy from " T _Di s trib utio nStrategy" wi ll be u pdate d  b y   the event m e ssage obj ect  accordin g to  calling updat e function  of  distribution st rategy  m anager  to delete som e  values  of "type" variable  in the  matche d distri bution  strat egy o b je ct acco rdin g to  the "data" in event messa ge,  and proce ss fo rward s  step 7);   Step 7: Resp onse notifier  notif ies  the res u lt to NATS.  g) Th read m a nage In messa g e - oriente d  mi d d leware, i n   orde r to  en sure the  efficien cy of m e ssag pro c e ssi ng, t he e nqu eue  (pushing  me ssag e into  qu eue) an deq ueue  (p oppi n g  me ssag e from  queu e) of ev ent messa g e  and no rmal  messag e ar e  operating at  the re spe c tive threa d . Among  them, the logic p r ocess  of enque ue  and de que ue  of normal  messag e is  not the sam e  and  executio n e n v ironme n t is  not the  sa me,  so  for the  se nding  qu eue  i n  pe unit tim e , the  amou n t   o f   enqu eue  and  dequ eue  is  certainly in co n s iste nt. We  u s e to th e ratio of the  num ber  of enq ue ue's  messag e a n d  deq ueu e's m e ssag e to  de scribe  the  th rough put effici ency  of sendi ng q ueu e, an d it  is sh own as f o rmul a 1.    Thro ugh put = numbe r of normal me ssa ge pu she d  into query pe r seco nd /   numbe r of no rmal me ssag e poppi ng fro m  query pe r seco nd        (1)    Mean while, consi deri ng th e numbe r of  normal m e ssag e is en ormous, if thro ughp ut  efficien cy co ntinue s lo w,  an a m ount  of  no rmal  me ssag will b e   piled  up i n  th e sendi ng  qu eue   over time. O n  the one h and, it will a ffect t he efficiency of the  impleme n tation of messa ge- oriente d  mid d leware; o n  the othe r ha n d  it c an al so  make  appli c ation re ceive  a messa ge  in  delay. Thu s , by adding th read ma nag e m ent into  me ssage -o riente d  middle w a r e  and in cre a si ng  Evaluation Warning : The document was created with Spire.PDF for Python.
                               ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 12, No. 10, Octobe r 2014:  739 5  – 7403   7400 or redu cing t he num ber  o f  dequeu e' th read  acco rdi ng to thro ug hput in o r de r to balan ce t h e   efficien cy of  enqu eue  and  dequ eue  of  norm a l me ssage. Th e n u m ber of de q ueue' s th rea d  is  sho w n in formula 2.          4.2.  Pub/sub of  Messa ge-oriente d Middlew a r e in NAT S   a) Co nstitue n t  element of messag e' s pu b/sub    Pub/sub  of  messag e in  NATS con s ists of  pu blish e r, sub s cribe r , me ssage  center  and   table of di stri bution  strate g y , so  we  can  descri be the   pub/sub of m e ssag e with  a  four-tu p le  (P, S,  C, T). P is a set of the mess age's publisher  {p1,  p2, ..., pn}, and S is a set of message's  s u bsc r iber  {s1, s 2 , ..., s n }.  P may intersec with S,  so that is  to say that  the mess age's publisher  and me ssag e ' s sub s crib er  are n o t ab sol u te, and they  can  be a u n i ty (both a p ublisher  and  a   descri b e r). C  is the messa ge's  cente r , and co nsi s ts o f  messa ge qu eue, queu e manag er, event   manag er, thread ma nag e r , distri bution  strategy  m anag er, an d  is re sp on sible for  cont act  messag e' s p ublisher  and  sub s crib er. Not only message-ori ented  middle w a r e receive s  me ssage  publi s hed by  messag e' s pu blish e r, but also send s me ssage to me ssag e's  sub s criber. Wh en C  is   equal  to 1,  all  of the  me ssa ge's pu blishin g  an sub s cri p tion u s e  a  m e ssag cente r , an d it i s  th e   simple st  m e ssag e's  pu b/sub system. Usually, with in NATS  the r e are multiple  messag e cen t ers,   so C i s  gre a ter than 1. T is a table of d i stribut io n strategy whi c ensure s  correct distri butio n of  messag e bet wee n  publi s h e rs  with su bscrib ers.   b) Pro c e ss of  message 's p ub/su b   Step 1: NA TS start s  th e functio n  o f   messag e'  publi s hing,  a nd then  ge n e rate s a  messag e: "msg", and then  sets the value of "flag"  in  the messa ge to 1 (It sets the messag e as a   norm a l message in fact),  and then sets the value o f   other variab le in the messag e, at last, set  test data to "msg" in the m e ssag e;  Step 2: NATS send s the "m sg" to messa ge ce nter;   Step 3: After  messag e' s ce nter re ceiving  the  message , acco rdin g that the flag's value is  one, the me ssage  can  b e  determined  as a n o rm a l  messag e, a nd then p a rsing the type  o f   messag e jud ges  wheth e a ''types' '  in some di stri buti on strategy contain s   the type of messa g e ; if  a "types" in some di stri bution strate gy cont ain s  the type of  messag e, then there i s  ATS  sub s cribi ng t he me ssag e, and  then  a c cording  to q u eue m ana ger ,the me ssag e is pu sh ed i n to  sen d ing  que u e ; if not a "types" i n  some  distri but ion  strategy contai ns the  type o f  messag e, so   there is n o  su bscrib er to su bscrib e the messag e and there i s  unn ecessary to pu sh the messag e   into sen d ing  queu e;  Step 4: Message' s ce nter  parse the value of ''pe rsisten c e'' in m e ssag e; if the value is  one th en th messag e i s   stored  in th e d a taba se, oth e r wi se t he m e ssage  do es n o t sto r e i n  th e   databa se;   Step 5: Message' s ce nter resp on se s to ATS t hat the  messag e is receive d  su ccessfully.  c) Mai n  pro c e ss of me ssag e' sub s cri p tio n   Step 1: ATS  start s  the fun c tion of me ssage' s su bscri p tion;  Step 2: Pop p ing  a me ssage from th e  se ndi n g  q u eue, a nd  set t ing the  messag e a s   "msg", an d p a rsi ng th e "type" in th e "m sg", an d final ly getting a  d i stributio strategy from t h e   "T_Di s tributio nStrategy" an d then namin g it as "ds ";  Step 3: If the  "types" in "d s" contai ns the  ty pe of me ssage, the n  a c cordin g to " s o c ket" in  "ds", sendin g  the me ssag e to sub s crib ing ATS;  if sendin g  the  m e ssag e un su ccessfully, th en  assigni ng the  socket to the  "receive r" in  messag e and  pushi ng it to waiting q ueu e;  Step 4: If existing unvi s ite d  distrib u tion  strat egy in "T _Di s tributio n S trategy", then gettin g   a next distrib u tion strate g y  and namin g it as "ds" , and jumpi ng  step 3; if all the distrib u tio n   strategi es a r e  visited, then jumping  step  5;  Step 5: If th ere is me ssa ge in sen d in g queue,  the n  jumping st ep 2; if there is not  messag e in sendin g  queu e ,  then waiting  until receivin g messag e a nd jumpin g st ep 2.  Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Networked A u tom a tic Test  System  Bas ed on Me ssa ge-O r ie nted … (Xiong Fe nggu ang 7401 d) Main p r o c e ss of sub s crib ing and di stri buting    Step 1: ATS  start s  the fun c tion of su bscription an d di stributio n;  Step 2: ATS  gene rate messag na med  as "msg ", and  set s  th e flag  of "m sg" to  ze ro,  and  set s  the  type of "msg" to two,  a nd  conve r t the  content  o f  messag e a s  byte a r ray  and  assigni ng it to data of "msg ";  Step 3: ATS  sen d s "m sg" to messag e' s cente r Step 4: After  messag e' s ce nter re ceiving  the  message , acco rdin g that the flag's value is  zero, the me ssag e can b e   determi ned  a s  an  event  m e ssag e, and t hen  calling  e v ent manag er to   compl e te su b s cription of di stributio n stra tegy.  e) Main p r o c e ss of un su bscribing di stri bu tion strategy   Step 1: ATS  start s  the fun c tion of  un su bscribi ng di stribution  strate gy;  Step 2: ATS  gene rate messag na med  as "msg ", and  set s  th e flag  of "m sg" to  ze ro,  and  set s  the  type of "m sg" to three,  and  co nver t t he  conte n t of  messa ge  as byte array  a n d   assigni ng it to data of "msg ";  Step 3: ATS  sen d s "m sg" to messag e' s cente r Step 4: After  messag e' s ce nter re ceiving  the  message , acco rdin g that the flag's value is  zero, the me ssag e can b e   determi ned  a s  an  event  m e ssag e, and t hen  calling  e v ent manag er to   compl e te un subscri p tion of  distributio n strategy.      5. Applicatio n of ATS Ba sed on Mes s a ge-oriented  Middle w a r e   For  example,  in ATS of  co ordin a ted  en gagem ent of  air-gro und  weapo n which  is  sho w   as  Figu re  6, first a e ri al reconnai ssan ce   investigate s   and l o cates e nemy's targ ets in  air,  se a a n d   land; and the n  enemy' s inf o rmatio n is p ublished  via  messag e-orie nted middle w are, an d gro u nd  control  cente r  sub s cribe s   the ene my's i n formatio while  g r oun d control ce nter also su bscrib es  longitud e , altitude, height,  spe ed, a z i m uth    and o t her info rmat ion which  are publi s he by  unman ned a e r ial vehicl es a nd fighter, as  well a s  lo cati on, transmit status whi c h a r e publi s h ed  by  pre c isi o n - gui ded mi ssil e s;  after analy z i ng the info rm ation pu blish ed by ae rial  reconn aissa n ce,  unman ned  a e rial ve hicl e s , fighter a nd p r e c is i o n - guid ed  missile s, groun d control  center  publi s he s inf o rmatio n of d a mage d ta rg et to me ssag e-o r iente d  mi ddle w are, an d ba se d on  the   distrib u tion strategy, messag e-o r ie nted  middlew are  distribute s  the inform atio n to preci s io n- guide d mi ssil e , fighter and  unma nne d a e rial ve hicl es; finally, unm anne d a e rial   vehicle s , figh ter  and  pre c i s io n-gui ded  mi ssile s atta ck  the target a nd p ubli s h t he d a mag e d  inform ation  to   messag e-orie nted mid d le ware, an evaluati on  control  ce nte r  sub s cribe s  the dam a g e   informatio n, and co ndu cts  a comp re hen sive analy s is.           Figure 6. ATS of Coordi na ted Engage m ent of Air-gro und Weap on       6. Test and  Analy s is   6.1. Test Tar g et  Messag e-orie nted middle w are mai n ly provi des a  co mmon info rm ation co mmu nicatio n   platform for  ATS, s o  tes t  mainly c o ns iders  tw o a s p e cts: first, the time that  messag e-orie nted  middle w a r e d i stribute s  m e ssage to su bscrib ers wh ether ca me et the re qui re ments;  se con d Evaluation Warning : The document was created with Spire.PDF for Python.
                               ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 12, No. 10, Octobe r 2014:  739 5  – 7403   7402 the middle w are  system  can  wh eth e r di strib u te  accurately messag es to the sp ecified   sub s crib er s.     6.2. Test Env i ronment an d Test  Data   Software E n vironme n t: Wind ows XP  ope rating  system  and  ATS of co ordin a ted   enga geme n t of air-g rou nd  wea pon.   Hardware Environme n t: There a r e 7 co mputers, and  a compute r  is used as a  messag e- oriente d  mid d l ewa r se rver, and oth e r si x comp ut ers are used  to simulating  th e host com pute r   of unman ned  aerial vehi cl es, fighter, p r eci s io n- guid ed missile, a e rial reconn a i ssan ce, grou nd  control cente r   an eval uat ion control center.  T h o s e  com pute r s'   config uratio n s  a r e Intel  Core2  Quard CP U 2 . 40 GHZ a nd  RAM 2G.   The ho st co mputer  of ae rial reconnai ssan ce   publi s hes i n form ation of ene my, the ho st  comp uter of  unmann ed aerial vehi cle s , aircraft an d pre c isi on-g u ided mi ssil e s publi s h th eir   informatio n,  whe n  the  len g th of m e ssa ge in   sendi ng  que ue i s  eq ual to  200 0,  messag e-orie nted   middle w a r starts to  di stri bute m e ssag e, whil e the   host  co mput er  of ae rial  reco nnai ssan ce,  unman ned  a e rial vehi cle s  an d preci s ion - gui ded  missil e stop  publishing i n formatio n, and   distrib u tion time will be re cord in Tabl e 1. In the  sam e  way, distri b u tion time of distrib u ting 4 000,  5000 a nd 10 0 00 messa g e s  will be re co rd in Table 1.       Table 1. Di stribution Time  of Message -o riented Mi ddl ewa r e     2000 M e ssage   4000 M e ssage   5000  M e ssage   10000  M e ssage   total distribution tim e M illisecond   120159  232877   311362   654186   Distribution tim e   per reco rd M illisecond   60 58  62  65      The ho st co mputer of un manne d aeri a l vehi cle s , aircraft and preci s ion - gui de d missil e publi s h da ma ged info rmati on 10 00 time s. The  stat e m ent of dist ri bution me ssa ge is  sho w in   Table 2.       Table 2. Statement of Dist ributing M e ssage   Sender   host com pute r  of  unmanned  aerial vehicles,   Host com put er of  aircraft   Host com put er of  precision- guided m i ssiles  Receiving tim e 1000  1000   1000     6.3. Result  Analy s is   By compari n g  these two  se ts of above test, we ca n draw the con c lu sion s:   (1) T he ba sic di stri buti on efficien cy  of  messag e-o r iente d  middle w a r is abo ut  60s/record, a nd di strib u tin g  40 00  message  wa ste s  a t  the lea s t, which  sho w s th at the n u mb e r  of  thread s of distributing me ssag e is optim al.  (2) Th e Accu racy rate of messag e-orie nt ed middle w are di strib u ting messag e is 100%,  and this in dicates that the distrib u tion a c cura cy  of the messag e-oriented middl e w are is reliabl e.      7. Conclusio n   Aim at the cu rre nt status  o f  the ATS that fo cuse s o n  only on a sin g le or the  sa me type   of weap on s' perfo rman ce  testing, this p aper int r od uces me ssage -oriente d  midd lewa re into A T in order to no t only shi e ld  complexity of the bottom  test equipm ent,  but also impl ement te st da ta  transfe r bet ween differe nt test equipm ent throug h the messag e ' s publi s h a n d sub s criptio n Acco rdi ng to test on me ssage-ori ented  middle w a r e a bout publi s hi ng and  sub scribing m e ssa g e   we can draw  the con c lu sio n  that  the message -o riente d  middle w a r e  can create a n  integrate d  test   platform for a  variety of weapon s an d im plement  com p reh e n s ive p e rform a n c e t e st for weap o n's  coo r din a ted e ngag ement.       Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Networked A u tom a tic Test  System  Bas ed on Me ssa ge-O r ie nted … (Xiong Fe nggu ang 7403 Referen ces   [1]  Ying lia ng F e n g ,  Shujua nW an g, Bin F eng, RuiW an g, Yuan  He, T ong Z hang. Devel opme n t  of an auto   test sy st em for humidit y  s ensors.  Sensors an d Actuators A: Physica l . 200 9; 152(1): 10 4-1 09.   [2]  Lai Qi ng,  Hu Jian-W e i,   Y un, C hen  Yu e- F e i, Xu   Ji an.    Rese arch on g ener al  r e la y pr otection   a u to- test s y stem  soft w a re.   Pow e r System  Protec tion an C ontr o l . D i an li   Xiton g  Ba oh yu  K ongz hi.  201 0 ;   38(3): 90- 94.   [3]  Yuan Qi ngfe n g ,   Lu Hui, Sh en  Shitua n. Auto t e st  s y stem r e s ource  descri p ti on meth od  bas ed o n   XML.   Journ a l of Bei jing  Univ ersity  of Aerona utic s and Astron a u tics Beiji ng  Han g kon g  Ha ngtia n Da xue   Xu eb ao. 20 10;  36(1): 11 4-1 1 7 .     [4]  Z hai L i fan g , Li  Chu n y u an, S un L i p i ng.  Res earch  on  the  messag e -ori en ted mid d l e w a r e  for  w i rel e s s   sensor n e t w ork s Journal of C o mputers . 20 1 1 ; 6(5): 104 0-1 046.   [5]  Miao C hun-Y u Shi Mei-Li n,  Jian g Jin-L e i.   MOM-S: Message- orie nted  middl e w a r e ba sed on W e b   service.  Jour na l on Co mmunic a tions . T ongxin  Xu eba o. 200 6;  27(11): 96- 10 0.  [6]  Jia Z h i y a n , H a Xie.  Net w ork  autom atic test  s y stem  bas ed  on d a tab a se m i ddl e w a r e.  Lect u re N o tes i n   Electrical E ngi neer ing. 2 013;  218( 3): 603- 60 9.  [7]  Jian  Ni, Yu nl o ng Z h ang.  Stu d y  of test  dat a g ener atio n method   bas ed   on evo l utio na r y  alg o rithm.   Te lkom n i ka . 20 14; 12(1): 8 18- 822.   [8]  Carril ho S e rg i o , Esaki  Hiros hi.  A pu b/sub  messag e  d i stri butio n arc h itec ture for d i sru p t ion to lera nt   net w o rks.  IEICE T r ansactions  on Informatio n  and Syste m s .  2009; E9 2-D(1 0 ): 1888- 18 96.       Evaluation Warning : The document was created with Spire.PDF for Python.