Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        /**
         * <summary>
         *   Retrieves a pressure sensor for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindPressure(string func)
        {
            YPressure obj;

            obj = (YPressure)YFunction._FindFromCache("Pressure", func);
            if (obj == null)
            {
                obj = new YPressure(func);
                YFunction._AddToCache("Pressure", func, obj);
            }
            return(obj);
        }
Exemplo n.º 3
0
        /**
         * <summary>
         *   Retrieves a monitor for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindWakeUpMonitor(string func)
        {
            YWakeUpMonitor obj;

            obj = (YWakeUpMonitor)YFunction._FindFromCache("WakeUpMonitor", func);
            if (obj == null)
            {
                obj = new YWakeUpMonitor(func);
                YFunction._AddToCache("WakeUpMonitor", func, obj);
            }
            return(obj);
        }
Exemplo n.º 4
0
        /**
         * <summary>
         *   Retrieves a range finder for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindRangeFinder(string func)
        {
            YRangeFinder obj;

            obj = (YRangeFinder)YFunction._FindFromCache("RangeFinder", func);
            if (obj == null)
            {
                obj = new YRangeFinder(func);
                YFunction._AddToCache("RangeFinder", func, obj);
            }
            return(obj);
        }
Exemplo n.º 5
0
        /**
         * <summary>
         *   Retrieves a Total  Volatile Organic Compound sensor for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindTvoc(string func)
        {
            YTvoc obj;

            obj = (YTvoc)YFunction._FindFromCache("Tvoc", func);
            if (obj == null)
            {
                obj = new YTvoc(func);
                YFunction._AddToCache("Tvoc", func, obj);
            }
            return(obj);
        }
        /**
         * <summary>
         *   Retrieves a generic sensor for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindGenericSensor(string func)
        {
            YGenericSensor obj;

            obj = (YGenericSensor)YFunction._FindFromCache("GenericSensor", func);
            if (obj == null)
            {
                obj = new YGenericSensor(func);
                YFunction._AddToCache("GenericSensor", func, obj);
            }
            return(obj);
        }
Exemplo n.º 7
0
        /**
         * <summary>
         *   Retrieves an altimeter for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindAltitude(string func)
        {
            YAltitude obj;

            obj = (YAltitude)YFunction._FindFromCache("Altitude", func);
            if (obj == null)
            {
                obj = new YAltitude(func);
                YFunction._AddToCache("Altitude", func, obj);
            }
            return(obj);
        }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
0
        /**
         * <summary>
         *   Retrieves a current sensor for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindCurrent(string func)
        {
            YCurrent obj;

            obj = (YCurrent)YFunction._FindFromCache("Current", func);
            if (obj == null)
            {
                obj = new YCurrent(func);
                YFunction._AddToCache("Current", func, obj);
            }
            return(obj);
        }
Exemplo n.º 10
0
        /**
         * <summary>
         *   Retrieves an audio output for a given identifier.
         * <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 output is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YAudioOut.isOnline()</c> to test if the audio output is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   an audio output 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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <param name="func">
         *   a string that uniquely characterizes the audio output, for instance
         *   <c>MyDevice.audioOut1</c>.
         * </param>
         * <returns>
         *   a <c>YAudioOut</c> object allowing you to drive the audio output.
         * </returns>
         */
        public static YAudioOut FindAudioOut(string func)
        {
            YAudioOut obj;

            obj = (YAudioOut)YFunction._FindFromCache("AudioOut", func);
            if (obj == null)
            {
                obj = new YAudioOut(func);
                YFunction._AddToCache("AudioOut", func, obj);
            }
            return(obj);
        }
Exemplo n.º 11
0
        /**
         * <summary>
         *   Retrieves a digital IO port for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindDigitalIO(string func)
        {
            YDigitalIO obj;

            obj = (YDigitalIO)YFunction._FindFromCache("DigitalIO", func);
            if (obj == null)
            {
                obj = new YDigitalIO(func);
                YFunction._AddToCache("DigitalIO", func, obj);
            }
            return(obj);
        }
Exemplo n.º 12
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);
        }
Exemplo n.º 13
0
        /**
         * <summary>
         *   Retrieves a filesystem for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindFiles(string func)
        {
            YFiles obj;

            obj = (YFiles)YFunction._FindFromCache("Files", func);
            if (obj == null)
            {
                obj = new YFiles(func);
                YFunction._AddToCache("Files", func, obj);
            }
            return(obj);
        }
Exemplo n.º 14
0
        /**
         * <summary>
         *   Retrieves a function for a given identifier.
         * <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 function is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YFunction.isOnline()</c> to test if the function is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a 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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <param name="func">
         *   a string that uniquely characterizes the function, for instance
         *   <c>MyDevice.</c>.
         * </param>
         * <returns>
         *   a <c>YFunction</c> object allowing you to drive the function.
         * </returns>
         */
        public static YFunction FindFunction(string func)
        {
            YFunction obj;

            obj = (YFunction)YFunction._FindFromCache("Function", func);
            if (obj == null)
            {
                obj = new YFunction(func);
                YFunction._AddToCache("Function", func, obj);
            }
            return(obj);
        }
Exemplo n.º 15
0
        /**
         * <summary>
         *   Retrieves a segmented display for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindSegmentedDisplay(string func)
        {
            YSegmentedDisplay obj;

            obj = (YSegmentedDisplay)YFunction._FindFromCache("SegmentedDisplay", func);
            if (obj == null)
            {
                obj = new YSegmentedDisplay(func);
                YFunction._AddToCache("SegmentedDisplay", func, obj);
            }
            return(obj);
        }
Exemplo n.º 16
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);
        }
Exemplo n.º 17
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);
        }
Exemplo n.º 18
0
        /**
         * <summary>
         *   Retrieves a PWM generator for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindPwmOutput(string func)
        {
            YPwmOutput obj;

            obj = (YPwmOutput)YFunction._FindFromCache("PwmOutput", func);
            if (obj == null)
            {
                obj = new YPwmOutput(func);
                YFunction._AddToCache("PwmOutput", 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);
        }
Exemplo n.º 20
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);
        }
Exemplo n.º 21
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);
        }
Exemplo n.º 22
0
        /**
         * <summary>
         *   Retrieves a motor for a given identifier.
         * <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 motor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YMotor.isOnline()</c> to test if the motor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   a 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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <param name="func">
         *   a string that uniquely characterizes the motor
         * </param>
         * <returns>
         *   a <c>YMotor</c> object allowing you to drive the motor.
         * </returns>
         */
        public static YMotor FindMotor(string func)
        {
            YMotor obj;

            obj = (YMotor)YFunction._FindFromCache("Motor", func);
            if (obj == null)
            {
                obj = new YMotor(func);
                YFunction._AddToCache("Motor", func, obj);
            }
            return(obj);
        }
Exemplo n.º 23
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);
        }
Exemplo n.º 24
0
        /**
         * <summary>
         *   Retrieves a Bluetooth sound controller for a given identifier.
         * <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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <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 FindBluetoothLink(string func)
        {
            YBluetoothLink obj;

            obj = (YBluetoothLink)YFunction._FindFromCache("BluetoothLink", func);
            if (obj == null)
            {
                obj = new YBluetoothLink(func);
                YFunction._AddToCache("BluetoothLink", func, obj);
            }
            return(obj);
        }
Exemplo n.º 25
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);
        }
Exemplo n.º 26
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);
        }
Exemplo n.º 27
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);
        }
Exemplo n.º 28
0
        /**
         * <summary>
         *   Retrieves an arithmetic sensor for a given identifier.
         * <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 arithmetic sensor is online at the time
         *   it is invoked. The returned object is nevertheless valid.
         *   Use the method <c>YArithmeticSensor.isOnline()</c> to test if the arithmetic sensor is
         *   indeed online at a given time. In case of ambiguity when looking for
         *   an arithmetic 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>
         * <para>
         *   If a call to this object's is_online() method returns FALSE although
         *   you are certain that the matching device is plugged, make sure that you did
         *   call registerHub() at application initialization time.
         * </para>
         * <para>
         * </para>
         * </summary>
         * <param name="func">
         *   a string that uniquely characterizes the arithmetic sensor, for instance
         *   <c>RXUVOLT1.arithmeticSensor1</c>.
         * </param>
         * <returns>
         *   a <c>YArithmeticSensor</c> object allowing you to drive the arithmetic sensor.
         * </returns>
         */
        public static YArithmeticSensor FindArithmeticSensor(string func)
        {
            YArithmeticSensor obj;

            obj = (YArithmeticSensor)YFunction._FindFromCache("ArithmeticSensor", func);
            if (obj == null)
            {
                obj = new YArithmeticSensor(func);
                YFunction._AddToCache("ArithmeticSensor", func, obj);
            }
            return(obj);
        }
Exemplo n.º 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);
        }
Exemplo n.º 30
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);
        }