1tcl::transform::counter(Rne)flected/virtual channel supptocrlt::transform::counter(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       tcl::transform::counter - Counter transformation
9

SYNOPSIS

11       package require Tcl  8.6
12
13       package require tcl::transform::core  ?1?
14
15       package require tcl::transform::counter  ?1?
16
17       ::tcl::transform::counter chan -option value...
18
19______________________________________________________________________________
20

DESCRIPTION

22       The  tcl::transform::counterr  package  provides  a  command creating a
23       channel transformation which passes the read and written bytes  through
24       unchanged  (like tcl::transform::identity), but additionally counts the
25       bytes it has seen for each direction and stores  these  counts  in  Tcl
26       variables specified at construction time.
27
28       Related  transformations  in  this  module are tcl::transform::adler32,
29       tcl::transform::crc32,   tcl::transform::identity,   and    tcl::trans‐
30       form::observe.
31
32       The  internal  TclOO class implementing the transform handler is a sub-
33       class of the tcl::transform::core framework.
34

API

36       ::tcl::transform::counter chan -option value...
37              This command creates a counter  transformation  on  top  of  the
38              channel chan and returns its handle. The accepted options are
39
40              -read-variable varname
41                     The value of the option is the name of a global or names‐
42                     paced variable, the location where the transformation has
43                     to  store  the byte count of the data read from the chan‐
44                     nel.
45
46                     If not specified, or the empty string, the counter of the
47                     read direction is not saved.
48
49              -write-variable varname
50                     The value of the option is the name of a global or names‐
51                     paced variable, the location where the transformation has
52                     to  store the byte count of the data written to the chan‐
53                     nel.
54
55                     If not specified, or the empty string, the counter of the
56                     write direction is not saved.
57

BUGS, IDEAS, FEEDBACK

59       This  document,  and the package it describes, will undoubtedly contain
60       bugs and other problems.  Please report such in the category  virtchan‐
61       nel  of  the  Tcllib  Trackers  [http://core.tcl.tk/tcllib/reportlist].
62       Please also report any ideas for enhancements you may have  for  either
63       package and/or documentation.
64
65       When proposing code changes, please provide unified diffs, i.e the out‐
66       put of diff -u.
67
68       Note further that  attachments  are  strongly  preferred  over  inlined
69       patches.  Attachments  can  be  made  by  going to the Edit form of the
70       ticket immediately after its creation, and  then  using  the  left-most
71       button in the secondary navigation bar.
72

KEYWORDS

74       channel  transformation, counter, reflected channel, tip 230, transfor‐
75       mation, virtual channel
76

CATEGORY

78       Channels
79
81       Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
82
83
84
85
86tcllib                                 1            tcl::transform::counter(n)
Impressum