COPYLynx Web app

Version 1.1.0

The copy station family supports remote controlling. The main goal is to offer nearly the same control functionality in the browser as interacting with the built-in LC-display.

For example, copy profiles can be started using the LCD user interface and also via the remote API and the Web interface.

This manual describes the functions of the COPYLynx Web app which uses the remote API as a backend application. Several clients can connect to the copy station in parallel.

The communication is designed in client-server-architecture and the protocol used is JSON-RPC 2.0. The copy station acts as JSON-RPC server and a connected remote application acts as JSON-RPC client. The JSON-RPC server is based on a TCP-IP server.

The JSON-RPC server accepts connections to all active IP addresses on port 3943.

To prevent repeatedly sending the application status-request, the API is designed to communicate with the remote application bidirectional in full duplex mode. This requires a permanently open TCP-IP connection, as long as a remote application wants to control and retrieve status information to/from the copy station.

Status information, e.g. progress data from running copy profiles, are not polled by the client. Such status information are sent to connected clients as JSON-RPC notifications. The Web-Client displays information regarding the status of copy-profiles and COPYLynx-Events and allows the user to start/abort/confirm. Within the Dashboard-View the user can check general system information like CPU-load, MEM-usage, temperature and the available network interfaces.

JSON-RPC protocol

JSON-RPC V2.0 is a simple human-readable protocol and is a combination of ‘Remote Procedure Call’ using the ‘Java Script Object Notation‘ (RFC 4627).

The type JSON knows four simple data types (strings, numbers, Boolean and null) and two structure types (objects and arrays).

The Web-Server opens a TCP-socket to the remote API and communicates over JSON-RPC to get status information from the hardware or to process user-input from the Web app. The Web-Client displays the data received from the remote API and collects user-input. Web-Client and Server share all collected data using a Websocket.

Example:

--> data sent to server (here copy station) <-- data sent to client (here connected remote application)

Request:

--> {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1}
<-- {"jsonrpc": "2.0", "result": 19, "id": 1}

Notification:

--> {"jsonrpc": "2.0", "method": "update", "params": {"param1": 1547, "param2": "foo”}}

See http://www.jsonrpc.org/specification for more information.

‘RPC call batch’ is no supported and ignored by the copy station.

Several JSON-RPC calls are done as notifications, which means no response is expected from the addressed method.

All method calls done by the copy station are notifications. The remote client application never has to respond.

Webapp-Layout

Three Views are shown in the Browser when the Web-Client is opening a connection: Two loading-views containing Hardware-name and logo and the main page which is organized in tabs that provide Hardware-Information and allow user-input.

Figure 1: first page-loading view

Figure 2: Web-Client and Server are connecting

System View

The Base System Panel shows system-relevant Data read from the COPYLynx hardware. This tab is loaded first after the Client has connected successfully.

System-Parameters

In this section, general version- and type-information of the currently installed COPYLynx software are shown. This is a simple text-field with a list of Parameters.

Figure 3: System-Parameters section

CPU/Memory

The CPU/Memory Panel contains two diagrams which are displaying the real-time CPU- and MEM-load of the hardware. Both values are also shown in the Headline-Section in the right upper corner as a simple value within a progress dial.

Figure 4: CPU and MEM value

Figure 5: CPU/MEM Graphs

Network

The Network-Panel draws graphs of all the available network interfaces. It shows rx- and tx traffic as well as MAC, IPv4-address, state and number of multicasts.

Figure 6: Network

Time and Voltage/Temperature

There are furthermore two small one-line tables that show a local timestamp and some core-parameters of the COPYLynx hardware.

Figure 7: Time Voltage and Temperature

The Copy View

The Copy-Panel allows the user to start copy-profiles and view their progress or to switch to Fileserver-Mode. An active profile can be aborted before it is finished. After abortion or when the copy-process is done, the user has to confirm this. If there are events thrown by the COPYLynx Software, they are displayed in a separate table. To get rid of those event-entries, the user has to confirm them. This is not mandatory and is not blocking the copy-functionality in general.

Fileserver-Mode

Fileserver-Mode can be activated and deactivated by Button via Web interface. The Status-LED shows the user whether it is on (green) or off (red). In Off-State, Copy-Profiles can be started. In On-State the Copy-Functionality and Event-Handling are not available, the Profile- and Event-Table are shown empty. No User-Selection is possible and all buttons (except Fileserver-Mode) are inactive.

Figure 8: File-Server Off

Figure 9: Fileserver-Mode On

Copying – Single Profiles

After connecting to the remote API, a list of all available Copy-Profiles is requested. They are shown in Copy-Profile Table. The User can handle the Copy-Process via three Buttons:

  • Run: Starts all previously selected Profiles (multiple Profiles can be started synchronously)

  • ACK: confirmation is necessary when a Profile was aborted or a Copy-Process is finished. The need of acknowledge is shown by the right LED “ACK” in the table. It lights up in orange when the user has to send a confirmation regarding one of the Profiles. In case of several orange LED signs, also a multiple choice for ACK is possible.

  • Abort: This Button aborts the selected Profile(s).

The first column contains checkboxes to select Profiles. The Profile-Names are listed in the second column. On the right side, three columns show the status of the Profiles during copying.

As soon as a Profile is started, the corresponding (left) LED is blinking orange. This means that the user-input has been processed by the Web-Client, but the Hardware has not responded yet. In case a Profile can’t be started (due to some hardware reasons, or when it’s running already) the LED is set to default again and an Event is added to the Event-Table. In default state the LED is gray, when no copying is done.

Figure 10: User-Input „Run Profile“ processed

After the COPYLynx confirms the start of Profile, the LED turns green. Then the progress bar shows the current status of the copy-progress.

Figure 11: Running Copy-Progress

When a Profile is finished, the progress bar shows 100% and the right “ACK” LED is blinking orange. This means that the user has to confirm using the ACK Button.

Figure 12: Copying finished, ACK requested

Figure 13: synchronously running Profiles in different progress

After the acknowledgment is sent by the user, all status LEDs and the Progress bar return to default state (showing gray). In case of the user trying to send an ACK while the copying is still ongoing, the ACK is not considered by the COPYLynx. This doesn’t result in an error or Event.

When a running Profile is aborted, the progress bar stops at the current state and the ACK LED lights up in orange. The user has to confirm the Abortion to finish the Profile completely.

Figure 14: Two Profiles were aborted, user-confirmation is requested

Event - Table

Whenever the COPYLynx Hardware throws an Event, it is reported to all connected clients by the remote API. The Web app Backend fills the Event-Table during runtime and each newly reported Event is added to the list. The occurrence of those Events doesn’t prevent the User from handling the copying. Events shown in the table can be confirmed by the user at any time. Multiple or single choice is possible via the checkboxes. After the „Confirm“ Button is hit, the confirmation for the particular Event-Id is sent to the Hardware. As soon as the Event is deleted by the COPYLynx it is removed from the Event-Table.

Figure 15: Event-Table shows three Events that request confirmation

The „Type“ LED shows the kind of Event that occurred. When a user-confirmation is requested, the LED is blinking red. This Event remains in the Table until it is confirmed. Other Event messages that might occur are shown in orange and are removed automatically.

Last updated