|
How to solve the problem? Let’s start with an example from our lives. We know that the voltage of alternating current in different countries is different, including V and V. If it is directly connected to electrical equipment, the electrical equipment will burn out because the operating voltage is out of range. How to solve this problem? The problem is solved through the power adapter.
For example, the picture below is a notebook power adapter, which indicates that the working input Indonesia Telegram Number Data voltage range is - volts. Although the input voltage fluctuates widely, the output has always been stable within the voltage range required by the notebook (picture below) is volts). How to design IoT device access products? An adapter is an intermediate device that can handle different input sources without affecting the output.

Inspired by adapters, an adapter pattern emerged in the field of software design. The adapter pattern converts different inputs into the same output, thereby avoiding a direct relationship between the business layer and the input. In this way, all input source change processing is completed by the adapter, and the business layer does not need to care about input source changes. For Internet of Things device access, we will find that the problems to be solved by adapters are the same.
|
|