![Alcorn Mcbride V+ series User Manual Download Page 248](http://html1.mh-extra.com/html/alcorn-mcbride/v-series/v-series_user-manual_2892709248.webp)
15-12
Appendix A
– Adding User-Defined Serial Protocols
@second
– This function takes the fifth and sixth bytes of the compiler
buffer as an ASCII representation of one byte ( the second of a time ), and
puts it in the message as one byte. This function assumes you had a
param
field of
timestring
, which stores
HHMMSSFF
in the compiler buffer.
@frame
– This function takes the seventh and eighth bytes of the compiler
buffer as an ASCII representation of one byte ( the frame of a time ), and
puts it in the message as one byte. This function assumes you had a
param
field of
timestring
, which stores
HHMMSSFF
in the compiler buffer.
@track
– This function takes the first two bytes of the compiler buffer as
an ASCII representation of one byte ( the track of a track-index ), and puts
it in the message as one byte. This function assumes you had a
param
field of
trackstring
, which stores
TTII
in the compiler buffer.
@trackindex
– This function takes the third and fourth bytes of the
compiler buffer as an ASCII representation of one byte ( the index of a
track-index ), and puts it in the message as one byte. This function assumes
you had a
param
field of
trackstring
, which stores
TTII
in the compiler
buffer.
@checksum
– This function calculates an eight-bit checksum of all bytes
in the range specified as its parameters (e.g.
@checksum(1,5)
)
@msg
– This function returns the byte designated by the index parameter
(e.g.
@msg(1)
)
@msgposition
– This function returns the current position within the
message.
@complex
– This function allows mathematical operations to be
performed upon the data specified. It is not for the novice user.
Let's abandon our
PlayUntil
event for a moment, in favor of a event that uses an
@complex function. This event is a
Search
event for a Denon CD player.
[Search:Time]
description="Search to a Time (MM:SS.FF)"
param1=port, "A valid Port"
param2=timestring, "A valid Time"
byte1=((@minute(param2) / 10 ) << 4 ) | ( @minute(param2) % 10 )
byte2=((@second(param2) / 10 ) << 4 ) | ( @second(param2) % 10 )
byte3=((@frame(param2) / 10 ) << 4 ) | ( @frame(param2) % 10 )
message="C" @complex(byte1) @complex(byte2) @complex(byte3)
retries=1
timeout=60
completionack="A"
Pay close attention to the
message
field and the previously unexplained
byte
field. The
byte
field is only used when
@complex
functions are used, and
defines what this byte should be in the message. The argument for an
@complex
function is always a reference to a
byte
field.
Regardless of the complexity of this function, the compiler reduces the
mathematical expression in the
byte
field specified to one byte, and that
one
byte
is put into the message as a result of an
@complex
function.
Summary of Contents for V+ series
Page 2: ...User s Guide To Show Control by Alcorn McBride Inc...
Page 7: ...Third Party Equipment 18 3 Index 19 1...
Page 8: ......
Page 14: ...1 6 Welcome...
Page 28: ...3 14 Show Control Overview GoingToDayModeMsg ClearLine2Msg...
Page 38: ...3 24 Show Control Overview...
Page 82: ...4 44 WinScript User s Guide...
Page 118: ......
Page 144: ...6 26 Advanced WinScript Programming...
Page 170: ...7 26 Application Notes...
Page 220: ...13 8 DMX Machine Hardware Reference...
Page 236: ...14 16 SMPTE Machine Hardware Reference...
Page 254: ...15 18 Appendix A Adding User Defined Serial Protocols...
Page 264: ......