- Posts: 11
- Thank you received: 0
//===================
int N=0;
public void Setup()
{
Console.WriteLine("\nSetup()\n");
EventHelper.ModuleChangedHandler((o, m, p) =>
{
if (m.Domain == Domains.MQTTCLIENT /*&& p.Property == "Status.Connection"*/ )
Console.WriteLine("\n<event>\t" + m.Address + " in program id "+ Program.ProgramId.ToString()+ " driver "+
m.Domain + " address "+ m.Address + " property "+ p.Property + " value " + p.Value);
N=0;
return true;
});
Console.WriteLine();
}
public void Run()
{
Console.WriteLine("\n\t<Run>\tN={0}",N++);
if(N>=3){
N=0;
Console.WriteLine("\n\t<MQTTCLIENT.SetIsEnabled>");
DriverHelper.ProcessCommad(Domains.MQTTCLIENT, "1", "SetIsEnabled","");
}
}
Please Log in or Create an account to join the conversation.