Embodiments described herein relate generally to a communication terminal and a communication method.
Generally, with the recent progress of information communication, a communication protocol such as ECHONET for controlling instruments in a house is known. In the communication protocol such as ECHONET, a composite telegraphic message form is defined in addition to a basic telegraphic message form. The basic telegraphic message form is a form for controlling or acquiring a single property value in a single request telegraphic message. The composite telegraphic message form is a form for controlling or acquiring a plurality of property values in a single request telegraphic message.
According to an embodiment, a communication terminal receives a request packet of a composite telegraphic message form from a request terminal and transmits a response packet. The communication terminal includes a reception unit, a request processing unit, and a transmission unit. The reception unit is configured to receive a request packet including a packet identifier for identifying a packet, a service type, and a plurality of property information pieces regarding requests. The request processing unit is configured to generate a response packet including only property information of a response corresponding to a request processed according to the service type among the plurality of property information pieces regarding the requests, and the packet identifier. The transmission unit is configured to transmit the response packet to the request terminal.
Embodiments will be described with reference to the drawings. In the following description of the drawings, the same or similar reference numerals are given to the same or similar parts.
As illustrated in
The request terminal 1 and the response terminal 2 are ECHONET nodes, and are communication terminals based on the ECHONET specification. The request terminal 1 and the response terminal 2 are each instrument such as housing equipment, home appliance, or building or store equipment, and a server or the like which monitors, controls, and operates the instrument. In the embodiments, the request terminal 1 is a terminal which transmits a control or acquisition request telegraphic message to the response terminal 2. The response terminal 2 is a terminal which processes the request telegraphic message transmitted from the request terminal 1 and transmits a response telegraphic message to the request telegraphic message.
The response terminal 2 controls a request target object 30 which is an object of a request target or acquires a state on the basis of the request telegraphic message transmitted from the request terminal 1. As illustrated in
In the communication system 4, according to the first embodiment, the request terminal 1 may allow a single request packet to include a plurality of property information pieces. In the first embodiment, particularly, a description will be made of a case where a single request packet includes at least one of acquisition and control as a service type. Specifically, a single request packet may include a plurality of service types by including both acquisition and control or any one thereof as a service type.
The response terminal 2 receives the request packet of a composite telegraphic message form from the request terminal 1 and transmits a response packet. The response terminal 2 allows property information regarding the response in relation to processed property information among a plurality of property information pieces included in the request packet to be included in the response packet. The response terminal 2 may process all the plurality of property information pieces included in the request packet or may not process all the property information pieces.
If the response packet is received from the response terminal 2, the request terminal 1 compares the number of properties included in the request packet with the number of properties included in the response packet so as to determine whether or not all properties regarding the request are processed in the response terminal 2. If all the properties are not processed, the request terminal 1 transmits the request packet again as necessary.
With reference to
The request terminal 1 includes a memory 10 and a controller 13. A predetermined program is executed by the controller 13 of the request terminal 1, and thereby the request terminal 1 performs a process according to the predetermined program so as to refer to or update data stored in the memory 10. The memory 10 of the request terminal 1 stores request packet data 11 and response packet data 12.
The request packet data 11 is data of a packet which is transmitted to the response terminal 2 by the request terminal 1. The request packet data 11 has a composite telegraphic message form, and includes a packet identifier for identifying a packet, a service type, and a plurality of property information pieces regarding a request. Here, the service type indicates a request type and is one of an acquisition request and a control request. The acquisition is to refer to data of a request target object. The control is to control changing or the like in data of a request target object.
The request packet data 11 has a data structure, for example, as illustrated in
An identifier of a request packet transmitted by the request terminal 1 is set in the packet identifier. The same packet identifier is set in a request packet and a response packet to the request packet, and thereby the request terminal 1 can determine a process result in the response terminal 2 by correlating the request packet and the response packet.
The object information is an object defined by the ECHONET specification. The ECHONET specification employs an inter-object communication form. Therefore, an object code of a request source and an object code of a request target are stored in the object information. Here, the object code of the request source is an identifier of an object which is the request source of the request terminal 1. The object code of the request target is an identifier of the request target object 30 of the response terminal 2 illustrated in
The request packet illustrated in
In the example illustrated in
The response packet data 12 is data of a packet which is received from the response terminal 2 by the request terminal 1. The response packet data 12 includes property information of a response to property information regarding a request processed according to a service type among a plurality of property information pieces regarding the request, and a packet identifier. In addition, the response packet data 12 may include a corresponding process result for each service type of the request packet. This process result indicates whether or not the request is successfully processed, and, specifically, “success” or “failure” is set.
The number of property information pieces regarding a response to a request included in the response packet data 12 may be different from the number of requests included in the request packet data 11. The response packet data 12 includes property information regarding a response to only a request processed in the response terminal 2 among a plurality of requests included in the request packet data 11. In addition, the number of process results included in the response packet data 12 may be different from the number of service types included in the request packet data 11. The response packet data 12 includes, for example, only a process result corresponding to a service type in which all property information pieces are processed in the request packet data 11. Therefore, if all of the service types and the property information pieces are processed in the response terminal 2, the number of process results included in the response packet data 12 is the same as the number of service types included in the request packet data 11.
The response packet data 12 has a data structure, for example, as illustrated in
The same values as the packet identifier and the object information of the request packet data 11 are set in the packet identifier and the object information.
The response packet illustrated in
In the example illustrated in
Here, as illustrated in
In addition, the number of property information pieces correlated with the first service type in the request packet maybe different from the number of property information pieces correlated with the first service type in the response packet. The number of property information pieces correlated with the first service type of the request packet illustrated in
As described above, only property information processed in the response terminal 2 is included in the response packet, and thereby there are cases in which the number of service types and the number of process results and the number of property information pieces included in each packet are different in the request packet and the response packet. In addition, if all property information pieces included in the request packet are processed in the response terminal 2, the number of service types is the same as the number of process results, and the number of property information pieces of each packet is also the same, in the request packet data 11 and the response packet data 12.
Next, each unit of the controller 13 of the request terminal 1 will be described. The controller 13 of the request terminal 1 includes a transmission unit 14, a reception unit 15, and a result determination unit 16.
The transmission unit 14 sends the request packet data 11 stored in the memory 10 to the communication network 3 via a communication control device (not illustrated) or the like. The sent request packet data 11 is transmitted to the response terminal 2 which is a request destination according to address information.
The reception unit 15 receives the response packet data 12 via the communication control device or the like and stores the response packet data 12 in the memory 10. The reception unit 15 receives the response packet data 12 from the response terminal 2 which is a transmission destination of the request packet data 11.
The result determination unit 16 determines a process result of the response terminal 2 on the basis of the request packet data 11 transmitted by the transmission unit 14 and the response packet data 12 received by the reception unit 15. Specifically, first, the result determination unit 16 reads the request packet data 11 and the response packet data 12 from the memory 10. Here, a code common to packet identifiers is set in the read request packet data 11 and response packet data 12. For example, if the reception unit 15 receives the response packet data 12, the result determination unit 16 specifies the request packet data 11 which has the same packet identifier as a packet identifier included in the received response packet data 12, and reads the request packet data 11.
The result determination unit 16 counts the property numbers which are respectively included in the read request packet data 11 and response packet data 12 and determines whether or not the property numbers match each other. If the property numbers match each other, the result determination unit 16 determines that the property information pieces are processed in the response terminal 2 on the basis of the property information regarding all the requests included in the request packet data 11.
If the property numbers do not match each other, the result determination unit 16 determines that all the property information pieces are not processed in the response terminal 2. Further, the result determination unit 16 may compare the first service type, the first property number, and property information correlated with the first service type of the request packet data 11, with the first process result, the first property number, and property information correlated with the first process result of the response packet data 12. Thereby, the result determination unit 16 can determine a result such as which property information being processed or failing to be processed among a plurality of property information pieces, for each property information piece.
In addition, the result determination unit 16 can understand the number of property information pieces which can be processed in the response terminal 2 from the number of property information pieces included in the response packet data 12. Thereby, the result determination unit 16 may generate new request packet data such that the number of property information pieces of requests which are not processed in the response terminal 2 becomes equal to or less than the number of property information pieces which can be processed in the response terminal 2. The transmission unit 14 transmits the new request packet data to the response terminal 2, and thereby the request terminal 1 can obtain responses to property information pieces of all the requests from the response terminal 2.
Next, the response terminals 2a and 2b will be described. In the following description, the response terminal 2a will be described as a representative, and the response terminals 2a and 2b are configured and operate in a similar manner.
The response terminal 2a includes a controller 20a. A predetermined program is executed by the controller of the response terminal 2a, and thereby the response terminal 2a can perform processes according to the predetermined program. In addition, the response terminal 2a may include a memory (not illustrated). The memory stores request packet data which is received from the request terminal 1. Further, the memory is a work area for storing a process result or the like regarding a request target object and for creating a response packet.
The controller 20a includes a reception unit 21a, a request processing unit 22a, and a transmission unit 23a.
The reception unit 21a receives a request packet from the request terminal 1 via the communication control device (not illustrated). The request packet has the data structure illustrated in
The request processing unit 22a generates a response packet including property information of a response to property information regarding a request processed according to a service type among a plurality of property information pieces regarding requests, and a packet identifier. Here, the request processing unit 22a processes only property information which can be processed by the response terminal 2a among a plurality of property information pieces included in the request packet data.
For example, if the response terminal 2a can process only a single property, the response terminal 2a reads an initial single property information piece of the received request packet data and processes the request target object 30a on the basis of a service type thereof and property information. In this case, the request processing unit 22a allows property information of a response to the read and processed initial single property information piece to be included in response packet data. Furthermore, the request processing unit 22a discards property information pieces other than the initial single property information piece. In addition, property information which can be processed by the response terminal 2a may be restricted in consideration of a processing time or a processing capability of the controller 20a of the response terminal 2a.
The transmission unit 23a sends the response packet data generated by the request processing unit 22a to the communication network 3 via the communication control device or the like. The sent response packet data is transmitted to the request terminal 1 which is a request source according to the address information.
The response terminal 2b includes a controller 20b. The controller 20b includes reception unit 21b, a request processing unit 22b, and a transmission unit 23b. The controller 20b, the reception unit 21b, the request processing unit 22b, and the transmission unit 23b operate in a same manner as the controller 20a, the reception unit 21a, the request processing unit 22a, and the transmission unit 23a described above.
Here, with reference to
In the example illustrated in
If the received request packet is not addressed to the response terminal 2a, or if the object information included in the request packet is not information of an object which needs to be controlled by the response terminal 2a, the received packet is discarded, and the flow returns to step S101. If the received request packet is addressed to the response terminal 2a, and the object information included in the request packet is information of an object which needs to be controlled by the response terminal 2a, the flow proceeds to step S103.
In step S103, the request processing unit 22a of the response terminal 2a acquires a service type included in the request packet. For example, in a case of the request packet illustrated in
Specifically, first, in step S104, the request processing unit 22a acquires a property number correlated with the first service type. In the example illustrated in
In step S106, the request processing unit 22a determines whether or not the subsequent property information is processed. For example, if a process of property information is restricted based on a processing time in the response terminal 2a, it is determined whether or not an elapsed time from step S103 exceeds a predetermined time. If the elapsed time does not exceed the predetermined time, the flow returns to step S105, and the request processing unit 22a processes further subsequent property information. If the process in step S105 is performed on all the property information pieces correlated with the first service type, in step S107, the request processing unit 22a sets data in the first process result on the basis of the process result instep S105. For example, if all the property information pieces are successfully processed, a flag of “success” is set in the first process result.
Next, the request processing unit 22a repeatedly performs the processes in steps S104 to S106 on the second service type. If the processes in steps S104 to S106 for all the service types are completed, the flow proceeds to step S110. In step S110, the request processing unit 22a generates a response packet, and the transmission unit 23a transmits the response packet to the request terminal 1.
On the other hand, if the process cannot be continuously performed in step S106, the request processing unit 22a proceeds to step S108 so as to create a response packet. The case where the process cannot be continuously performed is, for example, a case where an elapsed time from step S103 exceeds a predetermined time. In step S108, the request processing unit 22a sets data in the process result on the basis of the process result in step S105.
For example, a description will be made of a case where the request processing unit 22a processes three property information pieces and then cannot process a fourth property information piece in relation to the second service type. In this case, in step S108, the request processing unit 22a sets data in the second process result on the basis of the three property information pieces which are already processed in relation to the second service type. In addition, all of the property information pieces correlated with the first service type are processed. Therefore, in step S107, data is already set in the first process result.
In step S109, the request processing unit 22a discards property information pieces of requests which are not processed. Specifically, the request processing unit 22a discards property information pieces after the fourth property information piece of the second service type. Here, property information correlated with each service type after the third service type is also discarded.
In step S110, the request processing unit 22a generates a response packet data on the basis of the property information of the responses acquired in step S105, and the process results set in step S107 and step S108. The response packet data includes the first process result corresponding to the first service type of the request packet data, the property information of the responses, the second process result corresponding to the second service type, and the property information of responses corresponding to the property information of the processed requests. In addition, the response packet data does not include process results corresponding to service types after the third service type, which are not processed in step S105. The request processing unit 22a further sets addresses of the response terminal 2a and the request terminal 1 on the basis of the received request packet data, and generates address information of the response packet data. The request processing unit 22a sets an object code of the request target object 30a as object information and sets a packet identifier of the request packet data in a packet identifier.
According to the communication method according to the first embodiment, the response packet data 12 is generated so as to include property information of a response corresponding to property information of a processed request even if all property information pieces of a composite telegraphic message cannot be processed due to a processing capability or a specification of the response terminal 2. Thereby, it is possible to notify the request terminal 1 that a process in the response terminal 2 is restricted and to thereby press a request packet to be transmitted again.
In the general ECHONET specification, if errors based on the request packet data being a composite telegraphic message occur in the response terminal 2, it is difficult to send the errors to the request terminal 1. For example, the errors include not only a simple case where a process result for property information is negative, but also a case where a length of a telegraphic message which can be received by the response terminal 2 is exceeded or the number of properties which can be processed is exceeded in the request packet data 11. These errors are all treated as the same error, and thus the response terminal 2 cannot know causes of the errors and thus cannot complete a process.
Therefore, according to the communication method according to the first embodiment, response packet data which includes only property information of a response processed in the response terminal 2 is generated and is transmitted to the request terminal 1 in relation to the request packet data 11. Thus, the request terminal 1 can understand property information of a request which is not processed in the response terminal 2. In addition, the request terminal 1 can determine whether or not property information of a request is appropriately processed from the property information included in the response packet data.
As described above, according to the communication method according to the first embodiment, the response terminal can appropriately process a telegraphic message of a composite telegraphic message form. In addition, since the response terminal 2 can process a composite telegraphic message as above, the request terminal 1 can also appropriately process property information.
With reference to
In the request packet data according to the second embodiment, one of acquisition and control is designated as a service type. In addition, property information included in the request packet data is property information regarding a request for the designated service type.
Specifically, a plurality of service types are included in the request packet illustrated in
In the second embodiment, the number n of property information pieces of the request packet may be the same as or different from the number m of property information pieces of the response packet. In the response terminal 2, if all the property information pieces of the request packet can be processed, n is m.
With reference to
Step S201 and step S202 illustrated in
In step S203, the request processing unit 22a of the response terminal 2a acquires a service type and a property number included in the request packet. For example, in a case of the request packet illustrated in
Specifically, first, in step S204, first, the request processing unit 22a processes the request target object 30a in relation to a first property information piece according to the service type and the property information. In step S204, the request processing unit 22a acquires property information of a response corresponding to property information of a request.
In step S205, the request processing unit 22a determines whether or not the subsequent property information is processed. For example, if a process of property information is restricted based on a processing time in the response terminal 2a, it is determined whether or not an elapsed time from step S203 exceeds a predetermined time. If the elapsed time does not exceed the predetermined time, the flow returns to step S204, and the request processing unit 22a processes further subsequent property information. If the process in step S204 is performed on all the property information pieces, in step S206, the request processing unit 22a sets data in the process result on the basis of the process result in step S204. For example, if all the property information pieces are successfully processed, a flag of “success” is set in the process result. Thereafter, in step S209, response packet data is generated based on the property information of the response acquired in step S205 and the process result set in step S206. If the response terminal 2a has a sufficient processing capability and thus processes all the property information pieces of the request packet, the response terminal 2a performs a general process according to the ECHONET specification.
On the other hand, if the process cannot be continuously performed in step S205, the request processing unit 22a proceeds to step S207 so as to create a response packet. The case where the process cannot be continuously performed is, for example, a case where an elapsed time from step S203 exceeds a predetermined time. The request processing unit 22a proceeds to step S207 and sets data in the process result on the basis of the process result in step S204. Further, instep S208, the request processing unit 22a discards property information of a request which is not processed.
In step S209, the request processing unit 22a generates a response packet data on the basis of the property information of the responses acquired in step S205, and the process result set in step S206 or step S207. The generation process of the response packet data is the same as described in the first embodiment.
The response terminal 2a can appropriately process a telegraphic message of a composite telegraphic message form in the second embodiment as well. In addition, since the response terminal 2a can process a composite telegraphic message as above, the request terminal 1 can also appropriately process property information.
With reference to
In the third embodiment, the request packet data includes a service type and property information so as to correspond one to one. In addition, the request processing unit 22a/22b of the response terminal 2a/2b generates a response packet which correlates property information of a response to property information regarding a request processed according to the service type with a process result thereof one to one and includes a packet identifier.
Specifically, in the first embodiment, a plurality of property information pieces are correlated so as to correspond to the first service type in the request packet illustrated in
In addition, the number of property information pieces included in the request packet may be different from the number of property information pieces included in the response packet. The number of property information pieces of the request packet illustrated in
With reference to
Step S301 and step S302 illustrated in
The request processing unit 22a repeatedly performs the processes in step S303 and step S304 on all the property information pieces included in the request packet data.
Specifically, first, in step S303, the request processing unit 22a processes the request target object 30a in relation to a first property information piece according to the service type and the property information. In step S303, the request processing unit 22a acquires property information of a response corresponding to property information of a request.
In step S304, the request processing unit 22a determines whether or not the subsequent property information is processed. For example, if a process of property information is restricted based on a processing time in the response terminal 2a, it is determined whether or not an elapsed time from step S302 exceeds a predetermined time. If the elapsed time does not exceed the predetermined time, the flow returns to step S303, and the request processing unit 22a processes further subsequent property information.
If the process in step S303 is performed on all the property information pieces, in step S305, the request processing unit 22a sets data in the process result on the basis of the process result in step S303. For example, if the process is successfully performed in each property information piece of the response, a flag of “success” is set in the process result.
On the other hand, if the process cannot be continuously performed in step S304, the request processing unit 22a proceeds to step S306 so as to create a response packet. The case where the process cannot be continuously performed is, for example, a case where an elapsed time from step S302 exceeds a predetermined time. The request processing unit 22a proceeds to step S306 and sets data in each process result of the response packet on the basis of the process result in step S303. Further, in step S307, the request processing unit 22a discards property information of a request which is not processed.
In step S308, the request processing unit 22a generates a response packet data on the basis of the property information of the responses acquired in step S303, and the process result corresponding to each property information piece set in step S305 or step S306. The generation process of the response packet data is the same as described in the first embodiment.
In the third embodiment as well, the response terminal 2 can appropriately process a telegraphic message of a composite telegraphic message form. In addition, since the response terminal 2 can process a composite telegraphic message as above, the request terminal 1 can also appropriately process property information.
Particularly, since a process result can be set for each property information piece in the third embodiment, the request terminal 1 can clearly understand a process result in the response terminal 2 for each property information piece of the request packet data.
According to at least one embodiment described above, the communication terminal can appropriately process a composite telegraphic message form.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2010-245147 | Nov 2010 | JP | national |
This application is a continuation of International Application No. PCT/JP2011/066654, filed on Jul. 22, 2011, which claims the benefit of priority of the prior Japanese Patent Application No. 2010-245147, filed on Nov. 1, 2010, the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2011/066654 | Jul 2011 | US |
Child | 13797101 | US |