How to CUE this
tdewild
Posts: 49
20 microphone units, every microphone send ONn if it going online and send OFFn when going offline.
I need a Wait list of max 5 positions.
Position: [1][2][3][4][5]
I allway`s need to send the name of the first device in the wait list if some position changed in the wait list like below.
microphone online
ON12
ON16
ON9
Wait list need to change to: [ON12],[ON16],[ON9],[4],[5]
Send string online = ON12
microphone online
ON6
ON18
Wait list need to change to: [ON12],[ON16],[ON9],[ON6],[ON18]
Send string online = ON12
microphone offline
OFF16
Wait list need to change to: [ON12],[ON9],[ON6],[ON18],[5]
Send string online = ON12
microphone offline
OFF12
Wait list need to change to: [ON9],[ON6],[ON18],[4],[5]
Send string online = ON9
microphone online
ON1
Wait list need to change to: [ON9],[ON6],[ON18],[ON1],[5]
Send string online = ON9
How to handle this?
Toon
I need a Wait list of max 5 positions.
Position: [1][2][3][4][5]
I allway`s need to send the name of the first device in the wait list if some position changed in the wait list like below.
microphone online
ON12
ON16
ON9
Wait list need to change to: [ON12],[ON16],[ON9],[4],[5]
Send string online = ON12
microphone online
ON6
ON18
Wait list need to change to: [ON12],[ON16],[ON9],[ON6],[ON18]
Send string online = ON12
microphone offline
OFF16
Wait list need to change to: [ON12],[ON9],[ON6],[ON18],[5]
Send string online = ON12
microphone offline
OFF12
Wait list need to change to: [ON9],[ON6],[ON18],[4],[5]
Send string online = ON9
microphone online
ON1
Wait list need to change to: [ON9],[ON6],[ON18],[ON1],[5]
Send string online = ON9
How to handle this?
Toon
0
Comments
I get the online/offline mics info from the RS232 buffer and store them in a variable like: CHAR nMic[3] // hold last online mic and CHAR dMic[3] // hold last offline mic
These are numbers like this: nMic = '001'
After that I need to manage a queue for these mics like I wrote before.
I will do some testing using your code, thanks for that.
Toon.
Here is adding the mics to the queue from an RS232 Buffer, assuming Carriage Return or something between messages.