emaxedon

c4Forums Member
  • Content count

    7
  • Joined

  • Last visited

  1. How to create Events from an Action?

    Hey @msgreenf, So I created an Action that pulls in Property values - and this works. I'm wondering if you've ever used the C4:AddEvent API. I'm calling C4:AddEvent, and creating events dynamically (not in the XML configuration), but I'm not seeing the events under the Programming/Events tab in Composer after they are allegedly being created. Does the AddEvent function create events that Composer programmers can then use in the Programming tab?
  2. How to get "action" parameters value

    Are there different kind of user input elements we can create under the "Actions" tab? For instance, something similar to a HTML form element, where there is a submit button with textfields we can pass as arguments. Or are Actions limited to only buttons?
  3. How to create Events from an Action?

    Can I pass arguments to the Update Properties command in the action tab? <action> <name>Update Properties</name> <command>update</command> ??? Any way to pass arguments that would show up as text fields in the action tab? </action> That way, when the "update" function is called, I can do stuff with user generated input... say: function LUA_ACTION.update(arg1, arg2) Dbg:Trace("Update properties") Dbg:Trace("Argument 1:" .. arg1) Dbg:Trace("Argument 2:" .. arg2) end Any ideas @msgreenf?
  4. My driver needs to be able to dynamically create Events. I want to create these Events from a LUA_ACTION. How would I complete the XML configuration to create an Action that would pass 3 parameters, eventId, eventName, and eventDescription? <actions> <action> ??? </action> </actions> When pressed, it would trigger the "ExecuteCommand", and subsequently create the Event using the C4:AddEvent API. function ExecuteCommand(strCommand, tParams) if (strCommand == 'LUA_ACTION') then if tParams ~= nil then for pName, pValue in pairs(tParams) do if pName == 'ACTION' then -- TODO: C4:AddEvent(eventId, eventName, eventDescription) end end end end end In Leyman's terms, I need to create a button under the Actions tab that would create an event by passing 3 parameters - the event ID, event name, and event description. Any help getting me moving in the right direction would be greatly appreciated. Thank you.
  5. How to get "action" parameters value

    How would we get the "second" parameter value from a LUA_ACTION?
  6. Help: Proxies and Connections

    Thank you @TheWizard, your answer was very helpful. I'll try it out now.
  7. I'm writing a driver that polls data using C4:urlGet, and depending on the resulting data an Event is fired. Is it possible to create a driver without using any device proxies or connections? I tried keeping proxies and connections empty: <proxies /> <connections /> But, Composer doesn't even find the driver when trying to add it. So I'm assuming it's not possible to keep proxies/connections empty. Any ideas on what type of proxy/connection XML configuration I should be using? And where specifically to look in the right direction for documentation? DriverWorks SDK 2.9.0 API Reference Guide doesn't document XML configurations very well at all...