itm / wsn-device-drivers

Drivers for Wireless Sensor Network Devices
Other
6 stars 4 forks source link

Remove Connection interface from Device #86

Closed mlegenhausen closed 12 years ago

mlegenhausen commented 12 years ago

Just confusing

mlegenhausen commented 12 years ago

But the problem is that when I remove the Connection Interface from the Device Interface the usage is more complicated, because I have to add a line to fetch the connection when I want to connect or close the connection.

One solution I prefer is to return the Device after the connect was successful. That implies that the factories have to return a Connection instead of a Device. This will make the usage of the drivers more intuitive cause you have to connect before you use the device.

Any other suggestions?