Netlinx Master to Master
Technical Support Guide
Table of Contents
Brand:
- AMX
Models:
- Netlinx
Overview:
In the legacy Axcess systems, we used to send strings between RS232 ports to communicate between masters. With NetLinx, we can do very much the same thing over our networks. In fact, this method allows each master to simultaneously communicate with many other masters!
Procedure:
- Establish a Master-Master link between the two systems. (include IP or URL address in NetLinx URL list)
- Define a virtual device on one of the masters.
- Add that virtual device (including its actual system number) into the device list of the other master(s).
- Any system can now send strings to the virtual device.
- All online systems (including the sender) will see the strings.
SYSTEM 3:
vdvRemote = 33001:1:1
SYSTEM 2:
vdvRemote = 33001:1:1
SYSTEM 1:
vdvRemote = 33001:1:0Code Example:
All strings sent from a given system will also be received, so if bi-directional communications is desired, it may be a good idea to add some identifying characters into the messages. These in turn tell the recipient whether the message is intended for it. For example, the following code could be included in all systems:
DEFINE_CALL 'Process Remote Buffer'
{
cMsg = REMOVE_STRING(cRemoteBuffer,"$0D",1)
cAddress = GET_BUFFER_CHAR(cMsg)
IF(cAddress == SYSTEM_NUMBER)
{
// the rest of the message is for me!
}
IF(FIND_STRING(cRemoteBuffer,"$0D",1)
{
CALL 'Process Remote Buffer' // recurse in case >1 messages were in buffer
}
}
DEFINE_CALL 'Send Message' (Destination, cMessage[20])
{
SEND_STRING vdvRemote,"Destination,cMessage,$0D"
}
DEFINE_EVENT
DATA_EVENT[vdvRemote]
{
STRING:
{
IF(FIND_STRING(DATA.TEXT,"$0D",1)
{
CALL 'Process Remote Buffer'
}
}
}System 2 or 3 sends a message to system 1 with the code example below.
CALL 'Send Message' (1, 'Hello World')
System 1 or 3 sends a message to system 2 with the code example below.
CALL 'Send Message' (2, 'How are you doing?')
Table of Contents