Tani web based tools  2.01.01
Tani web socket JSON frames
station parameters.


Connection initialisation.

in:
{
"function": "Station/Init",
"id": "some-text-or-number",
"data": {}
}
out:
{
"function": "Station/Init",
"id": "some-text-or-number",
"status": 0,
"data": {
"LoginRequired": true,
"LoginSalt": [0, 1, 2, 3, ...]
}
}


Station login.

in:
{
"function": "Station/Login",
"id": "some-text-or-number",
"data": {
"user": "abc",
"password": "def"
}
}
out:
{
"function": "Station/Login",
"id": "some-text-or-number",
"status": 0,
"data": {
"Read": true,
"Write": true,
"Exec": true
}
}


Read user accounts.

in:
{
"function": "Station/UserRead",
"id": "some-text-or-number",
"data": {
}
}
out:
{
"function": "Station/UserRead",
"id": "some-text-or-number",
"status": 0,
"data": {
"Users": [
{ "User": "xxx", "Password": "yyy", ... }
]
}
}


Write user accounts.

in:
{
"function": "Station/UserWrite",
"id": "some-text-or-number",
"data": {
"User": "xxx", "Password": "yyy", ...
}
}
out:
{
"function": "Station/UserWrite",
"id": "some-text-or-number",
"status": 0,
"data": {
}
}


Delete an unser account.

in:
{
"function": "Station/UserDelete",
"id": "some-text-or-number",
"data": {
"User": "xxx", "Password": "yyy", ...
}
}
out:
{
"function": "Station/UserDelete",
"id": "some-text-or-number",
"status": 0,
"data": {
}
}


List all network adapters.

in:
{
"function": "Station/AdapterList",
"id": "some-text-or-number",
"data": {}
}
out:
{
"function": "Station/AdapterList",
"id": "some-text-or-number",
"status": 0,
"data": {
"Adapters": [
{ "Name": "eth0", "Adapter": [0,0,1,1,...] },
...
]
}
}


List all serial ports.

in:
{
"function": "Station/SerialPortList",
"id": "some-text-or-number",
"data": {}
}
out:
{
"function": "Station/SerialPortList",
"id": "some-text-or-number",
"status": 0,
"data": {
"Ports": [
{ "Name": "UART0", "InternalName": "/dev/ttyO0" },
...
]
}
}


List general device informations.

in:
{
"function": "Station/DeviceVersions",
"id": "some-text-or-number",
"data": {}
}
out:
{
"function": "Station/DeviceVersions",
"id": "some-text-or-number",
"status": 0,
"data": {
"SumRev": "2.03.004",
"Copyright": "...",
...
}
}


Set/return the last edit positions.

in:
{
"function": "Station/LastWindow",
"id": "some-text-or-number",
"data": {
"LastFunction": "Connections",
"Element": 0,
TODO baseflags
"Modules": ["PlcEngine", "Logger", ...],
"LastLogicGroup": "",
"LastLogicTable": "xxx",
"LastStatusTable": "yyy"
}
}
out:
{
"function": "Station/LastWindow",
"id": "some-text-or-number",
"status": 0,
"data": {
"LastFunction": "Connections",
"Element": 0,
TODO baseflags
"Modules": ["PlcEngine", "Logger", ...],
"LastLogicGroup": "",
"LastLogicTable": "xxx",
"LastStatusTable": "yyy"
}
}


List all library versions.

in:
{
"function": "Station/Revisions",
"id": "some-text-or-number",
"data": {}
}
out:
{
"function": "Station/Revisions",
"id": "some-text-or-number",
"status": 0,
"data": {
"Versions": [
]
}
}


List library load paths.

in:
{
"function": "Station/LoadPaths",
"id": "some-text-or-number",
"data": {}
}
out:
{
"function": "Station/LoadPaths",
"id": "some-text-or-number",
"status": 0,
"data": {
"Versions": [
]
}
}


List BACnet station settings.

in:
{
"function": "Station/BacnetClockRead",
"id": "some-text-or-number",
"data": {}
}
out:
{
"function": "Station/BacnetClockRead",
"id": "some-text-or-number",
"status": 0,
"data": {
"OwnDeviceId": 42,
"ClockMaster": [
{
"Port": 40"
"Adapter": [0,0,1,1,...]
"ClockSyncInterval": 42
},...
]
}
}


Save BACnet station settings.

in:
{
"function": "Station/BacnetClockWrite",
"id": "some-text-or-number",
"data": {
"OwnDeviceId": "number",
"ClockMaster": [
{
"Port": 42
"Adapter": [0,0,1,1,...]
"ClockSyncInterval": 1000
}, ...
]
}
}
out:
{
"function": "Station/BacnetClockWrite",
"id": "some-text-or-number",
"status": 0,
"data": {}
}