I am trying to get the 240 Link Control Word bits out of the LDU1 frame
using this:

void
ldu1::decode_lcw()
{
const size_t LCW_BITS[] = {
410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
788, 789, 792, 793, 794, 795, 796, 797, 798, 799,
800, 801, 802, 803, 804, 805, 806, 807, 808, 809,
810, 811, 812, 813, 814, 815, 816, 817, 818, 819,
820, 821, 822, 823, 824, 825, 826, 827, 828, 829,
978, 979, 980, 981, 982, 983, 984, 985, 986, 987,
988, 989, 990, 991, 992, 993, 994, 995, 996, 997,
998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1008, 1009,
1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019,
1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177,
1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187,
1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197,
1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207,
1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365,
1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377,
1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387,
1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397,
};
int * encoded_lcw = new int[240];
yank(frame_body(), LCW_BITS, 240, encoded_lcw, 0);
correct_lcw( encoded_lcw );
delete [] encoded_lcw;
}

What am I doing wrong here? the output is obviously wrong:

LDU1 LCW Data--------------------------------------------
----------------------------------------------------------
Encoded LCW:
LCF: 00111011
MFID: 00110000
TGID: 0000000100000000
Source ID: 000100000000000001000100

Hamming decode:
LCF: 00111011
MFID: 00110000
TGID: 0000000000000000
Source ID: 000000000000000000000000

RS decode:
LCF: 00111011
MFID: 00110000
TGID: 0000000000000000
Source ID: 000000000000000000000000
----------------------------------------------------------

I am pretty sure there is something wrong with how I am using the
yank(), but I have been able to find something else to try. Any help
will be much appreciated. Thanks.

--
------
Matt D
------------

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
Visit Your Group
.

__,_._,___