Clear-Com Logic-Maestro User Manual

Page 135

Advertising
background image

Clear-Com Communication Systems
Eclipse Logic Maestro Instruction Manual

3 - 7

TRIGGER ACTION WHEN BOTH A IS SET AND A
CROSSPOINT IS MADE

// When control AND1 is activated AND ISTA talks to D4222, activate control FRLY2

using System;
using ClearCom.ScriptHost;
using ClearCom.ScriptLibrary;
using ClearCom.Entities;
using EMS.MapClient;
using EMS.MapClient.Tables;
using EMS.MapClient.Tables.Actions;
using Shared.Enums;

namespace CustomControlMacros
{
public class CustomMacro : ScriptBase
{
public override void OnUserStart()
{
// Fetch the elements we need.
ControlMacro AND1 = ControlMacro.GetControl("AND1");
ControlMacro FRLY2 = ControlMacro.GetControl("FRLY2");

// Fetch the panels we wish to get the crosspoint between.
PortObject ISTA = ControlMacro.GetPort("ISTA");
PortObject D4222 = ControlMacro.GetPort("D4222");

// Create the control that will be triggered on the crosspoint.
CrosspointControl crosspointControl = new CrosspointControl(ISTA, D4222);

FRLY2.TriggersIf(crosspointControl, Condition.AND, AND1);
}
}
}

Advertising