ControlMacros book



Yüklə 7,32 Mb.
Pdf görüntüsü
səhifə27/33
tarix28.06.2018
ölçüsü7,32 Mb.
#52153
1   ...   23   24   25   26   27   28   29   30   ...   33

Clear-Com
Eclipse Logic Maestro Instruction Manual
A - 6 0
GetLogger (string) [Logger]
Gets information for the logger specified in the string 
parameter e.g.
Logger = Logger.GetLogger();
GetLogger (Type) [Logger]
Gets information for the logger specified in the type 
parameter e.g.
Logger = Logger.GetLogger();
GetType () [Type]
Returns the type of an object previously created by a 
control macro.  e.g.
Type  = .GetType();
HasLoggingStarted () [bool]
Returns a boolean to indicate whether logging has been 
started or not e.g.
bool = Logger.HasLoggingStarted();
Info (Exception, IFormatPro-
vider, string, Object[]) [void]
Creates a information object to be sent to a logger e.g.
.Info(,
mat>,Object[]);
Info (Exception, Object) [void]
Creates a information object to be sent to a logger e.g.
.Info(,Object[]);
Info (Exception, string, Object[]) 
[void]
Creates a information object to be sent to a logger e.g.
.Info(,
mat>,Object[]);
Info (IFormatProvider, string, 
Object[]) [void]
Creates a information object to be sent to a logger e.g.
.Info(
mat>,Object[]);
Info (Object) [void]
Creates a information object to be sent to a logger e.g.
.Info(Object[]);
Info (string, Object[]) [void]
Creates a information object to be sent to a logger e.g.
.Info(,Object[]);
Push (string) [IDisposable]
creates a temporary string object e.g.
IDisposable = Logger.Push();
StartLogging () [void]
Command to start logging e.g.
Logger.StartLogging();
ToString () [string]
Returns the string value of an object previously created 
by a control macro. e.g.
string = .ToString();
Warn (Exception, IFormatPro-
vider, string, Object[]) [void]
Creates a warning object to be sent to a logger e.g.
.Warn(,
mat>,Object[]);
Macro
Description


Clear-Com
Eclipse Logic Maestro Instruction Manual
A - 6 1
Warn (Exception, Object) [void]
Creates a warning object to be sent to a logger e.g.
.Warn(,Object[]);
Warn (Exception, string, 
Object[]) [void]
Creates a warning object to be sent to a logger e.g.
.Warn(,
mat>,Object[]);
Warn (IFormatprovider, string, 
Object[]) [void]
Creates a warning object to be sent to a logger e.g.
.Warn(,
mat>,Object[]);
Warn (Object) [void]
Creates a warning object to be sent to a logger e.g.
.Warn(Object[]);
Warn (string, Object[]) [void]
Creates a warning object to be sent to a logger e.g.
.Warn(,Object[]);
IsDebugEnabled [bool]
Returns a boolean TRUE or FALSE indicating whether 
debug mode is enabled e.g.
Logger isDebugEnabled = .IsDebugEna-
bled;
IsDebugLowEnabled [bool]
Returns a boolean TRUE or FALSE indicating whether 
debug low mode is enabled e.g.
Logger isDebugLowEnabled = .IsDebugLo-
wEnabled;
IsErrorEnabled [bool]
Returns a boolean TRUE or FALSE indicating whether 
error reporting mode is enabled e.g.
Logger isErrorEnabled = .IsErrorEnabled;
IsFatalEnabled [bool]
Returns a boolean TRUE or FALSE indicating whether 
fatal error reporting mode is enabled e.g.
Logger isFatalEnabled = .IsFatalEnabled;
IsInfoEnabled [bool]
Returns a boolean TRUE or FALSE indicating whether 
info mode is enabled e.g.
Logger isInfoEnabled = .IsInfoEnabled;
IsWarnEnabled [bool]
Returns a boolean TRUE or FALSE indicating whether 
warn mode is enabled e.g.
Logger isWarnEnabled = .IsEWarnEnabled;
Macro
Description


Clear-Com
Eclipse Logic Maestro Instruction Manual
A - 6 2


Clear-Com
Eclipse Logic Maestro Instruction Manual
B - 1
APPENDIX B 
EXAMPLE CONTROL 
MACROS
ACTIVATE SPECIFIC KEY LED
// When control LED0 is activated fourth key on each panel is illuminated red.
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 control that will trigger this action.
            ControlMacro LED0 = ControlMacro.GetControl("LED0");
            // Fetch the panels we wish to activate the LED on.
            PortObject ISTA = ControlMacro.GetPort("ISTA");
            PortObject D4222 = ControlMacro.GetPort("D4222");
            PortObject[] panelArray = new PortObject[] { ISTA, D4222 };
            foreach (PortObject panel in panelArray)
            {
                // Set up LED indications.
                // Note1: LED will only indicate if a key is assigned here, i.e. can't illuminate empty key.
                // Note2: Key numbers are silly, some start from 1, some from 0 etc
                Action fireLed1 = ControlActions.ActivateLED(panel, 4, 1, 0, Shared.Enums.LedRate.On, 
Shared.Enums.LedIndication.Red);
                // Activate LEDs on.
                LED0.Triggers(fireLed1);
            }
        }
    }
}
B


Yüklə 7,32 Mb.

Dostları ilə paylaş:
1   ...   23   24   25   26   27   28   29   30   ...   33




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©www.genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə