> The logic there isn't really needed, but you'll need to either assign > txEvent.when() to a local variable for the SERIALIZE_SCALAR() macro to > work right. You can use paramOut/In manually. > > Was there some reason that we just don't serialize the event directly? > Event has serialize/unserialize methods. However if you have more than > one event in an object there is probably a name issue. We kinda want a > SERIALIZE_SUBOBJECT() method which swizzles the naming. It's the name thing. If you look at the EtherPacket and PacketFifo, I do a subobject hack. What would actually be a lot better would be to have a SerializationContext object and pass that in instead of just the raw stream. Then we could provide some virtual functions in there.
I hate to say it, but having hierarchy a la XML would be another way to make life better. There's no way to serialize a sub object without prefixing its variable names with something. If there were a way to nest, it would work better. Actually, come to think of it, life would be way better if we just used a dict of dicts and then wrote it out instead of just directly writing to the stream. Some of these things would actually be pretty easy to do. Nate _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
