Пример #1
0
        /**
         * <summary>
         *   Retrieves a quadrature decoder for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the quadrature decoder is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YQuadratureDecoder.isOnline()</c> to test if the quadrature decoder is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a quadrature decoder by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the quadrature decoder
         * </param>
         * <returns>
         *   a <c>YQuadratureDecoder</c> object allowing you to drive the quadrature decoder.
         * </returns>
         */
        public static YQuadratureDecoder FindQuadratureDecoderInContext(YAPIContext yctx, string func)
        {
            YQuadratureDecoder obj;

            obj = (YQuadratureDecoder)YFunction._FindFromCacheInContext(yctx, "QuadratureDecoder", func);
            if (obj == null)
            {
                obj = new YQuadratureDecoder(yctx, func);
                YFunction._AddToCache("QuadratureDecoder", func, obj);
            }
            return(obj);
        }
Пример #2
0
        /**
         * <summary>
         *   Retrieves a range finder for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the range finder is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YRangeFinder.isOnline()</c> to test if the range finder is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a range finder by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the range finder
         * </param>
         * <returns>
         *   a <c>YRangeFinder</c> object allowing you to drive the range finder.
         * </returns>
         */
        public static YRangeFinder FindRangeFinderInContext(YAPIContext yctx, string func)
        {
            YRangeFinder obj;

            obj = (YRangeFinder)YFunction._FindFromCacheInContext(yctx, "RangeFinder", func);
            if (obj == null)
            {
                obj = new YRangeFinder(yctx, func);
                YFunction._AddToCache("RangeFinder", func, obj);
            }
            return(obj);
        }
Пример #3
0
        /**
         * <summary>
         *   Retrieves a pressure sensor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the pressure sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YPressure.isOnline()</c> to test if the pressure sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a pressure sensor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the pressure sensor, for instance
         *   <c>YALTIMK2.pressure</c>.
         * </param>
         * <returns>
         *   a <c>YPressure</c> object allowing you to drive the pressure sensor.
         * </returns>
         */
        public static YPressure FindPressureInContext(YAPIContext yctx, string func)
        {
            YPressure obj;

            obj = (YPressure)YFunction._FindFromCacheInContext(yctx, "Pressure", func);
            if (obj == null)
            {
                obj = new YPressure(yctx, func);
                YFunction._AddToCache("Pressure", func, obj);
            }
            return(obj);
        }
Пример #4
0
        /**
         * <summary>
         *   Retrieves a Bluetooth sound controller for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the Bluetooth sound controller is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YBluetoothLink.isOnline()</c> to test if the Bluetooth sound controller is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a Bluetooth sound controller by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the Bluetooth sound controller, for instance
         *   <c>MyDevice.bluetoothLink1</c>.
         * </param>
         * <returns>
         *   a <c>YBluetoothLink</c> object allowing you to drive the Bluetooth sound controller.
         * </returns>
         */
        public static YBluetoothLink FindBluetoothLinkInContext(YAPIContext yctx, string func)
        {
            YBluetoothLink obj;

            obj = (YBluetoothLink)YFunction._FindFromCacheInContext(yctx, "BluetoothLink", func);
            if (obj == null)
            {
                obj = new YBluetoothLink(yctx, func);
                YFunction._AddToCache("BluetoothLink", func, obj);
            }
            return(obj);
        }
        /**
         * <summary>
         *   Retrieves a generic sensor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the generic sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YGenericSensor.isOnline()</c> to test if the generic sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a generic sensor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the generic sensor
         * </param>
         * <returns>
         *   a <c>YGenericSensor</c> object allowing you to drive the generic sensor.
         * </returns>
         */
        public static YGenericSensor FindGenericSensorInContext(YAPIContext yctx, string func)
        {
            YGenericSensor obj;

            obj = (YGenericSensor)YFunction._FindFromCacheInContext(yctx, "GenericSensor", func);
            if (obj == null)
            {
                obj = new YGenericSensor(yctx, func);
                YFunction._AddToCache("GenericSensor", func, obj);
            }
            return(obj);
        }
Пример #6
0
        /**
         * <summary>
         *   Retrieves a filesystem for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the filesystem is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YFiles.isOnline()</c> to test if the filesystem is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a filesystem by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the filesystem
         * </param>
         * <returns>
         *   a <c>YFiles</c> object allowing you to drive the filesystem.
         * </returns>
         */
        public static YFiles FindFilesInContext(YAPIContext yctx, string func)
        {
            YFiles obj;

            obj = (YFiles)YFunction._FindFromCacheInContext(yctx, "Files", func);
            if (obj == null)
            {
                obj = new YFiles(yctx, func);
                YFunction._AddToCache("Files", func, obj);
            }
            return(obj);
        }
Пример #7
0
        /**
         * <summary>
         *   Retrieves a current sensor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the current sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YCurrent.isOnline()</c> to test if the current sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a current sensor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the current sensor, for instance
         *   <c>YAMPMK01.current1</c>.
         * </param>
         * <returns>
         *   a <c>YCurrent</c> object allowing you to drive the current sensor.
         * </returns>
         */
        public static YCurrent FindCurrentInContext(YAPIContext yctx, string func)
        {
            YCurrent obj;

            obj = (YCurrent)YFunction._FindFromCacheInContext(yctx, "Current", func);
            if (obj == null)
            {
                obj = new YCurrent(yctx, func);
                YFunction._AddToCache("Current", func, obj);
            }
            return(obj);
        }
Пример #8
0
        /**
         * <summary>
         *   Retrieves a humidity sensor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the humidity sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YHumidity.isOnline()</c> to test if the humidity sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a humidity sensor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the humidity sensor, for instance
         *   <c>YCO2MK02.humidity</c>.
         * </param>
         * <returns>
         *   a <c>YHumidity</c> object allowing you to drive the humidity sensor.
         * </returns>
         */
        public static YHumidity FindHumidityInContext(YAPIContext yctx, string func)
        {
            YHumidity obj;

            obj = (YHumidity)YFunction._FindFromCacheInContext(yctx, "Humidity", func);
            if (obj == null)
            {
                obj = new YHumidity(yctx, func);
                YFunction._AddToCache("Humidity", func, obj);
            }
            return(obj);
        }
Пример #9
0
        /**
         * <summary>
         *   Retrieves OS control for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the OS control is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YOsControl.isOnline()</c> to test if the OS control is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   OS control by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the OS control
         * </param>
         * <returns>
         *   a <c>YOsControl</c> object allowing you to drive the OS control.
         * </returns>
         */
        public static YOsControl FindOsControlInContext(YAPIContext yctx, string func)
        {
            YOsControl obj;

            obj = (YOsControl)YFunction._FindFromCacheInContext(yctx, "OsControl", func);
            if (obj == null)
            {
                obj = new YOsControl(yctx, func);
                YFunction._AddToCache("OsControl", func, obj);
            }
            return(obj);
        }
Пример #10
0
        /**
         * <summary>
         *   Retrieves a tilt sensor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the tilt sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YTilt.isOnline()</c> to test if the tilt sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a tilt sensor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the tilt sensor
         * </param>
         * <returns>
         *   a <c>YTilt</c> object allowing you to drive the tilt sensor.
         * </returns>
         */
        public static YTilt FindTiltInContext(YAPIContext yctx, string func)
        {
            YTilt obj;

            obj = (YTilt)YFunction._FindFromCacheInContext(yctx, "Tilt", func);
            if (obj == null)
            {
                obj = new YTilt(yctx, func);
                YFunction._AddToCache("Tilt", func, obj);
            }
            return(obj);
        }
Пример #11
0
        /**
         * <summary>
         *   Retrieves a quaternion component for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the quaternion component is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YQt.isOnline()</c> to test if the quaternion component is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a quaternion component by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the quaternion component
         * </param>
         * <returns>
         *   a <c>YQt</c> object allowing you to drive the quaternion component.
         * </returns>
         */
        public static YQt FindQtInContext(YAPIContext yctx, string func)
        {
            YQt obj;

            obj = (YQt)YFunction._FindFromCacheInContext(yctx, "Qt", func);
            if (obj == null)
            {
                obj = new YQt(yctx, func);
                YFunction._AddToCache("Qt", func, obj);
            }
            return(obj);
        }
Пример #12
0
        /**
         * <summary>
         *   Retrieves a CO2 sensor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the CO2 sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YCarbonDioxide.isOnline()</c> to test if the CO2 sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a CO2 sensor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the CO2 sensor, for instance
         *   <c>YCO2MK02.carbonDioxide</c>.
         * </param>
         * <returns>
         *   a <c>YCarbonDioxide</c> object allowing you to drive the CO2 sensor.
         * </returns>
         */
        public static YCarbonDioxide FindCarbonDioxideInContext(YAPIContext yctx, string func)
        {
            YCarbonDioxide obj;

            obj = (YCarbonDioxide)YFunction._FindFromCacheInContext(yctx, "CarbonDioxide", func);
            if (obj == null)
            {
                obj = new YCarbonDioxide(yctx, func);
                YFunction._AddToCache("CarbonDioxide", func, obj);
            }
            return(obj);
        }
        /**
         * <summary>
         *   Retrieves a data logger for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the data logger is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YDataLogger.isOnline()</c> to test if the data logger is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a data logger by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the data logger
         * </param>
         * <returns>
         *   a <c>YDataLogger</c> object allowing you to drive the data logger.
         * </returns>
         */
        public static YDataLogger FindDataLoggerInContext(YAPIContext yctx, string func)
        {
            YDataLogger obj;

            obj = (YDataLogger)YFunction._FindFromCacheInContext(yctx, "DataLogger", func);
            if (obj == null)
            {
                obj = new YDataLogger(yctx, func);
                YFunction._AddToCache("DataLogger", func, obj);
            }
            return(obj);
        }
Пример #14
0
        /**
         * <summary>
         *   Retrieves a voltage source for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the voltage source is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YPwmPowerSource.isOnline()</c> to test if the voltage source is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a voltage source by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the voltage source
         * </param>
         * <returns>
         *   a <c>YPwmPowerSource</c> object allowing you to drive the voltage source.
         * </returns>
         */
        public static YPwmPowerSource FindPwmPowerSourceInContext(YAPIContext yctx, string func)
        {
            YPwmPowerSource obj;

            obj = (YPwmPowerSource)YFunction._FindFromCacheInContext(yctx, "PwmPowerSource", func);
            if (obj == null)
            {
                obj = new YPwmPowerSource(yctx, func);
                YFunction._AddToCache("PwmPowerSource", func, obj);
            }
            return(obj);
        }
Пример #15
0
        /**
         * <summary>
         *   Retrieves a watchdog for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the watchdog is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YWatchdog.isOnline()</c> to test if the watchdog is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a watchdog by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the watchdog, for instance
         *   <c>WDOGDC01.watchdog1</c>.
         * </param>
         * <returns>
         *   a <c>YWatchdog</c> object allowing you to drive the watchdog.
         * </returns>
         */
        public static YWatchdog FindWatchdogInContext(YAPIContext yctx, string func)
        {
            YWatchdog obj;

            obj = (YWatchdog)YFunction._FindFromCacheInContext(yctx, "Watchdog", func);
            if (obj == null)
            {
                obj = new YWatchdog(yctx, func);
                YFunction._AddToCache("Watchdog", func, obj);
            }
            return(obj);
        }
Пример #16
0
        /**
         * <summary>
         *   Retrieves a wake up schedule for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the wake up schedule is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YWakeUpSchedule.isOnline()</c> to test if the wake up schedule is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a wake up schedule by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the wake up schedule, for instance
         *   <c>YHUBGSM3.wakeUpSchedule1</c>.
         * </param>
         * <returns>
         *   a <c>YWakeUpSchedule</c> object allowing you to drive the wake up schedule.
         * </returns>
         */
        public static YWakeUpSchedule FindWakeUpScheduleInContext(YAPIContext yctx, string func)
        {
            YWakeUpSchedule obj;

            obj = (YWakeUpSchedule)YFunction._FindFromCacheInContext(yctx, "WakeUpSchedule", func);
            if (obj == null)
            {
                obj = new YWakeUpSchedule(yctx, func);
                YFunction._AddToCache("WakeUpSchedule", func, obj);
            }
            return(obj);
        }
Пример #17
0
        /**
         * <summary>
         *   Retrieves a stepper motor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the stepper motor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YStepperMotor.isOnline()</c> to test if the stepper motor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a stepper motor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the stepper motor
         * </param>
         * <returns>
         *   a <c>YStepperMotor</c> object allowing you to drive the stepper motor.
         * </returns>
         */
        public static YStepperMotor FindStepperMotorInContext(YAPIContext yctx, string func)
        {
            YStepperMotor obj;

            obj = (YStepperMotor)YFunction._FindFromCacheInContext(yctx, "StepperMotor", func);
            if (obj == null)
            {
                obj = new YStepperMotor(yctx, func);
                YFunction._AddToCache("StepperMotor", func, obj);
            }
            return(obj);
        }
Пример #18
0
        /**
         * <summary>
         *   Retrieves a clock for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the clock is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YRealTimeClock.isOnline()</c> to test if the clock is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a clock by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the clock
         * </param>
         * <returns>
         *   a <c>YRealTimeClock</c> object allowing you to drive the clock.
         * </returns>
         */
        public static YRealTimeClock FindRealTimeClockInContext(YAPIContext yctx, string func)
        {
            YRealTimeClock obj;

            obj = (YRealTimeClock)YFunction._FindFromCacheInContext(yctx, "RealTimeClock", func);
            if (obj == null)
            {
                obj = new YRealTimeClock(yctx, func);
                YFunction._AddToCache("RealTimeClock", func, obj);
            }
            return(obj);
        }
Пример #19
0
        /**
         * <summary>
         *   Retrieves a digital IO port for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the digital IO port is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YDigitalIO.isOnline()</c> to test if the digital IO port is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a digital IO port by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the digital IO port, for instance
         *   <c>YMINIIO0.digitalIO</c>.
         * </param>
         * <returns>
         *   a <c>YDigitalIO</c> object allowing you to drive the digital IO port.
         * </returns>
         */
        public static YDigitalIO FindDigitalIOInContext(YAPIContext yctx, string func)
        {
            YDigitalIO obj;

            obj = (YDigitalIO)YFunction._FindFromCacheInContext(yctx, "DigitalIO", func);
            if (obj == null)
            {
                obj = new YDigitalIO(yctx, func);
                YFunction._AddToCache("DigitalIO", func, obj);
            }
            return(obj);
        }
Пример #20
0
        /**
         * <summary>
         *   Retrieves a RC servo motor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the RC servo motor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YServo.isOnline()</c> to test if the RC servo motor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a RC servo motor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the RC servo motor, for instance
         *   <c>SERVORC1.servo1</c>.
         * </param>
         * <returns>
         *   a <c>YServo</c> object allowing you to drive the RC servo motor.
         * </returns>
         */
        public static YServo FindServoInContext(YAPIContext yctx, string func)
        {
            YServo obj;

            obj = (YServo)YFunction._FindFromCacheInContext(yctx, "Servo", func);
            if (obj == null)
            {
                obj = new YServo(yctx, func);
                YFunction._AddToCache("Servo", func, obj);
            }
            return(obj);
        }
Пример #21
0
        /**
         * <summary>
         *   Retrieves a PWM generator for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the PWM generator is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YPwmOutput.isOnline()</c> to test if the PWM generator is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a PWM generator by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the PWM generator, for instance
         *   <c>YPWMTX01.pwmOutput1</c>.
         * </param>
         * <returns>
         *   a <c>YPwmOutput</c> object allowing you to drive the PWM generator.
         * </returns>
         */
        public static YPwmOutput FindPwmOutputInContext(YAPIContext yctx, string func)
        {
            YPwmOutput obj;

            obj = (YPwmOutput)YFunction._FindFromCacheInContext(yctx, "PwmOutput", func);
            if (obj == null)
            {
                obj = new YPwmOutput(yctx, func);
                YFunction._AddToCache("PwmOutput", func, obj);
            }
            return(obj);
        }
Пример #22
0
        /**
         * <summary>
         *   Retrieves a compass function for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the compass function is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YCompass.isOnline()</c> to test if the compass function is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a compass function by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the compass function, for instance
         *   <c>Y3DMK002.compass</c>.
         * </param>
         * <returns>
         *   a <c>YCompass</c> object allowing you to drive the compass function.
         * </returns>
         */
        public static YCompass FindCompassInContext(YAPIContext yctx, string func)
        {
            YCompass obj;

            obj = (YCompass)YFunction._FindFromCacheInContext(yctx, "Compass", func);
            if (obj == null)
            {
                obj = new YCompass(yctx, func);
                YFunction._AddToCache("Compass", func, obj);
            }
            return(obj);
        }
Пример #23
0
        /**
         * <summary>
         *   Retrieves a segmented display for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the segmented display is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YSegmentedDisplay.isOnline()</c> to test if the segmented display is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a segmented display by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the segmented display, for instance
         *   <c>MyDevice.segmentedDisplay</c>.
         * </param>
         * <returns>
         *   a <c>YSegmentedDisplay</c> object allowing you to drive the segmented display.
         * </returns>
         */
        public static YSegmentedDisplay FindSegmentedDisplayInContext(YAPIContext yctx, string func)
        {
            YSegmentedDisplay obj;

            obj = (YSegmentedDisplay)YFunction._FindFromCacheInContext(yctx, "SegmentedDisplay", func);
            if (obj == null)
            {
                obj = new YSegmentedDisplay(yctx, func);
                YFunction._AddToCache("SegmentedDisplay", func, obj);
            }
            return(obj);
        }
Пример #24
0
        /**
         * <summary>
         *   Retrieves a multi-sensor controller for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the multi-sensor controller is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YMultiSensController.isOnline()</c> to test if the multi-sensor controller is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a multi-sensor controller by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the multi-sensor controller, for instance
         *   <c>YTEMPIR1.multiSensController</c>.
         * </param>
         * <returns>
         *   a <c>YMultiSensController</c> object allowing you to drive the multi-sensor controller.
         * </returns>
         */
        public static YMultiSensController FindMultiSensControllerInContext(YAPIContext yctx, string func)
        {
            YMultiSensController obj;

            obj = (YMultiSensController)YFunction._FindFromCacheInContext(yctx, "MultiSensController", func);
            if (obj == null)
            {
                obj = new YMultiSensController(yctx, func);
                YFunction._AddToCache("MultiSensController", func, obj);
            }
            return(obj);
        }
Пример #25
0
        /**
         * <summary>
         *   Retrieves an altimeter for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the altimeter is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YAltitude.isOnline()</c> to test if the altimeter is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   an altimeter by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the altimeter
         * </param>
         * <returns>
         *   a <c>YAltitude</c> object allowing you to drive the altimeter.
         * </returns>
         */
        public static YAltitude FindAltitudeInContext(YAPIContext yctx, string func)
        {
            YAltitude obj;

            obj = (YAltitude)YFunction._FindFromCacheInContext(yctx, "Altitude", func);
            if (obj == null)
            {
                obj = new YAltitude(yctx, func);
                YFunction._AddToCache("Altitude", func, obj);
            }
            return(obj);
        }
Пример #26
0
        /**
         * <summary>
         *   Retrieves an audio input for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the audio input is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YAudioIn.isOnline()</c> to test if the audio input is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   an audio input by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the audio input
         * </param>
         * <returns>
         *   a <c>YAudioIn</c> object allowing you to drive the audio input.
         * </returns>
         */
        public static YAudioIn FindAudioInInContext(YAPIContext yctx, string func)
        {
            YAudioIn obj;

            obj = (YAudioIn)YFunction._FindFromCacheInContext(yctx, "AudioIn", func);
            if (obj == null)
            {
                obj = new YAudioIn(yctx, func);
                YFunction._AddToCache("AudioIn", func, obj);
            }
            return(obj);
        }
Пример #27
0
        /**
         * <summary>
         *   Retrieves a Total  Volatile Organic Compound sensor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the Total  Volatile Organic Compound sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YTvoc.isOnline()</c> to test if the Total  Volatile Organic Compound sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a Total  Volatile Organic Compound sensor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the Total  Volatile Organic Compound sensor, for instance
         *   <c>YVOCMK03.tvoc</c>.
         * </param>
         * <returns>
         *   a <c>YTvoc</c> object allowing you to drive the Total  Volatile Organic Compound sensor.
         * </returns>
         */
        public static YTvoc FindTvocInContext(YAPIContext yctx, string func)
        {
            YTvoc obj;

            obj = (YTvoc)YFunction._FindFromCacheInContext(yctx, "Tvoc", func);
            if (obj == null)
            {
                obj = new YTvoc(yctx, func);
                YFunction._AddToCache("Tvoc", func, obj);
            }
            return(obj);
        }
Пример #28
0
        /**
         * <summary>
         *   Retrieves a LED for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the LED is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YLed.isOnline()</c> to test if the LED is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a LED by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the LED
         * </param>
         * <returns>
         *   a <c>YLed</c> object allowing you to drive the LED.
         * </returns>
         */
        public static YLed FindLedInContext(YAPIContext yctx, string func)
        {
            YLed obj;

            obj = (YLed)YFunction._FindFromCacheInContext(yctx, "Led", func);
            if (obj == null)
            {
                obj = new YLed(yctx, func);
                YFunction._AddToCache("Led", func, obj);
            }
            return(obj);
        }
Пример #29
0
        /**
         * <summary>
         *   Retrieves a monitor for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the monitor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YWakeUpMonitor.isOnline()</c> to test if the monitor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a monitor by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the monitor
         * </param>
         * <returns>
         *   a <c>YWakeUpMonitor</c> object allowing you to drive the monitor.
         * </returns>
         */
        public static YWakeUpMonitor FindWakeUpMonitorInContext(YAPIContext yctx, string func)
        {
            YWakeUpMonitor obj;

            obj = (YWakeUpMonitor)YFunction._FindFromCacheInContext(yctx, "WakeUpMonitor", func);
            if (obj == null)
            {
                obj = new YWakeUpMonitor(yctx, func);
                YFunction._AddToCache("WakeUpMonitor", func, obj);
            }
            return(obj);
        }
        /**
         * <summary>
         *   Retrieves an accelerometer for a given identifier in a YAPI context.
         * <para>
         *   The identifier can be specified using several formats:
         * </para>
         * <para>
         * </para>
         * <para>
         *   - FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleSerialNumber.FunctionLogicalName
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionIdentifier
         * </para>
         * <para>
         *   - ModuleLogicalName.FunctionLogicalName
         * </para>
         * <para>
         * </para>
         * <para>
         *   This function does not require that the accelerometer is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YAccelerometer.isOnline()</c> to test if the accelerometer is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   an accelerometer by logical name, no error is notified: the first instance
         *   found is returned. The search is performed first by hardware name,
         *   then by logical name.
         * </para>
         * </summary>
         * <param name="yctx">
         *   a YAPI context
         * </param>
         * <param name="func">
         *   a string that uniquely characterizes the accelerometer
         * </param>
         * <returns>
         *   a <c>YAccelerometer</c> object allowing you to drive the accelerometer.
         * </returns>
         */
        public static YAccelerometer FindAccelerometerInContext(YAPIContext yctx, string func)
        {
            YAccelerometer obj;

            obj = (YAccelerometer)YFunction._FindFromCacheInContext(yctx, "Accelerometer", func);
            if (obj == null)
            {
                obj = new YAccelerometer(yctx, func);
                YFunction._AddToCache("Accelerometer", func, obj);
            }
            return(obj);
        }