beautypg.com

Cut talk to studio, Cut talk to studio -5 – Clear-Com Logic-Maestro User Manual

Page 133

background image

Clear-Com Communication Systems
Eclipse Logic Maestro Instruction Manual

3 - 5

CUT TALK TO STUDIO

// When control ST-CT is activated, prevents all panels from talking to port I2003.

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()
{

ControlMacro STCT = ControlMacro.GetControl("ST-CT");
PortObject[] stationsToCut = ControlMacro.GetAllStations();

PortObject STUD1 = ControlMacro.GetPort("I2003");

foreach (PortObject station in stationsToCut)
{
Action rOff1 = ControlActions.RouteOff(station.PortNumber, STUD1.PortNumber, 0);
STCT.Triggers(rOff1);
}
}
}
}