New answers tagged

2

My first idea was to create Configurator object as a private member inside the Device, declare Configurator as a friend of Device and pass pointer to the Device into the Configurator. Does the Configurator class need access to the entire Device object, or does it just need to know the register_map? If it is enough for the Configurator class to have a ...


3

You need a concept of a device configuration — which could be encapsulated as data/state — and the primitive abilities to write a configuration, and to verify a configuration — and perhaps at a higher level of abstraction some concept of write & rewrite the configuration until it takes or until you give up. I don't see how a visitor will help; visitors ...


0

If in doubt, pick the simplest, which in this case is, I think, #2. Specifically, work out the minimum required information the PC needs. For example, if your display consists of two lines of text, you send two strings to the PC. If your display consists of a number of icons, you could send a bitfield (or equivalent) where each bit indicates if that icon is ...


Top 50 recent answers are included