Using Buffers
REMOVE_STRING will remove all characters up to and including the 'T' or the '.'. So if the
SWT_BUFFER contained a 'CI1O1T', then after the line of code:
TRASH = REMOVE_STRING(SWT_BUFFER,'T',1)
TRASH would be equal to 'CI1O1T'. Once the proper response from the switcher is verified, it
Axcess prints out the message SWT ACK to the terminal.
Buffer Keywords
The Buffer keywords supported by Axcess are described below:
Buffer Keywords
CLEAR_BUFFER BUFR
Clears a buffer.
CREATE_BUFFER
Use the CREATE_BUFFER key-
word to create a buffer.
CREATE_MULTI_BUFFER
This keyword is similar to
CREATE_BUFFER, except it cre-
ates a multi-buffer that can
accept strings from a group of
cards.
76
This keyword effectively sets the length of the buffer to zero, so that subse-
quent GET_BUFFER_CHAR statements will not return anything. Using
CLEAR_BUFFER is preferable to other methods, such as assigning a null
string to the buffer, or using SET_LENGTH_STRING. The
CLEAR_BUFFER keyword actually compiles into smaller code and exe-
cutes faster than the other methods, plus it is clearer to the reader as to
what the programmer is trying to accomplish.
This keyword can only appear in the DEFINE_START section of your pro-
gram, and has the following syntax:
CREATE_BUFFER device, array
CREATE_BUFFER directs Axcess to place any strings received from the
specified device into the specified array. When Axcess places the byte into
the array, Axcess increments the length value for the array and then places
the byte at the end of the array. When the array is full, all bytes in the array
are shifted to make room for the new byte at the end.
Though the array is acting as a buffer, it is still an array and can be treated
as one. You can access its individual locations, send it to a device, assign it
to other arrays, assign other arrays to it, and use keywords to manipulate
the array.
This keyword can only appear in the DEFINE_START section of your pro-
gram, and has the following syntax:
CREATE_MULTI_BUFFER starting device, ending device,
array
CREATE_MULTI_BUFFER directs Axcess to place any strings received
from the specified range of devices into the specified array.
Three header bytes are present before each string in a multi-buffer. The
first header byte is the hexadecimal value $FF, which marks the beginning
of a new string. The next byte is the number of the device that received the
string, and then the length of the string follows. For example, if the string
HELP is received by device 1, these are the contents of the corresponding
multi-buffer:
$FF, 1, 4, 'H', 'E', 'L', 'P'
These header bytes are used by the keyword
GET_MULTI_BUFFER_STRING which returns only HELP. The
GET_MULTI_BUFFER_STRING is discussed later in this section.
Axcess Programming Language
Need help?
Do you have a question about the AXCESS CONTROL SYSTEM PROGRAM and is the answer not in the manual?