Difference between revisions of "Driving the SiGML Player App"

From Virtual Humans
Jump to navigation Jump to search
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Main Page|Home]] > [[CWASA]]
+
[[Main Page|Home]] >> [[CWA Signing Avatars|CWASA]]
 
----
 
----
This page describes the protocol a client app needs to follow in order to drive the SiGML Player app and provides a simple Java application that uses the protocol. The same protpcol is used for the [[JASigning]] SiGML Service Player app.
+
This page describes the protocol a client app needs to follow in order to drive the SiGML Player app which is part of the [https://vhg.cmp.uea.ac.uk/tech/jas/std CWASA Standard Release]. The application is based on Electron and Node.js.
 +
 
 +
The page also provides a simple Java application that uses the protocol. The same protpcol is used for the [[JASigning]] SiGML Service Player app.
  
 
== Protocol ==
 
== Protocol ==
Line 21: Line 23:
 
If a new text is dispatched before performance of the previous one is complete, then that previous performance is immediately abandoned in favour of the new one.
 
If a new text is dispatched before performance of the previous one is complete, then that previous performance is immediately abandoned in favour of the new one.
 
So, although in principle the client could be on the opposite side of the world from the server, in practice it does not make much sense if the client, i.e. its user, does not actually have line-of-sight contact with the server.
 
So, although in principle the client could be on the opposite side of the world from the server, in practice it does not make much sense if the client, i.e. its user, does not actually have line-of-sight contact with the server.
 +
 +
== Unix Commandline Scripting ==
 +
 +
On Unix systems, including OS X and Linux, or using Cygwin on Windows, the command:
 +
    nc localhost 8052 < mySigns.sigml
 +
will send SiGML data to the application. The parameter -N may be needed to close the socket on EOF. Alternatively, the form
 +
    nc localhost 8052 -w 0 < mySigns.sigml
 +
should work on all platforms
  
 
== Example Java Application ==
 
== Example Java Application ==
Line 32: Line 42:
  
 
The code can be adapted or incorporated in your own code but please acknowledge the source.
 
The code can be adapted or incorporated in your own code but please acknowledge the source.
 +
 +
== Other Applications ==
 +
 +
Various [[SiGML Tools]] send SiGML data to the SiGML Player.
 +
 
----
 
----
[[Main Page|Home]] > [[CWASA]]
+
[[Main Page|Home]] >> [[CWA Signing Avatars|CWASA]]

Latest revision as of 14:33, 29 April 2024

Home >> CWASA


This page describes the protocol a client app needs to follow in order to drive the SiGML Player app which is part of the CWASA Standard Release. The application is based on Electron and Node.js.

The page also provides a simple Java application that uses the protocol. The same protpcol is used for the JASigning SiGML Service Player app.

Protocol

The SiGML Player accepts connection requests on standard TCP/IP port number 8052.

Each time the client wants to dispatch a SiGML text to the player it performs the following sequence:

  • Make a new connection to that port (8052) on the server, i.e. the host system running the SiGML Player app, which may or may not be the "localhost".
  • Send the SiGML text on the resulting output stream.
    • If the SiGML text explicitly specifies an encoding in an initial XML declaration then the text should be sent as a byte stream with that encoding.
    • If there's no explicit encoding it should be sent as a UTF-8 stream.
  • Close the stream and the connection.

The protocol is extremely simple: so there's no feedback from the server to tell the client when the performance of a SiGML text is complete -- or indeed whether there are any errors in the SiGML text.

If a new text is dispatched before performance of the previous one is complete, then that previous performance is immediately abandoned in favour of the new one. So, although in principle the client could be on the opposite side of the world from the server, in practice it does not make much sense if the client, i.e. its user, does not actually have line-of-sight contact with the server.

Unix Commandline Scripting

On Unix systems, including OS X and Linux, or using Cygwin on Windows, the command:

   nc localhost 8052 < mySigns.sigml

will send SiGML data to the application. The parameter -N may be needed to close the socket on EOF. Alternatively, the form

   nc localhost 8052 -w 0 < mySigns.sigml

should work on all platforms

Example Java Application

A NetBeans project for a simple Java application is available as a ZIP archive for the SignStreamer Project.

  • The src folder contains Java source files
  • The dist folder contains SignStreamer.jar for the application
  • The application can be run by the command java -jar "SignStreamer.jar"
  • A SiGML file to be sent is selected by clicking the Select File button and sent using the Send File button

The code can be adapted or incorporated in your own code but please acknowledge the source.

Other Applications

Various SiGML Tools send SiGML data to the SiGML Player.


Home >> CWASA