static void Main(string[] args) { Console.WriteLine("Test the SL900A Get Sensor Value function in the Mercury API"); if (2 > args.Length) { Usage(); } else { for (int nextarg = 2; nextarg < args.Length; nextarg++) { string arg = args[nextarg]; if (arg.Equals("--ant")) { if (null != antennaList) { Console.WriteLine("Duplicate argument: --ant specified more than once"); Usage(); } antennaList = ParseAntennaList(args, nextarg); nextarg++; } else { Console.WriteLine("Argument {0}:\"{1}\" is not recognized", nextarg, arg); Usage(); } } //Create an object SL900AGetSensorValueTest test = new SL900AGetSensorValueTest(); //Pass the reader uri to the object test.run(args[0], args[1].ToUpper()); } }
static void Main(string[] args) { Console.WriteLine("Test the SL900A Get Sensor Value function in the Mercury API"); if (args.Length != 2) { //If the user did not supply the reader uri command arg, display this message Console.WriteLine("Must provide reader uri and sensor type (TEMP, EXT1, EXT2, BATT"); Console.WriteLine("Sl900ATest.exe [reader] [sensor]"); } else { //Create an object SL900AGetSensorValueTest test = new SL900AGetSensorValueTest(); //Pass the reader uri to the object test.run(args[0], args[1].ToUpper()); } }