Check-in [ac0d74ae78]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge with trunk
Timelines: family | ancestors | descendants | both | wtf-8-experiment
Files: files | file ages | folders
SHA1: ac0d74ae782562281139df9ef9413f20c0f2af08
User & Date: chw 2020-07-28 04:57:44
Context
2020-08-04
04:20
merge with trunk check-in: 2865017456 user: chw tags: wtf-8-experiment
2020-07-28
04:57
merge with trunk check-in: ac0d74ae78 user: chw tags: wtf-8-experiment
04:39
update topcua for some open62541 1.x diffs in type handling etc. check-in: 15e21d4fcc user: chw tags: trunk
2020-07-25
19:24
merge with trunk check-in: d78a1dbb7e user: chw tags: wtf-8-experiment
Changes

Name change from jni/README.txt to jni/README.md.

1
2
3

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
================================================================================
Native components of AndroWish
================================================================================


This directory holds the C/C++ components which are part of AndroWish.
It is built using the Android NDK. The build process is integrated
into the toplevel project but can be carried out manually by invoking
the "ndk-build" tool in this directory.

The Android.mk file in this directory invokes all dependent Android.mk
files below.

The Application.mk file controls NDK regarding prebuilt stuff,
Android API level, and most importantly the CPUs for which 
everything is to be built, e.g. ARM and x86 CPUs.

As of 2017-10-18 the following NDK revisions are known to build
everything without errors (but a varying amount of warnings):

  NDK r9d (March 2014)
  NDK r10e (May 2016)
  NDK r12b (June 2016)
  NDK r13b (October 2016)

The shiny new clang/llvm based NDKs with unified headers still fail:

  NDK r14b (March 2017)
  NDK r15c (July 2017)

As of 2018-02-09 the tree should build with NDK r16b (December 2017)
but this depends somewhat on the development system (Windows may fail).

For later NDKs it may be necessary to change the APP_ABI macro in
Application.mk to have "armeabi-v7a" instead of "armeabi".
<

<
>




|

|


|






|
|
|
|



|
|

|


|
|

1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

Native components of AndroWish

------------------------------

This directory holds the C/C++ components which are part of AndroWish.
It is built using the Android NDK. The build process is integrated
into the toplevel project but can be carried out manually by invoking
the `ndk-build` tool in this directory.

The `Android.mk` file in this directory invokes all dependent `Android.mk`
files below.

The `Application.mk` file controls NDK regarding prebuilt stuff,
Android API level, and most importantly the CPUs for which 
everything is to be built, e.g. ARM and x86 CPUs.

As of 2017-10-18 the following NDK revisions are known to build
everything without errors (but a varying amount of warnings):

	NDK r9d (March 2014)
	NDK r10e (May 2016)
	NDK r12b (June 2016)
	NDK r13b (October 2016)

The shiny new clang/llvm based NDKs with unified headers still fail:

	NDK r14b (March 2017)
	NDK r15c (July 2017)

As of 2018-02-09 the tree should build with `NDK r16b (December 2017)`
but this depends somewhat on the development system (Windows may fail).

For later NDKs it may be necessary to change the `APP_ABI` macro in
`Application.mk` to have `armeabi-v7a` instead of `armeabi`.

Changes to jni/imgjp2/README.md.

1
2
3
4
5
6
7
8
9
imgjp2
======

Tk photo image format handler for the JPEG2000 (.jp2) format using
libopenjp2 from [http://www.openjpeg.org](http://www.openjpeg.org).

The image format name is "jp2", i.e.

	package require imgjp2

|







1
2
3
4
5
6
7
8
9
imgjp2
------

Tk photo image format handler for the JPEG2000 (.jp2) format using
libopenjp2 from [http://www.openjpeg.org](http://www.openjpeg.org).

The image format name is "jp2", i.e.

	package require imgjp2

Name change from jni/librun/README.txt to jni/librun/README.md.

1
2
3
4
5
6
7
8
9
10
librun
======

Small rundll like wrapper to call a function in a shared library (.so)
from a shell command line.

Example usage:

	./librun.so libtclsqlite.so sqlite3_shell ...
 

|







<
1
2
3
4
5
6
7
8
9

librun
------

Small rundll like wrapper to call a function in a shared library (.so)
from a shell command line.

Example usage:

	./librun.so libtclsqlite.so sqlite3_shell ...

Name change from jni/src/README.txt to jni/src/README.md.

1
2
3
4
5


6
7
8
9
10
11
12
Native AndroWish modules
========================

This directory constitutes the Tcl/Tk interface to the Android world:



tkBorg.[ch]		- implementation of the "borg" command
tclRfcomm.[ch]		- Bluetooth SPP channels
tclBLE.[ch]		- Bluetooth Low Energy interface
tclUsbserial.[ch]	- serial channels through USB to serial converters
tclMuzic.[ch]		- interface to EAS synthesizer library (midi music)
tkAppInit.c		- AndroWish specific Tcl/Tk application initializer
doc/*.n			- man pages (nroff format)

|



>
>
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Native AndroWish modules
------------------------

This directory constitutes the Tcl/Tk interface to the Android world:

| Files               | Description |
| :------------------ | :------------------------------------------------ |
| `tkBorg.[ch]`       | Implementation of the `borg` command |
| `tclRfcomm.[ch]`    | Bluetooth SPP channels |
| `tclBLE.[ch]`       |	Bluetooth Low Energy interface |
| `tclUsbserial.[ch]` |	Serial channels through USB to serial converters |
| `tclMuzic.[ch]`     |	Interface to EAS synthesizer library (midi music) |
| `tkAppInit.c`       | AndroWish specific Tcl/Tk application initializer |
| `doc/*.n`           | Man pages (nroff format) |

Name change from jni/tbcload/README.txt to jni/tbcload/README.md.

1
2
3
4
5
6
7
8
9
tbcload
=======

The package for loading of precompiled bytecodes. Appeared originally
in TclPro. It is also part of ActiveState's ActiveTcl and Tcl Dev Kit
distributions.

More information can be found in http://wiki.tcl.tk/2624


|





|
|
1
2
3
4
5
6
7
8
9
tbcload
-------

The package for loading of precompiled bytecodes. Appeared originally
in TclPro. It is also part of ActiveState's ActiveTcl and Tcl Dev Kit
distributions.

More information can be found in
[http://wiki.tcl.tk/2624](http://wiki.tcl.tk/2624).

Changes to jni/tcl/library/http/http.tcl.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
....
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
....
2684
2685
2686
2687
2688
2689
2690
2691
2692
























2693
2694
2695
2696
2697
2698
2699
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tcl 8.6-
# Keep this in sync with pkgIndex.tcl and with the install directories in
# Makefiles
package provide http 2.9.2

namespace eval http {
    # Allow resourcing to not clobber existing data

    variable http
    if {![info exists http]} {
	array set http {
................................................................................
	totalsize	0
	querylength	0
	queryoffset	0
	type		text/html
	body		{}
	status		""
	http		""
	connection	close
    }
    set state(-keepalive) $defaultKeepalive
    set state(-strict) $strict
    # These flags have their types verified [Bug 811170]
    array set type {
	-binary		boolean
	-blocksize	integer
................................................................................
		# is handled by socketWrQueue later in this command.
		set reusing 1
		set sock $socketMapping($state(socketinfo))
		Log "reusing socket $sock for $state(socketinfo) - token $token"

	    }
	    # Do not automatically close the connection socket.
	    set state(connection) {}
	}
    }

    if {$reusing} {
	# Define state(tmpState) and state(tmpOpenCmd) for use
	# by http::ReplayIfDead if the persistent connection has died.
	set state(tmpState) [array get state]
................................................................................
			}
			transfer-encoding {
			    set state(transfer) \
				    [string trim [string tolower $value]]
			}
			proxy-connection -
			connection {
			    set state(connection) \
				    [string trim [string tolower $value]]
























			}
		    }
		    lappend state(meta) $key [string trim $value]
		}
	    }
	} else {
	    # Now reading body







|







 







|







 







|







 







<
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
....
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
....
2684
2685
2686
2687
2688
2689
2690

2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tcl 8.6-
# Keep this in sync with pkgIndex.tcl and with the install directories in
# Makefiles
package provide http 2.9.3

namespace eval http {
    # Allow resourcing to not clobber existing data

    variable http
    if {![info exists http]} {
	array set http {
................................................................................
	totalsize	0
	querylength	0
	queryoffset	0
	type		text/html
	body		{}
	status		""
	http		""
	connection	keep-alive
    }
    set state(-keepalive) $defaultKeepalive
    set state(-strict) $strict
    # These flags have their types verified [Bug 811170]
    array set type {
	-binary		boolean
	-blocksize	integer
................................................................................
		# is handled by socketWrQueue later in this command.
		set reusing 1
		set sock $socketMapping($state(socketinfo))
		Log "reusing socket $sock for $state(socketinfo) - token $token"

	    }
	    # Do not automatically close the connection socket.
	    set state(connection) keep-alive
	}
    }

    if {$reusing} {
	# Define state(tmpState) and state(tmpOpenCmd) for use
	# by http::ReplayIfDead if the persistent connection has died.
	set state(tmpState) [array get state]
................................................................................
			}
			transfer-encoding {
			    set state(transfer) \
				    [string trim [string tolower $value]]
			}
			proxy-connection -
			connection {

			    set tmpHeader [string trim [string tolower $value]]
			    # RFC 7230 Section 6.1 states that a comma-separated
			    # list is an acceptable value.  According to
			    # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection
			    # any comma-separated list implies keep-alive, but I
			    # don't see this in the RFC so we'll play safe and
			    # scan any list for "close".
			    if {$tmpHeader in {close keep-alive}} {
				# The common cases, continue.
			    } elseif {[string first , $tmpHeader] == -1} {
				# Not a comma-separated list, not "close",
				# therefore "keep-alive".
				set tmpHeader keep-alive
			    } else {
				set tmpHeader keep-alive
				set tmpCsl [split $tmpHeader ,]
				# Optional whitespace either side of separator.
				foreach el $tmpCsl {
				    if {[string trim $el] eq {close}} {
					set tmpHeader close
					break
				    }
			        }
			    }
			    set state(connection) $tmpHeader
			}
		    }
		    lappend state(meta) $key [string trim $value]
		}
	    }
	} else {
	    # Now reading body

Changes to jni/tcl/library/http/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
package ifneeded http 2.9.2 [list tclPkgSetup $dir http 2.9.2 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
package ifneeded http 2.9.3 [list tclPkgSetup $dir http 2.9.3 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]

Changes to jni/tcl/unix/Makefile.in.

930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \
	    done;
	@echo "Installing package http1.0 files to $(SCRIPT_INSTALL_DIR)/http1.0/";
	@for i in $(TOP_DIR)/library/http1.0/*.tcl ; \
	    do \
	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \
	    done;
	@echo "Installing package http 2.9.2 as a Tcl Module";
	@$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.9.2.tm;
	@echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/";
	@for i in $(TOP_DIR)/library/opt/*.tcl ; \
	    do \
	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \
	    done;
	@echo "Installing package msgcat 1.6.1 as a Tcl Module";







|







930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \
	    done;
	@echo "Installing package http1.0 files to $(SCRIPT_INSTALL_DIR)/http1.0/";
	@for i in $(TOP_DIR)/library/http1.0/*.tcl ; \
	    do \
	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \
	    done;
	@echo "Installing package http 2.9.3 as a Tcl Module";
	@$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.9.2.tm;
	@echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/";
	@for i in $(TOP_DIR)/library/opt/*.tcl ; \
	    do \
	    $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \
	    done;
	@echo "Installing package msgcat 1.6.1 as a Tcl Module";

Changes to jni/tcl/win/Makefile.in.

702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
	    $(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)"; \
	    done;
	@echo "Installing library http1.0 directory";
	@for j in $(ROOT_DIR)/library/http1.0/*.tcl; \
	    do \
	    $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \
	    done;
	@echo "Installing package http 2.9.2 as a Tcl Module";
	@$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.9.2.tm;
	@echo "Installing library opt0.4 directory";
	@for j in $(ROOT_DIR)/library/opt/*.tcl; \
	    do \
	    $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \
	    done;
	@echo "Installing package msgcat 1.6.1 as a Tcl Module";







|







702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
	    $(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)"; \
	    done;
	@echo "Installing library http1.0 directory";
	@for j in $(ROOT_DIR)/library/http1.0/*.tcl; \
	    do \
	    $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \
	    done;
	@echo "Installing package http 2.9.3 as a Tcl Module";
	@$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.9.2.tm;
	@echo "Installing library opt0.4 directory";
	@for j in $(ROOT_DIR)/library/opt/*.tcl; \
	    do \
	    $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \
	    done;
	@echo "Installing package msgcat 1.6.1 as a Tcl Module";

Name change from jni/tcllibc/README.txt to jni/tcllibc/README.md.




1
2

3



This is the pre-generated source for the accelerator functions
of tcllib 1.20. Build infrastructure for Android and TEA based

for all other platforms is included.
>
>
>

<
>
|
1
2
3
4

5
6
tcllibc
-------

This is the pre-generated source for the accelerator functions

of tcllib 1.20. An Android and TEA based build infrastructure
is included.

Name change from jni/tcluvc/README.txt to jni/tcluvc/README.md.

1
2
3
4
5
6
7
8
9
10
tcluvc
======

Tcl interface to UVC cameras using libusb. It may run on Android devices,
however, many devices with ARM processors seem to have problems with
isochronous transfers in their USB host implementations. The effect is
usually that no image data can be read from the UVC camera, ever.

Support on other platforms varies, too. It is known to work on x86(_64)
Linuxen, MacOSX, and maybe FreeBSD and Haiku, but these are untested.

|
|
|






1
2
3
4
5
6
7
8
9
10
tcluvc
------

Tcl interface to UVC cameras using `libusb`. It may run on Android devices,
however, many devices with ARM processors seem to have problems with
isochronous transfers in their USB host implementations. The effect is
usually that no image data can be read from the UVC camera, ever.

Support on other platforms varies, too. It is known to work on x86(_64)
Linuxen, MacOSX, and maybe FreeBSD and Haiku, but these are untested.

Changes to jni/tksvg/README.md.

1
2
3
4
5
6
7
8
9
10
11
12
tksvg
======

This package adds support to read the SVG image format from Tk.
The actual code to parse and raster the SVG comes from nanosvg.

Example usage:

	package require tksvg
	set img [image create photo -file orb.svg]
	pack [label .l -image $img]
 

|










1
2
3
4
5
6
7
8
9
10
11
12
tksvg
-----

This package adds support to read the SVG image format from Tk.
The actual code to parse and raster the SVG comes from nanosvg.

Example usage:

	package require tksvg
	set img [image create photo -file orb.svg]
	pack [label .l -image $img]
 

Name change from jni/tkvnc/README.txt to jni/tkvnc/README.md.

1
2

3
4
tkvnc
=====


Tk widget for displaying VNC desktops.

<
>


1

2
3
4
tkvnc

-----

Tk widget for displaying VNC desktops.

Name change from jni/topcua/README.txt to jni/topcua/README.md.

1
2

3
4
5
6
7
8
9
10
11
topcua
======


Proof of concept minimal Tcl binding to the OPC/UA implementation
of http://www.open62541.org

Both, client and server modes of operation are supported, see the
examples directory for some potential use cases.

Many things are still missing: more documentation, checks for memory
leaks, higher level OPC/UA services, e.g. asynchronous operations.

<
>


|






1

2
3
4
5
6
7
8
9
10
11
topcua

------

Proof of concept minimal Tcl binding to the OPC/UA implementation
of [http://www.open62541.org](http://www.open62541.org).

Both, client and server modes of operation are supported, see the
examples directory for some potential use cases.

Many things are still missing: more documentation, checks for memory
leaks, higher level OPC/UA services, e.g. asynchronous operations.

Changes to jni/topcua/doc/opcua.n.

1
2
3
4
5
6
7
8
9
10
11
...
706
707
708
709
710
711
712
713









714
715
716
717
718
719
720



721
722
723
724
725
726
727
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 2018/19 Christian Werner <chw at ch minus werner dot de>
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
.TH opcua n 8.6 Tcl "Tcl Extension Commands"
.\" ---- man.macros begin ----
.\" The -*- nroff -*- definitions below are for supplemental macros used
................................................................................
\fBopcua type\fR \fIhandle nodeid\fR ?\fIattr\fR?
.
Performs a read operation on the client or server object \fIhandle\fR
like \fBopcua read\fR but instead of the attribute's value returns the
type name of attribute \fIattr\fR of the node identifier \fInodeid\fR. If
\fIattr\fR is omitted, it defaults to the \fIValue\fR attribute.
.TP
\fBopcua types basic|empty|list|nodeid\fR ?\fIname\fR?









.
Returns a list of OPC/UA type names for the \fIbasic\fR and \fIlist\fR
subcommands. Basic types are primitives (e.g. integer numbers) for which
a mapping to Tcl objects is provided. The \fIempty\fR subcommand requires
\fIname\fR to be a known OPC/UA type name and produces and returns an
empty value of this type, e.g. 0.0 for a floating point type. The \fInodeid\fR
subcommand returns the node identifier for the type \fIname\fR.



.TP
\fBopcua write\fR \fIhandle nodeid\fR ?\fIattr\fR? \fItype value\fR
.
Performs a write operation on the client or server object \fIhandle\fR
writing \fIvalue\fR with type \fItype\fR into the attribute \fIattr\fR of
the node identifier \fInodeid\fR. If \fIattr\fR is omitted, it defaults
to \fIValue\fR.



|







 







|
>
>
>
>
>
>
>
>
>







>
>
>







1
2
3
4
5
6
7
8
9
10
11
...
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 2018-20 Christian Werner <chw at ch minus werner dot de>
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
.TH opcua n 8.6 Tcl "Tcl Extension Commands"
.\" ---- man.macros begin ----
.\" The -*- nroff -*- definitions below are for supplemental macros used
................................................................................
\fBopcua type\fR \fIhandle nodeid\fR ?\fIattr\fR?
.
Performs a read operation on the client or server object \fIhandle\fR
like \fBopcua read\fR but instead of the attribute's value returns the
type name of attribute \fIattr\fR of the node identifier \fInodeid\fR. If
\fIattr\fR is omitted, it defaults to the \fIValue\fR attribute.
.TP
\fBopcua types basic\fR
.
.TP
\fBopcua types empty\fR ?\fIhandle\fR? \fIname\fR
.
.TP
\fBopcua types list\fR ?\fIhandle\fR?\fR
.
.TP
\fBopcua types nodeid\fR ?\fIhandle\fR? \fIname\fR
.
Returns a list of OPC/UA type names for the \fIbasic\fR and \fIlist\fR
subcommands. Basic types are primitives (e.g. integer numbers) for which
a mapping to Tcl objects is provided. The \fIempty\fR subcommand requires
\fIname\fR to be a known OPC/UA type name and produces and returns an
empty value of this type, e.g. 0.0 for a floating point type. The \fInodeid\fR
subcommand returns the node identifier for the type \fIname\fR.
For the command forms where a \fIhandle\fR can be specified, this allows
to deal with additional custom data types (see e.g. \fBopcua deftypes\fR)
which where loaded into the client or server object \fIhandle\fR.
.TP
\fBopcua write\fR \fIhandle nodeid\fR ?\fIattr\fR? \fItype value\fR
.
Performs a write operation on the client or server object \fIhandle\fR
writing \fIvalue\fR with type \fItype\fR into the attribute \fIattr\fR of
the node identifier \fInodeid\fR. If \fIattr\fR is omitted, it defaults
to \fIValue\fR.

Name change from jni/topcua/examples/README.txt to jni/topcua/examples/README.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
topcua examples
===============

client.tcl		A simple client to be run against server.tcl
client_types.tcl	A client showing import of custom datatypes,
			to be run against server_types.tcl
fuse.tcl		A client mapping variables as (read-only) files
			using a FUSE filesystem
server.tcl		A simple server
server_types.tcl	A server which creates and exports custom
			datatypes by creating the necessary nodes
			in the OPC/UA address space
structs.tcl		A more automated server creating custom
			datatypes using opcua::deftypes and friends
uacam.tcl		A server implementing a webcam using the
			tcluvc extension
uacam_client.tcl	A simple client to be run against uacam.tcl

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
topcua examples
---------------

| File/Directory      | Description |
| :------------------ | :----------------------------------------------------- |
| `certs`             | Some scripts to create cert/key files |
| `client.tcl`        | A simple client to be run against `server.tcl` |
| `client_sec.tcl`    | Like `client.tcl` but using encryption |
| `client_types.tcl`  | A client showing import of custom datatypes, to be run against `server_types.tcl` |
| `fuse.tcl`          | A client mapping variables as (read-only) files using a FUSE filesystem |
| `server.tcl`        | A simple server |
| `server_sec.tcl`    | Like `server.tcl` but using encryption |
| `server_types.tcl`  | A server which creates and exports custom datatypes by creating the necessary nodes in the OPC/UA address space |
| `structs.tcl`       | A more automated server creating custom datatypes using `opcua::deftypes` and friends |
| `structs2.tcl`      | Like `structs.tcl` plus implementing methods which use custom datatypes |
| `uacam.tcl`         | A server implementing a webcam using the tcluvc extension |
| `uacam_client.tcl`  | A simple client to be run against `uacam.tcl` |

Changes to jni/topcua/topcua.c.

1178
1179
1180
1181
1182
1183
1184


























1185
1186
1187
1188
1189
1190
1191
....
2432
2433
2434
2435
2436
2437
2438








2439
2440
2441
2442
2443
2444
2445
....
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936



2937
2938
2939
2940

2941
2942
2943
2944
2945
2946
2947
		    (strcmp(types[j].typeName, name) == 0)) {
		    type = &types[j];
		    break;
		}
	    }
	}
    }


























    return type;
}
 
/*
 *-------------------------------------------------------------------------
 *
 * ParseNodeId --
................................................................................
	    }
	    return list;
	}
    }
    if (data == NULL) {
	return Tcl_NewObj();
    }








    if (type == &UA_TYPES[UA_TYPES_BOOLEAN]) {
	int *v = (int *) data;

	return Tcl_NewIntObj(*v ? 1 : 0);
    }
    if (type == &UA_TYPES[UA_TYPES_SBYTE]) {
	return Tcl_NewIntObj(((signed char *) data)[0]);
................................................................................
	    UA_delete(value, type);
	    value = NULL;
	    goto error;
	}
    } else if (type == &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]) {
	int n;
	Tcl_Obj **elem;
	UA_String s;

	if (Tcl_ListObjGetElements(interp, obj, &n, &elem) != TCL_OK) {
	    goto error;
	}
	if (n != 2) {
	    Tcl_SetResult(interp, "two elements required", TCL_STATIC);
	    goto error;
	}
	value = UA_new(type);



	s = UA_String_fromChars(Tcl_GetString(elem[0]));
	UA_String_copy(&s, &((UA_LocalizedText *) value)->locale);
	s = UA_String_fromChars(Tcl_GetString(elem[1]));
	UA_String_copy(&s, &((UA_LocalizedText *) value)->text);

    } else if (type == &UA_TYPES[UA_TYPES_VARIANT]) {
	int n, j;
	Tcl_Obj **elem;
	const UA_DataType *vtype = NULL;
	void *vdata = NULL;

	if (Tcl_ListObjGetElements(interp, obj, &n, &elem) != TCL_OK) {







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>







 







<




|
|



>
>
>
|
|
|
|
>







1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
....
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
....
2954
2955
2956
2957
2958
2959
2960

2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
		    (strcmp(types[j].typeName, name) == 0)) {
		    type = &types[j];
		    break;
		}
	    }
	}
    }
#if (UA_OPEN62541_VER_MAJOR >= 1)
    if (type == NULL) {
	UA_NodeId nodeid;

	if (ParseNodeId(NULL, &nodeid, name) != NULL) {
	    for (j = 0; j < UA_TYPES_COUNT; j++) {
		if (UA_NodeId_equal(&UA_TYPES[j].typeId, &nodeid)) {
		    type = &UA_TYPES[j];
		    break;
		}
	    }
	    if ((type == NULL) && (uah != NULL)) {
		size_t typesSize = uah->typesArray.typesSize;
		UA_DataType *types = (UA_DataType *) uah->typesArray.types;

		for (j = 0; j < typesSize; j++) {
		    if (UA_NodeId_equal(&types[j].typeId, &nodeid)) {
			type = &types[j];
			break;
		    }
		}
	    }
	    UA_NodeId_deleteMembers(&nodeid);
	}
    }
#endif
    return type;
}
 
/*
 *-------------------------------------------------------------------------
 *
 * ParseNodeId --
................................................................................
	    }
	    return list;
	}
    }
    if (data == NULL) {
	return Tcl_NewObj();
    }
#if (UA_OPEN62541_VER_MAJOR >= 1)
    /* Map scalar enum types to wide integer. */
    if ((type->membersSize == 0) &&
	(type->typeKind == UA_DATATYPEKIND_ENUM) &&
	(type->typeIndex == UA_TYPES_INT32)) {
	return Tcl_NewWideIntObj(((unsigned int *) data)[0]);
    }
#endif
    if (type == &UA_TYPES[UA_TYPES_BOOLEAN]) {
	int *v = (int *) data;

	return Tcl_NewIntObj(*v ? 1 : 0);
    }
    if (type == &UA_TYPES[UA_TYPES_SBYTE]) {
	return Tcl_NewIntObj(((signed char *) data)[0]);
................................................................................
	    UA_delete(value, type);
	    value = NULL;
	    goto error;
	}
    } else if (type == &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]) {
	int n;
	Tcl_Obj **elem;


	if (Tcl_ListObjGetElements(interp, obj, &n, &elem) != TCL_OK) {
	    goto error;
	}
	if ((n != 0) && (n != 2)) {
	    Tcl_SetResult(interp, "zero or two elements required", TCL_STATIC);
	    goto error;
	}
	value = UA_new(type);
	if (n > 0) {
	    UA_String s;

	    s = UA_String_fromChars(Tcl_GetString(elem[0]));
	    UA_String_copy(&s, &((UA_LocalizedText *) value)->locale);
	    s = UA_String_fromChars(Tcl_GetString(elem[1]));
	    UA_String_copy(&s, &((UA_LocalizedText *) value)->text);
	}
    } else if (type == &UA_TYPES[UA_TYPES_VARIANT]) {
	int n, j;
	Tcl_Obj **elem;
	const UA_DataType *vtype = NULL;
	void *vdata = NULL;

	if (Tcl_ListObjGetElements(interp, obj, &n, &elem) != TCL_OK) {

Name change from undroid/DiffUtilTcl/README to undroid/DiffUtilTcl/README.md.

1
2


3
DiffUtil
========


A Tcl extension for comparing files and other diff tasks.

<
>
>

1

2
3
4
DiffUtil

--------

A Tcl extension for comparing files and other diff tasks.

Name change from undroid/Rtcl/README to undroid/Rtcl/README.md.

1
2

3
4
5

6
7

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

24
25
26
27
28

29
30
31

32
33
34
35

36
37
38
39
40
41

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
93
	Rtcl - A Tcl Extension for Embedding the R Statistical Language
	---------------------------------------------------------------


DESCRIPTION
===========


The Rtcl extension embeds an interpreter for the R programming

language (see http://www.r-project.org) inside a Tcl interpreter. It
provides commands for evaluating R expressions, for importing their
values into Tcl, and for determining their type.


REQUIREMENTS
============

Rtcl requires the following software packages to be installed:

    1. Tcl, version 8.6 or newer
    2. R, version 3.4 or newer, built with shared libraries

At runtime Rtcl tries to dynamically link the main R shared library
from the following locations:


POSIX:		${R_HOME}/lib/libR.so
		/usr/local/lib/R/lib/libR.so
		/usr/lib64/R/lib/libR.so
		/usr/lib/R/lib/libR.so


MacOSX:		${R_HOME}/lib/libR.dylib
		/usr/local/lib/R/lib/libR.dylib


Win32:		%R_HOME%/bin/i386/R.dll
		%ProgramFiles%/R/R-3.*/bin/i386/R.dll
		%ProgramW6432%/R/R-3.*/bin/i386/R.dll


Win64:		%R_HOME%/bin/x64/R.dll
		%ProgramFiles%/R/R-3.*/bin/x64/R.dll


INSTALLATION
============


Installation of Rtcl follows Tcl's usual configure/make/make install
pattern. A typical installation on Unix will look like:

    % tar xvzf Rtcl1.1.tar.gz
    % cd Rtcl1.1
    % ./configure
    % make
    % make test
    % su
    password:
    # make install
    # ^D
    %

The configure script accepts a number of options, including:

    --with-tcl=tclDir        Directory containing "tclConfig.sh"


USING IT
========


Fire up your tclsh:

    tclsh8.6
    % package require Rtcl
    1.1

Use `man Rtcl` for further details.


HISTORY
=======


Versions 0.1 through 0.3 were initially developed and released by Neil
McKay on Redhat Linux 8. Versions 1.0 and later were revised and
packaged by Matt Adams on FreeBSD 11.

See ChangeLog for detailed notes.


VERSION NUMBERS
===============


New releases require version number changes in the following files:

README
configure.ac (line 22)
doc/Rtcl.tmml
doc/Rtcl.n
tests/rtcl.test (line 27)
|
<
>


<
>


>
|
|
|



|









>
|
|
|
|

>
|
|

>
|
|
|

>
|
|

<

<
>




|
|
|
|
|
<
<
|
<
<



|

<

<
>



|
|
|



<

<
>







<

<
>



|
|
|
|
|
1

2
3
4

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

44

45
46
47
48
49
50
51
52
53
54


55


56
57
58
59
60

61

62
63
64
65
66
67
68
69
70
71

72

73
74
75
76
77
78
79
80

81

82
83
84
85
86
87
88
89
90
Rtcl - A Tcl Extension for Embedding the R Statistical Language

===============================================================

DESCRIPTION

-----------

The Rtcl extension embeds an interpreter for the R programming
language (see [http://www.r-project.org](http://www.r-project.org))
inside a Tcl interpreter. It provides commands for evaluating R
expressions, for importing their values into Tcl, and for
determining their type.


REQUIREMENTS
------------

Rtcl requires the following software packages to be installed:

    1. Tcl, version 8.6 or newer
    2. R, version 3.4 or newer, built with shared libraries

At runtime Rtcl tries to dynamically link the main R shared library
from the following locations:

POSIX:
	${R_HOME}/lib/libR.so
	/usr/local/lib/R/lib/libR.so
	/usr/lib64/R/lib/libR.so
	/usr/lib/R/lib/libR.so

MacOSX:
	${R_HOME}/lib/libR.dylib
	/usr/local/lib/R/lib/libR.dylib

Win32:
	%R_HOME%/bin/i386/R.dll
	%ProgramFiles%/R/R-3.*/bin/i386/R.dll
	%ProgramW6432%/R/R-3.*/bin/i386/R.dll

Win64:
	%R_HOME%/bin/x64/R.dll
	%ProgramFiles%/R/R-3.*/bin/x64/R.dll


INSTALLATION

------------

Installation of Rtcl follows Tcl's usual configure/make/make install
pattern. A typical installation on Unix will look like:

	$ tar xvzf Rtcl1.1.tar.gz
	$ cd Rtcl1.1
	$ ./configure
	$ make
	$ make test


	$ sudo make install



The configure script accepts a number of options, including:

	--with-tcl=tclDir        Directory containing "tclConfig.sh"


USING IT

--------

Fire up your tclsh:

	tclsh8.6
	% package require Rtcl
	1.1

Use `man Rtcl` for further details.


HISTORY

-------

Versions 0.1 through 0.3 were initially developed and released by Neil
McKay on Redhat Linux 8. Versions 1.0 and later were revised and
packaged by Matt Adams on FreeBSD 11.

See ChangeLog for detailed notes.


VERSION NUMBERS

---------------

New releases require version number changes in the following files:

	README
	configure.ac (line 22)
	doc/Rtcl.tmml
	doc/Rtcl.n
	tests/rtcl.test (line 27)

Name change from undroid/TDK/README.txt to undroid/TDK/README.md.




1

2
3
4
5
6
7
8
9
10
11
12
13



This is a stripped down TDK from https://github.com/andreas-kupries/tdk

to be embedded into undroidwish/vanillawish.

The provided shortcuts to TDK tools are

   builtin:TDK/checker
   builtin:TDK/compiler
   builtin:TDK/debugger
   builtin:TDK/inspector
   builtin:TDK/tape
   builtin:TDK/tclapp
   builtin:TDK/tclsvc
   builtin:TDK/vfse
>
>
>
|
>




|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
TDK
---

This is a stripped down TDK from
[https://github.com/andreas-kupries/tdk](https://github.com/andreas-kupries/tdk)
to be embedded into undroidwish/vanillawish.

The provided shortcuts to TDK tools are

	builtin:TDK/checker
	builtin:TDK/compiler
	builtin:TDK/debugger
	builtin:TDK/inspector
	builtin:TDK/tape
	builtin:TDK/tclapp
	builtin:TDK/tclsvc
	builtin:TDK/vfse

Name change from undroid/critcl-min/README.txt to undroid/critcl-min/README.md.




1
2
3
4

5



This is a trimmed down critcl 3.18.1 runtime mainly used to generate
the C source code for the tcllib accelerator functions. This version
is Tcl only, i.e. does not contain shared libs with Tcl extensions.


For full critcl see http://andreas-kupries.github.io/critcl
>
>
>
|
|


>
|
1
2
3
4
5
6
7
8
9
critcl-min
----------

This is a trimmed down `critcl 3.18.1` runtime mainly used to generate
the C source code for the `tcllib` accelerator functions. This version
is Tcl only, i.e. does not contain shared libs with Tcl extensions.

For full critcl see
[http://andreas-kupries.github.io/critcl](http://andreas-kupries.github.io/critcl).

Name change from undroid/mkappimg/README to undroid/mkappimg/README.md.

1
2

3
4

5
6
7
8
9
10
11
12
13
14
15
16
17
18
mkappimg
========


Experimental tool to make an AppImage (https://appimage.org) standalone

portable Linux app from a running vanillawish, vanillatclsh, or undroidwish.

Requires an external appimagetool binary for the respective platform
depending on CPU architecture.

  $ ./vanillawish builtin:mkappimg/mkappimg
  -> creates ./vanillawish-x86_64.AppImage on a x86_64 system

  $ ./vanillawish-x86_64.AppImage builtin:mkappimg/mkzipimg
  -> recreates a vanillawish ZIPFS based binary

TODO: improve startup script to make desktop links?

CHW 2018-11-03

<
>

|
>





|
|

|
|




1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mkappimg

--------

Experimental tool to make an AppImage
[https://appimage.org](https://appimage.org) standalone
portable Linux app from a running vanillawish, vanillatclsh, or undroidwish.

Requires an external appimagetool binary for the respective platform
depending on CPU architecture.

	$ ./vanillawish builtin:mkappimg/mkappimg
	-> creates ./vanillawish-x86_64.AppImage on a x86_64 system

	$ ./vanillawish-x86_64.AppImage builtin:mkappimg/mkzipimg
	-> recreates a vanillawish ZIPFS based binary

TODO: improve startup script to make desktop links?

CHW 2018-11-03

Name change from undroid/piio/README.txt to undroid/piio/README.md.




1
2
3
4
5
6
7
8
9



piio by Schelte Bron is a library for accessing a couple
of the I/O possibilities of the Raspberry Pi. The library
supports gpio, i2c, and spi.

Further reading

 http://chiselapp.com/user/schelte/repository/piio/home

 http://wiki.tcl-lang.org/39548
>
>
>
|





|

|
1
2
3
4
5
6
7
8
9
10
11
12
piio
----

`piio` by Schelte Bron is a library for accessing a couple
of the I/O possibilities of the Raspberry Pi. The library
supports gpio, i2c, and spi.

Further reading

[http://chiselapp.com/user/schelte/repository/piio/home](http://chiselapp.com/user/schelte/repository/piio/home)

[http://wiki.tcl-lang.org/39548](http://wiki.tcl-lang.org/39548)

Name change from undroid/snap7/README.txt to undroid/snap7/README.md.


1
2
3

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

---------------------------------------------------------
This directory is a derivative of 
 "Snap7 IoT Package for Intel Quark architecure"

which generalizes the build for gcc supported platforms.
---------------------------------------------------------

# compile/link build/bin/libsnap7.so for POSIX
cd build/unix
make -f unix.mk

# clean source tree for POSIX
cd build/unix
make -f unix.mk clean

# compile/link build/bin/snap7.dll for WIN32/64
cd build/win
make -f win.mk

# clean source tree for WIN32/64
cd build/win
make -f win.mk clean

>
|
<
<
>
|
<

|
|
|

|
|
|

|
|
|

|
|
|
<
1
2


3
4

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

This is a derivative of "Snap7 IoT Package for Intel Quark architecure"
-----------------------------------------------------------------------



It generalizes the build for gcc supported platforms.


	# compile/link build/bin/libsnap7.so for POSIX
	cd build/unix
	make -f unix.mk

	# clean source tree for POSIX
	cd build/unix
	make -f unix.mk clean

	# compile/link build/bin/snap7.dll for WIN32/64
	cd build/win
	make -f win.mk

	# clean source tree for WIN32/64
	cd build/win
	make -f win.mk clean

Name change from undroid/tclcan/README to undroid/tclcan/README.md.

1
2

3
4
5
6
7
8

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

25
26

27
tclcan
======


This package provides CAN sockets for Tcl using the AF_CAN address
family on Linux.

INSTALLATION
============


This package uses the Tcl Extension Architecture (TEA). Please see the
web page

    http://www.tcl.tk/doc/tea/

for more information about TEA.

LINUX BUILD
===========

Building under Linux systems is easy, just run the configure script
and then run make.

FURTHER READING
===============


https://en.wikipedia.org/wiki/CAN_bus

https://elinux.org/CAN_Bus

<
>

|



<
>


<
<
|
<



|





<
>

|
>
|
1

2
3
4
5
6
7

8
9
10


11

12
13
14
15
16
17
18
19
20

21
22
23
24
25
tclcan

------

This package provides CAN sockets for Tcl using the `AF_CAN` address
family on Linux.

INSTALLATION

------------

This package uses the Tcl Extension Architecture (TEA). Please see the


web page [http://www.tcl.tk/doc/tea/](http://www.tcl.tk/doc/tea/)

for more information about TEA.

LINUX BUILD
-----------

Building under Linux systems is easy, just run the configure script
and then run make.

FURTHER READING

---------------

[https://en.wikipedia.org/wiki/CAN\_bus](https://en.wikipedia.org/wiki/CAN_bus)

[https://elinux.org/CAN\_Bus](https://elinux.org/CAN_Bus)

Name change from undroid/tclwmf/README.txt to undroid/tclwmf/README.md.

1
2

3
4
tclwmf
======


Tcl interface to cameras using Windows Media Foundation

<
>


1

2
3
4
tclwmf

------

Tcl interface to cameras using Windows Media Foundation

Name change from undroid/twapi/README.txt to undroid/twapi/README.md.




1
2
3



This is the "Tcl Windows API" extension by Ashok P. Nadkarni.

See http://twapi.magicsplat.com for more information.
>
>
>


|
1
2
3
4
5
6
twapi
-----

This is the "Tcl Windows API" extension by Ashok P. Nadkarni.

See [http://twapi.magicsplat.com](http://twapi.magicsplat.com) for more information.

Name change from undroid/ulis/README.txt to undroid/ulis/README.md.




1
2
3

4

5

6
7
8
9



Tk megawidgets by ulis copied from wiki.tcl-lang.org, see also

  https://wiki.tcl-lang.org/page/hugecombo

  https://wiki.tcl-lang.org/page/Hugelist

  https://wiki.tcl-lang.org/page/Lightbutton

  https://wiki.tcl-lang.org/page/Virtuallist

This is a modified and trimmed down version which can be used
with AndroWish and undroidwish.
>
>
>
|

|
>
|
>
|
>
|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ulis
----

Tk megawidgets by ulis copied from [wiki.tcl-lang.org](http://wiki.tcl-lang.org), see also

[https://wiki.tcl-lang.org/page/hugecombo](https://wiki.tcl-lang.org/page/hugecombo)

[https://wiki.tcl-lang.org/page/Hugelist](https://wiki.tcl-lang.org/page/Hugelist)

[https://wiki.tcl-lang.org/page/Lightbutton](https://wiki.tcl-lang.org/page/Lightbutton)

[https://wiki.tcl-lang.org/page/Virtuallist](https://wiki.tcl-lang.org/page/Virtuallist)

This is a modified and trimmed down version which can be used
with AndroWish and undroidwish.

Name change from undroid/v4l2/README.txt to undroid/v4l2/README.md.

1
2

3
4
v4l2
======


Tcl interface to Video For Linux Two

<
>


1

2
3
4
v4l2

----

Tcl interface to Video For Linux Two

Name change from undroid/wits/README.txt to undroid/wits/README.md.




1
2
3



This is the "Windows Inspection Tool Set" by Ashok P. Nadkarni.

See http://windowstoolset.magicsplat.com for more information.
>
>
>


|
1
2
3
4
5
6
wits
----

This is the "Windows Inspection Tool Set" by Ashok P. Nadkarni.

See [http://windowstoolset.magicsplat.com](http://windowstoolset.magicsplat.com) for more information.