-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for Device Structure (Not Final or Decided) #828
Comments
man, good approach, btw let's go with the better approach. Quick question: which (software)design pattern do you are use / or aim to use ? |
|
There are two different objects basically holding the same information to an extent. And both of them are dependent on each other (
The DeviceInfo object has methods to read characteristics to get data like the firmware version, hardware name etc., But it depends on BtDeviceStruct to differentiate between device type using the Both of them can be combined together to have a unified object for device details.
The |
I was thinking of the Abstract Factory pattern, but you know it better man. Please guide |
@mdmohsin7 man, please read more about Decorator, Strategy, Factory, Composite design pattern and tell me, what is the best fit for(and why)?
In the meantime, you could try to implement it and provide me w/ a PR. Don't worry about the design pattern but after that you should know which one is the best-fit for our case. |
DeviceBase
will define of all the core methods that will have to be implemented by a device. This includes all the methods related to connectivity and read/write operations. The communication to device will be managed by KeepAlivedConnectionRecordAudio
,CaptureImage
,StoreAudio
,StreamVideo
) and will be extended by the device depending on the features it supportsDeviceBase
and will also extend the functionality mixins (implemented using KASM)DeviceProvider
will be changed toDeviceManager
, whose sole responsibility would be to act as an interface which allows the user to interact with the Device and perform various operations.The text was updated successfully, but these errors were encountered: