How To Add Constraints To A Dialout Modem



How to configure a modem such that it is only used with specific sites.

ION Enterprise
StruxureWare Power Monitoring 7.0.x
Power monitoring Expert (PME) 7.2.x, 8.x

Mangement Console


1) Open Management Console and select Sites
2) Mouse over Column Selector and wait for the column selection to expand
3) Select the ID column. The ID number for the site will be displayed in the table.
4) Record the ID number for the site(s).
5) Select Dial Out Modems in management Console
6) Double-click on the dialout modem of interest.
7) On the Dialout Modem Options dialog, enter a value in the Constraints field. Constraints may be of the following formats, in which <ID number> is the ID number of the modem site:

WHERE port.ID IN (<ID number>)
WHERE port.ID NOT IN (<ID number>)
WHERE port.ID = <ID number>
WHERE port.ID <> <ID number>


To reference multiple sites, use a comma-separated list the ID numbers for each site for example:
WHERE port.ID IN (1, 2, 3)


Channel    -- a local COM port (with or without a modem)
Port -- roughly equivalent to a site (a collection of meters on the same wire)


Modem pooling is handled by the ConnectionManager.    The ConnectionManager will look at the constraints placed on a local modem and decide whether or not it can be used to dial up a remote modem site.    
The SQL fragment can be any valid SQL that can be executed as part of the following statement:

SELECT 1 FROM Gate JOIN Port ON Port.ID=portID constaints

where portID is the ID from the Port table of the port in question and constraints is the SQL fragment from the Channel or DataServer table.    If the query returns any rows, the port is considered to be routable via the channel in question. If the querey does not return any rows, the port is not routable. If the constraints are invalid, the channel (or data server) is disabled and will not be used again until the constraints are fixed.


As an example, consider a system with two local modems and three remote sites.    The Channel and Port tables contain the following records:

Port Table
ID: 22
* Name: Remote Site 1
ID: 23
* Name: Remote Site 2
ID: 24
* Name: Remote Site 3

Channel Table
ID: 1
* EntityClassID: 19 (modem)
* Address: COM1
* Type: 1 (Brand X)
* Constraints: WHERE port.ID IN (22,23)
ID: 2
* EntityClassID: 19 (modem)
* Address: COM2
* Type: 2 (Brand Y)
* Constraints: WHERE port.ID <> 22

This means that the local modem on COM1 can only connect to Remote Site 1 and Remote Site 2 but not Remote Site 3. The local modem on COM2 can connect to Remote Site 2, Remote Site 3, and any new remote site added to the system but it cannot connect to Remote Site 1.

In most cases, constraints will be simple lists, either IN or NOT IN.    It is possible to construct much more complicated constraints.

Adding constraints can affect system performance so they should be used only as necessary.'