Exemple #1
0
 /// <summary>
 /// ANTFS_ClientParameters, with the default beacon parameters
 /// </summary>
 /// <param name="deviceType">Client device type</param>
 /// <param name="manufacturerID">Client manufacturing ID</param>
 public ANTFS_ClientParameters(ushort deviceType, ushort manufacturerID)
 {
     // Default beacon configuration: Match unmanaged ANTFSClient::SetDefaultBeacon
     BeaconDeviceType     = deviceType;
     BeaconManufacturerID = manufacturerID;
     SerialNumber         = 0;  // Use the USB device serial number by default
     BeaconRadioFrequency = 50; // ANT-FS RF Frequency
     LinkPeriod           = BeaconPeriod.EightHz;
     IsPairingEnabled     = true;
     IsUploadEnabled      = false;
     IsDataAvailable      = false;
     AuthenticationType   = AuthenticationType.Pairing;
     BeaconTimeout        = 60; // In seconds
     PairingTimeout       = 5;  // In seconds
 }
Exemple #2
0
        /// <summary>
        /// Request the connected remote device to switch to the specified
        /// radio frequency and channel period
        /// </summary>
        /// <param name="ucRadioFrequency">New radio frequency</param>
        /// <param name="beaconPeriod">New beacon period</param>
        public void SwitchFrequency(byte ucRadioFrequency, BeaconPeriod beaconPeriod)
        {
            if (!bInitialized)
                throw new ObjectDisposedException("ANTFSHost object has been disposed");

            ReturnCode theReturn = (ReturnCode)ANTFSHost_SwitchFrequency(unmanagedHostPtr, ucRadioFrequency, (byte) beaconPeriod);
            if (theReturn != ReturnCode.Pass)
                throw new ANTFS_RequestFailed_Exception("SwitchFrequency", theReturn);
        }
        /// <summary>
        /// ANTFS_ClientParameters, with the default beacon parameters
        /// </summary>
        /// <param name="deviceType">Client device type</param>
        /// <param name="manufacturerID">Client manufacturing ID</param>
        public ANTFS_ClientParameters(ushort deviceType, ushort manufacturerID)
        {
            // Default beacon configuration: Match unmanaged ANTFSClient::SetDefaultBeacon
            BeaconDeviceType = deviceType;
            BeaconManufacturerID = manufacturerID;
            SerialNumber = 0;   // Use the USB device serial number by default
            BeaconRadioFrequency = 50;  // ANT-FS RF Frequency
            LinkPeriod = BeaconPeriod.EightHz;
            IsPairingEnabled = true;
            IsUploadEnabled = false;
            IsDataAvailable = false;
            AuthenticationType = AuthenticationType.Pairing;
            BeaconTimeout = 60; // In seconds
            PairingTimeout = 5; // In seconds

        }