****************************************************
Device Specific Considerations
****************************************************

ConnectPort X2
^^^^^^^^^^^^^^^^^^^^

As the entry-level product in Digi's Python enabled product line, the
ConnectPort X2 provides a few challenges for those interested in
running a fully featured installation of Dia in a system with less
memory or file system storage like the X2's bigger brothers the X4 and
X8. 

Some things that you can do to streamline an installation that needs
to run on an X2.

Minimalistic configuration
==========================

The X2 cannot run as many simultaneous configured devices and
presentations, nor as complex.  Please attempt to identify the minimum
set of configurations that will meet the needs of the application.

In particular, it's best to identify a single presentation to be used
to access and interact with Dia.

Strip doc-strings
====================

Doc-strings are provided by default in the 'dia.py' build, they can be
very useful during development of the system, but become dead-weight
on the X2 or after deployment.  Python provides a means to not include
doc-strings when byte-compiling files with the '-OO' interpreter flag.

To strip doc-strings from Dia when executing 'make.py', run the
interpreter like this:

  $> python2.4 -OO make.py <configfile>

The resulting ZIP archive will be significantly smaller and consume
less resources in system.

Stripping doc-strings in Digi Python Development environment
------------------------------------------------------------

The Digi Python Development environment exposes access to strip
doc-strings as well.  On the "Digi Python Properties" configuration
page there is a "Build Options" sections.  When compiling a project to
byte-code, you can addionally select whether doc-strings are included
with the "Remove docstrings from compiled code" option.

ConnectPort X3
^^^^^^^^^^^^^^^^^^^^

Communication limitations
=========================

Many of the demonstration configurations assume that the primary
communications interface available to communicate with the device
running Dia will be through an IP based network connection.  However,
in certain circumstances primarily involving the Digi ConnectPort X3,
the type of cellular connection provided is not suitable for running
server-style services such as the 'web' and tcp 'console'
sessions. Or, you may not know in advance the IP address that is
assigned to the device.

If you are running the Dia in one of these environments, you should
modify the given example .yml files accordingly.  This will not only
save resources, but also give you additional options for connecting.  

Console Presentation
--------------------

The :doc:`/user/presentations/console` presentation is by default
configured to present its CLI through a TCP based network socket.
However, the presentation is also capable of operation using a serial
port.  In any of the given example YML files, change the 'type'
setting to 'serial' and optionally configure the 'baud' and 'device'
settings to be correct for your serial connection.  The default
parameters of 115200 and '/com/0' are appropriate for a Digi
ConnectPort X3 without modification.

System access limitations
=========================

Available Memory
----------------

It is currently impossible to access the amount of memory that
a running ConnectPort X3 has in-use. This limitation is unlikely
to be resolved, so X3 developers should avoid running code which
attempts to access and/or use this value. As an example, this 
limitation would prevent the DIA Watchdog Service (which reboots its
host device if the available memory drops below a certain threshold)
from running properly.
