In part, you get to decide. ACQ4 has many layers of abstraction frameworks, but you aren’t required to use any of them. Many services provided by the program can simply be embedded in other existing applications.
First: Ask! No reason to start off in the wrong direction.
The very-short answer: If you want to add support for a device, read the devices section. If you want to add new experimental functionality, consider writing a module (module section) or adding new functionality to protocolrunner (link). If you want to add new analysis, read the analysis section.
The very-long answer: When developing new functionality for ACQ4, it is important to remember that ACQ4 is a _platform_ that provides many commonly used services to the developer. However, some of these services are only available within the context of a specific framework. I will attempt to make this very abstract statement somewhat more concrete with specific examples.
So we see that by operating within the ACQ4 framework, some useful services become available. If we go one step deeper, we might decide to create a Device class that encapsulates control of the device. The immediate benefit to this approach is that the device may become available for previously-existing modules to use. For example, if the new Device class implements the protocol interface, then it can be included by any other module in ACQ4’s acquisition protocols. If it implements the ProtocolRunner interface, it can be operated from within the Protocol Runner, possibly obviating the need for a new module altogether. Implementing a new Device class is likely to be a much more powerful and flexible approach; however, this may come with somewhat more complex programming requirements.
Finally, we might discover that nearly everything we want to do with our new hardware is very similar to ACQ4’s existing camera functionality. In this case, it would be best to implement a Device class that is also a subclass of Camera (which is itself a subclass of Device). By doing so, we can use our new hardware in the existing camera module and we get all of the pre-written device interfaces for free. This is a vastly simpler task than implementing a completely new Device. The drawback is that it may become more difficult to use the device in ways not originally supported by the generic Camera class.
To reiterate: there are a variety of options for adding new functionality to ACQ4 (only a few of which were covered here). Lower-level frameworks (such as Module) are generally easier to program at first, but higher-level frameworks, although they have a steeper learning curve, may offer power, flexibility, and features that were difficult to achieve otherwise. As always, the best place to start may be to ask the core developers for advice.
DVCS, BZR, Launchpad