Time_To_Second; Timed_Wait_Until; Timeline_Active; Timeline_Create - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Reserved Identifiers
Keywords & Run-Time Library Functions (Cont.)

TIME_TO_SECOND

TIMED_WAIT_UNTIL

TIMELINE_ACTIVE

TIMELINE_CREATE

154
This function returns an integer representing the second portion of a time
string.
SINTEGER TIME_TO_SECOND (CHAR TimeStr[ ])
Parameters:
• TimeStr: Input string containing the time in hh:mm:ss format.
If successful, this function returns an integer (0-59) representing the second
portion of the time string. If the specified time is invalid, this function returns -1.
CHAR TimeStr[ ] = '9:30:08'
SINTEGER nSecond
nSecond = TIME_TO_SECOND (TimeStr) // nSecond = 8
This keyword delays execution of one or more statements until a particular
condition is met. It is similar to WAIT_UNTIL except that this instruction pro-
vides for a timeout parameter to be specified. The syntax is:
TIMED_WAIT_UNTIL <condition> timeout ['<name>']{(* wait
statements *)}
For more information, refer to the discussion in this document regarding
WAITs.
This function is used to determine if a timeline has been created. If the timeline
does not exist (i.e. TIMELINE_CREATE has not been called) this function
returns zero.
INTEGER TIMELINE_ACTIVE(LONG Id)
Parameters:
• Id: A user defined value that uniquely identifies this timeline. Each timeline
must be assigned a unique identifier starting with number one.
Returns:
• 0: Not created.
• Non-zero: The timeline has been created.
IF(TIMELINE_ACTIVE(TL1)) // if timeline 1 is running
{
// do something
}
Creates an initial timeline and specifies the attributes of the timeline.
INTEGER TIMELINE_CREATE(LONG Id, LONG Times[ ],LONG
Length, LONG Relative, LONG Repeat)
Parameters:
• Id: A user defined value that uniquely identifies this timeline. Each timeline
must be assigned a unique identifier starting with number one.
• Times: An array of times where each time specifies when a
TIMELINE_EVENT will be triggered. The times in the array may be relative to
each other or relative to the start of the timeline depending upon the
Relative parameter. For an absolute timeline, it is not necessary for the
times in the array to be sorted in any particular order (the NetLinx master
does this internally for you). The NetLinx master makes an internal copy of
the values in the array allowing the user to modify the passed in array as
desired without affecting the operation of the timeline.
• Length: The count of times in the Times array.
• Relative: Indicates whether the Times array contains relative times or
absolute times. Relative indicates the each time given is relative to the
last event time (i.e. the time delay in between the triggered events).
Absolute indicates that each time given is absolute with respect to the start
of the timeline.
• Repeat: Indicates whether the timeline should automatically start over again
when Length events have been triggered.
NetLinx Programming Language Reference Guide

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents