[Next] [Previous] [Contents]

2.9 Application Communications Description

2.9.1 Reliability codes

The following table defines the reliability codes for applications used for navigation and mobility purposes to interface MoBIC.


Code        Meaning                                                           

0           Application is not able to control the system                     

1           Application has severe difficulties to take over control          

2           Application has some difficulties to take over control            

3           Application has minor difficulties to take over control           

4           Application has no problems to take over control                  



MoSI reliability codes

2.9.2 Message Sending and Definition

All messages explained in the following have to be registered in the Windows environment by using the RegisterWindowMessage() function. The strings for the messages given in the following have to be handled case sensitive, e.g.

WM_MOSI_GET_RELIABILITY = RegisterWindowMessage("WM_MOSI_GET_RELIABILITY");

Every message sent to an unknown count of concurrent applications in the MS Windows environment have to be sent to all top-level windows, e.g.

SendMessage(NULL,WM_MOSI_GET_RELIABILITY,0,0);

The NULL value in the first parameter guarantees that the message is sent to all top-level windows.

2.9.3 Request Reliability Information

Message: "WM_MOSI_GET_RELIABILITY"

Purpose: Request reliability information

Parameters: WParam - handle of window the responses have to be sent to

LParam - NULL

Return Value: None

Remarks: Applications receiving this message should send a message to the window sending the request by using the WM_MOSI_REQ_CONTROL message. This should preferably be done by using the function PostMessage() instead of SendMessage(). The application sending this message should wait for a certain time to make sure that every application has the necessary time to respond to this message. This message can be sent at start-up to check whether there are other applications using the MoSI interface. If yes, the starting application should try to get the control by using the WM_MOSI_REQ_CONTROL message.

2.9.4 Requesting Control

Message: "WM_MOSI_REQ_CONTROL "

Purpose: Request control

Parameters: WParam - handle of window sending this message

LParam - reliability code (see above).

Remarks: This message has to be sent to an application in response to an WM_MOSI_GET_ RELIABILITY message but can also be used to request control because of changed conditions. This message can be sent to a specific window as well as to all windows.

2.9.5 Hand Over Control

Message: "WM_MOSI_HAND_CONTROL"

Purpose: Hand over control

Parameters: None

Remarks: An application receiving this message is informed to take over the control of the system. It is the active application until it hands over the control to another application or up to an emergency request. This message must not be sent to all windows.

2.9.6 Emergency Request

Message: "WM_MOSI_REQ_EMERGENCY"

Purpose: Request emergency control

Parameters: None

Remarks: An application receiving the WM_MOSI_REQ_EMERGENCY message has to finish all access to IO-devices immediately before returning from the message response function. After the SendMessage() function returns the sender can assume that he has immediate control over the system. The control should be returned by using the WM_MOSI_HAND_CONTROL message.

Note: This message is meant for emergency cases. The application receiving this message is not required to clean up everything because it will get back the control over the system. The application sending this message should take care of possible problems with available memory etc.


[Next] [Previous] [Contents]