Specifications

AVIDdirector-M2M Technical Reference Guide
February 5, 2009 ©AVIDwireless 2004-2009 All Rights Reserved Page 15 of 55
§ receiveDataString(). This will return a String from the Radio, which is normally a M2MXML
string.
§ receiveDataString(int timeout). Like receiveDataString() except it will return a null if it
times out without receiving a M2MXML string from the radio.
§ receiveDataByteArray(byte[] buffer, int offset, int length). Allows receiving
binary data from the radio.
§ receiveDataByteArray(byte[] buffer, int offset, int length, int timeout).
Receives binary data from the radio but will return no characters if it times out before data is
received.
§ sendDataString (String dataStr). Sends the specified string, which is normally a
M2MXML packat, to the Radio.
§ sendDataByteArray (byte[] buffer). Sends the binary array to the radio.
§ isInNetworkContact(). Returns true if the radio is in network contact, false if it is out of
network contact.
§ getRadioNetworkAddress(). Returns the radio’s current network address as a String. This
may be the MAN number, IP address or other network specific address.
There are other methods a Radio class must implement to be supported by M2MApp.
IODevices
The com.avidwireless.AVIDdirector.iodevice.IODevice class provides the framework for all
I/O devices. It defines methods to start and stop each device and handle transducer specific
messages addressed to the IODevice. Each IODevice has several important attributes:
§ DeviceName. This is a standard name for the device. If there are multiple devices of the same
type (e.g. RFID Readers) each has the same DeviceName.
§ KeyName. IODevice’s are uniquely specified by their KeyName. In the M2MApp.ini file each
IODevice class (except the standard M2M_IODevices) are specified by a property
keyname.CLASSNAME” with the fully qualified Java classname for the device specified for the
class. Each IODevice must have a unique KeyName, e.g. multiple devices of the same type will
have unique KeyNames. This allows the configuration properties to be separately specified for
each device, and the KeyName is the default M2MXML address for the device.
§ M2MXML_Address. Each IODevice may specify a M2MXML device different from the
KeyName. For example, when using the Simulator board TTL1 is addressed as TTL1.AIN to
distinguish this as an analog input transducer.
com.avidwireless.avidirector.iodevice.IODevice is the parent class for all I/O devices. The
configuration parameters it supports are implemented by each child IODevice if it makes sense for
the IO device. If the IODevice is a serial device it will use the serial port parameters. Each
configuration parameter is appended to the device name in the M2MApp.ini/M2MApp.ini.default
files. So GPS.CLASSNAME has a device name and M2MXML address of "GPS".
IODevice
.CLASSNAME Specifies the Java class used to implement this device. The internal
M2M IODevices do not need this.
.LOAD For IO Devices loaded via CLASSNAME, this needs to be set true to
load the IODevice. In M2MApp.ini this defaults to False for most IO
Devices. If not true for M2MIODEVICE then none of the internal
M2M IODevices (TTLn) will be loaded.
.ENABLE True to enable the IO device, false to disable it operating. Mainly
used by the internal M2MIODevices