Avatar of naseeam
naseeam
Flag for United States of America asked on

Public Interface Design Help

Earlier question was asked about providing an interface for communicating between two software layers.  One software layer would select up to 8 devices for which it wants to read data.  Another software layer would scan selected devices and provide data for each device to the software layer that selected the devices.  Experts provided two great solutions as follows:

ScanDevices(unsigned char mask);
char is 8 bits ... Bit 0 corresponding to Device 1, Bit 1 for device 2 and so on.  Calling module simply sets and passes those bits as 1 which need to be scanned.

Another interface is like
ScanDevices(int NumberOfDevices, Device * DeviceList)

The question is as follows:  
Besides selecting number of devices and device type, an integer number is also specified for each device type selected.
For example,
device 1,      400
device 4,      600
device 8,      700

Please revise above interface to reflect this new requirement for integer number.

Thanks,
C

Avatar of undefined
Last Comment
sunnycoder

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
sunnycoder

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23