troubleshooting Question

Public Interface Design Help

Avatar of naseeam
naseeamFlag for United States of America asked on
1 Comment1 Solution212 ViewsLast Modified:
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.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros