Changes between Version 12 and Version 13 of Internal/NewNodeAgent
- Timestamp:
- Jan 16, 2015, 10:55:58 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/NewNodeAgent
v12 v13 182 182 When a call to connect is made, the config hash is checked for values and if any exist the approriate configure call is made. The set of possible props is stored in a frozen has along with a pointer to the function that will handle that prop. Configure it self takes 2 string arguments, the first is the "prop name" to be configured, and the second is a value string. e.g. ("ip","192.168.1.1."). If a prop name hit occurs in the hash, the mapped function is called and the value feed as an argument to that function. 183 183 184 A similar design is going to be worked into the WIFI class. 184 A similar design is going to be worked into the WIFI class. The expected behavior of the configure function is that if a prop name is not found by the current intonation of the configure function, a call to super is made to see if the superclass configure function can handle it. Eventually if you get all the way to up the device super class function, it raises an exception. 185 186 The prop names handled by Device are: 187 * None - Raises Exception 188 189 The prop names handled by Ethernet are: 190 * ip 191 * mtu 192 * mac 193 * arp 194 * forwarding 195 * gateway 196 197 The prop names for WiFi are: 198 * mode 199 * rate 200 * essid 201 * channel