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.
device 1, 400
device 4, 600
device 8, 700
Please revise above interface to reflect this new requirement for integer number.