Esempio n. 1
0
        private bool PreStartHighSpeedDataCommunication()
        {
            _sendCommand = SendCommand.PreStartHighSpeedDataCommunication;
            LJV7IF_HIGH_SPEED_PRE_START_REQ req = new LJV7IF_HIGH_SPEED_PRE_START_REQ();

            req.bySendPos = Convert.ToByte("2");
            // @Point
            // # SendPos is used to specify which profile to start sending data from during high-speed communication.
            // # When "Overwrite" is specified for the operation when memory full and
            //   "0: From previous send complete position" is specified for the send start position,
            //    if the LJ-V continues to accumulate profiles, the LJ-V memory will become full,
            //    and the profile at the previous send complete position will be overwritten with a new profile.
            //    In this situation, because the profile at the previous send complete position is not saved, an error will occur.

            LJV7IF_PROFILE_INFO profileInfo = new LJV7IF_PROFILE_INFO();

            int rc = NativeMethods.LJV7IF_PreStartHighSpeedDataCommunication(Define._currentDeviceId, ref req, ref profileInfo);

            //AddLogResult(rc, Resources.SID_PRE_START_HIGH_SPEED_DATA_COMMUNICATION);
            if (rc == (int)Rc.Ok)
            {
                // Response data display
                //AddLog(Utility.ConvertToLogString(profileInfo).ToString());
                _profileInfo[Define._currentDeviceId] = profileInfo;
                AddLog("高速通信预开启 OK!");
                return(true);
            }
            else
            {
                AddLog("高速通信预开启 Fail!");
                return(false);
            }
        }
Esempio n. 2
0
 internal static extern int LJV7IF_PreStartHighSpeedDataCommunication(
     int lDeviceId, ref LJV7IF_HIGH_SPEED_PRE_START_REQ pReq,
     ref LJV7IF_PROFILE_INFO pProfileInfo);