WO2013176250A1 - 通信装置 - Google Patents
通信装置 Download PDFInfo
- Publication number
- WO2013176250A1 WO2013176250A1 PCT/JP2013/064472 JP2013064472W WO2013176250A1 WO 2013176250 A1 WO2013176250 A1 WO 2013176250A1 JP 2013064472 W JP2013064472 W JP 2013064472W WO 2013176250 A1 WO2013176250 A1 WO 2013176250A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- program
- virtual program
- virtual
- memory
- execution unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Definitions
- the present invention relates to a communication device.
- This application claims priority based on Japanese Patent Application No. 2012-120180 filed in Japan on May 25, 2012, the contents of which are incorporated herein by reference.
- field devices called field devices and operation devices such as field devices and control devices for controlling these devices are connected via communication means in order to realize advanced automatic operation.
- a distributed control system has been established. Most of the communication systems that form the basis of such a distributed control system perform communication by wire, but in recent years, wireless communication that conforms to industrial wireless communication standards such as ISA100.11a and WirelessHART (registered trademark). Something that communicates has also been realized.
- ISA100 is a wireless communication standard used for measurement and control in a plant or the like formulated by the International Society for Measurement and Control (ISA).
- ISA International Society for Measurement and Control
- the WirelessHART described above was proposed by the HART (Highway Addressable Remote Remote Transducer) Communication Association in the United States, and sensor networks (multiple sensor-equipped wireless terminals are scattered in the space, and they coordinate the environment and physical conditions. It is a wireless communication standard based on a wireless network that can be collected.
- Patent Document 1 discloses a computer interconnected with a wireless sensor network compliant with ZigBee (registered trademark), which is a wireless communication standard with short distance and low power consumption, and an Internet protocol (IP) technology.
- ZigBee registered trademark
- IP Internet protocol
- a technique for interconnecting an IP network, which is a network is disclosed.
- a gateway including a protocol stack for realizing communication via a wireless sensor network compliant with Zigbee and a protocol stack for realizing communication via an IP network, These networks are interconnected.
- Many of the computers connected to the IP network described above include a CPU (central processing unit) with a high processing capacity, a large-capacity memory, and the like.
- a CPU central processing unit
- a plurality of application programs and a program for realizing a plurality of communication protocols are incorporated in advance, and a plurality of applications can be operated in parallel, and a communication protocol used for each application can be used. It is possible to switch.
- the field devices described above and the devices used in the sensor network described above often have a minimum hardware configuration because they need to perform a power saving operation.
- a CPU having a processing capability capable of operating a specific application and enabling communication using a specific communication protocol
- a memory having a capacity capable of executing a program that realizes the application and the communication protocol.
- a configuration is provided.
- the above-described application program is used for adding a new function or existing, whether it is used for a computer connected to the above-described IP network or the above-described device that needs to perform a power saving operation.
- the version may be upgraded for the purpose of strengthening the function. Since the computer connected to the IP network has a large-capacity memory, there is almost no problem even if the size of the application program increases due to version upgrade or the like. However, since the devices that need to perform the power saving operation described above are often set to the minimum hardware configuration, if the size of the application program increases due to version upgrade or the like, the application program is caused by a memory shortage. May not be able to be executed.
- a low-speed memory such as a flash memory can be easily expanded by an external interface, but few have an external bus that can be connected to a high-speed memory that can store programs, parameters at the time of execution, and the like. For this reason, it is not easy to connect a high-speed memory and expand the capacity capable of executing the program with respect to the increase in the program size as described above.
- a communication device that can avoid a situation in which an application program cannot be executed even if the program size increases.
- a communication device that performs communication in conformity with a predetermined communication standard, and includes at least a first virtual program including a program that realizes the first function of the communication device, and a first of the communication device.
- a storage unit configured to store a second virtual program including a program that implements two functions, an execution unit configured to sequentially execute the first and second virtual programs, At least part of one of the first and second virtual programs is read from the storage unit, stored in the memory of the execution unit, and executed by the execution unit, and the processing of the one virtual program is completed. After that, at least a part of the one virtual program is deleted from the memory according to the free space of the memory, and the first and second virtual programs are deleted from the storage unit.
- Switching between the first and second virtual programs to be executed by the execution unit is performed by reading at least a part of the other virtual program of the virtual program, storing it in the memory of the execution unit and causing the execution unit to execute the program.
- a switching control unit configured as described above.
- the execution unit includes an information holding area that holds information passed between the first virtual program and the second virtual program.
- the first virtual program includes a program that transmits and receives data via a protocol stack defined by the predetermined communication standard
- the second virtual program includes: A program that realizes at least pre-processing or post-processing of data is included.
- the switching control unit when data is transmitted from the outside to the communication device, the switching control unit causes the execution unit to execute the first virtual program and receive data. After the reception process by the first virtual program is completed, the virtual program to be executed in the execution unit is switched from the first virtual program to the second virtual program, and the reception is received by the second virtual program. The post-processing is performed on the processed data.
- the first virtual program uses parameters used in the reception process
- the second virtual program uses parameters used in the post-processing.
- the execution unit when the switching control unit transmits data to the outside of the communication device, the execution unit executes the second virtual program in the preprocessing of the data.
- the virtual program to be executed in the execution unit is switched from the second virtual program to the first virtual program, and the preprocessing is performed on the first virtual program.
- the first virtual program uses parameters used in the transmission processing
- the second virtual program uses parameters used in the preprocessing.
- the first virtual program includes a program used during normal operation defined in advance with reference to the execution frequency, and the second virtual program is based on the execution frequency. It includes a program that is used during predefined non-normal operation.
- the switching control unit is free to store at least a part of the other virtual program in the memory of the execution unit after the processing of the one virtual program is completed. When it is confirmed that there is no capacity, at least a part of the one virtual program is deleted from the memory. Further, according to the communication device of one aspect of the present invention, the switching control unit is a free space for storing at least a part of the other virtual program in the memory of the execution unit after the processing of the one virtual program is completed. When it is confirmed that there is a capacity, at least a part of the other virtual program is stored in the memory of the execution unit without deleting the one virtual program from the memory.
- a program execution control method is a program execution control method in a communication apparatus that performs communication in conformity with a predetermined communication standard, and the method includes a program that realizes the first function of the communication apparatus. Storing at least a part of any one of the first virtual program and a second virtual program including a program for realizing the second function of the communication device in a memory of an execution unit of the communication device; The step of executing the one virtual program at the time, and after the execution of the one virtual program is completed, the step of deleting at least a part of the one virtual program from the memory according to the free space of the memory, At least part of the one virtual program from the memory of the execution unit according to the free space of the memory And deleting at least part of the other virtual program of the first and second virtual programs in the memory of the execution unit, and causing the execution unit to execute the other virtual program.
- the first virtual program includes a program that transmits and receives data via a protocol stack defined by the predetermined communication standard
- the second virtual program Includes at least a program for realizing pre-processing or post-processing of data.
- the first virtual program includes a program used during normal operation defined in advance with reference to an execution frequency, and the second virtual program has an execution frequency. The program used at the time of the non-normal operation
- the step of deleting at least a part of the one virtual program from the memory in accordance with the free space of the memory includes the step of deleting the other virtual program in the memory of the execution unit.
- the method includes a step of deleting at least a part of the one virtual program from the memory.
- the step of deleting at least a part of the one virtual program from the memory in accordance with the free space of the memory includes the step of deleting the other virtual program in the memory of the execution unit. If there is free space for storing at least a part of the virtual program, the step of storing at least a part of the other virtual program in the memory of the execution unit without deleting the one virtual program from the memory; Including.
- a first virtual program including a communication program for realizing a protocol stack and a part of an application program (a program for transmitting and receiving data via the protocol stack) and a first virtual program including the rest of the application program are provided. Since any one of the two virtual programs is executed by the execution unit under the control of the switching control unit, it is possible to avoid a situation where the execution of the application program becomes impossible even if the program size increases. is there. Also, when dealing with an increase in the size of the virtual program, it can be easily handled by expanding the storage unit.
- FIG. 1 is a block diagram showing a main configuration of a communication device according to the first embodiment of the present invention.
- the communication device 1 according to the first embodiment includes a virtual program storage unit 11 (storage unit), a virtual program execution unit 12 (execution unit), a switching control unit 13, and a wireless communication interface unit 14. And performs communication conforming to a predetermined wireless communication standard.
- the communication device 1 is a field device that performs wireless communication conforming to ISA100, which is an industrial wireless communication standard.
- the virtual program storage unit 11 is implemented by a non-volatile memory such as a flash ROM (Read Only Memory) or an EEPROM (Electrically Eraseable and Programmable ROM), for example, and is used by the communication apparatus 1 as a virtual program P1 (first virtual program) and a virtual program.
- the program P2 (second virtual program) is saved.
- the virtual programs P1 and P2 are programs including a plurality of programs and divided programs according to the hardware configuration of the communication device 1.
- FIG. 2 is a diagram showing an example of a virtual program in the first embodiment of the present invention.
- the virtual program P1 includes communication programs P11 to P13 and an application program P21, and uses a parameter PM1.
- the communication programs P11 to P13 are programs that realize the protocol stack ST that complies with the wireless communication standard. Specifically, the communication program P11 implements the data link layer of the protocol stack ST, the communication program P12 implements the network layer of the protocol stack ST, and the communication program P13 implements the transport layer of the protocol stack ST.
- the communication program P11 realizes a data link layer defined by the wireless communication standard IEEE802.15.4.
- the communication program P12 realizes a network layer defined by IPv6, which is a kind of Internet protocol.
- the communication program P13 implements UDP (User Datagram Protocol) defined by the Internet protocol as a transport layer.
- UDP User Datagram Protocol
- the application program P21 is a program that transmits and receives data via the protocol stack ST in the application program P20 that realizes the functions of the communication device 1 (for example, the flow measurement function, the temperature measurement function, and other functions).
- the parameter PM1 is a parameter used when the communication programs P11 to P13 and the application program P21 are executed, and includes, for example, information indicating the data transmission destination and transmission source, and information for identifying the communication network (subnet ID). .
- the virtual program P2 includes the application program P22 and uses the parameter PM2.
- the application program P22 is the remaining program excluding the application program P21 in the application program P20.
- the application program P22 performs pre-processing of data to be transmitted via the protocol stack ST, post-processing of data received via the protocol stack ST, and functions of the communication device 1 described above (for example, flow rate measurement function, temperature measurement). Function, and other functions).
- the pre-processing includes encryption processing, but may include other processing.
- the post-processing includes decryption processing, but may include other processing.
- the parameter PM2 is a parameter used when the application program P22 is executed, and includes, for example, key information used for encryption processing, information indicating an encryption algorithm, and information indicating a measured flow rate and temperature unit.
- the application program P20 is divided into an application program P21 that is a program for transmitting and receiving data via the protocol stack ST and the remaining application program P22.
- the method of dividing P20 is arbitrary.
- the application program P20 may be divided into three or more programs.
- the situation where the execution of the application program P20 becomes impossible does not occur, and the processing of the communication device 1 (for example, data transmission / reception processing) does not occur.
- the application program P22 may be divided into a plurality of subprograms, and the program may be executed in units of the subprograms. As described above, the application program P22 is divided so that the application program P22 can be executed even if the program size of the application program P22 cannot be executed by the communication apparatus 1. .
- the virtual program execution unit 12 sequentially executes the virtual programs P1 and P2 stored in the virtual program storage unit 11.
- the virtual program execution unit 12 is realized by a volatile memory such as a CPU (Central Processing Unit) and a RAM (Random Access Memory), and is read from the virtual program storage unit 11 under the control of the switching control unit 13. Is stored in the volatile memory.
- the capacity of the volatile memory constituting a part of the virtual program execution unit 12 may be set to a capacity capable of executing the virtual programs P1 and P2.
- the virtual program read by the virtual program execution unit 12 is expressed as a dashed virtual program P0 for easy understanding.
- the virtual program execution unit 12 includes an information holding area R1 that is an area for holding information passed between virtual programs executed by the virtual program execution unit 12.
- the information holding area R1 holds, for example, data that has been received by the virtual program P1, data that has been encrypted by the virtual program P2, and the like. By providing this information holding area R1, it becomes possible to smoothly exchange information between the virtual programs P1 and P2 switched by the switching control unit 13.
- the switching control unit 13 switches the virtual programs P1 and P2 to be executed by the virtual program execution unit 12. Specifically, as shown in FIG. 3, when the event signal E1 is output from the virtual program P0 that is executed by the virtual program execution unit 12, the switching control unit 13 performs the virtual that is executed by the virtual program execution unit 12. Switch between programs P1 and P2.
- FIG. 3 is a diagram for explaining virtual program switching conditions in the first embodiment of the present invention.
- the switching control unit 13 when data is transmitted from the outside of the communication device 1, the switching control unit 13 reads the virtual program P1 from the virtual program storage unit 11, stores it in the memory of the virtual program execution unit 12, and stores the virtual program execution unit 12 to execute. Then, when the event signal E1 indicating that the reception process is completed is output from the virtual program P1 (virtual program P0), the switching control unit 13 is a free space for storing the virtual program P2 in the memory of the virtual program execution unit 12 It is confirmed whether there is capacity, and if there is free capacity, the virtual program P2 is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 without deleting the virtual program P1.
- the virtual program P1 is deleted from the memory of the virtual program execution unit 12, and the virtual program P2 is read from the virtual program storage unit 11 And stored in the memory of the virtual program execution unit 12.
- the program is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 in units of the subprograms. It may be deleted from the memory.
- the virtual program to be executed by the virtual program execution unit 12 is switched from the virtual program P1 to the virtual program P2, and post-processing such as decryption processing is performed on the data that has undergone reception processing.
- the switching control unit 13 when transmitting data to the outside of the communication device 1, the switching control unit 13 reads the virtual program P ⁇ b> 2 from the virtual program storage unit 11 and stores it in the memory of the virtual program execution unit 12. It is executed by the execution unit 12 to perform preprocessing such as encryption processing. Then, when the event signal E1 indicating that the encryption process is completed is output from the virtual program P2 (virtual program P0), the switching control unit 13 stores the virtual program P1 in the memory of the virtual program execution unit 12. It is confirmed whether there is free space. If there is free space, the virtual program P1 is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 without deleting the virtual program P2.
- the virtual program P2 is deleted from the memory of the virtual program execution unit 12, and the virtual program P1 is read from the virtual program storage unit 11 And stored in the memory of the virtual program execution unit 12.
- the program is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 in units of the subprograms. It may be deleted from the memory.
- the virtual program to be executed by the virtual program execution unit 12 is switched from the virtual program P2 to the virtual program P1, and the transmission process of the encrypted data is performed.
- the switching control unit 13 always sets the protocol stack ST when the state of the virtual program P0 executed by the virtual program execution unit 12 becomes indefinite (for example, when a failure is detected by a watchdog timer).
- the virtual program execution unit 12 executes a virtual program P1 including communication programs P11 to P13 to be realized. This is because, for example, the communication apparatus 1 is made in a communicable state in order to recover a problem that occurred during the execution of the virtual program P2 by remote operation. As described above, if the trouble that occurred in the communication device 1 can be recovered by remote operation, it is not necessary for the worker to go to the installation location of the communication device 1 and perform the recovery work, and the communication device 1 can be recovered early. Is possible.
- the wireless communication interface unit 14 receives data transmitted as a radio signal from the outside of the communication device 1 and transmits data to be transmitted to the outside of the communication device 1 as a radio signal.
- the wireless communication interface unit 14 corresponds to, for example, a physical layer defined by the wireless communication standard IEEE802.5.4, the wireless communication standard IEEE802.11n, or the wireless communication standard IEEE802.11a.
- the operation of the communication device 1 having the above configuration will be briefly described.
- an operation (reception operation) when receiving data transmitted from the outside of the communication device 1 as a radio signal and an operation (transmission) when transmitting data transmitted to the outside of the communication device 1 as a radio signal. Operation) will be described as an example.
- the communication device 1 is assumed to perform an intermittent operation according to a predetermined schedule in order to reduce power consumption. For this reason, the communication apparatus 1 performs a transmission operation at a predetermined timing and performs a reception operation at a predetermined timing different from the timing at which the transmission operation is performed.
- FIG. 4 is a flowchart showing a reception operation of the communication device 1 according to the first embodiment of the present invention.
- the reception operation is performed, first, the virtual program P1 stored in the virtual program storage unit 11 is read by the switching control unit 13, stored in the memory of the virtual program execution unit 12, and the virtual program execution unit 12 (Step S11).
- the protocol stack ST shown in FIG. 2 and the data transmission / reception function (function by the application program P21) via the protocol stack ST are realized in the communication device 1.
- step S12 When data destined for the communication device 1 is transmitted from outside the communication device 1 while the virtual program P1 is being executed, this data is received by the wireless communication interface unit 14 (step S12).
- the data received by the wireless communication interface unit 14 is output to the virtual program execution unit 12, and reception processing (packet processing, etc.) is performed by the virtual program P1 (step S13).
- the reception process by the virtual program P1 is performed using the protocol stack ST and the parameter PM1 realized by the communication programs P11 to P13.
- the data subjected to the reception process is held in the information holding area R1 of the virtual program execution unit 12 (step S14).
- an event signal E1 indicating that the reception process has ended is output from the virtual program P1 (virtual program P0) to the switching control unit 13 (step S15).
- the switching control unit 13 confirms whether there is a free capacity for storing the virtual program P2 in the memory of the virtual program execution unit 12 (step S16).
- the virtual program P1 is deleted from the memory without deleting the virtual program P1.
- the virtual program P2 is read and stored in the memory of the virtual program execution unit 12 (step S18).
- step S17 the virtual program P2 is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 (step S18).
- step S18 the program is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 in units of the subprograms. It may be deleted from the memory. Thereby, the virtual program executed in the virtual program execution unit 12 is switched from the virtual program P1 to the virtual program P2.
- step S19 the function of the application program P22 shown in FIG. 2 is realized, and post-processing such as decryption processing of data received via the protocol stack ST is performed (step S19).
- the decryption process the data held in the information holding area R1 is read by the application program P22, and the parameter PM2 included in the virtual program P2 is used. In this way, data transmitted to the communication device 1 is received.
- the data obtained by the above reception processing is used in, for example, functions (for example, a flow measurement function, a temperature measurement function, and other functions) realized by the application program P22.
- functions for example, a flow measurement function, a temperature measurement function, and other functions
- the virtual program execution unit 12 executes it to enable recovery of a problem that occurred during the execution of the virtual program P2 by remote operation.
- the virtual program is switched from the virtual program P2 to the virtual program P1 by the switching control unit 13.
- FIG. 5 is a flowchart showing a transmission operation of the communication device 1 according to the first embodiment of the present invention.
- the transmission operation is performed, first, the virtual program P2 stored in the virtual program storage unit 11 is read by the switching control unit 13, stored in the memory of the virtual program execution unit 12, and the virtual program execution unit 12 (Step S21). Thereby, the function of the application program P22 shown in FIG. 2 is implement
- the virtual program P2 is executed, a process for acquiring data to be transmitted to the outside of the communication device 1 is performed (step S22).
- the communication device 1 has a flow rate measurement function implemented by executing the application program P22, a process for measuring flow rate and obtaining flow rate data is performed, while the communication device 1 has a temperature measurement function. If so, a process of measuring temperature and acquiring temperature data is performed.
- this data is preprocessed by the virtual program execution unit 12 such as encryption processing (step S23).
- the encryption process is performed using the parameter PM2 included in the virtual program P2.
- the encrypted data is held in the information holding area R1 of the virtual program execution unit 12 (Step S24).
- an event signal E1 indicating that the encryption process is completed is output from the virtual program P2 (virtual program P0) to the switching control unit 13 (step S25).
- the switching control unit 13 confirms whether there is a free capacity for storing the virtual program P1 in the memory of the virtual program execution unit 12 (step S26).
- the virtual program P2 is deleted from the virtual program storage unit 11 without being deleted from the memory.
- the virtual program P1 is read and stored in the memory of the virtual program execution unit 12 (step S28).
- step S27 the virtual program P1 is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 (step S28).
- step S28 the program is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 in units of the subprograms. It may be deleted from the memory.
- the virtual program executed in the virtual program execution unit 12 is switched from the virtual program P2 to the virtual program P1.
- the data encrypted by the virtual program P2 is subjected to transmission processing (packet processing or the like) by the virtual program P1 in the virtual program execution unit 12 (step S29).
- the transmission process by the virtual program P1 is performed using the protocol stack ST and the parameter PM1 realized by the communication programs P11 to P13.
- the data for which the transmission process by the virtual program P1 is completed is output from the virtual program execution unit 12 to the wireless communication interface unit 14 and transmitted as a wireless signal. In this way, data is transmitted from the communication device 1 to the outside.
- the virtual program executed in the virtual program execution unit 12 is switched from the virtual program P2 to the virtual program P1 by the switching control unit 13. This is because, as in the case of the reception process, for example, it is possible to recover a malfunction that occurred during execution of the virtual program P2 by remote operation.
- virtual programs P1 and P2 including a plurality of programs or divided programs are stored in the virtual program storage unit 11 according to the hardware configuration of the communication device 1, and the virtual program is executed.
- the virtual program P ⁇ b> 1 and P ⁇ b> 2 to be executed in the unit 12 is configured to be switched by the switching control unit 13. For this reason, even if the program size of the application program P20 which implement
- the communication device according to the second embodiment Similar to the communication device 1 according to the first embodiment, the communication device according to the second embodiment has a configuration including the virtual program storage unit 11 to the wireless interface 14. However, in the communication apparatus of the second embodiment, virtual programs P1 and P2 stored in the virtual program storage unit 11 are different from those of the first embodiment.
- the application program P20 included in the virtual programs P1 and P2 uses the application program P21 that transmits / receives data on the basis of the presence / absence of a function that transmits / receives data, and the remaining It was divided into the application program P22.
- the application program P20 included in the virtual programs P1 and P2 is used in the normal operation and the application program P21 used in the normal operation on the basis of the execution frequency (if necessary) And the application program P22 to be executed.
- the application program P21 used in the normal operation includes a program that transmits and receives data via the protocol stack ST and a program that realizes a flow rate measurement function, a temperature measurement function, and the like, among the application programs P20. It is.
- the application program P22 used at the time of non-normal operation is a program that performs maintenance processing and key exchange processing by public key cryptography in the application program P20.
- the virtual program P1 includes communication programs P11 to P13 that realize the protocol stack ST and the application program P21 used during the normal operation, and includes parameters PM1 is used.
- the parameter PM1 includes information such as a transmission destination, a transmission source, and a subnet ID for performing communication, and information indicating a unit of measured flow rate and temperature.
- the virtual program P2 includes the application program P22 used during the above-described non-normal operation and uses the parameter PM2.
- the parameter PM2 includes main information (for example, a private key of a certificate and a public key of a certification authority (CA)) during non-normal operation.
- CA certification authority
- the switching control unit 13 of the second embodiment switches the virtual programs P21 and P22 according to an external event through communication. Specifically, the switching control unit 13 stores the virtual program P ⁇ b> 1 that performs normal operation at the time of startup in the memory of the virtual program execution unit 12 and causes the virtual program execution unit 12 to execute the virtual program P ⁇ b> 1. After that, when an external operation packet (key exchange or maintenance packet) is received and the event signal E1 from the virtual program P1 (virtual program P0) is output, the switching control unit 13 It is confirmed whether or not there is free space for storing the virtual program P2 in the memory of the program execution unit 12, and if there is free space, the virtual program P2 is read from the virtual program storage unit 11 without deleting the virtual program P1.
- an external operation packet key exchange or maintenance packet
- the virtual program P1 is deleted from the memory of the virtual program execution unit 12, and the virtual program P2 is read from the virtual program storage unit 11 And stored in the memory of the virtual program execution unit 12.
- the program is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 in units of the subprograms. It may be deleted from the memory. Thereby, the virtual program executed in the virtual program execution unit 12 is switched to the virtual program P2.
- FIG. 6 is a flowchart showing the operation of the communication apparatus according to the second embodiment. Note that the flowchart shown in FIG. 6 is started when the power is turned on and the communication apparatus is activated.
- Step S31 When the communication device 1 is activated, the virtual program P1 stored in the virtual program storage unit 11 is first read by the switching control unit 13, stored in the memory of the virtual program execution unit 12, and executed by the virtual program execution unit 12.
- Step S31 the protocol stack ST shown in FIG. 2 and the program (function by the application program P21) for realizing the data transmission / reception function and the flow rate measurement function via the protocol stack ST are realized by the communication device, and the normal operation is performed.
- step S32 During normal operation, data is transmitted / received via the wireless communication interface 14.
- the virtual program execution unit 12 determines whether or not a non-normal operation packet has been received according to the virtual program P1 (virtual program P0) (step S33). Specifically, it is determined whether or not a packet for key exchange or maintenance has been received via the wireless communication interface unit 14. When the virtual program execution unit 12 determines that a non-normal operation packet has not been received (when the determination result is “NO”), the normal operation is repeated (step S32).
- step S33 when it is determined that the packet of the non-normal operation is received (when the determination result of step S33 is “YES”), the virtual program P1 (virtual program P0) processes the packet with the protocol stack ST. .
- the virtual program P1 (virtual program P0) holds the processing result (for example, key exchange information) in the information holding area R1, and outputs the event signal E1 to the switching control unit 13 (step S34).
- step S35 When the event signal E1 from the virtual program P1 (virtual program P0) is input, the switching control unit 13 confirms whether or not there is a free capacity for storing the virtual program P2 in the memory of the virtual program execution unit 12 (step S35). ). When there is a free space for storing the virtual program P2 in the memory of the virtual program execution unit 12 (when the confirmation result in step S35 is “YES”), the virtual program P1 is not deleted from the memory, and the virtual program storage unit 11 The virtual program P2 is read and stored in the memory of the virtual program execution unit 12 (step S37).
- step S35 when there is no free capacity to store the virtual program P2 in the memory of the virtual program execution unit 12 (when the confirmation result in step S35 is “NO”), the virtual program P1 is deleted from the memory of the virtual program execution unit 12 ( In step S36, the virtual program P2 is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 (step S37).
- the program is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 in units of the subprograms. It may be deleted from the memory. As a result, the virtual program executed by the virtual program execution unit 12 is switched from the virtual program P1 to the virtual program P2.
- the function of the application program P22 shown in FIG. 2 is realized in the communication apparatus, and an abnormal operation is performed. Specifically, the key exchange information held in the information storage area R1 is extracted by the virtual program P2 (virtual program P0), and decryption processing using the secret key included in the parameter PM2 is performed (step S38).
- the processing result is held in the information holding area R1, and the event signal E1 is output from the virtual program P2 (virtual program P0) to the switching control unit 13 (step S39).
- the switching control unit 13 confirms whether the virtual program P1 exists in the memory of the virtual program execution unit 12 (step S40).
- the virtual program P1 exists in the memory of the virtual program execution unit 12 (when the confirmation result in step S40 is “YES”), the virtual program executed by the virtual program execution unit 12 is switched from the virtual program P2 to the virtual program P1.
- Step S41 When the virtual program P1 does not exist in the memory of the virtual program execution unit 12 (when the confirmation result in step S40 is “NO”), it is confirmed whether there is free space for storing the virtual program P1 in the memory of the virtual program execution unit 12 (Step S41). If there is free space in the memory of the virtual program execution unit 12 (when the confirmation result in step S41 is “YES”), the virtual program P1 is read from the virtual program storage unit 11 without deleting the virtual program P2, and the virtual program P2 is deleted. It memorize
- step S42 when there is no free capacity for storing the virtual program P1 in the memory of the virtual program execution unit 12 (when the confirmation result in step S41 is “NO”), the virtual program P2 is deleted from the memory of the virtual program execution unit 12 ( In step S42), the virtual program P1 is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 (step S31).
- the program is read from the virtual program storage unit 11 and stored in the memory of the virtual program execution unit 12 in units of the subprograms. It may be deleted from the memory.
- the virtual program executed by the virtual program execution unit 12 is switched from the virtual program P2 to the virtual program P1, and normal operation is performed again (step S32).
- the decryption processing result held in the information holding area R1 is extracted by the virtual program P1 (virtual program P0), and the normal operation is performed using the key obtained thereby.
- the virtual program executed in the virtual program execution unit 12 is switched from the virtual program P2 to the virtual program P1 by the switching control unit 13. This is because, for example, as in the first embodiment, it is possible to recover, for example, a malfunction that occurred during the execution of the virtual program P2 by remote operation.
- the application program P20 is divided into application programs P21 and P22 on the basis of the execution frequency and included in the virtual programs P1 and P2, respectively.
- These virtual programs P1 and P2 are switched by the switching control unit 13.
- the application program 20 It is possible to avoid the situation where the execution of is impossible.
- the present invention is not limited to the above-described embodiment, and can be freely changed within the scope of the present invention.
- the communication device 1 is a field device that performs wireless communication in conformity with ISA 100
- the communication device 1 is a field device that performs wireless communication in conformity with WirelessHART (registered trademark). May be.
- the present invention can be applied not only to a communication device that performs wireless communication, but also to a communication device that performs wired communication.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Communication Control (AREA)
Description
本発明は、通信装置に関する。
本願は、2012年5月25日に、日本に出願された特願2012-120180に基づき優先権を主張し、その内容をここに援用する。
本願は、2012年5月25日に、日本に出願された特願2012-120180に基づき優先権を主張し、その内容をここに援用する。
従来から、プラントや工場等においては、高度な自動操業を実現すべく、フィールド機器と呼ばれる測定器、操作器等の現場機器と、これらの制御を行う制御装置とが通信手段を介して接続された分散制御システム(DCS:Distributed Control System)が構築されている。このような分散制御システムの基礎をなす通信システムは、有線によって通信を行うものが殆どであったが、近年においてはISA100.11aやWirelessHART(登録商標)等の産業用無線通信規格に準拠した無線通信を行うものも実現されている。
上記のISA100は、国際計測制御学会(ISA:International Societyof Automation)で策定されたプラント等における計測・制御等に用いられる無線通信規格である。これに対し、上記のWirelessHARTは、米国のHART(Highway Addressable Remote Transducer)通信協会によって提唱され、センサネットワーク(複数のセンサ付無線端末を空間に散在させ、それらが協調して環境や物理的状況を採取することを可能とする無線ネットワーク)を基礎とする無線通信規格である。
以下の特許文献1には、近距離・低消費電力の無線通信規格であるZigBee(登録商標)に準拠した無線センサネットワークと、インターネットプロトコル(IP:Internet Protocol)技術を用いて相互接続されたコンピュータネットワークであるIPネットワークとを相互接続する技術が開示されている。具体的には、以下の特許文献1では、Zigbeeに準拠した無線センサネットワークを介した通信を実現するプロトコルスタックと、IPネットワークを介した通信を実現するプロトコルスタックとを備えるゲートウェイを設けることで、これらのネットワークを相互接続している。
上述したIPネットワークに接続されるコンピュータは、処理能力の高いCPU(中央処理装置)や大容量のメモリ等を備えるものが多い。このようなコンピュータは、複数のアプリケーションプログラム及び複数の通信プロトコルを実現するプログラムが予め組み込まれており、複数のアプリケーションを並列して動作させることが可能であるとともに、アプリケーション毎に使用する通信プロトコルを切り替えることが可能である。
これに対し、上述したフィールド機器や上述したセンサネットワークで用いられる機器は、省電力動作を行う必要があることから、必要最小限のハードウェア構成とされることが多い。具体的には、特定のアプリケーションを動作させ得るとともに特定の通信プロトコルによる通信を可能とし得る処理能力を有するCPUと、これらアプリケーション及び通信プロトコルを実現するプログラムを実行させ得る容量を有するメモリと、を備える構成が採用されることが多い。
上述のアプリケーションプログラムは、上述のIPネットワークに接続されるコンピュータ、または上述の省電力動作を行う必要のある機器のいずれに用いられる場合であっても、新たな機能を追加する目的、或いは、既存の機能を強化する目的でバージョンアップされることがある。IPネットワークに接続されるコンピュータは、大容量のメモリを備えるため、バージョンアップ等によりアプリケーションプログラムのサイズが増加しても問題が生ずることは殆どない。しかしながら、上述の省電力動作を行う必要のある機器は、必要最小限のハードウェア構成とされることが多いため、バージョンアップ等によりアプリケーションプログラムのサイズが増加してしまうと、メモリ不足によってアプリケーションプログラムを実行させることができなくなる場合がある。
また、フィールド機器やセンサネットワークに接続される機器は、ハードウェアの拡張性に制約があるものが多い。例えば、フラッシュメモリ等の低速なメモリは外部インターフェイスにより容易に拡張できるが、プログラムや実行時のパラメータ等を格納できるような高速なメモリを接続できる外部バスを持つものは少ない。このため、上記のようなプログラムサイズの増加に対して高速なメモリを接続し、プログラムを実行させ得る容量を拡張することは容易ではない。
本発明の一態様では、プログラムサイズが増加してもアプリケーションプログラムの実行が不可能になる事態を回避することができる通信装置を提供する。
本発明の一態様の通信装置は、所定の通信規格に準拠した通信を行う通信装置において、少なくとも、前記通信装置の第1機能を実現するプログラムを含む第1仮想プログラムと、前記通信装置の第2機能を実現するプログラムを含む第2仮想プログラムと、を保存するように構成される保存部と、前記第1及び第2仮想プログラムを逐次的に実行するように構成される実行部と、前記保存部から前記第1及び第2仮想プログラムの何れか一方の仮想プログラムの少なくとも一部を読み出して前記実行部のメモリに記憶させて前記実行部において実行させ、前記一方の仮想プログラムの処理が終了した後に、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除し、前記保存部から前記第1及び第2仮想プログラムの他方の仮想プログラムの少なくとも一部を読み出して前記実行部のメモリに記憶させて前記実行部において実行させることにより、前記実行部において実行させる前記第1及び第2仮想プログラムの切り替えを行うように構成される切替制御部とを備える。
また、本発明の一態様の通信装置によると、前記実行部は、前記第1仮想プログラムと前記第2仮想プログラムとの間で受け渡される情報を保持する情報保持領域を備える。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、前記所定の通信規格で規定されるプロコトルスタックを介したデータの送受信を行うプログラムを含み、前記第2仮想プログラムは、少なくともデータの前処理又は後処理を実現するプログラムを含む。
また、本発明の一態様の通信装置によると、前記切替制御部は、外部から前記通信装置にデータが送信される場合には、前記第1仮想プログラムを前記実行部において実行させてデータの受信処理を行わせ、前記第1仮想プログラムによる受信処理が終了した後に、前記実行部において実行させる仮想プログラムを前記第1仮想プログラムから前記第2仮想プログラムに切り替えて、前記第2仮想プログラムに前記受信処理が行われたデータに対する後処理を行わせるように構成される。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、前記受信処理で用いられるパラメータを用い、前記第2仮想プログラムは、前記後処理で用いられるパラメータを用いる。
また、本発明の一態様の通信装置によると、前記切替制御部は、前記通信装置の外部にデータを送信する場合には、前記第2仮想プログラムを前記実行部において実行させてデータの前処理を行わせ、前記第2仮想プログラムによる前処理が終了した後に、前記実行部において実行させる仮想プログラムを前記第2仮想プログラムから前記第1仮想プログラムに切り替えて、前記第1仮想プログラムに前記前処理が行われたデータの送信処理を行わせるように構成される。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、前記送信処理で用いられるパラメータを用い、前記第2仮想プログラムは、前記前処理で用いられるパラメータを用いる。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、実行頻度を基準として予め規定された通常動作時に用いられるプログラムを含み、前記第2仮想プログラムは、実行頻度を基準として予め規定された非通常動作時に用いられるプログラムを含む。
また、本発明の一態様の通信装置によると、前記切替制御部は、前記一方の仮想プログラムの処理が終了した後に、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がないことを確認した場合には、前記一方の仮想プログラムの少なくとも一部を前記メモリから削除するように構成される。
また、本発明の一態様の通信装置によると、前記切替制御部は、前記一方の仮想プログラムの処理が終了した後に、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量があることを確認した場合には、前記一方の仮想プログラムを前記メモリから削除せずに、他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させるように構成される。
本発明の一態様のプログラム実行制御方法は、所定の通信規格に準拠した通信を行う通信装置におけるプログラム実行制御方法であって、前記方法が、前記通信装置の第1機能を実現するプログラムを含む第1仮想プログラム及び前記通信装置の第2機能を実現するプログラムを含む第2仮想プログラムの何れか一方の仮想プログラムの少なくとも一部を前記通信装置の実行部のメモリに記憶させて、前記実行部において前記一方の仮想プログラムを実行させるステップと、前記一方の仮想プログラムの実行が完了した後に、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップと、 前記メモリの空き容量に応じて前記実行部のメモリから前記一方の仮想プログラムの少なくとも一部を削除した後、前記第1及び第2仮想プログラムの他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させて、前記実行部において前記他方の仮想プログラムを実行させるステップと、を含む。
また、本発明の一態様のプログラム実行制御方法によると、前記第1仮想プログラムは、前記所定の通信規格で規定されるプロコトルスタックを介したデータの送受信を行うプログラムを含み、前記第2仮想プログラムは、少なくともデータの前処理又は後処理を実現するプログラムを含む。
また、本発明の一態様のプログラム実行制御方法によると、前記第1仮想プログラムは、実行頻度を基準として予め規定された通常動作時に用いられるプログラムを含み、前記第2仮想プログラムは、実行頻度を基準として予め規定された非通常動作時に用いられるプログラムを含む。
また、本発明の一態様のプログラム実行制御方法によると、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップは、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がない場合には、前記一方の仮想プログラムの少なくとも一部を前記メモリから削除するステップを含む。
また、本発明の一態様のプログラム実行制御方法によると、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップは、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がある場合には、前記一方の仮想プログラムを前記メモリから削除せずに、他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させるステップを含む。
また、本発明の一態様の通信装置によると、前記実行部は、前記第1仮想プログラムと前記第2仮想プログラムとの間で受け渡される情報を保持する情報保持領域を備える。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、前記所定の通信規格で規定されるプロコトルスタックを介したデータの送受信を行うプログラムを含み、前記第2仮想プログラムは、少なくともデータの前処理又は後処理を実現するプログラムを含む。
また、本発明の一態様の通信装置によると、前記切替制御部は、外部から前記通信装置にデータが送信される場合には、前記第1仮想プログラムを前記実行部において実行させてデータの受信処理を行わせ、前記第1仮想プログラムによる受信処理が終了した後に、前記実行部において実行させる仮想プログラムを前記第1仮想プログラムから前記第2仮想プログラムに切り替えて、前記第2仮想プログラムに前記受信処理が行われたデータに対する後処理を行わせるように構成される。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、前記受信処理で用いられるパラメータを用い、前記第2仮想プログラムは、前記後処理で用いられるパラメータを用いる。
また、本発明の一態様の通信装置によると、前記切替制御部は、前記通信装置の外部にデータを送信する場合には、前記第2仮想プログラムを前記実行部において実行させてデータの前処理を行わせ、前記第2仮想プログラムによる前処理が終了した後に、前記実行部において実行させる仮想プログラムを前記第2仮想プログラムから前記第1仮想プログラムに切り替えて、前記第1仮想プログラムに前記前処理が行われたデータの送信処理を行わせるように構成される。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、前記送信処理で用いられるパラメータを用い、前記第2仮想プログラムは、前記前処理で用いられるパラメータを用いる。
また、本発明の一態様の通信装置によると、前記第1仮想プログラムは、実行頻度を基準として予め規定された通常動作時に用いられるプログラムを含み、前記第2仮想プログラムは、実行頻度を基準として予め規定された非通常動作時に用いられるプログラムを含む。
また、本発明の一態様の通信装置によると、前記切替制御部は、前記一方の仮想プログラムの処理が終了した後に、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がないことを確認した場合には、前記一方の仮想プログラムの少なくとも一部を前記メモリから削除するように構成される。
また、本発明の一態様の通信装置によると、前記切替制御部は、前記一方の仮想プログラムの処理が終了した後に、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量があることを確認した場合には、前記一方の仮想プログラムを前記メモリから削除せずに、他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させるように構成される。
本発明の一態様のプログラム実行制御方法は、所定の通信規格に準拠した通信を行う通信装置におけるプログラム実行制御方法であって、前記方法が、前記通信装置の第1機能を実現するプログラムを含む第1仮想プログラム及び前記通信装置の第2機能を実現するプログラムを含む第2仮想プログラムの何れか一方の仮想プログラムの少なくとも一部を前記通信装置の実行部のメモリに記憶させて、前記実行部において前記一方の仮想プログラムを実行させるステップと、前記一方の仮想プログラムの実行が完了した後に、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップと、 前記メモリの空き容量に応じて前記実行部のメモリから前記一方の仮想プログラムの少なくとも一部を削除した後、前記第1及び第2仮想プログラムの他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させて、前記実行部において前記他方の仮想プログラムを実行させるステップと、を含む。
また、本発明の一態様のプログラム実行制御方法によると、前記第1仮想プログラムは、前記所定の通信規格で規定されるプロコトルスタックを介したデータの送受信を行うプログラムを含み、前記第2仮想プログラムは、少なくともデータの前処理又は後処理を実現するプログラムを含む。
また、本発明の一態様のプログラム実行制御方法によると、前記第1仮想プログラムは、実行頻度を基準として予め規定された通常動作時に用いられるプログラムを含み、前記第2仮想プログラムは、実行頻度を基準として予め規定された非通常動作時に用いられるプログラムを含む。
また、本発明の一態様のプログラム実行制御方法によると、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップは、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がない場合には、前記一方の仮想プログラムの少なくとも一部を前記メモリから削除するステップを含む。
また、本発明の一態様のプログラム実行制御方法によると、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップは、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がある場合には、前記一方の仮想プログラムを前記メモリから削除せずに、他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させるステップを含む。
本発明の一態様によれば、プロトコルスタックを実現する通信プログラム及びアプリケーションプログラムの一部(プロトコルスタックを介したデータの送受信を行うプログラム)を含む第1仮想プログラムと、アプリケーションプログラムの残りを含む第2仮想プログラムとの何れか一方を切替制御部の制御の下で実行部において実行するため、プログラムサイズが増加してもアプリケーションプログラムの実行が不可能になる事態を回避することができるという効果がある。また、仮想プログラムサイズの増加に対応する際にも、保存部を拡張することで容易に対応できる。
以下、図面を参照して本発明の一実施形態による通信装置について詳細に説明する。
〔第1実施形態〕
図1は、本発明の第1実施形態による通信装置の要部構成を示すブロック図である。図1に示す通り、本第一実施形態の通信装置1は、仮想プログラム保存部11(保存部)、仮想プログラム実行部12(実行部)、切替制御部13、及び無線通信インターフェイス部14を備えており、所定の無線通信規格に準拠した通信を行う。例えば、通信装置1は、産業用無線通信規格であるISA100に準拠した無線通信を行うフィールド機器である。
図1は、本発明の第1実施形態による通信装置の要部構成を示すブロック図である。図1に示す通り、本第一実施形態の通信装置1は、仮想プログラム保存部11(保存部)、仮想プログラム実行部12(実行部)、切替制御部13、及び無線通信インターフェイス部14を備えており、所定の無線通信規格に準拠した通信を行う。例えば、通信装置1は、産業用無線通信規格であるISA100に準拠した無線通信を行うフィールド機器である。
仮想プログラム保存部11は、例えばフラッシュROM(Read Only Memory)やEEPROM(Electrically Erasable and Programmable ROM)等の不揮発性メモリで実現され、通信装置1で用いられる仮想プログラムP1(第1仮想プログラム)及び仮想プログラムP2(第2仮想プログラム)を保存する。仮想プログラムP1及びP2は、通信装置1のハードウェア構成に応じて、複数のプログラムや分割されたプログラムが含まれるプログラムである。
図2は、本発明の第1実施形態における仮想プログラムの一例を示す図である。図2に示す通り、仮想プログラムP1は、通信プログラムP11~P13、及びアプリケーションプログラムP21を含み、パラメータPM1を用いる。通信プログラムP11~P13は、上記の無線通信規格に準拠したプロトコルスタックSTを実現するプログラムである。具体的には、通信プログラムP11はプロトコルスタックSTのデータリンク層を実現し、通信プログラムP12はプロトコルスタックSTのネットワーク層を実現し、通信プログラムP13はプロトコルスタックSTのトランスポート層を実現する。
例えば、通信プログラムP11は、無線通信規格IEEE802.15.4で規定されるデータリンク層を実現する。通信プログラムP12は、インターネットプロトコルの一種であるIPv6で規定されるネットワーク層を実現する。通信プログラムP13は、インターネットプロトコルで規定されるUDP(User Datagram Protocol:ユーザデータグラムプロトコル)をトランスポート層として実現する。
アプリケーションプログラムP21は、通信装置1の機能(例えば、流量測定機能、温度測定機能、その他の機能)を実現するアプリケーションプログラムP20のうちの、プロトコルスタックSTを介したデータの送受信を行うプログラムである。パラメータPM1は、通信プログラムP11~P13及びアプリケーションプログラムP21の実行時に用いられるパラメータであり、例えば、データの送信先や送信元を示す情報、通信ネットワークを識別するための情報(サブネットID)が含まれる。
これに対し、仮想プログラムP2は、アプリケーションプログラムP22を含み、パラメータPM2を用いる。アプリケーションプログラムP22は、アプリケーションプログラムP20のうちのアプリケーションプログラムP21を除く残りのプログラムである。例えば、アプリケーションプログラムP22は、プロトコルスタックSTを介して送信するデータの前処理、プロトコルスタックSTを介して受信したデータの後処理、及び上述した通信装置1の機能(例えば、流量測定機能、温度測定機能、その他の機能)を実現するプログラムである。前記前処理には、暗号化処理が含まれるが、それ以外の処理が含まれていてもよい。前記後処理には、復号処理が含まれるが、それ以外の処理が含まれていてもよい。パラメータPM2は、アプリケーションプログラムP22の実行時に用いられるパラメータであり、例えば、暗号処理に用いられるキー情報や暗号アルゴリズムを示す情報、測定した流量や温度の単位を示す情報が含まれる。
本第一実施形態では、アプリケーションプログラムP20が、プロトコルスタックSTを介したデータの送受信を行うプログラムであるアプリケーションプログラムP21と、残りのアプリケーションプログラムP22とに分割されている例について説明するが、アプリケーションプログラムP20の分割の仕方は任意である。例えば、アプリケーションプログラムP20が3つ以上のプログラムに分割されてもよい。但し、アプリケーションプログラムP20の実行が不可能になる事態が生じず、且つ、通信装置1の処理(例えば、データの送受信処理)に支障が生じない。さらに、アプリケーションプログラムP22が複数のサブプログラムに分割され、このサブプログラム単位でプログラムの実行が行われてもよい。このように、アプリケーションプログラムP22が分割されるのは、アプリケーションプログラムP22のプログラムサイズが、通信装置1で実行することができない大きさであっても、アプリケーションプログラムP22の実行を可能にするためである。
仮想プログラム実行部12は、仮想プログラム保存部11に保存された仮想プログラムP1及びP2を逐次的に実行する。この仮想プログラム実行部12は、CPU(中央処理装置)及びRAM(Random Access Memory)等の揮発性のメモリで実現され、切替制御部13の制御によって仮想プログラム保存部11から読み出された仮想プログラムを揮発性メモリに記憶しつつ実行する。尚、仮想プログラム実行部12の一部を構成する揮発性メモリの容量は、仮想プログラムP1及びP2を実行させ得る容量に設定されてよい。また、図1では、理解を容易にするために、仮想プログラム実行部12に読み出された仮想プログラムを、破線の仮想プログラムP0として表現している。
また、仮想プログラム実行部12は、仮想プログラム実行部12で実行される仮想プログラムの間で受け渡される情報を保持する領域である情報保持領域R1を備える。この情報保持領域R1には、例えば、仮想プログラムP1により受信処理が行われたデータ、及び仮想プログラムP2により暗号化処理が行われたデータ等が保持される。この情報保持領域R1を設けることにより、切替制御部13によって切り替えられる仮想プログラムP1及びP2間で情報の受け渡しを円滑に行うことが可能になる。
切替制御部13は、仮想プログラム実行部12で実行させる仮想プログラムP1及びP2の切り替えを行う。具体的には、切替制御部13は、図3に示す通り、仮想プログラム実行部12で実行されている仮想プログラムP0からイベント信号E1が出力された場合に、仮想プログラム実行部12で実行させる仮想プログラムP1及びP2の切り替えを行う。図3は、本発明の第1実施形態における仮想プログラムの切り替え条件を説明するための図である。
例えば、切替制御部13は、通信装置1の外部からデータが送信される場合には、仮想プログラム保存部11から仮想プログラムP1を読み出して仮想プログラム実行部12のメモリに記憶させ、仮想プログラム実行部12において実行させる。そして、受信処理が終了した旨を示すイベント信号E1が仮想プログラムP1(仮想プログラムP0)から出力されたときに、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量があるかを確認し、空き容量がある場合には、仮想プログラムP1を削除することなく、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる。一方、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がない場合には、仮想プログラム実行部12のメモリから仮想プログラムP1を削除し、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12で実行させる仮想プログラムを仮想プログラムP1から仮想プログラムP2に切り替えて受信処理が行われたデータに対する復号処理等の後処理を行う。
また、例えば、切替制御部13は、通信装置1の外部にデータを送信する場合には、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させ、仮想プログラム実行部12において実行させて暗号化処理等の前処理を行う。そして、暗号化処理が終了した旨を示すイベント信号E1が仮想プログラムP2(仮想プログラムP0)から出力されたときに、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP1を記憶させる空き容量があるかを確認し、空き容量がある場合には、仮想プログラムP2を削除することなく、仮想プログラム保存部11から仮想プログラムP1を読み出して、仮想プログラム実行部12のメモリに記憶させる。一方、仮想プログラム実行部12のメモリに仮想プログラムP1を記憶させる空き容量がない場合には、仮想プログラム実行部12のメモリから仮想プログラムP2を削除し、仮想プログラム保存部11から仮想プログラムP1を読み出して、仮想プログラム実行部12のメモリに記憶させる。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12で実行させる仮想プログラムを仮想プログラムP2から仮想プログラムP1に切り替えて暗号化処理が行われたデータの送信処理を行う。
更に、切替制御部13は、仮想プログラム実行部12で実行される仮想プログラムP0の状態が不定となった場合(例えば、ウォッチドッグタイマにより不具合が検出された場合等)に、必ずプロトコルスタックSTを実現する通信プログラムP11~P13が含まれる仮想プログラムP1を仮想プログラム実行部12において実行させる。これは、例えば、仮想プログラムP2の実行中に生じた不具合を遠隔操作により復旧するために、通信装置1を通信可能な状態にするためである。このように、通信装置1で生じた不具合を遠隔操作により復旧することができれば、作業員が通信装置1の設置場所に行き、復旧作業を行う必要が無くなり、早期に通信装置1を復旧させることが可能になる。
無線通信インターフェイス部14は、通信装置1の外部から無線信号として送信されたデータを受信するとともに、通信装置1の外部に送信するデータを無線信号にして送信する。この無線通信インターフェイス部14は、例えば、無線通信規格IEEE802.15.4、無線通信規格IEEE802.11n、或いは無線通信規格IEEE802.11aで規定される物理層に相当する。
次に、上記構成における通信装置1の動作について簡単に説明する。尚、以下では通信装置1の外部から無線信号で送信されたデータを受信する際の動作(受信動作)と、通信装置1の外部に送信するデータを無線信号にして送信する際の動作(送信動作)と、を例に挙げて説明する。通信装置1は、消費電力を低減するために、予め規定されたスケジュールで間欠動作を行うものとする。このため、通信装置1は、予め規定されたタイミングで送信動作を行うとともに、送信動作が行われるタイミングとは異なる予め規定されたタイミングで受信動作を行う。
〈受信動作〉
図4は、本発明の第1実施形態による通信装置1の受信動作を示すフローチャートである。受信動作が行われる場合には、まず、仮想プログラム保存部11に保存された仮想プログラムP1が切替制御部13によって読み出されて、仮想プログラム実行部12のメモリに記憶され、仮想プログラム実行部12において実行される(ステップS11)。これにより、図2に示すプロトコルスタックSTと、プロトコルスタックSTを介したデータの送受信機能(アプリケーションプログラムP21による機能)とが通信装置1において実現される。
図4は、本発明の第1実施形態による通信装置1の受信動作を示すフローチャートである。受信動作が行われる場合には、まず、仮想プログラム保存部11に保存された仮想プログラムP1が切替制御部13によって読み出されて、仮想プログラム実行部12のメモリに記憶され、仮想プログラム実行部12において実行される(ステップS11)。これにより、図2に示すプロトコルスタックSTと、プロトコルスタックSTを介したデータの送受信機能(アプリケーションプログラムP21による機能)とが通信装置1において実現される。
仮想プログラムP1が実行されている状態で、通信装置1の外部から通信装置1宛のデータが送信されてくると、このデータは無線通信インターフェイス部14により受信される(ステップS12)。無線通信インターフェイス部14により受信されたデータは、仮想プログラム実行部12に出力され、仮想プログラムP1による受信処理(パケット処理等)が行われる(ステップS13)。尚、仮想プログラムP1による受信処理は、通信プログラムP11~P13によって実現されるプロトコルスタックSTとパラメータPM1とを用いて行われる。受信処理が行われたデータは、仮想プログラム実行部12の情報保持領域R1に保持される(ステップS14)。
仮想プログラムP1による受信処理が終了すると、受信処理が終了した旨を示すイベント信号E1が仮想プログラムP1(仮想プログラムP0)から切替制御部13に出力される(ステップS15)。次に、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量があるかを確認する(ステップS16)。仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がある場合(ステップS16の確認結果が「YES」の場合)、仮想プログラムP1をメモリから削除することなく、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS18)。一方、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がない場合(ステップS16の確認結果が「NO」の場合)、仮想プログラム実行部12のメモリから仮想プログラムP1を削除し(ステップS17)、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS18)。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12において実行させる仮想プログラムを仮想プログラムP1から仮想プログラムP2に切り替える。これにより、図2に示すアプリケーションプログラムP22の機能が実現され、プロトコルスタックSTを介して受信したデータの復号処理等の後処理が行われる(ステップS19)。尚、復号処理においては、情報保持領域R1に保持されたデータがアプリケーションプログラムP22により読み出され、仮想プログラムP2に含まれるパラメータPM2が用いられる。このようにして、通信装置1に送信されたデータが受信される。
以上の受信処理で得られたデータは、例えば、アプリケーションプログラムP22で実現される機能(例えば、流量測定機能、温度測定機能、その他の機能)で用いられる。尚、ステップS17~S19の処理で不具合が生じた場合には、例えば、仮想プログラムP2の実行中に生じた不具合の遠隔操作による復旧を可能にするために、仮想プログラム実行部12において実行される仮想プログラムが、切替制御部13によって仮想プログラムP2から仮想プログラムP1に切り替えられる。
〈送信動作〉
図5は、本発明の第1実施形態による通信装置1の送信動作を示すフローチャートである。送信動作が行われる場合には、まず、仮想プログラム保存部11に保存された仮想プログラムP2が切替制御部13によって読み出されて、仮想プログラム実行部12のメモリに記憶され、仮想プログラム実行部12において実行される(ステップS21)。これにより、図2に示すアプリケーションプログラムP22の機能が実現される。仮想プログラムP2が実行されると、通信装置1の外部に送信するデータを取得する処理が行われる(ステップS22)。例えば、アプリケーションプログラムP22の実行によって通信装置1に流量測定機能が実現されている場合には、流量を測定して流量データを取得する処理が行われ、一方、通信装置1に温度測定機能が実現されている場合には、温度を測定して温度データを取得する処理が行われる。
図5は、本発明の第1実施形態による通信装置1の送信動作を示すフローチャートである。送信動作が行われる場合には、まず、仮想プログラム保存部11に保存された仮想プログラムP2が切替制御部13によって読み出されて、仮想プログラム実行部12のメモリに記憶され、仮想プログラム実行部12において実行される(ステップS21)。これにより、図2に示すアプリケーションプログラムP22の機能が実現される。仮想プログラムP2が実行されると、通信装置1の外部に送信するデータを取得する処理が行われる(ステップS22)。例えば、アプリケーションプログラムP22の実行によって通信装置1に流量測定機能が実現されている場合には、流量を測定して流量データを取得する処理が行われ、一方、通信装置1に温度測定機能が実現されている場合には、温度を測定して温度データを取得する処理が行われる。
通信装置1の外部に送信するデータが取得されると、このデータは仮想プログラム実行部12において暗号化処理等の前処理される(ステップS23)。尚、暗号化処理は、仮想プログラムP2に含まれるパラメータPM2を用いて行われる。暗号化処理が行われたデータは、仮想プログラム実行部12の情報保持領域R1に保持される(ステップS24)。
仮想プログラムP2による暗号化処理が終了すると、暗号化処理が終了した旨を示すイベント信号E1が仮想プログラムP2(仮想プログラムP0)から切替制御部13に出力される(ステップS25)。次に、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP1を記憶させる空き容量があるかを確認する(ステップS26)。仮想プログラム実行部12のメモリに仮想プログラムP1を記憶させる空き容量がある場合(ステップS26の確認結果が「YES」の場合)、仮想プログラムP2をメモリから削除することなく、仮想プログラム保存部11から仮想プログラムP1を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS28)。一方、仮想プログラム実行部12のメモリに仮想プログラムP1を記憶させる空き容量がない場合(ステップS26の確認結果が「NO」の場合)、仮想プログラム実行部12のメモリから仮想プログラムP2を削除し(ステップS27)、仮想プログラム保存部11から仮想プログラムP1を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS28)。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12において実行させる仮想プログラムを仮想プログラムP2から仮想プログラムP1に切り替える。これにより、図2に示すプロトコルスタックSTと、プロトコルスタックSTを介したデータの送受信機能(アプリケーションプログラムP21による機能)とが実現される。
仮想プログラムP2によって暗号化されたデータは、仮想プログラム実行部12において仮想プログラムP1による送信処理(パケット処理等)が行われる(ステップS29)。尚、仮想プログラムP1による送信処理は、通信プログラムP11~P13によって実現されるプロトコルスタックSTとパラメータPM1とを用いて行われる。仮想プログラムP1による送信処理が終了したデータは、仮想プログラム実行部12から無線通信インターフェイス部14に出力されて無線信号として送信される。このようにして、通信装置1から外部にデータが送信される。
尚、ステップS21~S27の処理で不具合が生じた場合には、仮想プログラム実行部12において実行される仮想プログラムが、切替制御部13によって仮想プログラムP2から仮想プログラムP1に切り替えられる。これは、受信処理の場合と同様に、例えば、仮想プログラムP2の実行中に生じた不具合の遠隔操作による復旧を可能にするためである。
以上の通り、本第1実施形態では、通信装置1のハードウェア構成に応じて複数のプログラムや分割されたプログラムが含まれる仮想プログラムP1及びP2を仮想プログラム保存部11に保存し、仮想プログラム実行部12において実行させる仮想プログラムP1及びP2を切替制御部13によって切り替えるように構成されている。このため、通信装置1の機能を実現するアプリケーションプログラムP20のプログラムサイズが多少増加しても、アプリケーションプログラム20の実行が不可能になる事態を回避することができる。
〔第2実施形態〕
次に、本発明の第2実施形態による通信装置について説明する。本第2実施形態の通信装置は、第1実施形態による通信装置1と同様に、仮想プログラム保存部11~無線インターフェイス14を備える構成を有する。しかしながら、本第2実施形態の通信装置は、仮想プログラム保存部11に保存される仮想プログラムP1及びP2が第1実施形態のものとは相違する。
次に、本発明の第2実施形態による通信装置について説明する。本第2実施形態の通信装置は、第1実施形態による通信装置1と同様に、仮想プログラム保存部11~無線インターフェイス14を備える構成を有する。しかしながら、本第2実施形態の通信装置は、仮想プログラム保存部11に保存される仮想プログラムP1及びP2が第1実施形態のものとは相違する。
具体的には、前述した第1実施形態では、仮想プログラムP1及びP2に含まれるアプリケーションプログラムP20が、データの送受信を行う機能の有無を基準として、データの送受信を行うアプリケーションプログラムP21と、残りのアプリケーションプログラムP22とに分割されていた。これに対し、本第2実施形態では、仮想プログラムP1及びP2に含まれるアプリケーションプログラムP20が、実行頻度を基準として、通常動作時に用いられるアプリケーションプログラムP21と、非通常動作時に用いられる(必要に応じて実行される)アプリケーションプログラムP22とに分割されている。
上記の通常動作時に用いられるアプリケーションプログラムP21は、アプリケーションプログラムP20のうちの、プロトコルスタックSTを介したデータの送受信を行うプログラムと、流量測定機能、温度測定機能等を実現するプログラムと、を含むプログラムである。これに対し、非通常動作時に用いられるアプリケーションプログラムP22は、アプリケーションプログラムP20のうちの、メンテナンス用の処理や公開鍵暗号による鍵交換処理を行うプログラムである。
つまり、図2を参照して説明すると、本第2実施形態において、仮想プログラムP1は、プロトコルスタックSTを実現する通信プログラムP11~P13、及び上記の通常動作時に用いられるアプリケーションプログラムP21を含み、パラメータPM1を用いる。パラメータPM1には、通信を行うための送信先、送信元、サブネットID等の情報と、測定した流量や温度の単位を示す情報と、が含まれる。これに対し、仮想プログラムP2は、上記の非通常動作時に用いられるアプリケーションプログラムP22を含み、パラメータPM2を用いる。パラメータPM2には、非通常動作時における主要な情報(例えば、証明書の秘密鍵や認証局(CA:Certification Authority)の公開鍵等)が含まれる。
尚、本第2実施形態の切替制御部13は、通信による外部からのイベントによって仮想プログラムP21及びP22の切り替えを行う。具体的には、切替制御部13は、起動時には通常動作を行う仮想プログラムP1を、仮想プログラム実行部12のメモリに記憶させ、仮想プログラム実行部12において実行させる。その後、外部から非通常動作のパケット(鍵交換やメンテナンスのためのパケット)を受信して仮想プログラムP1(仮想プログラムP0)からのイベント信号E1が出力された場合に、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量があるかを確認し、空き容量がある場合には、仮想プログラムP1を削除することなく、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる。一方、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がない場合には、仮想プログラム実行部12のメモリから仮想プログラムP1を削除し、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12において実行させる仮想プログラムを仮想プログラムP2に切り替える。
次に、本第2実施形態による通信装置1の動作について簡単に説明する。図6は、本第2実施形態による通信装置の動作を示すフローチャートである。尚、図6に示すフローチャートは、電源が投入されて通信装置が起動されることによって開始される。
〈通常動作〉
通信装置1が起動すると、まず仮想プログラム保存部11に保存された仮想プログラムP1が切替制御部13によって読み出されて、仮想プログラム実行部12のメモリに記憶され、仮想プログラム実行部12において実行される(ステップS31)。これにより、図2に示すプロトコルスタックSTと、プロトコルスタックSTを介したデータの送受信機能及び流量測定機能等を実現するプログラム(アプリケーションプログラムP21による機能)と、が通信装置で実現され、通常動作が行われる(ステップS32)。尚、通常動作時には、無線通信インターフェイス14を介したデータの送受信が行われる。
通信装置1が起動すると、まず仮想プログラム保存部11に保存された仮想プログラムP1が切替制御部13によって読み出されて、仮想プログラム実行部12のメモリに記憶され、仮想プログラム実行部12において実行される(ステップS31)。これにより、図2に示すプロトコルスタックSTと、プロトコルスタックSTを介したデータの送受信機能及び流量測定機能等を実現するプログラム(アプリケーションプログラムP21による機能)と、が通信装置で実現され、通常動作が行われる(ステップS32)。尚、通常動作時には、無線通信インターフェイス14を介したデータの送受信が行われる。
通常動作時において、仮想プログラム実行部12は、仮想プログラムP1(仮想プログラムP0)に従って非通常動作のパケットを受信したか否かを判断する(ステップS33)。具体的には、鍵交換やメンテナンスのためのパケットを、無線通信インターフェイス部14を介して受信したか否かを判断する。非通常動作のパケットを受信していないと仮想プログラム実行部12が判断した場合(判断結果が「NO」の場合)には通常動作が繰り返される(ステップS32)。
これに対し、非通常動作のパケットを受信したと判断した場合(ステップS33の判断結果が「YES」の場合)には、仮想プログラムP1(仮想プログラムP0)は、プロトコルスタックSTでパケットを処理する。次に、仮想プログラムP1(仮想プログラムP0)は、その処理結果(例えば、鍵交換情報)を情報保持領域R1に保持するとともに、イベント信号E1を切替制御部13に出力する(ステップS34)。
〈非通常動作〉
仮想プログラムP1(仮想プログラムP0)からのイベント信号E1が入力されると、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量があるかを確認する(ステップS35)。仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がある場合(ステップS35の確認結果が「YES」の場合)、仮想プログラムP1をメモリから削除することなく、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS37)。一方、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がない場合(ステップS35の確認結果が「NO」の場合)、仮想プログラム実行部12のメモリから仮想プログラムP1を削除し(ステップS36)、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS37)。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12で実行させる仮想プログラムを仮想プログラムP1から仮想プログラムP2に切り替える。これにより、図2に示すアプリケーションプログラムP22の機能が通信装置において実現され、非通常動作が行われる。具体的には、情報保存領域R1に保持された鍵交換情報が仮想プログラムP2(仮想プログラムP0)によって取り出され、パラメータPM2に含まれる秘密鍵を用いた復号処理が行われる(ステップS38)。
仮想プログラムP1(仮想プログラムP0)からのイベント信号E1が入力されると、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量があるかを確認する(ステップS35)。仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がある場合(ステップS35の確認結果が「YES」の場合)、仮想プログラムP1をメモリから削除することなく、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS37)。一方、仮想プログラム実行部12のメモリに仮想プログラムP2を記憶させる空き容量がない場合(ステップS35の確認結果が「NO」の場合)、仮想プログラム実行部12のメモリから仮想プログラムP1を削除し(ステップS36)、仮想プログラム保存部11から仮想プログラムP2を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS37)。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12で実行させる仮想プログラムを仮想プログラムP1から仮想プログラムP2に切り替える。これにより、図2に示すアプリケーションプログラムP22の機能が通信装置において実現され、非通常動作が行われる。具体的には、情報保存領域R1に保持された鍵交換情報が仮想プログラムP2(仮想プログラムP0)によって取り出され、パラメータPM2に含まれる秘密鍵を用いた復号処理が行われる(ステップS38)。
復号処理が終了すると、その処理結果が情報保持領域R1に保持されるとともに、仮想プログラムP2(仮想プログラムP0)から切替制御部13に対してイベント信号E1が出力される(ステップS39)。仮想プログラムP2(仮想プログラムP0)からのイベント信号E1が入力されると、切替制御部13は、仮想プログラム実行部12のメモリに仮想プログラムP1が存在するかを確認する(ステップS40)。仮想プログラム実行部12のメモリに仮想プログラムP1が存在する場合(ステップS40の確認結果が「YES」の場合)、仮想プログラム実行部12で実行させる仮想プログラムを仮想プログラムP2から仮想プログラムP1に切り替える。仮想プログラム実行部12のメモリに仮想プログラムP1が存在しない場合(ステップS40の確認結果が「NO」の場合)、仮想プログラム実行部12のメモリに仮想プログラムP1を記憶させる空き容量があるかを確認する(ステップS41)。仮想プログラム実行部12のメモリに空き容量がある場合(ステップS41の確認結果が「YES」の場合)、仮想プログラムP2を削除することなく、仮想プログラム保存部11から仮想プログラムP1を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS31)。一方、仮想プログラム実行部12のメモリに仮想プログラムP1を記憶させる空き容量がない場合(ステップS41の確認結果が「NO」の場合)、仮想プログラム実行部12のメモリから仮想プログラムP2を削除し(ステップS42)、仮想プログラム保存部11から仮想プログラムP1を読み出して、仮想プログラム実行部12のメモリに記憶させる(ステップS31)。また、仮想プログラムP1及びP2の各々が複数のサブプログラムを含む場合には、このサブプログラム単位で、プログラムが、仮想プログラム保存部11から読み出され、仮想プログラム実行部12のメモリに記憶され、メモリから削除されてもよい。これにより、仮想プログラム実行部12で実行させる仮想プログラムを仮想プログラムP2から仮想プログラムP1に切り替え、再び通常動作が行われる(ステップS32)。
尚、再び通常動作が行われると、情報保持領域R1に保持された復号処理の処理結果が仮想プログラムP1(仮想プログラムP0)によって取り出され、これにより得られた鍵を用いて通常動作が行われる。尚、ステップS36~S42の処理で不具合が生じた場合には、仮想プログラム実行部12において実行される仮想プログラムが、切替制御部13によって仮想プログラムP2から仮想プログラムP1に切り替えられる。これは、第1実施形態と同様に、例えば仮想プログラムP2の実行中に生じた不具合の遠隔操作による復旧を可能にするためである。
以上の通り、本第2実施形態では、通信装置1のハードウェア構成に応じて、アプリケーションプログラムP20を、実行頻度を基準としてアプリケーションプログラムP21及びP22に分割して仮想プログラムP1及びP2にそれぞれ含め、これら仮想プログラムP1及びP2を切替制御部13によって切り替えるようにしている。これにより、省電力動作を行う必要がある機器にとってはプログラムサイズが大きくなる傾向があるプログラム(例えば、公開鍵暗号による鍵交換処理を行うプログラム)のプログラムサイズが多少増加しても、アプリケーションプログラム20の実行が不可能になる事態を回避することができる。
以上、本発明の一実施形態による通信装置について説明したが、本発明は上述した実施形態に制限されることなく、本発明の範囲内で自由に変更が可能である。例えば、上記実施形態では、通信装置1が、ISA100に準拠した無線通信を行うフィールド機器である場合を例に挙げて説明したが、WirelessHART(登録商標)に準拠した無線通信を行うフィールド機器であってもよい。また、本発明は、無線通信を行う通信装置のみならず、有線通信を行う通信装置にも適用可能である。
1 通信装置
11 仮想プログラム保存部
12 仮想プログラム実行部
13 切替制御部
P1,P2 仮想プログラム
P11~P13 通信プログラム
P20 アプリケーションプログラム
P21,P22 アプリケーションプログラム
PM1,PM2 パラメータ
R1 情報保持領域
ST プロトコルスタック
11 仮想プログラム保存部
12 仮想プログラム実行部
13 切替制御部
P1,P2 仮想プログラム
P11~P13 通信プログラム
P20 アプリケーションプログラム
P21,P22 アプリケーションプログラム
PM1,PM2 パラメータ
R1 情報保持領域
ST プロトコルスタック
Claims (15)
- 所定の通信規格に準拠した通信を行う通信装置において、
少なくとも、前記通信装置の第1機能を実現するプログラムを含む第1仮想プログラムと、前記通信装置の第2機能を実現するプログラムを含む第2仮想プログラムと、を保存するように構成される保存部と、
前記第1及び第2仮想プログラムを逐次的に実行するように構成される実行部と、
前記保存部から前記第1及び第2仮想プログラムの何れか一方の仮想プログラムの少なくとも一部を読み出して前記実行部のメモリに記憶させて前記実行部において実行させ、前記一方の仮想プログラムの処理が終了した後に、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除し、前記保存部から前記第1及び第2仮想プログラムの他方の仮想プログラムの少なくとも一部を読み出して前記実行部のメモリに記憶させて前記実行部において実行させることにより、前記実行部において実行させる前記第1及び第2仮想プログラムの切り替えを行うように構成される切替制御部と
を備える、通信装置。 - 前記実行部は、前記第1仮想プログラムと前記第2仮想プログラムとの間で受け渡される情報を保持する情報保持領域を備える、請求項1記載の通信装置。
- 前記第1仮想プログラムは、前記所定の通信規格で規定されるプロコトルスタックを介したデータの送受信を行うプログラムを含み、
前記第2仮想プログラムは、少なくともデータの前処理又は後処理を実現するプログラムを含む、請求項1記載の通信装置。 - 前記切替制御部は、外部から前記通信装置にデータが送信される場合には、前記第1仮想プログラムを前記実行部において実行させてデータの受信処理を行わせ、前記第1仮想プログラムによる受信処理が終了した後に、前記実行部において実行させる仮想プログラムを前記第1仮想プログラムから前記第2仮想プログラムに切り替えて、前記第2仮想プログラムに前記受信処理が行われたデータに対する後処理を行わせるように構成される、請求項3記載の通信装置。
- 前記第1仮想プログラムは、前記受信処理で用いられるパラメータを用い、
前記第2仮想プログラムは、前記後処理で用いられるパラメータを用いる、
請求項4記載の通信装置。 - 前記切替制御部は、前記通信装置の外部にデータを送信する場合には、前記第2仮想プログラムを前記実行部において実行させてデータの前処理を行わせ、前記第2仮想プログラムによる前処理が終了した後に、前記実行部において実行させる仮想プログラムを前記第2仮想プログラムから前記第1仮想プログラムに切り替えて、前記第1仮想プログラムに前記前処理が行われたデータの送信処理を行わせるように構成される、請求項3記載の通信装置。
- 前記第1仮想プログラムは、前記送信処理で用いられるパラメータを用い、
前記第2仮想プログラムは、前記前処理で用いられるパラメータを用いる、
請求項6記載の通信装置。 - 前記第1仮想プログラムは、実行頻度を基準として予め規定された通常動作時に用いられるプログラムを含み、
前記第2仮想プログラムは、実行頻度を基準として予め規定された非通常動作時に用いられるプログラムを含む、請求項1記載の通信装置。 - 前記切替制御部は、前記一方の仮想プログラムの処理が終了した後に、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がないことを確認した場合には、前記一方の仮想プログラムの少なくとも一部を前記メモリから削除するように構成される、請求項1記載の通信装置。
- 前記切替制御部は、前記一方の仮想プログラムの処理が終了した後に、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量があることを確認した場合には、前記一方の仮想プログラムを前記メモリから削除することなく、前記他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させるように構成される、請求項1記載の通信装置。
- 所定の通信規格に準拠した通信を行う通信装置におけるプログラム実行制御方法であって、前記方法が、
前記通信装置の第1機能を実現するプログラムを含む第1仮想プログラム及び前記通信装置の第2機能を実現するプログラムを含む第2仮想プログラムの何れか一方の仮想プログラムの少なくとも一部を前記通信装置の実行部のメモリに記憶させて、前記実行部において前記一方の仮想プログラムを実行させるステップと、
前記一方の仮想プログラムの実行が完了した後に、前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップと、
前記メモリの空き容量に応じて前記実行部のメモリから前記一方の仮想プログラムの少なくとも一部を削除した後、前記第1及び第2仮想プログラムの他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させて、前記実行部において前記他方の仮想プログラムを実行させるステップと、
を含む、方法。 - 前記第1仮想プログラムは、前記所定の通信規格で規定されるプロコトルスタックを介したデータの送受信を行うプログラムを含み、
前記第2仮想プログラムは、少なくともデータの前処理又は後処理を実現するプログラムを含む、請求項11記載の方法。 - 前記第1仮想プログラムは、実行頻度を基準として予め規定された通常動作時に用いられるプログラムを含み、
前記第2仮想プログラムは、実行頻度を基準として予め規定された非通常動作時に用いられるプログラムを含む、請求項11記載の方法。 - 前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップは、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がない場合には、前記一方の仮想プログラムの少なくとも一部を前記メモリから削除するステップを含む、請求項11記載の方法。
- 前記メモリの空き容量に応じて前記メモリから前記一方の仮想プログラムの少なくとも一部を削除するステップは、前記実行部のメモリに前記他方の仮想プログラムの少なくとも一部を記憶させる空き容量がある場合には、前記一方の仮想プログラムを前記メモリから削除することなく、前記他方の仮想プログラムの少なくとも一部を前記実行部のメモリに記憶させるステップを含む、請求項11記載の方法。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP13793684.5A EP2858324A4 (en) | 2012-05-25 | 2013-05-24 | COMMUNICATION DEVICE |
| CN201380026421.5A CN104322032B (zh) | 2012-05-25 | 2013-05-24 | 通信装置 |
| US14/395,600 US9733979B2 (en) | 2012-05-25 | 2013-05-24 | Communication device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012120180A JP5494727B2 (ja) | 2012-05-25 | 2012-05-25 | 通信装置 |
| JP2012-120180 | 2012-05-25 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2013176250A1 true WO2013176250A1 (ja) | 2013-11-28 |
Family
ID=49623930
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2013/064472 Ceased WO2013176250A1 (ja) | 2012-05-25 | 2013-05-24 | 通信装置 |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US9733979B2 (ja) |
| EP (1) | EP2858324A4 (ja) |
| JP (1) | JP5494727B2 (ja) |
| CN (1) | CN104322032B (ja) |
| WO (1) | WO2013176250A1 (ja) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2521607B (en) * | 2013-12-23 | 2016-03-23 | Nordic Semiconductor Asa | Integrated-Circuit Radio |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06342379A (ja) * | 1992-11-26 | 1994-12-13 | Shinko Seisakusho Co Ltd | コンピュータによる制御装置 |
| JPH09101941A (ja) * | 1995-10-04 | 1997-04-15 | Hitachi Ltd | 通信制御システム |
| JPH1196106A (ja) * | 1997-09-19 | 1999-04-09 | Matsushita Electric Ind Co Ltd | デバイスドライバ装置 |
| JP2005033295A (ja) * | 2003-07-08 | 2005-02-03 | Oki Telecommunication Systems Co Ltd | プロトコル変換装置、プロトコル変換方法、およびプロトコル変換プログラム |
| JP2007094801A (ja) * | 2005-09-29 | 2007-04-12 | Yokogawa Electric Corp | フィールド機器管理システムおよびフィールド機器管理方法 |
| JP4897884B2 (ja) | 2006-08-31 | 2012-03-14 | ソニー エリクソン モバイル コミュニケーションズ, エービー | Zigbee/ipゲートウェイ |
Family Cites Families (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6226665B1 (en) * | 1996-09-19 | 2001-05-01 | Microsoft Corporation | Application execution environment for a small device with partial program loading by a resident operating system |
| US8556698B2 (en) * | 2000-10-19 | 2013-10-15 | Igt | Executing multiple applications and their variations in computing environments |
| EP1933248A1 (de) * | 2006-12-12 | 2008-06-18 | secunet Security Networks Aktiengesellschaft | Verfahren zur sicheren Datenverarbeitung auf einem Computersystem |
| JP2008227896A (ja) * | 2007-03-13 | 2008-09-25 | Seiko Epson Corp | データ処理装置及び電子機器 |
| JP5010492B2 (ja) * | 2008-01-31 | 2012-08-29 | 株式会社東芝 | 通信装置、方法及びプログラム |
| US9143597B2 (en) * | 2009-09-21 | 2015-09-22 | Avaya Inc. | Method for telephony client synchronization in telephone virtualization |
| US8904518B2 (en) * | 2010-05-07 | 2014-12-02 | Panasonic Corporation | Information processing device, information processing method, and program distribution system |
| US8707005B2 (en) * | 2011-02-25 | 2014-04-22 | Quantum Corporation | Data control systems for virtual environments |
| CN102959555B (zh) * | 2011-04-27 | 2015-09-02 | 松下电器(美国)知识产权公司 | 虚拟计算机系统、虚拟计算机控制方法及半导体集成电路 |
| US8671414B1 (en) * | 2011-05-09 | 2014-03-11 | Emc Corporation | Accelerating data intensive computing applications by reducing overhead associated with communication protocols |
| US8761187B2 (en) * | 2011-06-14 | 2014-06-24 | Futurewei Technologies, Inc. | System and method for an in-server virtual switch |
| US8990428B2 (en) * | 2011-06-30 | 2015-03-24 | Infosys Limited | System and method for facilitating communication between different protocol stacks via virtual communication devices |
| CN102354281A (zh) * | 2011-07-11 | 2012-02-15 | 中国科学院深圳先进技术研究院 | 一种无线传感网络中内核装置及其实现方法 |
-
2012
- 2012-05-25 JP JP2012120180A patent/JP5494727B2/ja not_active Expired - Fee Related
-
2013
- 2013-05-24 EP EP13793684.5A patent/EP2858324A4/en not_active Withdrawn
- 2013-05-24 WO PCT/JP2013/064472 patent/WO2013176250A1/ja not_active Ceased
- 2013-05-24 US US14/395,600 patent/US9733979B2/en not_active Expired - Fee Related
- 2013-05-24 CN CN201380026421.5A patent/CN104322032B/zh not_active Expired - Fee Related
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06342379A (ja) * | 1992-11-26 | 1994-12-13 | Shinko Seisakusho Co Ltd | コンピュータによる制御装置 |
| JPH09101941A (ja) * | 1995-10-04 | 1997-04-15 | Hitachi Ltd | 通信制御システム |
| JPH1196106A (ja) * | 1997-09-19 | 1999-04-09 | Matsushita Electric Ind Co Ltd | デバイスドライバ装置 |
| JP2005033295A (ja) * | 2003-07-08 | 2005-02-03 | Oki Telecommunication Systems Co Ltd | プロトコル変換装置、プロトコル変換方法、およびプロトコル変換プログラム |
| JP2007094801A (ja) * | 2005-09-29 | 2007-04-12 | Yokogawa Electric Corp | フィールド機器管理システムおよびフィールド機器管理方法 |
| JP4897884B2 (ja) | 2006-08-31 | 2012-03-14 | ソニー エリクソン モバイル コミュニケーションズ, エービー | Zigbee/ipゲートウェイ |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP2858324A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104322032A (zh) | 2015-01-28 |
| US20150089508A1 (en) | 2015-03-26 |
| JP5494727B2 (ja) | 2014-05-21 |
| US9733979B2 (en) | 2017-08-15 |
| EP2858324A4 (en) | 2015-12-30 |
| JP2013247529A (ja) | 2013-12-09 |
| CN104322032B (zh) | 2018-04-27 |
| EP2858324A1 (en) | 2015-04-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6817174B2 (ja) | 互換性がないネットワークルーティングプロトコルを使用する通信ネットワークにわたるデータフレームの伝達 | |
| JP6870568B2 (ja) | 通信システム、制御装置、設定装置、設定方法およびプログラム | |
| CN104834247B (zh) | 仪器设定装置、存储有程序的存储介质以及多个仪器设定装置间的信息共享化方法 | |
| JP6402583B2 (ja) | 中継装置、中継システム、中継方法、及び、プログラム | |
| JP5598505B2 (ja) | ゲートウェイ装置、通信システム、及び通信方法 | |
| JP6392709B2 (ja) | 設定情報生成装置、方法、設定端末および方法 | |
| JP5673606B2 (ja) | 通信装置 | |
| CN117375859B (zh) | 信息传输方法及装置、存储介质和电子装置 | |
| JP5494727B2 (ja) | 通信装置 | |
| JP2018073182A (ja) | データ収集システム、末端装置、データ収集装置、データ収集方法及びプログラム | |
| CN115280724B (zh) | 用于处理数据异常的方法,特别是在机动车辆中 | |
| JP6813110B1 (ja) | 通信装置、プログラム、通信方法、及び通信システム | |
| JP5500332B2 (ja) | Icチップ、情報処理装置、ソフトウェアモジュール制御方法、情報処理システムおよび方法、並びにプログラム | |
| JP5839705B2 (ja) | 遠隔制御システム、遠隔制御装置、遠隔制御方法、および遠隔制御プログラム | |
| JP6099430B2 (ja) | 無線通信装置 | |
| CN107483203A (zh) | 物联网接入点接收数据的分时段加密方法及装置 | |
| CN107360566A (zh) | 物联网终端基于类型的上行数据加密控制方法及装置 | |
| JP5769128B2 (ja) | フィールド機器 | |
| JP6253813B2 (ja) | 国識別情報付加装置及び国識別情報付加方法及びプログラム | |
| JP2016062130A (ja) | ネットワーク処理トレース装置、ネットワーク処理トレース方法、および、コンピュータ・プログラム | |
| JP7665543B2 (ja) | 通信システム、通信端末、および、通信方法 | |
| JP2011221864A (ja) | 情報処理システム及び情報処理方法 | |
| JP4529085B2 (ja) | データ取得装置およびデータ取得方法 | |
| JP2007114984A (ja) | 情報処理装置及び通信制御方法ならびにプログラム | |
| JP5672033B2 (ja) | 通信制御装置、通信制御方法、及び通信システム |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13793684 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2013793684 Country of ref document: EP |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 14395600 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |