All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.OcapSystem.html Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version






OcapSystem














org.ocap
Class OcapSystem

java.lang.Object
  extended by org.ocap.OcapSystem

public final class OcapSystem
extends java.lang.Object

This class provides system utility functions.


Method Summary
static void monitorConfiguredSignal()
          Called by the Initial Monitor Application to inform the OCAP implementation it has completed its configuration process and that the boot processing may resume.
static void monitorConfiguringSignal(int port, int timeout)
          Called by the monitor application to inform the OCAP implementation that it is configuring and the boot process may resume after it calls the monitorConfiguredSignal method, see Section 20.2.2.3 Boot Process while connected to the cable network ? CableCARD device present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

monitorConfiguringSignal

public static void monitorConfiguringSignal(int port,
                                            int timeout)
                                     throws java.io.IOException
Called by the monitor application to inform the OCAP implementation that it is configuring and the boot process may resume after it calls the monitorConfiguredSignal method, see Section 20.2.2.3 Boot Process while connected to the cable network ? CableCARD device present.
On invocation of this method, the APIs used for conformance testing, specifically, org.ocap.test.OCAPTest SHALL be initialized for use. This means that the implementation SHALL perform the following actions:
  • a. Open a socket for receiving UDP datagrams on a port, the value of which is specified in the port parameter passed to this method.
  • b. Wait to receive a datagram that contains a string formatted thus: ate:a.b.c.d:xxxx:ppp (string may be null-terminated), where 'a.b.c.d' represents an IPv4 address, and 'xxxx' represents an IP port number, and 'ppp' represents protocol type ('TCP' for TCP/IP and 'UDP' for UDP/IP). Any received datagrams which do not contain a properly formatted payload string SHALL be ignored. Once a datagram with a properly formatted string has been received, the datagram socket SHALL be closed.
  • c. Attempt to establish a TCP or UDP socket connection to the test system using the IPv4 address and port number obtained in b. The protocol type for the socket connection is specified by 'ppp' string in b. This connected socket SHALL be used solely to transmit and receive data originating from the org.ocap.test.OCAPTest APIs and SHALL NOT be accessible to applications through other APIs. The TCP or UDP socket connection shall have a timeout of 'infinite'. If this method does not complete within the specified timeout period, an IOException SHALL be thrown.
  • d. Return control to the caller.

If this method is called with both the port and timeout parameters set to 0, then the OCAP implementation SHALL not enable the conformance testing APIs, which SHALL just return silently, without performing any action.
If the monitor application does not call this method in the time specified in section 20.2.2.3 Boot Process while connected to the cable network - CableCARD device present, then the OCAP implementation SHALL behave the same as if this method had been called with 0 specified for both the port and timeout parameters. If the monitor application does not call this method in the time specified in section 20.2.2.3 Boot Process while connected to the cable network - CableCARD device present, then the implementation SHALL behave the same as if this method had been called with 0 specified for both the port and timeout parameters.

Parameters:
port - the IP port number to listen for datagrams from the test system on.
timeout - the time, in seconds to allow for a communications channel to be established with the test system.
Throws:
java.lang.SecurityException - if application does not have MonitorAppPermission("signal configured").
java.io.IOException - if a communications channel cannot be established with the test system within the amount of time specified by the timeout parameter.

monitorConfiguredSignal

public static void monitorConfiguredSignal()
Called by the Initial Monitor Application to inform the OCAP implementation it has completed its configuration process and that the boot processing may resume. It is recommended that the monitor call this method as soon as possible after the monitorConfiguringSignal method has been called.







© 2015 - 2024 Weber Informatics LLC | Privacy Policy