pMe | (Object) Reference to the PmaRoot object where the event rises. |
---|---|
pEvent | (Object) Reference to object describing detailed information about the specific event. |
It goes, for example, about programs for the UPS (backup power source) that can start another program on warning when the power in the backup source is running out.
But which program to start so that the PROMOTIC application which is just running on the computer, would be told about it?
This problem is just solved by the PmSignal.exe program.
This parameter (in this case xy) is then passed into the onAppSignal event as the pEvent.Param parameter.
In case of using the PmSignal.exe program, only one PROMOTIC application can run on the computer.
PmSignal.exe program is located in the \Promotic\Tools\PmSignal folder.
switch (pEvent.Param)
{
case "ups":
Pm.AppStop(1);
break;
case "battery":
pMe.Pm("/Alarm").ActivateNew("battery" + Pm.Time, "alarm0", "Battery", "Warning - Battery low", "UPS - Battery");
break;
}