POD

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.hardware.pod
Class POD

    java.lang.Object
      org.ocap.hardware.pod.POD

    public class POD

extends Object

This class provides an access to functions and information of the OpenCable CableCARD device on the OCAP Host device. The following functions and information are provided.

- Get a list of all applications in the CableCARD device.
- Get Feature list supported by the Host.
- Get a manufacture ID and a version number of the CableCARD device.
- Get a current status of the CableCARD device.
- Update the Feature parameter in the Host.
- Reject updating of the Feature parameter in the Host.

Method Summary
`PODApplication[]` | `getApplications()` This method returns the CableCARD device applications listed in the Application_info_cnf() APDU defined in the OpenCable CableCARD Interface specification.
`int[]` | `getHostFeatureList()` This method returns a list of the Feature IDs supported by the Host device.
`byte[]` | `getHostParam(int featureID)` This method returns the current Feature parameter value in the Host device for the specified Feature ID.
`static POD` | `getInstance()` This method returns the sole instance of the POD class.
`int` | `getManufacturerID()` This method returns a CableCARD device manufacturer ID.
`int` | `getVersionNumber()` This method returns a CableCARD device version number.
`boolean` | `isReady()` This method provides a current status of the CableCARD device.
`void` | `setHostParamHandler(HostParamHandler handler)` This method sets an instance of a class that implements the HostParamHandler interface.
`boolean` | `updateHostParam(int featureID, byte[] value)` This method updates the Feature parameter value in the Host device.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static POD getInstance()

  This method returns the sole instance of the POD class. The POD instance is either a singleton for each OCAP application or a singleton for an entire OCAP implementation.

  Returns:
    a singleton POD instance.
  Throws:
    `SecurityException` - if the caller does not have MonitorAppPermission("podApplication").

### isReady

    public boolean isReady()

  This method provides a current status of the CableCARD device.

  Returns:
    true if the CableCARD device has completed the booting process.

### getManufacturerID

    public int getManufacturerID()

  This method returns a CableCARD device manufacturer ID.

  Returns:
    a pod_manufacturer_id in the Application_info_cnf() APDU defined in [CCIF 2.0].
  Throws:
    `IllegalStateException` - if the CableCARD is not ready, i.e., the `isReady()` method returns false.

### getVersionNumber

    public int getVersionNumber()

  This method returns a CableCARD device version number.

  Returns:
    pod_version_number in the Application_info_cnf() APDU defined in [CCIF 2.0].
  Throws:
    `IllegalStateException` - if the CableCARD is not ready, i.e., the `isReady()` method returns false.

### getApplications

    public PODApplication[] getApplications()

  This method returns the CableCARD device applications listed in the Application_info_cnf() APDU defined in the OpenCable CableCARD Interface specification.

  Note that the Host need not to send the Application_info_req APDU. It may cache the information.

  Returns:
    a list of CableCARD device applications in the CableCARD device.
  Throws:
    `IllegalStateException` - if the CableCARD is not ready, i.e., the `isReady()` method returns false.

### getHostFeatureList

    public int[] getHostFeatureList()

  This method returns a list of the Feature IDs supported by the Host device. Feature ID is defined in the OpenCable CableCARD Interface specification.

  Returns:
    a list of Feature IDs supported by the Host device.

### updateHostParam

    public boolean updateHostParam(int featureID,
                                   byte[] value)

  This method updates the Feature parameter value in the Host device. In this method call, the `HostParamHandler.notifyUpdate(int, byte[])` method shall be called. The notifyUpdate() method may reject update of the Feature parameter and also the Host device may reject it. The updated Feature parameter shall be notified to the CableCARD device according to [CCIF 2.0] after this method returns, but this method doesn't confirm a successful notification to the CableCARD device.

  The Feature ID and Feature parameter format is defined in [CCIF 2.0]. See also the `HostParamHandler` for more information.

  Note that the `HostParamHandler.notifyUpdate(int, byte[])` method shall be called before the Feature parameter is updated by this method call.

  Parameters:
    `featureID` - a Feature ID to be updated. Feature ID is defined in [CCIF 2.0]. The Feature ID reserved for proprietary use (0x70 - 0xFF) can be specified.
    `value` - a new Feature parameter value for the specified featureID. An actual format of each Feature parameter is defined in [CCIF 2.0]. For example, if the featureID is 0x1, the value is
    `Rf_output_channel() {
    Output_channel
    Output_channel_ui
    }
    `
  Returns:
    `true` if update was successful. `false` if rejected by the Host.
  Throws:
    `IllegalArgumentException` - if the specified featureID is not in a range of 0 <= featureID <= 0xFF, or the value is null.
  See Also:
    `HostParamHandler`

### getHostParam

    public byte[] getHostParam(int featureID)

  This method returns the current Feature parameter value in the Host device for the specified Feature ID. The Feature ID and Feature parameter format is defined in [CCIF 2.0]. See also the `HostParamHandler` for more information.

  Parameters:
    `featureID` - a Feature ID defined in [CCIF 2.0]. The Feature ID reserved for proprietary use (0x70 - 0xFF) can be specified.
  Returns:
    a current Feature parameter value for the specified featureID. For example, if the featureID is 0x1, the value is
    `Rf_output_channel() {
    Output_channel
    Output_channel_ui
    }
    ` An array of length zero, if the specified featureID is not supported.
  Throws:
    `IllegalArgumentException` - if the specified featureID is not in a range of 0 <= featureID <= 0xFF.
  See Also:
    `HostParamHandler`

### setHostParamHandler

    public void setHostParamHandler(HostParamHandler handler)

  This method sets an instance of a class that implements the HostParamHandler interface. Only one instance of such class can be set to the OCAP system. Multiple calls of this method replace the previous instance by a new one. By default, no HostParamHandler is set, i.e., all update of Feature parameter is decided by the Host device.

  Parameters:
    `handler` - an instance of a class that implements the HostParamHandler. if `null` is specified, the current HostParamHandler is removed.
  See Also:
    `HostParamHandler`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD