    .

1.  .

        
     - .

     :

- :
          
   ,   dumb-,    .

- -:
         , 
    " ".     
  -,       TCP/IP. 
      -    -   
      .
  
        :

- -301 ( "",  , )
- -100  ( "-", , )

  Datecs/Samsung,    , 
 (  ).


2.       .


   libdev/
   	iceb_server -  ;
   
   buhg/
   	mariq	-   (  , , , etc)
   	rozn	-  
   	xpro	-  


3.     -100

   -100    -
     libchon100.so, 
     .

     , :

1)   libchon100.so   /lib   

   ldconfig

2)      chon100.h  
      c++ -     
   /usr/include     :

-----------------------------cut-----------------------------------------
--- chon100.h.orig	2002-04-26 20:36:25 +0300
+++ chon100.h	2003-05-07 08:13:31 +0300
@@ -40,4 +40,7 @@
 #define errRemovedQty           55
 
+#ifdef	__cplusplus
+extern "C" {
+#endif
 extern int  cbAddBottomLine(char *Line);
 extern int  cbAddSale(char *Name, double Price, double Qty, int Section);
@@ -94,3 +97,6 @@
 extern void SetSupplierCode(char *Code); 
 extern int  UnLock(void); 
-extern PrintCheck(void);
+extern int  PrintCheck(void);
+#ifdef	__cplusplus
+}
+#endif
-----------------------------cut-----------------------------------------
   
3)    configure   --enable-amc


4.   

     :

	iceb_server [--test] [--model=MARIA-301|AMC-100F] device

	

	--test -    ,   ,
		     
		  ( - .);
		 
	--model -     ( - MARIA-301)
	
	device -   COM-,    KP
		 (  -100    /dev/ttyS0 
		 /dev/ttyS1).

        
 ,     (x)inetd   
TCP-.

.
,   ttyS0  ttyS1  kassa.my.net   
  - -301  -100 .  , 
    - 192.168.10.0,      
      
     .

     :

1)     TCP-      
 /etc/services        ( -
):

iceb-maria	7654/tcp	#  -301
iceb-amc	7655/tcp	#  -100

2)        .
   inetd      (
/etc/inetd.conf) :

iceb-maria stream tcp nowait root /usr/local/bin/iceb_server iceb_server --model=MARIA-301 /dev/ttyS0
iceb-amc stream tcp nowait root /usr/local/bin/iceb_server iceb_server --model=AMC-100F /dev/ttyS1

  xinetd -      (
/etc/xinetd.d)     :

iceb-maria:
--------------------------cut--------------------------------
# default: off
# description: Cash register MARIA-301
service iceb-maria
{
	disable		= no
	socket_type	= stream
	protocol	= tcp
	wait		= no
	user		= root
	server		= /usr/local/bin/iceb_server
	server_args	= --model=MARIA-301 /dev/ttyS1 
	only_from	= 192.168.10.0/24
}
--------------------------cut--------------------------------

iceb-amc:
--------------------------cut--------------------------------
# default: off
# description: Cash register AMC-100F
service iceb-amc
{
	disable		= no
	socket_type	= stream
	protocol	= tcp
	wait		= no
	user		= root
	server		= /usr/local/bin/iceb_server
	server_args	= --model=AMC-100F /dev/ttyS1 
	only_from	= 192.168.10.0/24
}
--------------------------cut--------------------------------

  -   . 
  ,    , , 
  telnet:

	telnet kassa.my.net iceb-maria

   -   :

	OK MARIA-301 V1.1 /dev/ttyS0


5.   .

   <->      
(  ).      
  ( ),     
 .

      kassa.alx,    
   ( - /etc/iceB/<>/) 
 ,   .

     :

kassa.alx:
--------------------------cut--------------------------------
#     ,   

#<------   ------------>#<---   ----->
#                                  #
1|1|kassa.my.net|iceb-maria|1111111#iceb.my.net|localhost|tty1
1|2|kassa.my.net|iceb-amc|161819022#iceb.my.net|remote.my.net|
| |    |             |        |          |             |       +>
| |    |             |        |          |             ->   (  telnet')
| |    |             |        |          -> ,    
| |    |             |        ->   I
| |    |             |              
| |    |             |
| |    |             -> TCP-  
| |    ->   
| ->  
->  
--------------------------cut--------------------------------

       #   
 ,        
 ,      (rozn  xpro). 

    -   ,  ,
 getworkid    iceb ( ,   mc!).
     stdout. 

:       
	       telnet    
	    ()  ,    
	         , 
	     telnet-,    
	      .     
	    getworkid   
	    
	    iceb.my.net|remote.my.net|pty/4

        :

	  1  :
	- - ,    
	  kassa.my.net    TCP-   iceb-maria; 
	         
	  I - 1111111;
	-  tty1 (  )  iceb.my.net

 :

	  2  :
	- - ,    
	  kassa.my.net    TCP-   iceb-amc; 
	      - 161819022;
	-  ,   telnet  
	  remote.my.net   iceb.my.net.
	
	    
  -       
 -    : 
       KASSANO
 ,   .

