       -   - .

       -  
      -   
  -  ,     


1.       .

     -  ,         .
        -.
        (). 
        . 
         .
   
         :
     1)         
     2)      JSON , 
	{"command":"start_session","operator":" .."}        
        
     2)           .
        ,  "start_session"     .
	  "WRITE_TABLE" -          .
           "OPEN_SESSION".

     3)             
     4)    

     5)       JSON, 
            ,    
         :
        { "data": 
                 [ { "commandCode": 30,
                     "commandText": "WRITE_TABLE", 
                     "errorCode": 0, 
                     "errorText": " ", 
                     "status": "OK"
                   },
                   { "commandCode": 30, 
                     "commandText": "WRITE_TABLE",
                     "errorCode": 0, 
                     "errorText": " ", 
                     "status": "OK" 
                   },        
                   { "commandCode": 224, 
                     "commandText": "OPEN_SESSION",
                     "errorCode": 0,
                     "errorText": " ",
                     "status": "OK"
                   }
                ]
        }

     6)        
               .

2.      .

    -. 
      ( ). 
    . 
     .

      :

 1)    ()  
   
          .
      .
   
   )    . 
                 .
              , 
              :
	

	{
          "data": [
                   {
                    "commandCode": 65520,
                    "commandText": "CONNECT_TO_DEVICE",
                    "errorCode"  : 243,
                    "errorText"  : "    -  .",
                    "status"     : "ERROR"
                   }
                  ]
        }    
      
    
    )    ,              , 
           .  
          ,   ,       . 

            ,      .
            ,     .
             ,         .
      
       { 
        data:[
              {               
               "commandCode" : 0,
               "commandText" : "",
               "errorCode"   : 242,
               "errorText"   : "       !"
               "status"      : "ERROR"
	      }
	     ]	
       }      
   
 2)     ( , 
     ,   )

        - ,    -  json,     .
     json c  ,         json   ,  ,    null.
    , -   ,       json     .
   
         :
   
   { 
        data:[
              {               
               "commandCode" :      128,
               "commandText" : "    SALE",
               "errorCode"   : 9,
               "errorText"   : "  "
               "status"      : "ERROR"
	      }
	     ]	
   }      
   
 3)         ,       ERROR.
   
      ,    ,    
       "     ".

        ,     ,     ,     .
         .   ,       ..

              ,  . 
            .
                              	
         .         -  , 
      ,    JSON     .

3.        .

   1)  "get_state"
     
      { "command":"get_state","operator":" .."}

      :
      
      { "data": [        
                   { "commandCode": 16, 
                     "commandText": "ECR_SHORT_STATUS",            
                     "errorCode": 0,
                     "errorText": " ",
                     "status": "OK",    
                     "data": [
                              { "state": "OK",
                                "state_mode": 2, 
                                "state_mode_text": " , 24   ",                
                                "state_print_mode": 0,                
                                "state_print_mode_text": "0 -  ,     ",
                                "state_print_result": 0,
                                "state_print_result_text": "  ",
                                "state_text": "OK"
                              }                   
                             ]
                    }
         ]
      }
     
        WARNING
      { "data": [
                   { "commandCode": 16,
                     "commandText": "ECR_SHORT_STATUS",
                     "errorCode": 0,
                     "errorText": " ",
                     "status": "OK"
                     "data": { "state": "WARNING",                
                               "state_mode": 4,
                               "state_mode_text": " ", 
                               "state_print_mode": 0,
                               "state_print_mode_text": "0 -  ,     ",
                               "state_print_result": 0, 
                               "state_print_result_text": "  ",
                               "state_text": ":  ; :  0 -  ,     ; :   " 
                             }
                   }
                ]
      }
   

   2)  "start_session"
      {"command":"start_session","operator":" .."}

      :
      {    "data": [        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 224,            "commandText": "OPEN_SESSION",            "errorCode": 0,            "errorText": " ",            "status": "OK"        }    ]}



  
   3) x_report
     
      :
      {    "data": [        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 64,            "commandText": "X_REPORT",            "errorCode": 0,            "errorText": " ",            "status": "OK"        }    ]}


   4) z_report
      {"command":"z_report","operator":" .."}
      
      :
      {    "data": [        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 65,            "commandText": "Z_REPORT",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 26,            "commandText": "GET_REGISTR",            "data": {                "cash_in_cashbox": 22545            },            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 81,            "commandText": "CASH_OUTCOME",            "errorCode": 0,            "errorText": " ",            "status": "OK"        }    ]}"

   5) print_check

      {"command":"print_check",
       "operator":" ..",
       "data":[
               {
                "StringForPrinting":"B01.004.001.006  (, ",
                "Quantity":1,
                "Price":1100,
                "Info":"",
                "Tax1":4
               },
               {
                "Summ1":0,
                "Summ2":1100,
                "Tax1":0,
                "Tax2":0,
                "Tax4":4,
                "StringForPrinting":"=============================="
               }
              ]
       }

       :
       {    "data": [        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 30,            "commandText": "WRITE_TABLE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 128,            "commandText": "SALE",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 133,            "commandText": "CLOSE_CHECK",            "errorCode": 0,            "errorText": " ",            "status": "OK"        },        {            "commandCode": 254,            "commandText": "PRINTING_CHECK",            "errorCode": 0,            "errorText": " ",            "status": "OK"        }    ]}



{\n    "data": [\n        {\n            "commandCode": 65523,\n            "commandText": "",\n            "errorCode": 0,\n            "errorText": " ",\n            "status": "OK"\n        }\n    ]\n}
