public NegotiateProtocolVersion(IURRTDE urRTDE)
        {
            byte[] payload = IToBytes.FromUshort(2);
            var    resp    = urRTDE.SendReceive(IPackageType.RTDE_REQUEST_PROTOCOL_VERSION, payload);

            Accepted = resp[0];
        }
Exemplo n.º 2
0
        public StartSending(IURRTDE urRTDE)
        {
            byte[] payload = new byte[0];
            var    resp    = urRTDE.SendReceive(IPackageType.RTDE_CONTROL_PACKAGE_START, payload);

            Accepted = resp[0];
        }
Exemplo n.º 3
0
        public ControllerVersion(IURRTDE urRTDE)
        {
            byte[] payload = new byte[0];
            var    resp    = urRTDE.SendReceive(IPackageType.RTDE_GET_URCONTROL_VERSION, payload);

            byte[] temp = new byte[4];
            Buffer.BlockCopy(resp, 0, temp, 0, 4);
            Major = IFromBytes.ToUInt32(temp);
            Buffer.BlockCopy(resp, 4, temp, 0, 4);
            Minor = IFromBytes.ToUInt32(temp);
            Buffer.BlockCopy(resp, 8, temp, 0, 4);
            Bugfix = IFromBytes.ToUInt32(temp);
            Buffer.BlockCopy(resp, 12, temp, 0, 4);
            Build = IFromBytes.ToUInt32(temp);
        }
Exemplo n.º 4
0
        public SetupOutput(IURRTDE urRTDE, double frequency, string variables)
        {
            var bFreq = IToBytes.FromDouble(frequency);
            var bVar  = IToBytes.FromString(variables);

            byte[] payload = new byte[bFreq.Length + bVar.Length];
            Buffer.BlockCopy(bFreq, 0, payload, 0, bFreq.Length);
            Buffer.BlockCopy(bVar, 0, payload, bFreq.Length, bVar.Length);

            var resp = urRTDE.SendReceive(IPackageType.RTDE_CONTROL_PACKAGE_SETUP_OUTPUTS, payload);

            OutputRecipeId = resp[0];

            byte[] temp = new byte[resp.Length - 1];
            Buffer.BlockCopy(resp, 1, temp, 0, temp.Length);
            VariableTypes = IFromBytes.ToString(temp);
        }