Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag 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,
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial