Event Handlers
72
NetLinx Programming Language Reference Guide
}
Each
TIMELINE
data member is defined as follows:
Return Valuess:
Example:
DEFINE_VARIABLE
LONG TimeArray[100]
DEFINE_CONSTANT
TL1 = 1
TL2 = 2
DEFINE_EVENT
FIG. 2
Timeline representation
ID
The
ID
that the user assigned to the timeline in the
TIMELINE_CREATE
func-
tion.
SEQUENCE
The index of the time in the Times array that was passed to the
TIMELINE_CREATE
function. The
SEQUENCE
data member is used to deter-
mine what action to take for the event and is normally decoded with a
SWITCH/
CASE
structure (as shown in the example).
TIME
The amount of time that has elapsed since the timeline started. For repeating
timelines, the
TIME
and
REPETITION
data members can be used to calculate
the total amount of time it has been running.
RELATIVE
If the timeline is operating in relative mode, this data member is equal to
TIMELINE_RELATIVE
. If the timeline is absolute, it is equal to
TIMELINE_ABSOLUTE
.
REPETITION
If the timeline was created with
TIMELINE_REPEAT
, this data member holds
the number of times the timeline has been executed.
REPETITION
contains
zero for the first pass through the timeline. Thus, the calculation to determine
the total amount of time the timeline has been running is simply:
TIMELINE.TIME * TIMELINE.REPETITION
.
0 Successful
1 Timeline ID already in use
2 Specified array is not an array of LONGs
3 Specified length is greater than the length of the passed array
4 Out of memory
TIMELINE_CREATE
Timeline.Sequence =
TIMELINE_EVENT[TL1]
Time 0
1000
2000
3000
4000
5000
Time (1mS resolution)
Triggered
1
2
3
4
5
Continued
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...