Moved the logic for device-specific communication to the adapter class.