svghmi/svghmi.c
branchsvghmi
changeset 3281 1fc4274de64e
parent 3273 08a5a019bed2
child 3294 e3db472b0dfb
equal deleted inserted replaced
3280:09133b155f0c 3281:1fc4274de64e
   209 }
   209 }
   210 
   210 
   211 void SVGHMI_SuspendFromPythonThread(void);
   211 void SVGHMI_SuspendFromPythonThread(void);
   212 void SVGHMI_WakeupFromRTThread(void);
   212 void SVGHMI_WakeupFromRTThread(void);
   213 
   213 
   214 static int continue_collect;
   214 int svghmi_continue_collect;
   215 
   215 
   216 int __init_svghmi()
   216 int __init_svghmi()
   217 {
   217 {
   218     bzero(rbuf,sizeof(rbuf));
   218     bzero(rbuf,sizeof(rbuf));
   219     bzero(wbuf,sizeof(wbuf));
   219     bzero(wbuf,sizeof(wbuf));
   220 
   220 
   221     continue_collect = 1;
   221     svghmi_continue_collect = 1;
   222 
   222 
   223     return 0;
   223     return 0;
   224 }
   224 }
   225 
   225 
   226 void __cleanup_svghmi()
   226 void __cleanup_svghmi()
   227 {
   227 {
   228     continue_collect = 0;
   228     svghmi_continue_collect = 0;
   229     SVGHMI_WakeupFromRTThread();
   229     SVGHMI_WakeupFromRTThread();
   230 }
   230 }
   231 
   231 
   232 void __retrieve_svghmi()
   232 void __retrieve_svghmi()
   233 {
   233 {
   249     SVGHMI_SuspendFromPythonThread();
   249     SVGHMI_SuspendFromPythonThread();
   250 }
   250 }
   251 
   251 
   252 int svghmi_send_collect(uint32_t session_index, uint32_t *size, char **ptr){
   252 int svghmi_send_collect(uint32_t session_index, uint32_t *size, char **ptr){
   253 
   253 
   254     if(continue_collect) {
   254     if(svghmi_continue_collect) {
   255         int res;
   255         int res;
   256         sbufidx = HMI_HASH_SIZE;
   256         sbufidx = HMI_HASH_SIZE;
   257         send_session_index = session_index;
   257         send_session_index = session_index;
   258         if((res = traverse_hmi_tree(send_iterator)) == 0)
   258         if((res = traverse_hmi_tree(send_iterator)) == 0)
   259         {
   259         {