This is historical information of device classes implemented in WebSocketDS device server.
Use this link to find the valid information.
Development status:
Released,
Release: 0.9.3
Information status: Verified
Repository:
https://github.com/elkinvg/WebSocketDS
Contact:
Class Description
WebSocket access to tango device-server attributes.
Configuration should be done via properties:
Port - port to listen incoming ws connections; DeviceServer - tango id of a required device server; Attributes - list of required DS attributes, you wish to read via WS; Commands - list of required DS commandes, you wish to executed via WS; AuthDS - Tango web authentication device server (TangoWebAuth ) name. Secure - It will be used wss connection (websocket secure). (true if you want) Certificate - Certificate file name (crt) with full path (if Secure = true) Key - Private key file name (if Secure = true) Options - Various options for the device server
Then you should set polling to the UpdateData command. (1000 means that all connected clients would read attributes once per second).
Data format: JSON string with array of attrubute objects {atrrtibute name, attribute value, quality, timestamp};
if you want to record in the logs, define uselog in Property Options. The database (defined in AuthDS) must contain a table command_history with columns:
// id - autoincrement // argin[0] = timestamp_string UNIX_TIMESTAMP // argin[1] = login // argin[2] = deviceName // argin[3] = IP // argin[4] = commandName // argin[5] = commandJson // argin[6] = statusBool // argin[7] = isGroup
Families: Communication
Key words:
Platform: All Platforms
Language: Cpp
License: GPL
Contact:
Hardware
Manufacturer: none
Bus: Not Applicable
Class interface
Attributes:
Name | Description |
---|---|
JSONScalar: DevString | — |
TimestampDiffScalar: DevULong | The difference between the timestamps from UpdateData and CheckPoll |
NumberOfConnectionsScalar: DevULong | Number of WS clients |
Commands:
Name | Description |
---|---|
StateInput: DevVoid Output: State Device state |
This command gets the device state (stored in its device_state data member) and returns it to the caller. |
StatusInput: DevVoid Output: ConstDevString Device status |
This command gets the device status (stored in its device_status data member) and returns it to the caller. |
OnInput: DevVoid Output: DevVoid |
— |
OffInput: DevVoid Output: DevVoid |
— |
UpdateDataInput: DevVoid Output: DevVoid |
— |
ResetInput: DevVoid Output: DevVoid |
Restart websocket server |
CheckPollInput: DevVoid Output: DevVoid |
— |
Pipes:
Properties:
Name | Description |
---|---|
ModeDevString | Device operating mode ser - Server mode ser_cli_all - Server mode. Client mode (You can use all devices) ser_cli_all_ro - Server mode. Client mode (You can use all devices only for reading attributes and pipes) ser_cli_ali - Server mode. Client mode. (You can use devices that have an alias.) ser_cli_ali_ro - Server mode. Client mode. (You can use devices that have an alias only for reading attributes and pipes) cli_all - Client mode (You can use all devices) cli_all_ro - Client mode (You can use all devices only for reading attributes and pipes) cli_ali - Client mode. (You can use devices that have an alias.) cli_ali_ro - Client mode. (You can use devices that have an alias only for reading attributes and pipes) |
PortDevShort | Using port of WebSocket |
DeviceServerDevString | Using DeviceServer name or a device name pattern (e.g. domain_* / family/ member_*) for communicate with a group of devices. Used only if any server mode is selected. |
AttributesArray of DevString | A list of device attributes you want to read, if reading all attributes is required, add __all_attrs__ (not operational in group mode); Used only if any server mode is selected. |
CommandsArray of DevString | a list of device commands you want to execute through WS Used only if any server mode is selected. |
PipeNameArray of DevString | Name of DevicePipe for reading. [0] When using GROUP, the DevicePipe name must be the same for all devices. If you want to set properties for specific attributes, add them in the format ``NameAttr;property`` Used only if any server mode is selected. |
SecureDevBoolean | Shall we use SSL encryption? set true, for secure wss connection, otherwise false; |
CertificateDevString | full path to the certificate in use (if Secure = true) example: /etc/ssl/certs/ssl-cert-snakeoil.pem |
KeyDevString | full path to the file in use with Private key (if Secure = true) Example: /etc/ssl/private/ssl-cert-snakeoil.key |
AuthDSDevString | Tango web authentication device server (TangoWebAuth ) name. responsible for user authentication in case of commands execution |
MaxNumberOfConnectionsDevUShort | maximum number of connections. If the limit is reached, further connections will be lost with 400 Bad Request error. If 0 is set, the number of connections will be unlimited. |
MaximumBufferSizeDevUShort | maximum buffer size for each connection, KiB. The Default value is 1000. Possible values range from1 to 10000 (if setting a value outside the range, the default value will be set). If exceeding the set maximum buffer size, the connection will be lost by the server; |
ResetTimestampDifferenceDevUShort | The difference in timestamps (seconds) after which a WS server is reset. The difference is counted by CheckPoll method between update timestamp in UpdateData method and current timestamp. Minimum value is 60. Default and MinValue = 60 Used only if any server mode is selected |
OptionsArray of DevString | Options for device. Format of options: nameOfOption or nameOfOption=value |
Updated:
The device class has been updated.
You can see previous version here .
23 Oct 2017, Vladimir Elkin
Updated:
The device class has been updated.
You can see previous version here .
27 Jun 2017, Vladimir Elkin
Updated:
The device class has been updated.
You are looking at this version now.
21 May 2017, Igor Khorkhriakov
Reverted:
Recent update of device classes in this device server has been verified by Igor Khorkhriakov.
21 May 2017, Vladimir Elkin
Created:
The device class has been added to catalogue.