Control macros, Control macros -51 – Clear-Com Logic-Maestro User Manual

Page 117

Advertising
background image

Clear-Com Communication Systems
Eclipse Logic Maestro Instruction Manual

2 - 5 1

CONTROL MACROS

Control macros act on system configuration objects to get or set
parameters or to change the state of the object. The format of a
control macro command is:

ControlMacro.<Macroname><parameters>;

The ‘ControlMacro’ command is used to create a copy of a system
configuration object which can then to used in the control macro.

For example, the command:

ControlMacro GP19 = ControlMacro.GetControl(“GP19”);

will create a copy of the GPIO control object called GP19 created by
ECS called GP19 which can be used in the control macro.

These macros are accessed by expanding the ‘Clearcom’ >
‘ScriptLibrary’ > ‘ControlMacro’ entry in the Available Modules menu.

Macro

Description

CreateControl (string) [Control-
Macro]

Creates a control named by the string e.g.
ControlMacro AND_60 = ControlMacro.CreateCon-
trol(“AND_60”);

CreateControl(string,bool) [Con-
trolMacro]

Creates a control named by the string with a state set by
the boolean e.g.
ControlMacro AND_60 = ControlMacro.CreateCon-
trol("AND_60", true);

Equals (Object) [bool]

Tests the equivalence of two objects and returns True or
False. e.g.
bool <result> = <object1>.equals<(object2)>;

GetAllEntities[(bool) [EntityOb-
ject[]]

Returns a list of all known entities e.g.
EntityObject[] = ControlMacro.GetAll Entities(<local
system only boolean>);

GetAllPorts() [PortObject[]]

Returns all the known ports in a system to an allay of
PortObject e.g.
PortObject[] allportsknown = ControlMacro.GetAll-
Ports();

GetAllPorts(bool) [PortObject[]]

Returns a list of port objects e.g.
PortObject[] = ControlMacro.GetAllPorts(<local sys-
tem only boolean>);

Advertising