Jump to content

DCE Binary Communication Protocol: Difference between revisions

From LinuxMCE
Ender (talk | contribs)
Ender (talk | contribs)
Line 15: Line 15:
>> Device sends:  
>> Device sends:  


''HELLO <my_device_id> '\n'''
'''''HELLO <my_device_id> '\n''''''




<< To router can response with :  
<< To router can response with :  


''NOT IN THIS INSTALLATION IP=<device_ip_address> '\n'''
'''''NOT IN THIS INSTALLATION IP=<device_ip_address> '\n''''''


or
or


''OK 43 IP=<device_ip_address> '\n'''
'''''OK 43 IP=<device_ip_address> '\n''''''




>> Device sends:  
>> Device sends:  


''EVENT 43 '\n'''
'''''EVENT 43 '\n''''''




<< To router will response with :  
<< To router will response with :  


''OK 43 IP=<device_ip_address> '\n'''
'''''OK 43 IP=<device_ip_address> '\n''''''




>> To send a message, the device will send :
>> To send a message, the device will send :


''MESSAGE <size_of_binary_message> '\n'''
'''''MESSAGE <size_of_binary_message> '\n''''''


and then
and then


''<serialized_binary_message>''
'''''<serialized_binary_message>'''''


== How to create a command connection ==  
== How to create a command connection ==  

Revision as of 12:53, 16 May 2007

Introduction

A device can create a command connection and one or more event connections to the router.

The command connection is used as an incoming connection and device will use it to receive message from the router (commands).

An event connection is used by the device as an outgoing connection to notify the router about events or the deliver commands to other devices.

The DCERouter process is listening on 3450 port.

How to create an event connection

Here is how the handshake is made for an event connection:

>> Device sends:

HELLO <my_device_id> '\n'


<< To router can response with :

NOT IN THIS INSTALLATION IP=<device_ip_address> '\n'

or

OK 43 IP=<device_ip_address> '\n'


>> Device sends:

EVENT 43 '\n'


<< To router will response with :

OK 43 IP=<device_ip_address> '\n'


>> To send a message, the device will send :

MESSAGE <size_of_binary_message> '\n'

and then

<serialized_binary_message>

How to create a command connection

How to serialize a message

How to serialize data

How to serialize data-grids