Steps to provide a Mock binary for CSCOAP

If you are going to develop productive FESA-software, you as well need to give CSCOAP the chance to create a operative GUI for your FESA-software.

If you know how the public API of you FESA-software will look like ( properties and value-Items ), and if odds are good that this API will have no radical changes until operative release, than it is time to provide a mock-binary of your FESA-software on a virtual frontend together with a mock-device.

In order to do so, the following steps have to be performed:
  • Check on which virtual frontend your Mock should run.
  • Create a instance-file for this virtual frontend.
    • Each real-world device should have an related mock-device. The name of this mock-device has to be "x" + "real-device name".
      Real device: <device-instance name="PLLEVM1">
      Mock device: <device-instance name="xPLLEVM1">
  • If you already have a working instance-file with all real-devices defined, you can use a plugin-service to create a mock instance-file from it.
  • Virtual frontends dont support WR-based timing!
    • --> Make sure that no Timing is used in the instance-file of the virtual frontend.
    • --> As a direct result currently it is not possible to use multiplexing on virtual frontends. Pick "MainMuxCriterion = None" for the Mock-device.
    • Outlook on the future: After bug 914 got fixed, simulated WR-Timing will be available
  • If there is code which needs to act in a different way for mock-devices, usually it is a good idea to have a device-specific configuration-field "isMock", which is set to 'true' only in the mock instance-file.
    • via "(*device)->isMock.get(pEvt->getMultiplexingContext());" you than can decide what to do
    • you can set "false" as default-value in the design
  • Check the release and run wiki page in order to get your mock-software running
  • Dont forget to inform CSCOAP about the running mock-device !
  • For more info on Mocking, check chapter 12 of the FESA-Development-Guideline. You can find the document here.

Topic revision: r1 - 29 Jul 2016, AlexanderSchwinn
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback