content.gif menu.gif basics.gif

Handling Connected Channels

This chapter describes the checks that the Channel Manager makes for its channels:

  1. Check for connections to be established

A channel can have one of the following states:

CMGR_STATUS_NONE

Nothing.

CMGR_STATUS_CONNECTED

Connection is OK.

CMGR_TRY_TO_CONNECT

A device wants to get connected.

CMGR_CONNECTING

A device is busy connecting.

  1. Check for incoming data on a connected channel

The Channel Manager has N channels to handle. A "connected" channel has an associated device and client application. The Channel Manager reads incoming bytes on each of the connected channels and sends the data to the client application.

  1. Assure that channels are not open too long

Each channel (actually, each plug-in) has a maximum usage time. When this time is exceeded, then a message is sent to the client application: "Please disconnect".

  1. Check the possible timeplans and check for "scheduled poll"

A timeplan can be assigned to each device. The Channel Manager goes through all devices, and associated timeplan, and will determine the time of next poll.

When a poll is pending, then the state of the device is set to CMGR_TRY_TO_CONNECT. This will eventually cause a connection being established.

  1. Hang-up channels that are no longer needed

Hanging-up a channel can take some time (for example: you need the standard Hayes modem command 'ATH' to hang up the modem, and then wait for the answer of the modem).

 

page_top.gif

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved