open-dis / open-dis-cpp

C++ implementation of the IEEE-1278.1 Distributed Interactive Simulation (DIS) application protocol v6 and v7
BSD 2-Clause "Simplified" License
92 stars 66 forks source link

Rework PDUBank handling #17

Closed plata closed 5 years ago

plata commented 5 years ago

Currently, the PDUBank (and thus the available PDUs) is hardcoded in https://github.com/open-dis/open-dis-cpp/blob/05aa32c59397b7c889a6b603a6327c69ae0b4420/src/utils/IncomingMessage.cpp#L46

As a consequence, it is not possible to use a different PDUBank without changing the code. However, this is required e.g. to use DIS 7 PDUs.

I suggest to implement the PDUBank handling in a similar way to the PacketProcessors, i.e.

This would also help reducing the cyclic dependencies between the PDUs and the utils.

leif81 commented 5 years ago

@phoppermann was this fixed by #32 ?

phoppermann commented 5 years ago

Yes.