Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Drivers within CML Macro
#1
How do I use other drivers from within a macro? For example, I'm using a V2 driver for my AVR. How do I create an object for this AVR driver within my new macro and use its methods?
Reply
#2
(01-01-2017, 09:15 AM)Jnetto Wrote: How do I use other drivers from within a macro? For example, I'm using a V2 driver for my AVR. How do I create an object for this AVR driver within my new macro and use its methods?

You have to use the SimpleFldClient object. To access it via the field interface.

SimpleFldClient m_fldClient;  

strValue := m_fldClient.ReadField(strMoniker, strField);
m_fldClient.WriteField(strMoniker, strWriteField, strWriteVal);

There is also a backdoor way to call drivers with that same object if you have implemented them into the AVR driver. (QueryData/SendDrvCmd) But IMHO anything useful should be exposed as a field so users can call it as well and it is self documenting. Backdoor stuff needs to be documented separately, they will not show up in any of the client interfaces so no one knows they are there without looking at the driver code. I think probably they are most used for more dynamic ways of passing data, since fields have to be registered when the driver loads.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Lutron RA2 & Caseta drivers Mark Stega 2 49 09-19-2021, 05:24 AM
Last Post: Mark Stega
  Weather Drivers simplextech 10 3,659 01-05-2020, 10:51 AM
Last Post: simplextech
  Edit Macro Parameters Jnetto 5 4,407 01-02-2017, 11:22 AM
Last Post: Dean Roddey
  Drivers for new equipment George M 10 6,833 12-17-2016, 07:36 AM
Last Post: Mark Stega
  Non-Shipped Drivers Links Dean Roddey 6 9,592 01-09-2016, 10:42 AM
Last Post: Dean Roddey
  Wuench's Drivers wuench 3 12,118 06-09-2014, 02:44 PM
Last Post: Dean Roddey
  Lighting IP Drivers willplaice 3 4,274 04-27-2013, 02:30 AM
Last Post: znelbok
  Any drivers need to be added/updated for 4.2? Dean Roddey 8 6,301 08-01-2012, 10:01 AM
Last Post: Dean Roddey
  Can a CML macro be called in PDL? zpollock 7 5,536 04-13-2010, 06:41 AM
Last Post: zpollock
  Any PTZ Drivers In Existence? zpollock 0 3,442 11-03-2009, 11:37 AM
Last Post: zpollock

Forum Jump:


Users browsing this thread: 1 Guest(s)