more G-Labs products

Author Topic: CustomData  (Read 684 times)

October 20, 2016, 12:14:34 AM
Read 684 times

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
It appears in an interface when adding a module I can add customData..

Code: [Select]
var moduleToAdd = new InterfaceModule
       {
           Domain = this.GetDomain(),             
           Address = alarm.Zones[i].ZoneNumber.ToString(),
           Description = $"Texecom Zone {alarm.Zones[i].ZoneNumber}",
           ModuleType = ModuleTypes.Sensor,
           CustomData = new { ZoneText = alarm.Zones[i].ZoneName }
       };

X10 does similar too:

Code: [Select]
module = new InterfaceModule();
                module.Domain = this.GetDomain();
                module.Address = address;
                module.Description = "X10 Security";
                module.ModuleType = moduleType;
                module.CustomData = 0.0D;
                securityModules.Add(module);

Is there an example how I can access these from a program, or even a widget?

Thanks

October 20, 2016, 11:59:31 AM
Reply #1

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Thanks for the headsup, I hadn't noticed that, I'll have a play around with it later. If I find anything I'll let you know.

October 20, 2016, 01:54:34 PM
Reply #2

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271

October 20, 2016, 02:11:15 PM
Reply #3

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
I can only find references to CustomData (string) in Statistics.cs and StatisticsLogger.cs

As far as I can see it's not exposed to Programs or Widgets, but I could be wrong.

October 21, 2016, 07:11:11 PM
Reply #4

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
GetModule might return it.. this is my annoyance with not being able to dev in visual studio, as I could set a breakpoint in the debugger and see what is available..

Really need to look and see what is going on behind the scenes and see if I can attach a remote debugger.. - not idea... being able to dev externally would really help me :)