/// <summary>
 /// Constructor
 /// </summary>
 public OpenEthernetForm()
 {
     _ethernetConfig = new LJV7IF_ETHERNET_CONFIG();
     _ethernetConfig.abyIpAddress = new byte[]
     {
         Convert.ToByte("192"),
         Convert.ToByte("168"),
         Convert.ToByte("196"),
         Convert.ToByte("18")
     };
     _ethernetConfig.wPortNo = Convert.ToUInt16("24691");
 }
Beispiel #2
0
        /// <summary>
        /// "EthernetOpen" seitch case integer.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        public string EthernetOpen()    // amity: to establsihed the commenction between device and the dll.
        {
            OpenEthernetForm       openEthernetForm = new OpenEthernetForm();
            LJV7IF_ETHERNET_CONFIG ethernetConfig   = openEthernetForm.EthernetConfig;

            int rc = NativeMethods.LJV7IF_EthernetOpen(_currentDeviceId, ref ethernetConfig);

            AddLogResult(rc, Resources.SID_ETHERNET_OPEN);
            if (rc == (int)Rc.Ok)
            {
                _deviceData[_currentDeviceId].Status         = DeviceStatus.Ethernet;
                _deviceData[_currentDeviceId].EthernetConfig = ethernetConfig;
            }
            else
            {
                _deviceData[_currentDeviceId].Status = DeviceStatus.NoConnection;
            }
            return(rc.ToString());
        }
Beispiel #3
0
 internal static extern int LJV7IF_HighSpeedDataEthernetCommunicationInitalize(
     int lDeviceId, ref LJV7IF_ETHERNET_CONFIG pEthernetConfig, ushort wHighSpeedPortNo,
     HighSpeedDataCallBack pCallBack, uint dwProfileCnt, uint dwThreadId);
Beispiel #4
0
 internal static extern int LJV7IF_EthernetOpen(int lDeviceId, ref LJV7IF_ETHERNET_CONFIG ethernetConfig);