1046 | | cnt += snprintf(tmp+cnt, bufflen-cnt, "%s:%02d ", |
---|
1047 | | srcBlockToString(m_input_route_map[j].src), |
---|
1048 | | m_input_route_map[j].srcChannel); |
---|
1049 | | } |
---|
1050 | | printMessage("%s\n", tmp);*/ |
---|
| 1046 | cnt += snprintf(tmp+cnt, bufflen-cnt, "%s ", getRowName(j).data()); |
---|
| 1047 | } |
---|
| 1048 | printMessage("%s\n", tmp); |
---|
1058 | | |
---|
1059 | | // construct the set of destinations |
---|
1060 | | std::string destinations; |
---|
1061 | | /*for ( RouterConfig::RouteVectorIterator it = m_output_route_map[i].begin(); |
---|
1062 | | it != m_output_route_map[i].end(); |
---|
1063 | | ++it ) |
---|
1064 | | { |
---|
1065 | | RouterConfig::Route r = *it; |
---|
1066 | | // check whether the destination is valid |
---|
1067 | | if((r.dst != eRD_Invalid) && (r.dstChannel >= 0)) { |
---|
1068 | | char tmp[128]; |
---|
1069 | | snprintf(tmp, 128, "%s:%d,", dstBlockToString(r.dst), r.dstChannel); |
---|
1070 | | destinations += tmp; |
---|
1071 | | } |
---|
1072 | | }*/ |
---|
1073 | | |
---|
1074 | | cnt += snprintf(tmp+cnt, bufflen-cnt, "=[%02d]=> %s ", i, destinations.c_str()); |
---|
| 1056 | |
---|
| 1057 | // Display destinations name |
---|
| 1058 | cnt += snprintf(tmp+cnt, bufflen-cnt, "=[%02d]=> %s", i, getColName(i).data()); |
---|
1147 | | #if 0 |
---|
| 1131 | std::string |
---|
| 1132 | EAP::Mixer::getRowName(const int row) { |
---|
| 1133 | std::string mixer_src; |
---|
| 1134 | if (row < 0 || row > m_eap.m_mixer_nb_tx) return "Invalid"; |
---|
| 1135 | unsigned int dstid = (eRD_Mixer0<<4) + row; // Mixer has consecutive ID's |
---|
| 1136 | debugOutput(DEBUG_LEVEL_VERBOSE, "EAP::Mixer::getRowName( %d ): ID's %d\n", row, dstid); |
---|
| 1137 | if (m_eap.m_router){ |
---|
| 1138 | std::string mixer_dst = m_eap.m_router->getDestinationName(dstid); |
---|
| 1139 | mixer_src = m_eap.m_router->getSourceForDestination(mixer_dst); |
---|
| 1140 | debugOutput(DEBUG_LEVEL_VERBOSE, "EAP::Mixer::found %s as source for %s\n", mixer_src.data(), |
---|
| 1141 | mixer_dst.data()); |
---|
| 1142 | } |
---|
| 1143 | else { |
---|
| 1144 | char tmp[32]; |
---|
| 1145 | snprintf(tmp, 32, "MixIn:%d", row); |
---|
| 1146 | mixer_src = tmp; |
---|
| 1147 | } |
---|
| 1148 | |
---|
| 1149 | return mixer_src; |
---|
| 1150 | } |
---|
| 1151 | |
---|
1150 | | //debugOutput(DEBUG_LEVEL_VERBOSE, "EAP::Mixer::getColName( %i )\n"); |
---|
1151 | | char tmp[32]; |
---|
1152 | | snprintf(tmp, 32, "%s:%d", srcBlockToString(m_input_route_map[col].src), m_input_route_map[col].srcChannel); |
---|
1153 | | return tmp; |
---|
1154 | | } |
---|
1155 | | std::string |
---|
1156 | | EAP::Mixer::getRowName(const int row) { |
---|
1157 | | if (m_output_route_map[row].size() == 0) { |
---|
1158 | | return "Not connected"; |
---|
1159 | | } |
---|
1160 | | if (m_output_route_map[row].size() > 1) { |
---|
1161 | | return "Many"; |
---|
1162 | | } |
---|
1163 | | char tmp[32]; |
---|
1164 | | snprintf(tmp, 32, "%s:%d", dstBlockToString(m_output_route_map[row][0].dst), m_output_route_map[row][0].dstChannel); |
---|
1165 | | return tmp; |
---|
1166 | | } |
---|
1167 | | #endif |
---|
| 1154 | std::string mixer_dst; |
---|
| 1155 | stringlist dest_names; |
---|
| 1156 | |
---|
| 1157 | // invalid col index |
---|
| 1158 | if (col < 0 || col > m_eap.m_mixer_nb_rx) { |
---|
| 1159 | mixer_dst.append("Invalid"); |
---|
| 1160 | return mixer_dst; |
---|
| 1161 | } |
---|
| 1162 | |
---|
| 1163 | unsigned int srcid = (eRS_Mixer<<4) + col; // Mixer has consecutive ID's |
---|
| 1164 | debugOutput(DEBUG_LEVEL_VERBOSE, "EAP::Mixer::getColName( %d ): ID's %d\n", col, srcid); |
---|
| 1165 | if (m_eap.m_router){ |
---|
| 1166 | std::string mixer_src = m_eap.m_router->getSourceName(srcid); |
---|
| 1167 | dest_names = m_eap.m_router->getDestinationsForSource(mixer_src); |
---|
| 1168 | if (dest_names.size() > 0) { |
---|
| 1169 | stringlist::iterator it_d = dest_names.begin(); |
---|
| 1170 | stringlist::iterator it_d_end_m1 = dest_names.end(); --it_d_end_m1; |
---|
| 1171 | while (it_d != it_d_end_m1) { |
---|
| 1172 | mixer_dst.append((*it_d).c_str()); mixer_dst.append("; "); |
---|
| 1173 | it_d++; |
---|
| 1174 | } |
---|
| 1175 | } |
---|
| 1176 | } else { |
---|
| 1177 | char tmp[32]; |
---|
| 1178 | snprintf(tmp, 32, "MixOut:%d", col); |
---|
| 1179 | mixer_dst.append(tmp); |
---|
| 1180 | } |
---|
| 1181 | |
---|
| 1182 | return mixer_dst; |
---|
| 1183 | } |
---|