User Tools

Site Tools


tcpcommandport

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tcpcommandport [2008/03/06 21:16] seststtcpcommandport [2018/11/03 02:59] (current) – external edit 127.0.0.1
Line 1: Line 1:
-{{port64.png|}}+{{::server:port64.png?nolink|}}
 ====== TCPCommandPort ====== ====== TCPCommandPort ======
-The TCPCommandPort acts as a command line interface to the HomeServer. By connecting a telnet session to the TCPCommandPort you can access all objects in the HomeServer. Via the TCPCommandPort you can list all instances, get and set the attributes of the instances and call methods in the instances. You can also send events to the event hub. +This module is a part of the [[:start|NetHomeServer]]. The TCPCommandPort acts as a command line interface to the HomeServer. By connecting a telnet session to the TCPCommandPort you can access all objects in the HomeServer. Via the TCPCommandPort you can list all instances, get and set the attributes of the instances and call methods in the instances. You can also send events to the event hub. 
-The interface is primarily intended for machine-machine communication and not for human interaction. It is used by the external GUI tool "HomeClient"+The interface is primarily intended for machine-machine communication and not for human interaction. The syntax is described [[commandportsyntax|here]]. The supported commands are: //dircreategetset, call, rename, event, subscribequit//.
- +
-=== Command Syntax === +
-The syntax for the interface is ascii text where command elements are separated with comma "," and each command and response are ended with ''[CR][LF]''. If a parameter contains a  "," or any other quote character they should be quoted as follows: +
-  * '','' should be represented as: ''%2C'' +
-  * ''[CR]'' should be represented as: ''%0D'' +
-  * ''[LF]'' should be represented as: ''%0A'' +
-  * ''%'' should be represented as: ''%25'' +
-Each command response begins with the word //ok// followed by the result or the word //error// followed by an error code and an error string. +
- +
-=== Commands === +
-The following commands are supported by the command port: +
-  * **dir** - Returns a list of all instances in the HomeServer. +
-  * **get**,//instance name{,attribute name}// - Returns a list of name and value for the specified attribute. If no attribute name is specified all attributes of the instance are listed. +
-  * **set**,//instance name,attribute name,value// - Sets the attribute value in the specified instance. +
-  * **call**//instance name,action name// - Calls the specified method in the specified instance. +
-  * **event**{,//attribute name,attribute value}*// - Sends an event with the specified attribute values. +
-  * **quit** - Forces the TCPCommandPort to close the connection. +
-== Examples == +
-  dir +
-  ok,Event Broker,Bedroom Lamp,Hall Lamp,Bedroom Timer,Button,Gate Keeper,TCPListener Port,TCP Command Port,UDP Command Port,Temperature Log,UDP Listener,CPU Temp,CPU Temp Alarm,InternetRadio,Home-WAP,Home-Soap,WEB-Server +
-  get,Bedroom Lamp +
-  ok,State,Off,HouseCode,11111111,DeviceCode,1111,FHZ1000PcPort,NoPort +
-  call,Bedroom Lamp,on +
-  ok, +
-  get,Bedroom Lamp,State +
-  ok,State,On +
-  get +
-  error,2,No Instance specified +
- +
  
 ===== Attributes ===== ===== Attributes =====
Line 38: Line 8:
   * **MessageCount** //[get]// Number of processed commands.   * **MessageCount** //[get]// Number of processed commands.
  
 +==== See also ====
 +[[CommandPortSyntax|Command Port Syntax]], [[UDPCommandPort]]
tcpcommandport.1204834610.txt.gz · Last modified: 2018/11/03 02:57 (external edit)