/*****************************************************************/
/**                                                             **/
/**             (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 inv2 5
   Integer(2),Integer(2);

End;


main(argc,argv)
   int argc;
   char *argv[];
{
   Control (sample) inst1;
   Integer(2) int2_s1, int2_s2;
   Integer(2) int2_r1, int2_r2;

   if (argc != 2)
      exit(1);

   int2_s1 = 15;
   int2_s2 = 16;

/***************** send it out ************************/

   Bind_STUB(inst1,argv[1],"w",Asn_1_ber);
   Give inst1
      inv2(int2_s1,int2_s2);
   Unbind(inst1);

/***************** receive it back ********************/

   Bind_STUB(inst1,argv[1],"r",Asn_1_ber);
   Accept inst1
   {
      On inv2(int2_r1,int2_r2);
   }
   Unbind(inst1);

/***************** report results *********************/

   if (int2_s1 != int2_r1) {
      printf("   int2_r1 value was bad\n");
      exit(1);
   }
   if (int2_s2 != int2_r2) {
      printf("   int2_r2 value was bad\n");
      exit(1);
   }

   printf("test completed\n");
   return(0);
}
