/*****************************************************************/
/**                                                             **/
/**             (C) Copyright 1992 the Regents of the           **/
/**        University of California.  All Rights Reserved.      **/
/**                                                             **/
/**        This work was produced under the sponsorship of      **/
/**         the U.S. Department of Energy.  The Government      **/
/**                retains certain rights therein.              **/
/**                                                             **/
/**                         Written by                          **/
/**         Distributed Programming Environments Project        **/
/**           Computer Software and Networking Division,        **/
/**                   Livermore Computer Center,                **/
/**            Lawrence Livermore National Laboratory           **/
/**                                                             **/
/*****************************************************************/
 
Interface sample; 
 
   Invoke op0  2.1.6.3		Integer(4); 
   Invoke op1  1.2.8.655	Integer(4); 
   Invoke op2  1.2.8.655.17	Integer(4); 
   Invoke op3  1.2.8.655.17.8	Integer(4); 
   Invoke op4  1.2.8.655.18.1	Integer(4); 
   Invoke op5  1.2.6.655.4	Integer(4); 
   Invoke op6  1.2.7.655.4	Integer(4); 
   Invoke op7  1.2.8.655.99	Integer(4); 
   Invoke op8  1.2.8.655.9	Integer(4); 
   Invoke op9  1.2.7.654.8	Integer(4); 
   Invoke op10 1.2.7.654.5	Integer(4); 
   Invoke op11 1		Integer(4); 
 
End; 
  

main(argc,argv) 
   int argc; 
   char *argv[]; 
{ 
   Integer(4) x; 
 
   Control (sample) inst; 
  
   int i; 
 
   if (argc != 2) 
      exit(1);    
  
/***************** send it out ************************/

   Bind_STUB(inst,argv[1],"w",Asn_1_ber); 
   Give inst 
   { 
      op0(0); 
      op1(1); 
      op2(2); 
      op3(3); 
      op4(4); 
      op5(5); 
      op6(6); 
      op7(7); 
      op8(8); 
      op9(9); 
      op10(10); 
      op11(11); 
   } 
   Unbind(inst); 
  
/***************** receive it back ********************/

   Bind_STUB(inst,argv[1],"r",Asn_1_ber); 
 
   for (i=0;i<=11;i++) { 
  
   Accept inst 
   { 
      On op0(x) 
        if (i != 0 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op1(x) 
        if (i != 1 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op2(x) 
        if (i != 2 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op3(x) 
        if (i != 3 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op4(x) 
        if (i != 4 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op5(x) 
        if (i != 5 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op6(x) 
        if (i != 6 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op7(x) 
        if (i != 7 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op8(x) 
        if (i != 8 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op9(x) 
        if (i != 9 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op10(x) 
        if (i != 10 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
        
      On op11(x) 
        if (i != 11 || x != i) 
	   printf("###wrong operation %d %d\n",i,x); 
   }
  
   } 
  
 
   Unbind(inst); 
 
   printf("test completed\n");
   return(0); 
} 
