r759 - in oipf/js: impl initObj
Author: ygrego Date: 2015-02-02 16:54:52 +0000 (Mon, 02 Feb 2015) New Revision: 759 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/759 Log: Adding of classes 'Tuner', 'LocalSystem', 'Channel'(From ChannelConfig) into 'init.js' because they are useful for 'ChannelConfig' and 'ConfigurationOject'. Beginning implementation of 'ConfigurationOject' to simulate channel line-up from a terminal tuner. Modified: oipf/js/impl/ChannelConfig.js oipf/js/impl/ConfigurationObject.js oipf/js/impl/VideoBroadcastObject.js oipf/js/initObj/init.js Modified: oipf/js/impl/ChannelConfig.js =================================================================== --- oipf/js/impl/ChannelConfig.js 2015-02-02 13:08:18 UTC (rev 758) +++ oipf/js/impl/ChannelConfig.js 2015-02-02 16:54:52 UTC (rev 759) @@ -106,38 +106,4 @@ onChannelListUpdate: function() { } -}); - -// Used in the channelType property to indicate a TV channel. -channelConstants ={"TYPE_TV" : 0}; - -var Channel = Class.extend({ - - /* - * Description The type of channel. The value MAY be indicated by one of the TYPE_* constants defined above. If the - * type of the channel is unknown then the value SHALL be “ undefined ”. - * NOTE: Values of this type between 256 and 511 are reserved for use by related specifications on request by - * liaison. - * - * Visibility Type: readonly Integer - */ - channelType: null, - - /* - * Description: - * The name of the channel. Can be used for linking analog channels without CNI. Typically, it will contain the - * call sign of the station (e.g. 'HBO'). - * - * - * Type: String - */ - name: null, - - - init: function(name , channelType) { - this.name = name; - this.channelType = channelConstants[channelType]; - } - - -}); \ No newline at end of file +}); Modified: oipf/js/impl/ConfigurationObject.js =================================================================== --- oipf/js/impl/ConfigurationObject.js 2015-02-02 13:08:18 UTC (rev 758) +++ oipf/js/impl/ConfigurationObject.js 2015-02-02 16:54:52 UTC (rev 759) @@ -1,7 +1,51 @@ +/* +* Description: +* The OITF SHALL implement the “ application/oipfConfiguration ” object as defined below. This object +* provides an interface to the configuration and user settings facilities within the OITF. +*/ var ConfigurationObject = Class.extend({ + /* + * Description: + * Accesses the configuration object that sets defaults and shows system settings. + * + * Visibilité Type: readonly Configuration + */ + configuration: null, + + /* + * Description: + * Accesses the object representing the platform hardware. + * + * Visibilité Type: readonly LocalSystem + */ + localSystem: null, + init : function(){ + + }, + /* + * Description: + * The function that is called when the IP address of a network interface has changed. The specified function + * is called with two arguments (NetworkInterface)item and (String)ipAddress . The ipAddress may have the value undefined if a previously assigned address has been * lost. + * + */ + onIpAddressChange: function(item, ipAddress) { + } -}); \ No newline at end of file + +}); + +/* +* Description: +* The LocalSystem object allows hardware settings related to the local device to be read and modified. +* Note: The standbyState property has been removed from this class. +* +*/ +var LocalSystem = Class.extend({ + + + +}) \ No newline at end of file Modified: oipf/js/impl/VideoBroadcastObject.js =================================================================== --- oipf/js/impl/VideoBroadcastObject.js 2015-02-02 13:08:18 UTC (rev 758) +++ oipf/js/impl/VideoBroadcastObject.js 2015-02-02 16:54:52 UTC (rev 759) @@ -89,7 +89,7 @@ * call to bindToCurrentChannel() completes. Applications which do not need to call bindToCurrentChannel() should not do so. The current channel can * be obtained from the currentChannel property on the ApplicationPrivateData object which is the same as that on the video/broadcast object under most normal * conditions. */ - playstate: 0, + playstate: null, /* * Description: @@ -112,6 +112,7 @@ */ allocationMethod: null, + createdCallback: function() { console.log("[INFO] createdCallback called."); //this.width= "128"; @@ -124,6 +125,7 @@ init: function() { console.log("[INFO] constructor of VideoBroadcast class called."); + this.playstate = 0; }, /*! Modified: oipf/js/initObj/init.js =================================================================== --- oipf/js/initObj/init.js 2015-02-02 13:08:18 UTC (rev 758) +++ oipf/js/initObj/init.js 2015-02-02 16:54:52 UTC (rev 759) @@ -1,7 +1,169 @@ -var oipfObjectFactory = new OipfObjectFactory(); -var metadata = data; +// Used in the channelType property to indicate a TV channel. +CHANNEL_CONSTANT ={"TYPE_TV" : 0}; document.registerElement('video-broadcast', { - prototype: VideoBroadcastObject.prototype, - extends: "object" -}); \ No newline at end of file + prototype: VideoBroadcastObject.prototype, + extends: "object" +}); + +/* +* Description: +* The LocalSystem object allows hardware settings related to the local device to be read and modified. +* +* Note: The standbyState property has been removed from this class. +*/ +var LocalSystem = Class.extend({ + + init: function() { + + } + +}); + +/* +* Description: +* The Channel object represents a broadcast stream or service. +* Channel objects typically represent channels stored in the channel list (see section 7.13.10). Channel objects may also +* represent locally defined channels created by an application using the createChannelObject() methods on the +* video/broadcast embedded object or the ChannelConfig class or the createChannelList() method on the +* ChannelConfig class. Accessing the channel property of a ScheduledRecording object or Recording object +* which is scheduled on a locally defined channel SHALL return a Channel object representing that locally defined +* channel. +* Except for the hidden property, writing to the writable properties on a Channel object SHALL have no effect for +* Channel objects representing channels stored in the channel list. Applications SHOULD only change these writable +* properties of a locally defined channel before the Channel object is referenced by another object or passed to an API +* call as an input parameter. The effects of writing to these properties at any other time is implementation dependent. +* The LocalSystem object allows hardware settings related to the local device to be read and modified. +* +* Note: The standbyState property has been removed from this class. +*/ +var Channel = Class.extend({ + + /* + * Description: + * The type of channel. The value MAY be indicated by one of the TYPE_* constants defined above. If the + * type of the channel is unknown then the value SHALL be “ undefined ”. + * NOTE: Values of this type between 256 and 511 are reserved for use by related specifications on request by + * liaison. + * + * Visibility Type: readonly Integer + */ + channelType: null, + + /* + * Description: + * The name of the channel. Can be used for linking analog channels without CNI. Typically, it will contain the + * call sign of the station (e.g. 'HBO'). + * + * Type: String + */ + name: null,init: function() { + + }, + + + init: function(name , channelType) { + this.name = name; + this.channelType = CHANNEL_CONSTANT[channelType]; + } + + +}); + +/* +* Description: +* A Tuner object represents the source of broadcast content provided through a physical tuner in the OITF. Each Tuner +* object is represented by a <video_broadcast> element in the capability description as defined in section 9.3.1. +* A Tuner object that is capable of tuning at the same time to multiple transponders SHALL have the nrstreams attribute +* of the <video_broadcast> element set to a value equal to the number of transponders. +* A Tuner object that is capable of tuning to transponders of different types SHALL include all those types in the types +* attribute of the <video_broadcast> element. +* NOTE: An OITF may contain a physical tuner that has its capabilities split into multiple Tuner objects to fit the +* restrictions on the <video_broadcast> element outlined above and in section 9.3.1. +* +* Note: The standbyState property has been removed from this class. +*/ +var Tuner = Class.extend({ + + /* + * Description: A unique identifier of the tuner. + * + * Visibility Type: readonly Integer + */ + id: null, + + /* + * Description: The name of the tuner as designated in OITF. + * + * Visibility Type: readonly String + */ + name: null, + + /* + * Description: Returns a collection of the types supported by the tuner. The types are according to the ID types in section 7.13.11.1 under Channel object. + * + * Visibility Type: readonly IntegerCollection + */ + idTypes: null, + + /* + * Description: + * The property enables ( true ) and disables ( false ) the tuner. Reading the property provides the current + * state, enabled or disabled. Attempting to disable the tuner while the resource is in use has no effect and the tuner SHALL continue to be enabled. + * While disabled: + * • any external power feed (if applicable) SHALL be turned off; + * • the value of the signalInfo property is not defined; + * • the value of the lnbInfo property is not defined; + * • the tuner SHALL NOT be available for use by any JavaScript object (e.g. the video/broadcast object) or by the underlying OITF system (e.g. to perform a * scheduled recording). Note the property enableTuner is available in order to re-enable the tuner and get access to the tuner again. + * + * The set value of the property SHALL persist after OITF restarts. + * + * Type: Boolean + */ + enableTuner: null, + + /* + * Description: The property returns a SignalInfo object with signal information for example signal strength. + * + * Visibility Type: readonly SignalInfo + */ + signalInfo: null, + + /* + * Description: The property returns a LNBInfo object with information regarding the LNB associated with the tuner. + * + * Visibility Type: readonly LNBInfo + */ + lnbInfo: null, + + /* + * Description: Indicates the physical interface associated with the tuner. + * + * Visibility Type: readonly Integer + */ + frontEndPosition: null, + + /* + * Description: + * The property turns on (true) and off (false) the power applied to the external interface of the tuner unless the + * tuner is disabled. Reading the property provides the current value, on or off. Attempting to modify the + * property while the resource is in use has no effect. The value of the property SHALL persist after OITF + * restarts. + * For DVB-S/S2 power is supplied to the LNB(s) and if present the DiSEqC switch. + * For DVB-T/T2 a supply +5V is supplied to the antenna with built in amplifier. Note that applying power may + * have adverse effects to the external equipment if it has its own power supply. It is a strong recommendation + * to indicate to the end user a possible adverse effect before using this method. + * For DVB-C/C2 there is no effect. + * Reading the property provides the current value. + * + * Type: Boolean + */ + powerOnExternal: null, + + init: function() { + + } + +}); +var oipfObjectFactory = new OipfObjectFactory(); +var metadata = data; \ No newline at end of file
participants (1)
-
ygrego@users.nuiton.org