1 "Master Master" and 116 "Sub-Masters." Need help please.
staticattic
Posts: 200
This is BY FAR the largest project I have ever done. I asked this in another thread, but felt the potential topic drift warranted its own thread.
In my building, there is one Master Master that all of the sub masters talk to. The Master Master controls a Pesa Cheetah 512 x 512 video matrix. Each sub master has an 8 x 8 Pesa video matrix in their rooms. I need to pass vairables from the Master Master to the sub-masters when they need it. For example, the 512 x 512 matrix has a DSS head end as poart of its inputs. So, if Room 1 wants to watch CNN here's what happens:
Room 1 asks for CNN.
Each room has multiple outputs from the 512 matrix, so the user is also asked what tie line they want to use for CNN.
For room 1, we'll say inputs 1 - 4 on the local matrix are tied to outputs 40 - 43 of the 512 x 512 matrix.
Once the user selects a tie line, room 1 sends a command to a virtual device.
SEND_COMMAND vdvDEVICE, 'ROUTE=DSS 1 PORT x' (Port x equals the input of the local matrix)
Room 1 sends a command to a virtual device on the Master Master that represents room 1.
The Master Master uses a DATA_EVENT to parse the data rx'd on the vdvDEVICE:
Now the Master Master knows which room asked for CNN and which port they are using. The fnDoRoute builds the string to send to the 512 x 512 matrix and now, room 1 is watching CNN.
I want to pass the feedback from the 512 x 512 matrix to the sub-master. The sub-master, via direct feedback, would then place the CNN logo on the appropriate button on the TP and that's what I am not quite sure how to do. If Room 1 has 4 outputs from the 512 x 512 matrix, I was thinking on the sub-master I need to create an array with each index representing individual tie lines. If the user wanted CNN on tie line 3, then everywhere they sent tie line 3, the CNN logo would display. How can I populate that array? Once I get the array populated, I'm good from there. I just need a push in the right direction. There are over 100 sub-masters communicating with the Master Master, so I was thinking each room's array needs to be updated only when that room makes a change vice all of the sub-masters trying to talk to the Master Master at once. Thanks.
In my building, there is one Master Master that all of the sub masters talk to. The Master Master controls a Pesa Cheetah 512 x 512 video matrix. Each sub master has an 8 x 8 Pesa video matrix in their rooms. I need to pass vairables from the Master Master to the sub-masters when they need it. For example, the 512 x 512 matrix has a DSS head end as poart of its inputs. So, if Room 1 wants to watch CNN here's what happens:
Room 1 asks for CNN.
Each room has multiple outputs from the 512 matrix, so the user is also asked what tie line they want to use for CNN.
For room 1, we'll say inputs 1 - 4 on the local matrix are tied to outputs 40 - 43 of the 512 x 512 matrix.
Once the user selects a tie line, room 1 sends a command to a virtual device.
SEND_COMMAND vdvDEVICE, 'ROUTE=DSS 1 PORT x' (Port x equals the input of the local matrix)
Room 1 sends a command to a virtual device on the Master Master that represents room 1.
The Master Master uses a DATA_EVENT to parse the data rx'd on the vdvDEVICE:
DATA_EVENT[vdvDEVICE] { COMMAND: { STACK_VAR INTEGER nRoom STACK_VAR INTEGER nIndex, nIndex2, nRoomIN, nRoomOUT STACK_VAR INTEGER nIn, nOut STACK_VAR INTEGER nRoomIndex nRoom = GET_LAST(vdvDEVICE) SELECT { ACTIVE(FIND_STRING(DATA.TEXT,"'ROUTE='",1)): { REMOVE_STRING(DATA.TEXT,"'ROUTE='",1) SELECT { ACTIVE(LEFT_STRING(DATA.TEXT,3) = 'DSS'): { REMOVE_STRING(DATA.TEXT,"'DSS'",1) nIn = ATOI(DATA.TEXT) } } REMOVE_STRING(DATA.TEXT, ',' ,1) SELECT { ACTIVE(FIND_STRING(DATA.TEXT,"'PORT'",1)): { REMOVE_STRING(DATA.TEXT,"'PORT'",1) nINDEX2 = ATOI(DATA.TEXT) nOUT = nRoomOutputs[nRoom][nIndex2] } } fnDoRoute(nIn,nOut,BOTH) } } } }
Now the Master Master knows which room asked for CNN and which port they are using. The fnDoRoute builds the string to send to the 512 x 512 matrix and now, room 1 is watching CNN.
I want to pass the feedback from the 512 x 512 matrix to the sub-master. The sub-master, via direct feedback, would then place the CNN logo on the appropriate button on the TP and that's what I am not quite sure how to do. If Room 1 has 4 outputs from the 512 x 512 matrix, I was thinking on the sub-master I need to create an array with each index representing individual tie lines. If the user wanted CNN on tie line 3, then everywhere they sent tie line 3, the CNN logo would display. How can I populate that array? Once I get the array populated, I'm good from there. I just need a push in the right direction. There are over 100 sub-masters communicating with the Master Master, so I was thinking each room's array needs to be updated only when that room makes a change vice all of the sub-masters trying to talk to the Master Master at once. Thanks.
0
Comments
Using my earlier example, if a room makes a change, I was thinking I could do something like:
SEND_COMMAND vdvDevice[nRoom], "'Input', ITOA(nRouterMatrix[nOut]), 'to position', ITOA(nIndex2)"
I could then parse that data however I see fit on the sub-master. Now I just need to be able to go the other way. If someone controlling the Master Master sends a feed to a particular room, the same process needs to happen. I think I can get something like this to work well enough unless someone makes a change to the 512 x 512 matrix via the front panel of the matrix. In that case, my data would be inaccurate.
What if I created 2 nRouterMatrix arrays? For the first go round, array 1 could populate. The second go round, array 2 would populate. I could compare the two and if they were identical do nothing. If something changed, then take action only on that index of the array. This is by far the largest project I have ever done by miles, so I am feeling the pressure. Any ideas would be helpful. Thanks again.
It should be pretty easy to only update the pertinent rooms file for a switch by following the output number that the where the change occurred.
The sub masters would then download or read the file to check for changes using a timeline to verify status as often as you see necessary.
The other solution I that I would consider is to have a small computer running mySQL or your favorite database software to track all of the inputs/outputs and channels. You could either send the SQL commands directly from AMX or create a simple PHP file to handle the SQL commands via POST data in a standard HTML header request.
Oh the humanity of it all...
Now that you mention it, I remember doing that in Programmer III. That's something I would like to play with just for fun to see if I can get it working, but I think it is overkill for this project. I think what I am going to do is fake the feedback in the individual rooms, but on the TP of the Master-Master, I'll have that one update per the feedback from the 512 x 512 matrix.
I'm not going to say I am in over my head on this project, but I am certainly treading in very deep water. As the lone "AMX Guy," when I was asked about this stuff, I made a typical rookie mistake and ended up getting myself Jeff Goldblumed. I knew better, but I guess I was blinded by the sheer size and scope of this project.
As this project goes on, I am sure I am going to hit some stumbling blocks. This thread is going to stay pretty active.
That should be very easy.
Have the "master master" parse feedback from the switcher. When an input is connected to an output, send a level to a virtual device on the associated submaster.
Something like as follows should do the trick...
On the "master master":
And on the sub masters:
Note that the feedback sent to the sub systems by this code is physical input numbers on the switcher. This should probably be abstracted into virtual constants that identify individual sources so that if router connections change the code on all the submasters doesn't have to change. Likewise, the submasters should probably be requesting "sources" from the master master, not physical inputs on the main router.
Also (without knowing the system you're working on), you'd likely to have to expand this to support multiple switching layers (so that audio and video switching feedback is sent to the room systems).
As the constants relating to levels on the room virtual devices are common between the master master code and submaster code, they should probably be moved out to a common include file that is #included into both systems,
Jeff, I have to ask, is this for a government facility in the Southeast? ...as I was recently hired and thrown into a project that sounds almost identical... same routers and number of controllers.
-Paul
That explains it, you must be one of those liberals. It all makes perfect sense to me now!