svghmi/svghmi.c
branchsvghmi
changeset 3271 561dbd1e3e04
parent 3270 38f7122ccbf9
child 3273 08a5a019bed2
equal deleted inserted replaced
3270:38f7122ccbf9 3271:561dbd1e3e04
   240         SVGHMI_WakeupFromRTThread();
   240         SVGHMI_WakeupFromRTThread();
   241     }
   241     }
   242 }
   242 }
   243 
   243 
   244 /* PYTHON CALLS */
   244 /* PYTHON CALLS */
       
   245 int svghmi_wait(void){
       
   246 
       
   247     SVGHMI_SuspendFromPythonThread();
       
   248 }
       
   249 
   245 int svghmi_send_collect(uint32_t session_index, uint32_t *size, char **ptr){
   250 int svghmi_send_collect(uint32_t session_index, uint32_t *size, char **ptr){
   246 
       
   247     SVGHMI_SuspendFromPythonThread();
       
   248 
   251 
   249     if(continue_collect) {
   252     if(continue_collect) {
   250         int res;
   253         int res;
   251         sbufidx = HMI_HASH_SIZE;
   254         sbufidx = HMI_HASH_SIZE;
   252         send_session_index = session_index;
   255         send_session_index = session_index;
   272 typedef enum {
   275 typedef enum {
   273     setval = 0,
   276     setval = 0,
   274     reset = 1,
   277     reset = 1,
   275     subscribe = 2
   278     subscribe = 2
   276 } cmd_from_JS;
   279 } cmd_from_JS;
       
   280 
       
   281 int svghmi_reset(uint32_t session_index){
       
   282     reset_session_index = session_index;
       
   283     traverse_hmi_tree(reset_iterator);
       
   284     return 1;
       
   285 }
   277 
   286 
   278 // Returns :
   287 // Returns :
   279 //   0 is OK, <0 is error, 1 is heartbeat
   288 //   0 is OK, <0 is error, 1 is heartbeat
   280 int svghmi_recv_dispatch(uint32_t session_index, uint32_t size, const uint8_t *ptr){
   289 int svghmi_recv_dispatch(uint32_t session_index, uint32_t size, const uint8_t *ptr){
   281     const uint8_t* cursor = ptr + HMI_HASH_SIZE;
   290     const uint8_t* cursor = ptr + HMI_HASH_SIZE;