1. Field of the Invention
The present invention relates to processing performed to remove an abnormality on a data communication line, and to a printing process for the transmission of data along, for example, an IEEE 1394 line.
2. Related Background Art
Since for the performance of a communication process across a so-called centronics line only an image data source and a printer are connected together, basically, even when a physical line is disconnected, the canceling of a session is not required unless a user physically breaks the connection. And when data are being transmitted to other apparatuses, if a lower layer is disconnected from a line, accordingly an upper layer is immediately disconnected from the line.
Assume that, as provided for by the IEEE 1394 specification, a plurality of image data sources and a plurality of printers are connected together along a single, closed communication line. If, for example, one of the image sources that is connected to the line and that is transmitting data is disconnected, and if a printer that during a session communicates with that image data source continues to be connected to the source, as with a centronics line, the printer will be unable to transmit data to other image data sources on the line.
If an upper layer is disconnected immediately after a lower layer is disconnected, or if the disconnection and the re-connection of a line is performed due to the careless performance of an operation by a user or due to a rearrangement of apparatuses, the printing process must be repeated from the beginning. As a result, an undesirable, excessive expenditure of time, paper and ink (toner, etc.) occurs.
It is, therefore, one objective of the present invention to provide a communication control apparatus and a communication control method for re-connecting a system that, during a data transmission session, has been disconnected from a line due to the careless performance of an operation by a user, and a storage medium therefor.
To achieve the above objective, according to the present invention, a communication control apparatus comprises:
control means for, if a lower layer is disconnected while data is being transmitted to an apparatus, permitting an upper layer to continue to maintain a session for a predetermined period of time, and for, if a line connection is re-established within the predetermined period of time, permitting the upper layer to establish a connection for the transmission of data.
Further, according to the present invention, a communication control method comprises:
a control step for, if a lower layer is disconnected while data is being transmitted to an apparatus, permitting an upper layer to continue to maintain a session for a predetermined period of time, and for, if a line connection is re-established within the predetermined period of time, permitting the upper layer to establish a connection for the transmission of data.
Furthermore, according to the present invention, provided is a storage medium, on which is stored a communication control program, the communication control program comprising:
a control step for, if a lower layer is disconnected while data is being transmitted to an apparatus, permitting an upper layer to continue to maintain a session for a predetermined period of time, and for, if a line connection is re-established within the predetermined period of time, permitting the upper layer to establish a connection for the transmission of data.
The preferred embodiments of the present invention will now be described in detail while referring to the accompanying drawings.
(First Embodiment)
It should be noted that, even though not specifically described, in the host computer the CPU 1 controls the RAM 2, the memory 3, the input unit 4, and the IEEE 1394 controller 5, via the main bus 8. In the printer, the CPU 11 controls the RAM 12, the ROM 13, the IEEE 1394 controller 15, and the printer engine 16, via the main bus 18.
In the host computer, the processing to be performed in accordance with the present invention is divided into a print data transmission program and a bus reset interrupt processing program. In the printer, the processing to be performed in accordance with the present invention is divided into a print data reception program and a bus reset interrupt processing program.
It is assumed that SBP-2 is automatically logged out when a specified apparatus is disconnected from the bus.
The print data transmission program for the host computer will now be described while referring to
First, the program waits for print data to be prepared and for a printing request to be issued by a user (S401).
When a printing request is issued, an application in the host computer produces additional print data based on the data prepared by the user (S402). To initiate the transmission of data to the printer, a login process for the printer is performed in accordance with the rules established for SBP-2 by the IEEE 1394 controller 5 connected to the IEEE 1394 line (S403). A check is then performed to determine whether the login was successful (S404). If the login was not successful, it is assumed that the operating condition of the printer is abnormal or that the printer is busy, and a user is notified via the user I/F display 6 that the printer can not be used at the present (S405). Thereafter, the print data that were prepared are cleared (S406).
If the login was successful, however, login identifier “NULL” is transmitted along the IEEE 1394 line, via the IEEE 1394 controller 5, to the printer, in order to notify the printer that a new printing request has been received (S407). Then, the program waits for the reception of a login identifier that is issued by the printer relative to the printing request (S408). Upon receiving the login identifier, its value is stored in a “PRNLOGINID” area in the RAM 2 (S409). Thereafter, the user is requested to enter the time for the session time-out via the user I/F display 6 (S410). The program then waits for the user to employ the input unit 4 to enter the time for the session time-out (S411). When the user enters the time, its value is stored in a “SESSIONTIME” area in the RAM 2 (S412), and the value stored in the “SESSIONTIME” area in the RAM 2 is transmitted via the IEEE 1394 controller 5 and the IEEE 1394 line to the printer (S413). Then the transmission of the print data to the printer is begun via the IEEE controller 5 and the IEEE 1394 line (S414). When the printer data have been transmitted, the data transmission process is terminated (S415), and by logging out the printer, which is performed in accordance with the rules established for SBP-2, the communication process is also terminated (S416). Then, the process at step S401 is performed while the program waits for the next printing request.
An explanation will now be given, while referring to
This processing is performed in accordance with a host computer interrupt program that is initiated by an IEEE 1394 bus reset.
When an interrupt occurs (S500), a check is performed to determine whether the interrupt is the result of an IEEE 1394 bus reset at a lower layer shown in
When print data are being transmitted, a check is performed to determine, via the IEEE 1394 controller 5 on the IEEE 1394 line, whether a printer in a session is currently connected to the bus (S504). If the printer in the session is connected, it is assumed that the bus reset does not adversely affect the communications performed by the printer and the interrupt process is terminated (S522). If the pertinent printer is not connected, it is assumed that the printer that is receiving data is not connected to the bus, and a logout process for the internal communication performed by the host computer (an abnormality end process) is performed (S505). The timer for the host computer is started and measures the elapsed time since the printer was disconnected from the bus (S506). The elapsed time is stored in an area “TIME” in the RAM 2. A value in “TIME” is then compared with a value in “SESSIONTIME” (S507).
When the value in “TIME” is ≧the value in “SESSIONTIME”, it is assumed that the session time has expired, and print data stored in the host computer are cleared (S519) and all the tasks associated with the transmission of print data are initialized (S520). Then, the user is notified via the user I/F display 6 that printing has been halted (S521). The processing is thereafter terminated (S522).
When the value in “TIME” is <the value in “SESSIONTIME”, it is assumed that the session time has not yet expired, and a check is performed to determine whether the printer in the session has been reconnected to the bus (S508). If the printer has not yet been re-connected, the process at step S507 is repeated.
When the printer in use during the session has been re-connected, the login of the printer in the session is again performed in accordance with the rules established for SBP-2 (S509). A check is thereafter performed to determine whether the login has been successful (S510). If the login has not been successful, it is assumed that an abnormality has occurred at the printer, and the user is notified via the user I/F display 6 that the printer can not presently be used (S517). Thereafter, print data stored in the host computer are cleared (S518), and all the tasks associated with the transmission of print data are initialized. If the login has been successful, however, a login ID that is stored as a login identifier in area “PRNLOGINID” is transmitted along the IEEE 1394 line via the IEEE 1394 controller 5 (S511), and reception of permission for continuous reception by the printer is waited for (S512). If permission for continuous reception is not received, the printer is logged out to clear the print data, and all the tasks concerning the transmission of print data are initialized. But when continuous reception is permitted, transmission of print data to the printer is resumed (S513). When the print data have been transmitted, the transmission process is terminated (S514) and the logging out of the printer is performed in accordance with the rules established for SBP-2 for the termination of communication (S515). Then all the tasks associated with the transmission of print data are initialized (S516). The processing is thereafter terminated (S522).
The processing for receiving print data when the printer is operating normally will now be described while referring to
A check is performed to determine whether a login request output along the IEEE 1394 line by the host computer has been received via the IEEE 1394 controller 15 (S601). When a login request has been received, sequentially, checks are performed to determine whether a login identifier has been received (S602), and when one is received, whether the received identifier is a “NULL” (S603). If the login identifier is a “NULL”, it is assumed that the received request is a new printing request, and a new login identifier is issued and is stored in area “LOGINID” in the RAM 12 (S604). Thereafter, the login identifier is transmitted to the host computer (S611) and the reception of a session time from the host computer is waited for (S612). When the session time is received, its value is stored in area “SESSIONTIME” in the RAM 12 (S613). Following this, print data output along the IEEE 1394 line by the host computer are received via the IEEE 1394 controller 15 (S614). After the reception of print data has ended (S615) and a logout notification has been received from the host computer (S616), the communication process is terminated. Printing is then initiated by the printer engine 16 (S610).
If the received login identifier is not a “NULL”, however, it is assumed that the request is for the continuous transmission of print data that has been halted, and a check is performed to determine whether the print data for the received login identifier are valid (S604). When the print data are not valid, an abnormal end notification is transmitted to the host computer to terminate the communication process (S605), the printer is initialized (S606), and the process at step S601 is repeated.
When the received print data are valid, permission for continuous reception is transmitted via the IEEE 1394 controller 15 and along the IEEE 1394 line to the host computer (S607), and the reception of print data from the host computer is resumed (S608). When the reception of data has been completed (S609) and a logout notification has been received from the host computer, the communication process is terminated (S616) and printing is initiated by the printer engine 16 (S610). Thereafter, the process at step S601 is repeated.
An explanation will now be given, while referring to
This processing is performed by a program for processing an interrupt that occurs as the result of an IEEE 1394 bus reset.
When an interrupt has occurred (S700), a check is performed to determine whether the interrupt is the result of an IEEE 1394 bus reset (S701). If the interrupt is not the result of a bus reset, an interrupt routine that corresponds to the cause of the interrupt is activated, the appropriate processing is performed (S702), and the processing is thereafter terminated (S710). However, if the interrupt was the result of a bus reset, a check is performed to determine, via the IEEE 1394 controller 5 and the IEEE 1394 line, whether the host computer in the session is currently connected to the bus (S703). If the host computer in the session is connected to the bus, it is assumed that the bus reset has not adversely affected communication by the printer and the interrupt process is terminated (S710). If the host computer in the session is not connected, it is assumed that the host computer that was transmitting the data has been disconnected from the bus and a logout process is performed inside the printer (an abnormal end process) (S704). The timer for the printer is activated to measure the time that has elapsed since the host computer was disconnected from the bus, and the elapsed time is stored in area “TIME” in the RAM 12 (S705). Thereafter, the value stored in “TIME” is compared with the value stored in “SESSIONTIME” (S706).
If the value stored in “TIME”≧the value stored in “SESSIONTIME”, it is assumed that the session time has expired and the print data that are stored in the printer are cleared (S708). Then, all the tasks concerning the transmission of print data are initialized (S709) and the processing is thereafter terminated (S710).
If the value stored in “TIME”<the value in “SESSIONTIME”, it is assumed that the session time has not yet expired, and a check is performed to determine whether the host computer in the session has been reconnected to the bus (S707). If the host computer has not been re-connected, the process at step S706 is repeated.
If the host computer in the session has been reconnected, the processing is thereafter terminated (S710).
An explanation will now be given, while referring to
The lower layer of the OSI seven layer model includes a physical layer, a data link layer, a network layer and a transport layer; and the upper layer includes a session layer, a presentation layer and an application layer. When the individual layers are compared with the means provided by the present invention, it is apparent that the functions of the upper layer are implemented by the control provided by the programs shown in
(Second Embodiment)
While in the first embodiment the session time is set by a user, the session time can be fixed by a system. Further, in the first embodiment, the session time for the disconnection of the host computer from the bus is equal that for the disconnection of the printer. However, a different session time can be set for each case.
(Third Embodiment)
In the first embodiment, the IEEE 1394 line is employed by the host computer to transmit data to the printer. However, it can be easily understood that a great economical effect can be obtained when this control method is applied when transmitting a large amount of data along a line for which a transmission fee is charged.
According to the present invention, if a plurality of image sources and a plurality of printers can be connected to a single, closed communication line like the IEEE 1394, and if an image data source in a connection that is transmitting data is disconnected from the line, the printer can exchange data with another image source along another line so long as a predetermined time has expired.
Since the upper layer is not immediately disconnected upon the disconnection of the lower layer, even when the disconnection and the re-connection of a line occurs due to a careless mistake or the rearrangement of apparatuses by a user, the continuous transmission of data can be sustained so long as the line connection is re-established within a predetermined time. As a result, as concerns printing, paper, time and ink (toner) are not wasted.
According to the present invention, even if a line disconnection occurs, data received before then can be effectively employed.
Number | Date | Country | Kind |
---|---|---|---|
10-205081 | Jul 1998 | JP | national |
This application is a continuation of application Ser. No. 09/357,976, filed Jul. 21, 1999, now U.S. Pat. No. 6,665,719.
Number | Name | Date | Kind |
---|---|---|---|
5027269 | Grant et al. | Jun 1991 | A |
5546382 | Fujino | Aug 1996 | A |
5867636 | Walker | Feb 1999 | A |
6085247 | Parsons, Jr. et al. | Jul 2000 | A |
6160843 | McHale et al. | Dec 2000 | A |
6233543 | Butts et al. | May 2001 | B1 |
6298060 | Miyakawa et al. | Oct 2001 | B1 |
6341312 | French et al. | Jan 2002 | B1 |
Number | Date | Country | |
---|---|---|---|
20040039824 A1 | Feb 2004 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09357976 | Jul 1999 | US |
Child | 10635567 | US |