Specifications
AVIDdirector-M2M™ Technical Reference Guide
February 5, 2009 ©AVIDwireless 2004-2009 All Rights Reserved Page 14 of 55
The user M2Mlet inherits from the abstract class com.avidwireless.AVIDdirector.M2Mlet and
implements the start (AVIDdirectorMain adApp) and stop(). All M2MXML messages not addressed to a
particular transducer are directed towards the M2Mlet and methods corresponding to each
M2MXML message are called depending on the M2MXML message received. The user M2Mlet can
override each of these methods if they wish to. The methods are:
§ processControlCommand(ControlCommand message). The default action is to return a
Response.UNRECOGNIZED_COMMAND_RESULT_CODE message to the portal.
§ processConfigurationQuery(ConfigurationQuery message). This will return the value of any property
in the configuration file M2MApp.ini. For example, a query of “AVIDDIRECTOR.MODEL” will
return which AVIDdirector-M2M model this is (the normal response is “M2M”). There are special
predefined Queries that may be inquired that are not M2MApp.ini values. These are:
§ STATUS. This returns the software version, how long the M2MApp has been running, the
SNAP and PSoC version, radio type and last log message.
§ processSetConfiguration(SetConfiguration message). If not overridden this will set the
specified property in the M2MApp.ini file and also invoke the method
processSetConfigurationItem (String propertyName, String oldValue, String
newValue, String seqNum). The user M2Mlet will typically implement the
processSetConfigurationItem method to respond to specific property settings and update
any operation because of the property changes.
§ processFileUpdate(FileUpdate message). The default action is to return a
Response.UNRECOGNIZED_COMMAND_RESULT_CODE message to the portal.
§ processPPPConfig(PPPConfig message). The default action is to return a
Response.UNRECOGNIZED_COMMAND_RESULT_CODE message to the portal.
§ processRebootCommand(RebootCommand message). This will send out the acknowledgement
and shutdown the M2MApp and reboot the processor once the confirmation message has been
sent to the portal.
§ processResponse(Response message). The default action is to return a
Response.UNRECOGNIZED_COMMAND_RESULT_CODE message to the portal.
§ processTimeSync(TimeSync message). This updates the devices’s real-time clock to the time
specified in the message.
Each message returns a String which is a M2MXML message to send back to the portal, which are
typically Command Response messages. If the M2Mlet needs to send a message separately to the
portal it can call app.sendMessageToPortal(String) to send the M2MXML message to the portal
by placing the message in the outgoing message queue.
Radio
M2MApp manages the radio’s and the M2MXML packets sent and received over each radio. It
allows multiple radios to be dynamically loaded via the M2MApp.ini file and switching between
which radio will be used for communications based on parameters such as least cost routing, signal
strength and geographical location.
Each radio class implements the ADRadio class that provides a standard interface to allow
M2MApp to control and work with each radio. This allows easy development of customer and
network specific radio devices. A “Radio” may be any device that M2MApp uses to communicate
with the M2MXML port, so an Ethernet port may also be a Radio. The
com.avidwireless.radio.ADRadio class specifies methods for:
§ start(AVIDdirectorMain mainApp). Called with the Radio class is loaded, it initializes
powers up the Radio, resets it, initializes the Radio communications channel, establishes
contact with the network and any other items to make the radio ready to communicate.
§ stop(). Called when the system is shutting down, it disconnects the radio from the
communications channel and powers down the radio.
§ resetRadio(). Resets the radio hardware.