Reserved Identifiers
154
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
TIME_TO_SECOND
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
TIMED_WAIT_UNTIL
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
WAIT
s.
TIMELINE_ACTIVE
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
}
TIMELINE_CREATE
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.
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...