using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace GcDevicePc.Common
{
    class SendDataToHW
    {
        [DllImport(@"HWSendData.dll", EntryPoint = "SendDataToHW")]
        public static extern void GCSendDataToHW(Int32 data1, Int32 data2, Int32 data3);

        public SendDataToHW()
        {

        }

        ~SendDataToHW()
        {

        }

        public void StartSendDataToHW()
        {
            GCSendDataToHW(1, 0, 1);
            GCSendDataToHW(0, 1, 1);
        }

        public void StopSendDataToHW()
        {
            GCSendDataToHW(1, 0, 2);
            GCSendDataToHW(0, 1, 2);
        }

        public void SendDataToHW_A(Int32 data)
        {
            GCSendDataToHW(data, 0, 3);
            GCSendDataToHW(0, 0, 4);
        }

        public void SendDataToHW_B(Int32 data)
        {
            GCSendDataToHW(0, data, 4);
            GCSendDataToHW(0, 0, 3);
        }

        public void SendDataToHW_AB(Int32 dataA, Int32 dataB)
        {
            GCSendDataToHW(dataA, dataB, 0);
           
        }
    }
}
