Comments (15)
Mail list thread:
http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/2012q2/000124.html
from quickfixn.
Has anyone looked at how Java does it?
from quickfixn.
A bit heavy handed, but would this work?
public void OnMessage(QuickFix.FIX42.MarketDataIncrementalRefresh message, SessionID sessionID)
{
MDReqID mdReqID = message.MDReqID;
int count = message.GetInt(Tags.NoMDEntries);
var list = new List<QuickFix.Group>();
for (int grpIndex = 1; grpIndex <= count; grpIndex++)
{
list.Add(message.GetGroup(grpIndex, Tags.NoMDEntries));
}
foreach (var noMDEntriesGroup in list.OfType<QuickFix.FIX42.MarketDataIncrementalRefresh.NoMDEntriesGroup>())
{
// code omitted here
}
}
If you're expecting them to all be NoMDEntriesGroup you might replace OfType with Cast.
from quickfixn.
Sorry I missed the part where you already tried the explicit cast. The above code probably won't be of any use.
from quickfixn.
Unfortunately, bigger hammers aren't the solution here. I've tried :).
So as far as a solution in code, what does everyone else think is the best method?
I'm a bit pressed for time but am willing to do some work on this. It'll make my life easier in the long run so my boss shouldn't mind.
from quickfixn.
We'd really like to maintain some semblance of similarity between QF/n and QF for C++/Java.
I'd really like to see how QF/J handles this. They might have a design we can steal. I'll have a look later if I can find the time.
from quickfixn.
I had the same problem with a MarketDataSnapshotFullRefresh.
A workaround was :
QuickFix.Group mdGroup;
for(int i = 1; i < message.GetInt(Tags.NoMDEntries);i++)
{
mdGroup = message.GetGroup(i, Tags.NoMDEntries);
Console.WriteLine(mdGroup.GetString(Tags.MDEntryPx));
Console.WriteLine(mdGroup.GetString(Tags.MDEntrySize));
}
Hope this help !
S
from quickfixn.
That's how I ended up having to do it. Thanks Steven.
This is still a bug, so how should we go about fixing it? I don't mind doing some of the work, but I wouldn't want to attempt anything without guidance. I'm new to contributing to open source projects.
from quickfixn.
Notes on methods of other QF versions:
QF: msg.getGroup(1,group_object)
(this is a member of Message, not FieldMap)
QF/j: msg.getGroup(1,group_object)
and group_object=msg.getGroup(1,tag_int)
(each are from FieldMap)
QF/n: group_object = msg.GetGroup(1, tag_int)
Java: http://quickfixj.org/quickfixj/usermanual/1.5.1/usage/repeating_groups.html
C++: http://www.quickfixengine.org/quickfix/doc/html/repeating_groups.html
from quickfixn.
Unit tests: https://github.com/gbirchmeier/quickfixn/tree/56_group
from quickfixn.
I see the root cause now. When Message::FromString() creates a Message object from a string, it constructs Group objects instead the type-specific subclasses of Group. Therefore, the objects retrieved by GetGroup() are also Group objects. You can't cast a base class to a subclass if it was never a subclass-type object in the first place.
So I need to see if we have some kind of Group factory to create the typed Group objects. If we don't, then I guess I need to generate one.
from quickfixn.
Each of the following classes implements IMessageFactory that has a method called 'Create' that returns a Typed Group object based on the arguments passed in, it has the following signiture:
public Group Create(string beginString, string msgType, int correspondingFieldID)
The classes are:
QuickFix.FIX40.MessageFactory();
QuickFix.FIX41.MessageFactory();
QuickFix.FIX42.MessageFactory();
QuickFix.FIX43.MessageFactory();
QuickFix.FIX44.MessageFactory();
from quickfixn.
Thanks, Nick. I figured it was in there somewhere, but couldn't remember where. With this, I will probably be able to knock this out this week.
from quickfixn.
I think I solved it on my branch. Will integrate tomorrow.
https://github.com/gbirchmeier/quickfixn/tree/56_group
from quickfixn.
Damn, still failing AT 14i in the FIX50x sets.
Note to self:
cd AcceptanceTest
runat.bat release 5006 definitions\server\fix50\14i_RepeatingGroupCountNotEqual.def cfg\at_50.cfg
runat.bat release 5007 definitions\server\fix50sp1\14i_RepeatingGroupCountNotEqual.def cfg\at_50_sp1.cfg
runat.bat release 5008 definitions\server\fix50sp2\14i_RepeatingGroupCountNotEqual.def cfg\at_50_sp2.cfg
from quickfixn.
Related Issues (20)
- Release 1.11.0 announcement
- DDField.cs SEQNUM type is still int after 24x7 ulong implementation HOT 1
- not able to capture the return message after login and seq mismatch HOT 2
- "Acceptor heartbeat set to" log message is wrong
- In Logout session, the field=553(Username) is redundant HOT 2
- Udp protocol support HOT 1
- FIX50 IOIQty does not allow Numeric Quantity HOT 2
- Not send Missing Application messages to the receiving application as response for Resend Request HOT 2
- Unhandled Exception in SocketInitiator.OnStart() can Terminate Process HOT 8
- Enhanced CME Globex Resend Logic HOT 3
- Wrong time format for TimeStampPrecision=NANO HOT 4
- Weekdays setting implementation HOT 1
- setting "TimeStampPrecision" is not documented
- performance tests HOT 2
- When Acceptor initiates Logoff, it doesn't wait for the Logoff response HOT 1
- Possible release of 1.10.1 for .net standard users with deadlock fix released as part of 1.11.0 HOT 1
- GroupDelimiterTagException : Group X 's first entry does not start with delimiter HOT 2
- Consider adding a package icon HOT 4
- Problem when debugging HOT 3
- Timing issue loading DLLs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickfixn.