METHOD AND SYSTEM FOR OPERATING VIRTUAL DEVICES BY MASTER CONTROLLERS IN A CONTROL SYSTEM

Abstract: A master controller (28) in a control area network system in a larger control area network (16, 18) may have a plurality of devices (33) coupled thereto. The master controller may further include a device manager (51) which provides a virtual device (58). The virtual device operates to link a state associated with the virtual device to a plurality of states associated with the devices such that the respective states are maintained in a substantially similar condition. The substantially similar condition is maintained by propagating a change in the state of the virtual device to a change in the state of the devices and a change in the state of one or more of the devices is propagated to the virtual device and all other devices.

Description: METHOD AND SYSTEM FOR OPERATING VIRTUAL DEVICES BY MASTER CONTROLLERS IN A CONTROL SYSTEM RELATED APPLICATIONS This patent application is related to co-pending U.S. applications entitled METHOD AND SYSTEM FOR MASTER TO MASTER COMMUNICATION IN CONTROL SYSTEMS, Serial No. 09/328,926, filed June 9, 1999; and METHOD FOR DYNAMICALLY UPDATING MASTER CONTROLLERS IN A CONTROL SYSTEM, Serial No. 09/328,885, filed June 9, 1999. TECHNICAL FIELD OF THE INVENTION This invention relates generally to control systems and more particularly to a method and system for operating virtual devices by a master controller in a control system. BACKGROUND OF THE INVENTION Through the use of a control system, various equipment or appliances in an environment, such as a home or business, can be computer-controlled to form an automated environment. The controlled equipment may include heating, ventilation and air conditioning (HVAC) systems, lighting systems, audio-visual systems, telecommunications systems, security systems, surveillance systems, and fire protection systems, for example. The equipment may be coupled to equipment controlling devices that are linked to a computer-based master controller through the use of a control area network. One or more user interface devices, such as a touch panel, may also be linked to the control area network to accept user input and display current system status. Traditional control systems typically have no or limited support for grouping a plurality of devices. The limited support provided by the traditional control systems have required unstable workarounds in order to group the behavior of the devices. SUMMARY OF THE INVENTION From the foregoing, it may be appreciated that a need has arisen for a method and system for operating virtual devices by a master controller in a control area network. In one aspect of the invention a system is provided to address this need, and involve a master controller and a plurality of devices coupled to the master controller, each of the devices having a respective state associated therewith, and wherein each respective state represents a plurality of data values associated with the respective device. This aspect further involves a device manager associated with the master controller. In addition, this aspect involves a virtual device associated with the device manager and a set of the devices. The virtual device has a virtual device state associated therewith and the virtual device state represents a plurality of data values associated with the virtual device. The virtual device links the virtual device state and the respective states associated with the set of devices such that the virtual device state and the respective device states are maintained in a substantially similar condition. BRIEF DESCRD?TION OF THE DRAWINGS A better understanding of the present invention will be realized from the detailed description which follows, taken in conjunction with the accompanying drawings, in which: FIGURE 1 is a block diagram of an exemplary configuration of control area networks utilizing the present invention; FIGURE 2 is a detailed block diagram of a master controller according to an embodiment of the teachings of the present invention; FIGURE 3 is a detailed block diagram of a virtual device according to an embodiment of the teachings of the present invention; FIGURE 4 is a flow chart showing a method for routing data between a plurality of the master controllers according to an embodiment of the teachings of the present invention; FIGURE 5 is a flowchart showing a method for operating virtual elements by a master controller in a control area network according to an embodiment of the teachings of the present invention; and FIGURE 6 is a flowchart showing a method for dynamically updating a master controller in a control area network according to an embodiment of the teachings of the present invention. DETAILED DESCRIPTION OF THE INVENTION Control area networks may be used to replace the typical discrete systems used to control items in a home or business. Traditionally, items such as light fixtures and VCRs have been separately and manually controlled by light switches and individual remote controls. The present invention replaces such traditional systems with integrated, electronic control area networks to control items in a home or business. FIGURE 1 is a block diagram showing an exemplary configuration of control area networks utilizing the present invention. A distributed control area network configuration 10, in the disclosed embodiment, includes a first control area network 16 and a second control area network 18. In another embodiment of the present invention, first and second control area networks 16 and 18 form a single control area network. First control area network 16 includes a plurality of control area network systems 21, 23, and 26 ("CAN systems"). Each CAN system 21, 23, and 26 includes a master controller 28 (respectively, 28A, 28B and 28C) which are described in more detail in association with FIGURE 2. Master controller 28 refer to a generic master controller, while 28A-C refer to specific master controllers. In one embodiment, one master controller defines one CAN system. Stated another way, there exists a one-to-one correspondence between CAN systems and master controllers. Each CAN system 21, 23 and 26 further has associated therewith a system identifier 27. System identifier 27 is used to uniquely identify each CAN system in a particular control area network. The system identifier may be any value or reference suitable to represent distinct systems, for example, integers, floating point numbers and character strings. In one embodiment, system identifier 27 is a numeric value which may be derived from an identifier associated with the respective master controller 28A-C. A system identifier is unique with respect to a control area network, but may be reused by a different control area network. In order to provide a clearer understanding of the present invention, an example is provided. Referring to FIGURE 1, CAN systems 21, 23 and 26 may respectively control three rooms in a house, specifically a living room, a kitchen and a bedroom. Various associated external devices 34 are controlled using the CAN systems. In particular, referring to the device and system numbers shown in FIGURE 1, device 1: 1 (hereinafter, a particular device will be referred to as "device A:B" where A is the device number and B is the system number, i.e. device 1: 1 is device 1 coupled to master controller 1) controls a security alarm panel and device 2: 1 controls a TV, both in the living room. Device 1 :2 is a microwave oven and device 2:2 controls a light switch, both in the kitchen. Device 1 :3 controls a VCR and device 2:3 controls an alarm clock, both in the bedroom. A respective hub 31 may be coupled to each master controller 28. In the disclosed embodiment, hub 31 is shown as being separate from master controller 28, however, hub 31 may be integral to master controller 28. A plurality of devices may be coupled to master controller 28 through hub 31. In one embodiment, devices 33 are slave devices which require coupling to master controller 28 for proper operation, however, various level of intelligence and capability may be included with devices 33 that may require various levels of control and interaction with master controller 28 for proper operation. Each device 33 has a device number 32 used to uniquely identify each device 33 in a particular CAN system (such as 21, 23 and 26). Device numbers 32 may be any value or reference suitable to represent distinct devices, for example, integers, floating point numbers and character strings. In addition, device numbers 32 are unique within a single CAN system (such as 21, 23 and 26), but may be reused within different CAN systems. Each device 33 further includes a plurality of ports 35, a plurality of levels (not shown), and a plurality of channels (not shown). Ports 35, levels and channels may be used to communicate with one or more associated external devices 34 controlled by device 33. Devices 33 used to control associated external devices 34 may include infrared emitters, light switches, touch pads, and direct connections to associated external devices 34. For example, associated external devices 34 may include VCRs, TVs, stereo systems, infrared remote controllers, and lights. Each master controller 28 may be coupled to one or more other master controllers 28 by an intramaster link 36A, 36B and 36C. For example, master controller 28A is coupled to master controller 28B by intramaster link 36A. Intramaster links 36A-C may be Ethernet links, AXLinks links, LONTalk links, Wide Area Network links, Local Area Network links, FTP links, Internet links, fiberoptic links, and other suitable combinations of electrical, physical and logical communication systems. Intramaster links 36A-C may be used to couple one master controller 28A to another master controller or controllers 28B-C that exist in the same or different control area networks (such as 16 and 18) or between different CAN systems (such as 21, 23 and 26). In the disclosed embodiment, intramaster link 36C couples first control area network 16 to second control area network 18 over the Internet 43, while other intramaster links 36A-B couple master controllers 28A-C within a single control area network 16. Second control area network 18 includes at least one CAN system 38 and a master controller 28D. Second control area network 18 may be configured similarly to first control area network 16 or in any other suitable way and is shown in one embodiment with exemplary master controller 28D. Continuing the previous example, CAN system 38 may represent a security service for home protection. The security service may remotely control the various devices in the home in order to provide increased security when a home owner is out of town. More specifically, a home owner sets the alarm clock in the bedroom to awaken the home owner for a business trip. Master controller 3 (28C) then commands master controller 1 (28A) to activate the TV and set the TV channel to the morning news. After a predetermined delay, such as the amount of time normally spent in the shower by the home owner, master controller 3 (28C) will send a further command to master controller 2 (28B) and request that the lights in the kitchen be turned on so that the homeowner can prepare breakfast. After breakfast the homeowner activates the security alarm using the security alarm panel in the living room and leaves the house. In response to the activation of the security alarm, master controller 1 (28 A) turns off the TV using device 1 : 1 (which master controller 1 (28A) has direct control over) and requests master controller 3 (28C) to turn off the lights in the kitchen with device 2:2. Master controller 1 (28A) then sends a further command to the security service of CAN system 38 informing the security service that the house will be empty for the duration of the business trip. Master controller (28D) of the security service may then send out commands requesting that the various master controllers in the home turn on lights, stereo systems, and TVs to simulate the presence of a person in the house in order to deter crime. A plurality of content providers 46 may be accessed by master controllers 28A-D over links 36A-C. Content providers 46 may include any of the well-known providers of information on the Internet 43 and, in particular, may also include a company web site which may provide upgrades, enhancements, and other information used to update or modify software or firmware on master controller 28. A web browser 48 may be used to manipulate and control master controllers 28A-D from a remote location over the Internet 43. FIGURE 2 is a block diagram showing details of master controller 28. Each master controller 28 includes a device manager 51, a connection manager 53, a message dispatcher 56, a TCP/IP stack 79 and firmware 57. Each of device manager 51, connection manager 53, message dispatcher 56, and firmware 57 is described only for one exemplary master controller 28, but applies to any particular master controller 28A-D. Device manager 51 maintains status information about each device 33 coupled to master controller 28. The status information maintained by device manager 51 includes port information, string information, command information, and maintenance information. The port information includes a port count for each device 33, indicating the number of ports 35 (Figure 1) supported by each device 33. Each port 35 may include one or more channels and one or more levels. The channels further include input channels and output channels and the levels further include input levels and output levels. Channel information and level information is further respectively maintained for each channel and level of each port on each device 33. The channel information maintains the status of each input channel and each output channel on the port. In the disclosed embodiment, the channel information may include information for 255 input channels and 255 output channels associated with each port 35, but device 33 may specify a different number of channels. Also, each channel may be in either an on or an off state, or may represent a single binary value, for example, high or low, and 0 or 1 , respectively. The channels may be used as flags to represent various information about device 33. In the disclosed embodiment, device 33 will inform device manager 51 of the number of channels supported by each port 35 on that device 33 when device 33 is activated, reset or turned on. Device 33 may also inform device manager 51 at a different time or change the number of supported channels dynamically. The level information maintained by device manager 51 may be used to specify a value within a range of allowed values associated with each port 35, as opposed to the channel information which tracks binary value information. In the disclosed embodiment, device 33 will inform device manager 51 of the number of levels supported by each port 35 on that device 33 when device 33 is activated, reset, or turned on. Device 33 may also inform device manager 51 at a different time or change the number of supported levels dynamically. The string information maintained by device manager 51 for each device includes a string length and a string data type or types supported by device 33. The string information is used to perform conversions between supported string data types of different devices 33. For example, if a device that utilizes 8-bit character values to represent strings needs to communicate with a device that uses 16-bit character values to represent strings, the string information can be used by device manager 51 to convert between the different string formats of the devices. Command information maintained by device manager 51 for each device includes a command length and a command data type or types supported by device 33 and may be used to perform conversions between command data types as necessary. For example, if a device that supports only 8-bit data for commands needs to communicate with a device that supports commands using 16-bit data, the command information can be used by device manager 51 to convert between the supported command types so that the devices may communicate. The maintenance information associated with device 33 may include a device type identifier, a serial number, a firmware ID, and a version string. If necessary, multiple sets of maintenance information may be maintained for a single given device 33. For example, a device 33 with both an onboard network communication chip and an onboard CPU may include two sets of maintenance information, one set for the network chip and one set for the CPU. The device type identifier may include a numeric or alphanumeric value representing the type of device. For example, the device type identifier may identify a particular device 33 as a touch pad, a light switch, or an infrared remote control. The firmware ID may include an identifier representing the current firmware version and compatible updates. Device manager 51 on each master controller 28 may also maintain non-local device information for devices 33 which are not part of the corresponding CAN system of particular master controller 28A- D. Non-local devices 33 are devices 33 which are not coupled to same master controller 28 as local devices 33. The non-local device information may also include the port information, channel information, level information, string information and command information similar to that maintained for local devices 33, and additionally includes notification information for non-local devices 33. The notification information includes the status of requests for events from other systems. The notification information allows devices 33 to request and receive data and event information from non-local devices 33. Connection manager 53 operates to manage various physical interfaces, which may include an RS232 interface 63, a PhastLink interface 67, as AXLink interface 71, and an Ethernet interface 73. Connection manager 53 receives information from various interfaces 63, 67, 71 and 73 and dispatches the data, with appropriate formatting applied if necessary, to message dispatcher 56. Connection manager 53 further provides whatever application-level management various interfaces 63, 67, 71 and 73 require. Interfaces 63, 67, 71, and 73 may be used to physically and electrically couple devices 33 to master controller 28. Interfaces 63, 67, 71 and 73 may also be used to communicate with intramaster links 36 to connect one master controller 28 to another master controller 28. Interfaces 63, 67, 71 and 73 may also be used to couple master controllers 28A-D to the Internet 43. In one embodiment, the Internet 43 is coupled to master controller 28B through Ethernet interface 73 on master controller 28B. Connection manager 53 may also manage communication with a proxy server 76. Proxy server 76 provides an alternate method for master controller 28B to communicate with the Internet 43. Proxy server 76 provides master controller 28B with greater security against intrusion and tampering from external, unauthorized users connected to the Internet 43 while providing Internet communications functionality to master controller 28B. Message dispatcher 56 is coupled to connection manager 53 and receives data from connection manager 53. Message dispatcher 56 is further coupled to a plurality of modules 77 which include a diagnostics manager 78, device manager 51, a configuration manager 86, and an IP port manager 88. In one embodiment, modules 77 may also include an FTP server 83 and an HTTP server 81 which may not be coupled to message dispatcher 56. Message dispatcher 56 operates to route data received from connection manager 53 and other modules 77 to appropriate modules 77. Message dispatcher 56 dispatches the data from connection manager 53 and other modules 77, such as diagnostics manager 78, configuration 86, and IP port manager 88, based on the content of the data, the dispatching information from connection manager 53 and modules 77, and other suitable criteria. Diagnostics manager 78 operates to monitor the operational status of devices 33. Diagnostics manager 78 may examine specific diagnostic data generated by devices 33 in response to diagnostic commands sent to devices 33 and may also examine error messages independently generated by devices 33 and modules 77. TCP/IP stack 79 is coupled to the HTTP server 81 and the FTP server 83, and provides TCP/IP based protocol and communication services to master controller 28, HTTP server 81 and FTP server 83. HTTP server 81 provides Hypertext Transport Protocol (HTTP) services to master controller 28. HTTP server 81 may be used to receive and respond to commands generated by a user at a remote location, such as a user using web browser 48 (FIGURE 1) to control first or second control area networks 16 and 18. HTTP server 81 processes the commands through a CGI engine 91. CGI engine 91 operates to interpret CGI scripts which define behavior and handling instructions for commands received over the Internet 43 by HTTP server 81. CGI engine 91 provides services which may include security and remote control services appropriate to the control area network (such as 16 and 18), master controllers 28A-D and devices 33. CGI engine 91 is further coupled to device manager 51 and manipulates devices 33 through device manager 51. FTP server 83 provides file transfer protocol (FTP) services to master controller 28. In particular, FTP server 83 may be used to provide FTP-based communications to remote users who communicate with master controller 28 over the Internet 43. FTP server 83 may be used to provide, for example, remote updating of the software and firmware controlling master controller 28. A configuration manager 86 operates to configure and reconfigure master controller 28 in suitable ways. IP port manager 88 provides suitable management capabilities for the various Internet protocol (IP) functionalities on master controller 28. Device manager 51 is further coupled to an interpreter 93 and a loadable object manager 96. Interpreter includes a version identifier 94. The version identifier 94 may include an identifier representing the current interpreter version and compatible upgrades. Interpreter 93 provides run-time interpretation of the software used to run master controllers 28 and to control devices 33. Interpreter 93 communicates with loadable object manager 96 to dynamically add new functionality to master controllers 28, modules 77 and interpreter 93. Given the rapid rate of change and development in the computer and software industries, new updates, patches, and upgrades often become available during the lifetime of a product. These updates, patches and upgrades provide new and enhanced functionality, as well as fixing errors in previous versions of the software and hardware associated with the product. Master controller 28 may be updated in the following manner. In one embodiment, loadable object manager 96 may be used in conjunction with FTP server 83 to retrieve software and firmware updates, patches and upgrades from one of the content providers 46 over the Internet 43 and then dynamically add the new functionality provided by the patches, updates and upgrades to device manager 51 , interpreter 93 and other software and firmware associated with master controller 28. The new functionality may be added using loadable object manager 96. First, communication is established by a user with one or more of the content providers 46 via FTP server 83. The user may be using web browser 48 or devices 33 to communicate with content providers 46. A list of available files is then presented to the user. The user selects one or more of the available files to be used to update master controller 28. Alternatively, appropriate files may be selected automatically for the user by master controller 28 as a function of firmware identifier 97 and version identifier 94. Other criteria may be used by the user and master controller 28 in selecting files, such as other version and identification information that may be associated with other elements of master controller 28. For example, device manager 51 and connection manager 53 may include version identifiers which could be used in selecting the appropriate files. The selected files may be used to update both software and firmware, either individually or in combination, on master controller 28. For example, firmware 57 could be updated, as well as software such as device manager 51, interpreter 93, and connection manager 53. Other elements of master controller 28 could also be updated. Firmware 57 provides required suitable functionality at a hardware level to master controller 28. In the disclosed embodiment, firmware 57 controls the operations and interactions of interfaces 63, 67, 71 and 73. The firmware 57 may also control the operation of various other hardware which forms portions of master controller 28. Firmware 57 includes a firmware identifier 97. Firmware identifier 97 may provide identification and version information relating to firmware 57. Firmware identifier 97 may also serve to identify compatible upgrades, updates and patches that may be applied to firmware 57. Firmware identifier 97, in one embodiment, is an alphanumeric value, but may include any suitable representation. Device manager 51 is further operable to provide a plurality of virtual elements corresponding to physical elements associated with master controllers 28, such as devices 33, ports 35, levels, channels, strings, commands, and notifications. Virtual elements may include a plurality of input elements coupled to output elements of each linked physical element, and a plurality of output elements coupled to input elements of each linked physical element. FIGURE 3 is a detailed block diagram of a particular virtual element, a virtual device 58. Virtual device 58 is a logical construct in device manager 51 which may be used to unify or group the behavior of a plurality of physical elements. For example, the virtual device 58 may be created by issuing the command DEFINE_COMBINE(VirtualDevice, PhysicalDevice, PhysicalDevice) to the device manager 51. Virtual device 58 includes a plurality of input elements coupled to output elements of each linked physical element, and a plurality of output elements coupled to input elements of each linked physical element. Virtual device 58 may include a virtual port 61. Virtual port 61 operates to link a plurality of ports 62A, 62B, 62C, 62D, 62E, and 62F having associated levels, channels, strings and commands on a group of devices 64A, 64B and 64C with virtual levels, virtual channels, virtual strings and virtual commands associated with virtual port 61. The virtual device 58, using the virtual port 61, maintains a logical device representation 65A, 65B and 65C (shown by dashed lines in FIGURE 3) of respective physical devices 64A-C and a logical port representation 66A,66B and 66C of respective physical ports 62 A, 62D, and 62F. For example, virtual port 61 is represented by device manager 51 as the first port (port 1) of device number 4 which is known to device manager 51 as one of virtual devices 58. Virtual port 61 links port 1 (62A) of device 1, port 2 (62D) of device 2, and port 2 (62F) of device 3. Commands or information sent to device 4, port 1 (61) are replicated by device manager 51 and individually sent to the linked devices, specifically device 1, port 1 (62A), device 2, port 2 (62D), and device 3, port 2 (62F). Similarly, the nature of the links between virtual device 4 and the physical elements allows a change in the level of port 2 (62D) of device 2 to be detected by device manager 51 and handled as a change in the virtual level of virtual device 4, port 1 (61). The detected change in the level at device 2, port 2 (62D) is replicated at the respective levels of device 1, port 1 (62 A), and device 3, port 2 (62F) by device manager 51 and is reported out to master controller 28 as a change in virtual device 4 (58). Also, the nature of the links between virtual device 4 and the physical elements confines a change in the channels, commands and strings of port 2 (62D) of device 2 to be detected by device manager 51 and handled as a change in the respective virtual channels, virtual commands and virtual strings of virtual device 4, port 1 (61). In contrast to changes in the levels, the detected change in the channels, strings and commands of device 2, port 2 (62D) is not replicated at the respective channels, strings and commands of device 1, port 1 (62A), and device 3, port 2 (62F) by device manager 51. Stated another way, the output elements of the virtual device 58 (from the virtual device 58 to the physical devices 33) are maintained in a substantially similar or identical condition, while the input elements (from the physical device 33 to the virtual device 58) are not required to be in a substantially similar or identical state. Each physical element and virtual element may have a state (not shown) associated therewith, where the state represents various data values associated with the corresponding element. A portion of the state represents the levels associated with the corresponding element, and a further portion of the state represents the channels, strings and commands associated with the corresponding element. Virtual elements provide a logical link between the state of the virtual element and the corresponding physical element. The behavior of the physical elements may be maintained and updated so that the portion of the states representing the respective physical and virtual elements' levels are identical or substantially similar to each other. The portion of the state associated with the virtual element level may also be maintained and updated similarly to the portion of the state associated with the physical elements' levels, such that the portion of the virtual element's state associated with the virtual element's levels is identical or substantially similar to the portion of the state of the respective physical element associated with the physical element's levels. The linking between the virtual element levels and the physical element levels is achieved by replicating commands and propagating state changes found at the virtual element levels to the physical element levels, and further by replicating commands and propagating state changes from any one of the linked physical elements to the corresponding virtual element and then to the other linked physical elements. In contrast, the behavior of the channels, strings and commands of the physical elements are maintained and updated such that changes in the further portion of the state of the virtual element are propagated to the further portion of the states of the respective physical elements, while changes in the further portions of the states in the physical elements are propagated only to the virtual element. In other words, changes in the channels, strings and commands of the virtual element are propagated to all of the linked physical elements, but changes in the linked physical elements are only propagated to the virtual element. For example, a change in the state associated with virtual port 61 will be replicated and propagated through logical port representation 66A-66C to physical ports 62A, 62D, and 62F. Similarly, a change in the state associated with the level of physical port 62A will be propagated to virtual port 61 and then replicated by virtual port 61 and propagated to physical ports 62A and 62F through logical port representations 66A and 66C, respectively. In contrast, a change in the state associated with the channels, strings and commands of physical port 62A will be propagated only to virtual port 61. The virtual elements are treated similarly to their respective physical elements by master controller 28. The linking between virtual elements and physical elements, in one embodiment, may be performed at compile time and may be changed by rewriting and restarting the program code used to control master controller 28. In another embodiment, the linking between virtual elements and physical elements may be dynamically changed at run time without having to reload the underlying program code for master controller 28, for example, by changing the value of a variable in the underlying program code and by issuing the command UNCOMBrNE_CHANNELS(VirtualDevice) to the device manager 51. Virtual elements are treated in the same manner by master controller 28 as the physical elements and the virtual nature of virtual elements is known only to device manager 51. FIGURE 4 is a flow chart showing a method for routing data between master controllers 28. The method begins at step 98 with the activation of master controller 28. As part of device activation step 98, master controller 28 may perform whatever initialization and startup preparation suitable for master controller 28. For convenience, the master controller just activated in step 98 will be referred to as the "activated master controller" for example, master controller 28A. One or more master controllers 28 directly connected to the activated master controller will be referred to as "connected master controllers", for example, master controller 28B, and all further master controllers 28 which may communicate with the activated master controller will be referred to as "other master controllers", for example, master controllers 28C and 28D. Next, the method proceeds to step 101 where the activated master controller transmits a connections table request to all interfaces on the activated master controller. The connections table request is a request by the activated master controller for all information that the connected master controllers have regarding the other master controllers and for information regarding the connected master controllers themselves. Specifically, the activated master controller is requesting information regarding one or more paths that may exist between the activated master controller, and the connected and other master controllers. Each path is a sequence of master controllers that must be traversed to get from one master controller to another, for example, the activated master controller would have paths from the activated master controller to connected and other master controllers. The activated master controller will use this information to route data from devices 33 coupled to the activated master controller to destinations. These paths are represented by a connections table. The connections table, in order to represent each path, stores the master controller or master controllers through which data must pass to reach a particular master controller. For example, referring to FIGURE 1, master controller 28A is coupled to master controller 28B, and master controller 28B is coupled to master controller 28C, thus, master controller 28A will store in the connections table a path from 28A to 28B and a path from 28A to 28C through 28B. Proceeding to step 103, the activated master controller 28A receives one or more connections tables from one or more of the connected 28B and other master controllers 28C-D. Then, at step 106, the activated master controller 28A updates an internal connections table using the one or more connections tables received from the connected 28B and other master controllers 28C-D. An example of steps 98-106 is presented in order to further clarify those steps. Referring to FIGURE 1, when master controller 28A activates (step 98), it transmits a connections table request (step 101) to master controller 28B. Master controller 28B then sends connections tables representing the path from master controller 28A to master controller 28B, and the path from master controller 28A to master controller 28C through master controller 28B. Master controller 28B would also include in the connections table the path from master controller 28A to master controller 28D through master controller 28B and the Internet 43. After master controller 28A has received the connections tables from master controller 28B (step 103), master controller 28A updates its internal connections table so that if one of devices 33 coupled to master controller 28A needs to communicate with one of devices 33 coupled to master controller 28B-D, master controller 28A will know if the destination device is reachable from master controller 28A and if the destination device is reachable, which path the data should be routed over. The internal connections table may also include a fallback device. The fallback device is a master controller that master controller 28A will send data to if the destination device is unreachable. Thus, the fallback device comes into use when the master controller does not know how to contact the destination device. The goal of the fallback device is that the fallback device will know how to contact the destination device even if the master controller using the fallback device did not. The method continues at step 108 where one of devices 33 coupled to activated master controller (28A) generates data that is bound for another device 33 (the destination device). Next, at step 111, activated master controller (28A) receives the data. Proceeding to step 113, the activated master controller (28A) inspects the data received from device 33. Inspection step 113 is used to determine which device is the destination device. In particular, the particular system will be determined and the particular device within the system. For example, by consulting system number 27 and an identifier associated with the device 33. Next, at step 1 16, the location of the destination slave device is determined. The destination slave device will be in one of three locations: 1) the destination device will be coupled to activated master controller (28 A); 2) the destination slave device will be coupled to one of the connected master controllers (28B); or 3) the destination slave device will be coupled to one of the other master controllers (28C-D). Then, at decisional step 118, if the destination device is coupled to activated master controller (28A), then the YES branch of decisional step 118 is followed. The YES branch of decisional step 1 18 leads to step 121 which transfers the data to the destination device and the method ends. If the destination device is not coupled to activated master controller (28A), then the NO branch of decisional step 118 is followed to decisional step 123. At decisional step 123, if the destination device is coupled to one of the connected master controllers (28B), then the YES branch of decisional step 123 is followed and the method proceeds to step 126. At step 126, the activated master controller transfers the data to the connected master controller (28B) having the destination device coupled thereto. Then the method would proceed from step 126 to step 128 where the connected master controller (28B) having the destination device coupled thereto would transfer the data to the destination device and the method would end. If the destination device is not coupled to one of the connected master controllers (28B) then the NO branch of decisional step 123 is followed to decisional step 131. Proceeding to decisional step 131, if the destination device is coupled to one of the other master controllers (28C-D), then the YES branch of decisional step 131 is followed and the method proceeds to step 133. If the destination slave device is not coupled to one of the other master controllers (28C-D), then the NO branch of decisional step 131 is followed to step 136. If the YES branch of decisional step 131 is followed, the method proceeds to step 133. In step 133, the data is transferred from master controller to master controller until the master controller having the destination device coupled thereto is reached. The data is first transferred from the activated master controller (28A) to the connected master controller (28B) which is the first master controller on the path to the master controller having the destination device coupled thereto. The connected master controller which receives the data then passes the data on to the next master controller on the path to the master controller having the destination device coupled thereto. The data continues to be passed on to further master controllers until the master controller having the destination device coupled thereto is reached. If the NO branch of decisional step 131 is followed, the method proceeds to step 136 where the data is transferred to the fallback device. As described above, the fallback device represents a master controller that the activated master controller will transfer information to if the destination device is coupled to a master controller not known to the activated master controller (28A). Stated another way, if the activated master controller (28A) has no path in its internal connections table to the master controller having the destination device coupled thereto, the activated master controller (28A) will transmit the data to the fallback master controller in the hope that the fallback master controller will know of a path to the master controller having the destination device coupled thereto. Proceeding to decisional step 138, after the data has been transferred to the fallback device in step 136 the fallback master controller determines if it knows of the master controller having the destination slave device coupled thereto. If the fallback master device knows of the master controller having the destination slave device coupled thereto, the YES branch of decisional step 138 is followed and the method proceeds to step 133 to transfer the data as described above. If the fallback master does not know of the master controller having a destination slave device coupled thereto, the NO branch of decisional step 138 is followed and the fallback master will transfer the data to its fallback master controller in the hope that its fallback master controller will know of the master controller having the destination slave device coupled thereto. Once the fallback master controller receives the data, the fallback master will operate in a manner similar to the activated master controller (28A) to attempt to find the master controller having the destination device coupled thereto. The data further includes a transfer count that tracks the number of master controllers the data has been transferred to. If the transfer count exceeds a predetermined point then the destination device is considered to be completely unreachable, the data is discarded and an error message is generated. FIGURE 5 is a flowchart showing a method for operating virtual elements by a master controller 28 in a control area network (16 and 18) according to an embodiment of the teachings of the present invention. The method begins at step 151 where the virtual element is defined. As noted previously in association with FIGURE 3, the virtual element is a logical construct used to group physical elements such as devices 33, ports 35, levels, channels, strings, commands, and notifications. The virtual element is defined by linking at least two physical elements with one virtual element. Multiple virtual elements may share particular physical elements and multiple physical elements may share particular virtual elements. In one embodiment, the virtual element is virtual device 58 and the physical elements are devices 33 (referred to as "physical devices 33" in the context of FIGURE 5 in order to clearly differentiate virtual and physical devices). Next, the method proceeds to step 153 where a virtual device state associated with the virtual device 58 is linked with physical device states respectively associated with physical devices 33, which are linked to virtual device 58. Generally, virtual elements will have an associated state and physical elements will also have an associated state. The virtual device state represents data values associated with the virtual device, and the physical device state represents a plurality of data values associated with the physical device. The virtual device state and the respective physical device states are linked such that the virtual and physical device states may be maintained in a substantially similar condition. The linked virtual and physical device states may also be maintained in an identical condition. The method proceeds to decisional step 156 where a check is made for a request to change the virtual device state. The virtual device state may change in response to a data state change request received at the virtual device 58 or to other suitable criteria. If no request to change the virtual device state is detected, then the NO branch of decisional step 156 is followed to decisional step 168. If a request to change the virtual device state is detected, then the YES branch of decisional step 156 is followed to step 158. From the YES branch of decisional step 156 the method proceeds to step 158, where the method updates the virtual device state in response to the request to the change the virtual device state. Then, at step 161, the method replicates the change in the virtual device state. In one embodiment of the present invention, the change in the virtual device state is replicated by generating a data state change request for each respective physical device 33 linked to the virtual device 58. Each generated data state change request is tailored to induce a change in the corresponding physical device state which is substantially similar to the change induced in the virtual device state. The induced change in the physical device may also be identical to the change in the virtual device. Next, at step 163, the method sends the generated data state change requests to respective devices and, at step 166, the respective physical device states are updated in response to the corresponding generated data state change requests. Returning to the NO branch of decisional step 156, the method proceeds to decisional step 168 where a check is performed for a request to change one or more of the respective physical device states. If no request to change one more of the physical device states is detected, then the NO branch of decisional step 168 is followed to step 183. If a request to change one or more of the physical device states is detected, then the YES branch of decisional step 168 is followed to step 171 where the method updates the respective physical device states. Then, at step 173, the change in the respective physical device state is replicated and, at step 176, sent to the virtual device 58. In one embodiment of the present invention, a data state change request is received at one or more of the respective physical devices 33 and a copy of the received data state change request is sent to the virtual device 58. Proceeding to step 178, the method updates the virtual device state in response to the copy of the data state change request from step 173. Next, at decisional step 181, the method determines if the data state change request effected a change in the state of the levels respectively associated with the physical devices 33. If a state change is not detected in the levels, but rather in the channels, strings and commands, then the NO branch of decisional step 181 is followed and the method proceeds back to step 156. If a state change is detected in the levels then the method replicates the state change induced in the virtual device state by copy of the data state change request from step 173 by generating at least one data state change request for each physical device 33 linked to the virtual device 58 except for the physical device 33 that has already updated its corresponding physical device state in step 171. Stated another way, virtual elements link or unify the behavior of physical elements such that a change in the virtual element state is reflected in the respective physical element states associated with linked physical elements, and a change in one or more physical element states is reflected in the virtual element state and the other respective physical element states. Thus, in step 181, the method is reacting to a change in one or more physical device states that must be propagated or replicated at the virtual device 58 and also at the other linked physical devices 33. Therefore, no generated state change request need be generated for the physical device 33 that is inducing the state change in the virtual device state and the other linked physical device states since the excluded device's state was already updated at step 171. The method then follows the YES branch of decisional step 181 back to step 163 where the generated state change requests generated in step 181 are sent to corresponding physical devices 33. Returning to the NO branch of decisional step 168, the method proceeds to step 183 where the method performs any modifications to the virtual elements indicated by input from the user, master controller 28 or other suitable input, to change one or more virtual elements. Modifications to the virtual elements may include linking additional physical elements to a particular virtual element or elements, removing physical elements from a particular virtual element or elements, creating a entirely new virtual element, and deleting an entire virtual element. In one embodiment, modification step 183 is performed using virtual device 58 and physical devices 33. The method then returns to step 156 and continues to maintain linked virtual and physical element states until the method is commanded to end (not shown). FIGURE 6 is a flowchart showing a method for dynamically updating master controllers 28 in a control area network (16 and 18) according to an embodiment of the teachings of the present invention. The method begins at step 201 where master controller 28 connects to a remote site. In one embodiment of the present invention, the remote site is one or more of content providers 46 and the connection to content providers 46 is created over the Internet 43 using FTP server 83 (shown in FIGURE 1). The connection with the remote site may be initiated automatically by master controller 28, in response to user input or in response to any suitable criteria. For example, based on version identifiers associated with software or firmware, the master controller 28 could actively search out updates, upgrades and patches. Next, at step 203, the method receives or retrieves a list of files available from the remote site. Then, at step 206, the method selects at least one of the files in the list. The selection may be performed manually by the user, automatically by master controller 28 and by a combination of manual input and automatic selection. In particular, the selection may be based on one or more version identifiers and firmware identifier 97 (shown in FIGURE 2), but any other suitable criteria may be used. Version identifiers be used to identify version, age, compatibility and other information associated with software on master controller 28. Software may include content provider interfaces to provide communication services with various content providers, other user or retailer added software, or other suitable software. For example, a security and home protection service may load custom software onto master controller 28. The software elements may have respective associated identifiers that may be used by the present method or the various software elements may share identifiers. Firmware identifier 97 may be used to determine the version, age, compatibility and other criteria associated with firmware 57 on master controller 28. The firmware 57 may also include firmware associated with the interfaces 63, 67, 71 and 73, interpreter 93, any modules 77, message dispatcher 56, CGI engine 91, proxy server 76 and connection manager 53, as well as any other suitable part of master controller 28 which is implemented in firmware. In addition, the various pieces of firmware may have individual identifiers associated with them as well as being able to share firmware identifier 97. Version identifiers and firmware identifier 97 may be used alone or in combination with each other to determine which files in the list are compatible with the software and firmware 57 on master controller 28, as well as whether the files in the list are older or newer than the software and firmware 57 on master controller 28. Then, at step 208, the files selected in step 206 are retrieved from the remote site. Proceeding to step 211, the software and the firmware may be updated either individually or collectively. The software may be updated while the software is in use. Stated another way, master controller 28 does not need to be reset or interrupted in any substantial way in order to update the software using the files selected for updating the software. The firmware may also be updated without resetting or interrupting master controller 28. In one embodiment, the loadable object manager 96 (shown in FIGURE 2) is used to update the software and firmware 57 on master controller 28. Based on the selected files, master controller 28 or the user may determine that only one of the software and firmware 57 need to be updated. If the method determines that only the software needs to be updated then only the software will be updated, similarly, if the method determines that only the firmware needs to be updated then only the firmware will be updated. The software and firmware 57 may also be updated collectively, for example, by simultaneously updating both. Once the software and/or firmware have been updated, the method ends until invoked again either automatically by master controller 28, in response to user input or in response to other suitable criteria. The present invention provides a number of technical advantages. One such technical advantage is the ability to unify the states of a virtual element and a plurality of physical elements associated with the virtual element. Another such technical advantage is the ability to dynamically create and modify a linking between a state associated with the virtual element and a respective state associated with the plurality of physical elements linked with the virtual element. It should be recognized that direct connections disclosed herein could be altered, such that two disclosed components or elements would be coupled to one another through an intermediate device or devices without being directly connected, while still realizing the present invention. Other changes, substitutions and alterations are also possible without departing from the spirit and scope of the present invention, as defined by the following claims.

Claims: WHAT IS CLAIMED IS: 1. A control area network comprising: a master controller; a first device and a second device coupled to said master controller, said first device having a first state representing a plurality of data values associated with said first device and said second device having a second state representing a plurality of data values associated with said second device; and a virtual device associated with said first and second devices, said virtual device having a virtual device state representing a plurality of data values associated with said virtual device, said virtual device linking said virtual device state to said first and second states. 2. The control area network according to claim 1, wherein said first and second devices are each a port and said virtual device is a virtual port. 3. The control area network according to claim 1 , wherein said first and second devices are each levels and said virtual device is a virtual level. 4. The control area network according to claim 1, wherein said first and second devices are each channels and said virtual device is a virtual channel. 5. The control area network according to claim 1 further including a device manager associated with said master controller. 6. The control area network according to claim 5 wherein said device manager is operable to utilize said virtual device to maintain said virtual device state and said first and second states in a substantially similar condition. 7. The control area network according to claim 5 further including a data state change request being received by said virtual device, a first generated data state change request being generated by said device manager based on said data state change request and sent to said first device, and a second generated data state change request being generated by said device manager based on said data state change request and sent to said second device. 8. The control area network according to claim 7, wherein said data state change request is a command sent by said master controller in the control area network. 9. The control area network according to claim 7, wherein said virtual device state is updated in response to said data state change request, said first state is updated in response to said first generated data state change request and said second state is updated in response to said second data state change request. 10. The control area network according to claim 7, wherein said first and second generated data state changes request are generated by replicating said data state change request received by said virtual device such that said first and second generated data state change requests are substantially similar to said data state change request. 11. The control area network according to claim 10, wherein said first and second devices are each operable to respond to input by changing said respective first and second states, wherein the change in said first state effects substantially similar changes in said virtual device state, and wherein the change in said second state effects substantially similar changes in said virtual device state. 12. The control area network according to claim 11, wherein said input is an external input from an associated external device. 13. The control area network according to claim 11, wherein said input is an external input from a user. 14. The control area network according to claim 10 further including level input, wherein each of said virtual device state and said first and second states include a level data portion therein, wherein said first and second devices are each operable to respond to said input by changing said level data portion of said respective first and second states, wherein the change in said level data portion of said first state is replicated in said level data portion of said virtual device state by said device manager and the change in said level data portion of said first state is replicated in said level data portion of said second device state by said device manager, and wherein the change in said level data portion of said second state is replicated in said level data portion of said virtual device state by said device manager and the change in said level data portion of said second state is replicated in said level data portion of said first device state by said device manager such that each of said level data portions of said virtual device state, said first device state and said second device state are maintained in a substantially similar condition. 15. The control area network according to claim 10 further including channel change input, wherein each of said virtual device state and said first and second states include a channel data portion therein, wherein said first and second devices are each operable to respond to said channel change input by changing said channel data portion of said respective first and second states, wherein the change in said channel data portion of said first state is replicated in said channel data portion of said virtual device state by said device manager, and wherein the change in said channel data portion of said second state is replicated in said channel data portion of said virtual device state by said device manager. 16. The control area network according to claim 10 further including string change input, wherein each of said virtual device state and said first and second states include a string data portion therein, wherein said first and second devices are each operable to respond to said string change input by changing said string data portion of said respective first and second states, wherein the change in said string data portion of said first state is replicated in said string data portion of said virtual device state by said device manager, and wherein the change in said string data portion of said second state is replicated in said string data portion of said virtual device state by said device manager. 17. The control area network according to claim 10 further including command change input, wherein each of said virtual device state and said first and second states include a command data portion therein, wherein said first and second devices are each operable to respond to said command change input by changing said command data portion of said respective first and second states, wherein the change in said command data portion of said first state is replicated in said command data portion of said virtual device state by said device manager, and wherein the change in said command data portion of said second state is replicated in said command data portion of said virtual device state by said device manager. 18. The control area network according to claim 5, wherein said linking between said virtual device and said first and second devices may be created at run-time. 19. The control area network according to claim 5, wherein said linking between said virtual device and said first and second devices may be modified at run-time. 20. The control area network according to claim 5, wherein said linking between said virtual device and said first and second devices may be defined only at compile time and may only be changed by resetting said master controller. 21. A control area network comprising: a master controller; a plurality of devices coupled to said master controller, each said device having a respective state representing a plurality of data values associated with said respective devices; and a virtual device associated with a set of said devices, said virtual device having a virtual device state representing a plurality of data values associated with said virtual device, said virtual device linking said virtual device state and said respective states associated with said set. 22. The control area network according to claim 21, wherein said virtual device state and said respective states are maintained in a substantially similar condition. 23. The control area network according to claim 21 further including a device manager associated with said master controller and said virtual device being further associated with said device manager. 24. The control area network according to claim 23 further including a data state change request received by said virtual device, a plurality of respective device state change requests generated by said virtual device for each device in said set in response to said data state change request and wherein said device state change requests are sent to said each device in said set. 25. The control area network according to claim 24, wherein said data state change request is a command sent by said master controller in the control area network. 26. The control area network according to claim 24, wherein said virtual device updates said virtual device state in response to said data state change request and each of said devices in said set update said respective states in response to said device state change requests. 27. The control area network according to claim 24, wherein said device state change requests are generated by replicating said data state change request received by said virtual device such that each said device state change request is substantially similar to said data state change request. 28. The control area network according to claim 27 further including level input, wherein each of said virtual device state and said respective states include a level data portion therein, wherein said devices in said set are each operable to respond to said level input by changing said level data portion of said respective states, wherein the change in said level data portion of state of one of said devices in said set is effected in said level data portion of said state associated with each of said devices in said set distinct from said one of said devices in said set and in said level data portion of said virtual device state such that each of said level data portions of said respective states associated with said devices in said set and said virtual device state are maintained in a substantially similar condition. 29. The control area network according to claim 27 further including channel change input, wherein each of said virtual device state and said respective states include a channel data portion therein, wherein said devices in said set are each operable to respond to said channel input by changing said channel data portion of said respective states, wherein the change in said channel data portion of state of one of said devices in said set is effected in said channel data portion of said virtual device state. 30. The control area network according to claim 27 further including string change input, wherein each of said virtual device state and said respective states include a string data portion therein, wherein said devices in said set are each operable to respond to said string input by changing said string data portion of said respective states, wherein the change in said string data portion of state of one of said devices in said set is effected in said string data portion of said virtual device state. 31. The control area network according to claim 27 further including command change input, wherein each of said virtual device state and said respective states include a command data portion therein, wherein said devices in said set are each operable to respond to said command input by changing said command data portion of said respective states, wherein the change in said command data portion of state of one of said devices in said set is effected in said commanddata portion of said virtual device state. 32. The control area network according to claim 28, wherein said level input is from an associated external device associated with said devices. 33. The control area network according to claim 28, wherein said level input is an external input from a user. 34. The control area network according to claim 21, wherein said linking between said virtual device state and said respective device states may be created at run-time. 35. The control area network according to claim 21, wherein said linking between said virtual device state and said respective device states may be modified at run-time. 36. The control area network according to claim 21, wherein said linking between said virtual device state and said respective device states may be defined only at compile time and may only be changed by resetting said master controller. 37. A method for supporting a virtual device on a master controller in a control area network comprising: associating the virtual device to a plurality of devices; linking a plurality of data states respectively associated with the virtual device and each of the plurality of devices associated with the virtual device; and maintaining each respective data state in a substantially similar condition. 38. The method according to claim 37, wherein maintaining each respective data state in a substantially similar condition includes: receiving a data state change request at the virtual device, wherein the data state change request effects a change in the data state of the virtual device; and replicating the data state change request for each of the devices associated with the virtual device. 39. The method according to claim 38, wherein replicating the command for each of the devices associated with the virtual device further includes changing the data state of the virtual device in response to the data state change request, and wherein maintaining each respective data state in a substantially similar condition further includes changing the data state of each of the devices associated with the virtual device in response to the replicated data state change request. 40. The method according to claim 39, wherein the data state change request is a command sent by the master controller in the control area network. 41. The method according to claim 37, wherein maintaining each respective data state in a substantially similar condition includes: receiving a data state change request at a one of the devices associated with the virtual device; and sending the data state change request to the virtual device. 42. The method according to claim 41, wherein receiving a data state change request at a one of the devices associated with the virtual device includes changing the data state of the one of the devices in response to the data state change request. 43. The method according to claim 42, wherein the data state change request is a command sent by a master controller in the control area network. 44. The method according to claim 37, wherein maintaining each respective data state in a substantially similar condition includes: receiving a level state change request at a one of the devices associated with the virtual device; sending the level state change request to the virtual device; changing a level data state portion of the data state of the virtual device in response to the level state change request; replicating the level state change request for each of the devices associated with the virtual device; and changing a level data portion of the data state of each of the devices associated with the virtual device in response to the replicated data state change request. 45. The method according to claim 44, wherein the data state change request is a command sent by a master controller in the control area network.

Inventors: BARBER RONALD W, MCGRANE WILLIAM B, BARBER, RONALD, W., MCGRANE, WILLIAM, B.
Applicants: BARBER RONALD W, MCGRANE WILLIAM B, PANJA INC, BARBER, RONALD, W., MCGRANE, WILLIAM, B., PANJA, INC.
Application year: 2000
Main classification: G08C19
IPC codes: H04L12, H04L29