Main

3rd party services integration

Command-line option

Example.

Command:
C:\_majordomo\htdocs\obj.bat USBDev.Connected serial:"12345" devname:"mydevice"

This example will call Connected method of the USBDev object with serial parameter set to 12345 and devname parameter set to mydevice

Method code could be something like this:

if ($params['serial']=='12345' && $params['devname']=='mydevice') {
 say("mydevice device is connected");
}

HTTP-requests

The same command could be send using HTTP-request:

http://192.168.0.17/objects/?object=USBDev&op=m&m=Connected&serial=12345&devname=mydevice

(192.168.0.17 -- MajorDoMo server's hostname)

Also you can use http-requests to get or set object's property :

http://192.168.0.17/objects/?object=USBDev&op=get&p=status 
// will return "status" property value for USBDev object

http://192.168.0.17/objects/?object=USBDev&op=set&p=status&v=connected 
//  will set "status" property value to "connected" for USBDev object

MajorDomo

Project

Partners

edit SideBar

 

Blix theme adapted by David Gilbert, powered by PmWiki