DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically register Broadcast and Requests

Solved!
Go to solution

Hi AlexElb,

 

Here are some good links for creating a HAL in DQMH:

 

1) https://delacor.com/hal-in-your-dqmh-2/ - This is a great tutorial, and we have followed this to the letter at Wired-in for a couple of our projects.

2) https://delacor.com/simplifying-your-hardware-abstraction-layer-hal-with-lvoop-and-dqmh-part-1/ - I haven't read this one, but it looks interesting.

 

Regards

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 11 of 15
(1,056 Views)

@AlexElb wrote:

How do the child classes communicate the "New Data Aquired" Broadcast?

Have a method that exposes the broadcast refs.

 


@AlexElb wrote:

You're not talking about wrapping a whole DQMH-Module in a class aren't you?

Just the API.


@AlexElb wrote:

 

EDIT: First CON detected: How do you test? In the tester.vi of the GUI I would like to test the Request "Register for .... Broadcast". To do so, the tester has to start one of the hw-modules. So again, now the tester has a dependency to the hw_modules.To avoid that we could have a "integration tester". When I want to reuse the GUI in another project, I would copy everything except that integration tester and my new project shouldn't have any dependencies loaded...


If you use the class method you can create a dummy class that just exposes the event refs. Have the tester tell the module to launch the dummy class. Then just fire an event from the tester and if the module is correctly registered for it, it will detect it. The module won't care.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Message 12 of 15
(1,051 Views)

Hi Alex,

 

Check out tip #5 on this blog post: https://delacor.com/tips-and-tricks-for-a-successful-dqmh-based-project/

 

I believe the second video will help, as you can see, the methods in the class are calling the DQMH Start Module and Synchronize Module Events, not shown in the video, the Close Port.vi method calls the Stop Module DQMH Request.

 

I hope that helps clarify what Sam is suggesting.

 

Regards,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Message 13 of 15
(1,028 Views)

Thanks for sharing Fab. It's one of those concepts that is difficult to explain in words. The examples are a big help.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 14 of 15
(1,027 Views)

@Taggart wrote:

Have a method that exposes the broadcast refs.

The broadcast references of the two DQMH modules are typedef. Of what type can the output of the abstract method "obtain broadcast events" be, so that the two concrete dqmh modules can broadcast theire concrete references in the child implementation?


Proud developer at Hampel Software Engineering where we turn '404 not found' into '200 OK'. Join us on Discord
0 Kudos
Message 15 of 15
(985 Views)