11 using System.Collections.Generic;
14 using System.Threading;
36 List<string> positions_A = File.ReadAllText(fileA).Split(
',').ToList();
37 List<string> positions_B = File.ReadAllText(fileB).Split(
',').ToList();
52 if (positions_A.Count() != positions_B.Count())
54 Console.WriteLine(
"Error: The two datasets are not the same size");
65 }
while (Load_Buffer(
gclib, positions_A, positions_B, capacity, ref cmd));
72 private static bool Load_Buffer(
gclib gclib, List<string> positions_A, List<string> positions_B,
73 int capacity, ref
int cmd)
75 for (; capacity > 0; capacity--)
77 if (cmd + 1 < positions_A.Count())
80 double cdA =
double.Parse(positions_A[cmd + 1]) -
double.Parse(positions_A[cmd]);
83 double cdB =
double.Parse(positions_B[cmd + 1]) -
double.Parse(positions_B[cmd]);
Provides a class of shared constants and methods for gclib's example projects.
const int GALIL_EXAMPLE_OK
Examples success code.
const int GALIL_EXAMPLE_ERROR
Examples error code.
string GCommand(string Command, bool Trim=true)
Used for command-and-response transactions.
void GMotionComplete(string axes)
Blocking call that returns once all axes specified have completed their motion.
Int16 GCmdI(string Command)
Used for command-and-response transactions.
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
static int Record_Position(gclib gclib, string fileA, string fileB)
Record user's training and saves to a text file.
static int Contour(gclib gclib, string fileA, string fileB)
Record user's training and plays back training through contour mode.