[Quickfix-developers] constructing generic repeating groups
Brought to you by:
orenmnero
|
From: Rick L. <ric...@gm...> - 2007-12-05 18:25:17
|
Greetings,
I believe I've made some headway with constructing repeating groups,
however I feel like this method is a "hack" and, more importantly,
QuickFix isn't recognizing the repeating groups (even though the
message, when printed, /seems /complete). Here is the method I'm using:
QuickFix42.Message message = new QuickFix42.Message();
int numEntriesInGroup = 3;
for (int i = 0; i < numEntriesInGroup; i++) {
QuickFix.Group sequenceGroup = new QuickFix.Group(1, 50); //<- not
entirely sure what these params do
if (i == 0) {
sequenceGroup.setField(new QuickFix.IntField(864,
numEntriesInGroup));
}
// add elements to the sequenceGroup Group
message.addGroup(sequenceGroup);
}
I'm adding the length field to the FIRST member of the group, so this
way it only appears at the start of the sequence. For instance:
[1128]="8" [35]="d" [49]="CME" [34]="723" [52]="20071204220936787"
[911]="2140" *[864]="2"* *[865]="5" [866]="20050916" [1145]="213000000"
[865]="7" [866]="20101213" [1145]="110000000" *[1150]="0.00"
[1149]="2000.00"
This, I believe, is proper form for a repeating group, however QuickFix
doesn't like it. Not only that, but now when I try to grab field 864
from the message, it says it does not exist (I'm guessing because in
actuality, message 864 exists in a /group within /the message)?
Any help is greatly appreciated.
Rick
|