Working with the Host Services Processes Group

Navigation:  How to Work with Processes >

Working with the Host Services Processes Group

Previous pageReturn to chapter overviewNext page

 

Process Purpose

 

The Host Services group of processes allows the device to send or receive files to and from the host server, to send or receive packets and to execute some file operations on files residing on the host server.

All the processes in the Host Communication group follow the same structure:

 

• Define the host connection

 

• Define the command to execute

 

• Define the file(s) and or the variable(s) used in the process

 

• Define the action to take if an error occurs

 

• Define (if needed) a time out value for the process

 

Application/Host communication

 

The communication between application and host can be synchronous or asynchronous.

Within MCL-Designer, the communication type is associated to the selected server type ("MCL-Net V4", "Web Service" or "TCP IP"). Having a synchronous or an asynchronous communication between application and host affects the application's workflow. Consider the following when working with host profiles/host related processes:

 

Synchronous Communication

 

Details

Behavior

Occurs in real time

Is executed in the foreground

Is affected by a defined time out

The application workflow stops until communication between application and host is successful or a communications error is established (ex: after a time out runs out)

 

 

Asynchronous Communication

 

Details

Behavior

May or may not occur in real time

Is executed in the background

Application/host connection guaranteed by a background mechanism

The time out and/or the retries (defined in the host profile) affect the background mechanism

The application workflow does NOT stop

The data being sent/received is put "in queue" and a background mechanism takes care of the communication to the host

 

 

is a recurring icon in these processes (located on the upper right corner of the properties window) - it is used to set up a time out. See Time Out.

 

 

 

The "<Default>" Host Profile

 

 

The "<Default>" host profile option available in Host Services processes refers to the server's address defined in MCL-Mobility Platform (set in the "Server" sub-module and associated to a Device Group within your MCL-Mobility Platform site).

Refer to the MCL-Mobility Platform User Guide for more details.

 

 

In a testing scenario (with MCL-Simulator), the "<Default>" host profile connects to the IP you established in "MCL-Designer Setup". See Simulation tab.

 

 

 

Time Outs

 

A time out is a preset time period during which a task must be completed or that task is canceled. Time outs are particularly useful in a communications context - if the communication between system/application and Host does not occur within a specific period of time, the time out stops the constant connection request loop.

 

When defining a time out for your application, consider the following time outs:

 

The TCP time out - a time out embedded in the target device's OS. It is defined/controlled by the manufacturer and can vary according to the device's OS (external context).

If the TCP time out is shorter than the Process or Host Profile time outs, it will be applied first and dismiss any other defined time out(s).

The Process time out - the time out you define in a process (MCL-Designer context). It overrides the Host Profile time out.

The Host Profile time out - the time out you define within the Host Profile(s) you use in Host related processes (MCL-Designer context).

 

 

A time out fulfillment always triggers a "Comm Error". You must take into account the TCP time out when you define a Process time out or a Host Profile time out at the risk of triggering a "virtual communications error":

Ex: Considering the TCP time out of a WinCE device of 21 seconds and a Process time out of 60 seconds, a "communications error" will be displayed after 21 seconds.

Ex: Considering the same TCP time out of a WinCE device (21 seconds) and a Process time out of 0 (infinite), the "communications error" will also be displayed after 21 seconds.

Ex: Considering the same TCP time out of a WinCE device of 21 seconds and a Process time out of 10 seconds, the "communications error" will also be displayed after 10 seconds.

 

Contact the manufacturer to find out/change the device's TCP time out.

 

 

The Host Profile time out does NOT apply to Aux related processes that use an Aux Profile of the "Socket TCP" type.

 

 

Due to limitations of the connection provided by Windows Mobile Device Center (USB connection with the device), the used time out is always the TCP time out.

 

 

When establishing a shorter Process time out than a TCP time out to override that TCP time out, always consider the task it is associated to.

Ex: If you define a 2 second time out within a "Receive from Host" process (used to receive data packets from a specific host server), the time out may not be enough to allow the application to contact the host, validate the communication and proceed to data packet exchange. The time out will interrupt the application's workflow and trigger a "virtual" error, meaning, there is no real issue regarding communication between the application and the host but a "Comm Error" will be displayed.

 

You can associate a Message Box to a time out to inform the operator that this condition occurred for a specific operation and, depending on the application's workflow, you can add the necessary processes/settings to allow the operator to retry that operation.

 

 

To Define a Process Time Out

 

Step-by-step

 

1. Click (when available). This icon is located on the upper right corner of a properties window. This opens a "Time Out" window.

 

 

2. Define the time out value:

 

Time Out (s)

Time Out

Use one of the following to define the time out value:

Enter the number of seconds or use the up/down arrows.

Use the up/down arrows and select "<Default>" to use the time out associated to the selected host profile. ("<Default>" is NOT APPLICABLE to Aux profiles that use "Socket TCP".)

Use the up/down arrows to select "Infinite" or enter "0" for an infinite time out.

 

3. Click to conclude or to abort the operation.

After filling in the required options, click to conclude or to abort the operation.

 

 

The Host Services group includes the following processes:

 

----- File Services

Working with Send to Host Process

Working with Receive from Host Process

----- Remote File Operations

Working with Write into Host File Process

Working with Copy File on Host Process

Working with Rename File on Host Process

Working with Delete File on Host Process

Working with Append File on Host Process

Working with Get Host File Info Process

----- Data Services

Working with Send to Host Process

Working with Receive from Host Process

Working with Host Get Data Info

----- Other Services

Working with Sync Date/Time Process

Working with Execute Program on Host Process

Working with ShellExecute on Host Process

Working with Open Bridge Command Process

----- Connection/Status

Working with Connection Status Process

Working with Set Host Address Process

Working with Get Host Address Process

Working with Connect to Host Process

Working with Disconnect Process

Working with Flush Host Process