modbus/mb_runtime.h
changeset 2683 5d8a4deacfe1
parent 2655 d2b2ee04bfa1
child 2687 c79c5d49ba34
equal deleted inserted replaced
2682:4d3320fdab19 2683:5d8a4deacfe1
   104 	    int		mb_nd;      // modbus library node used for this client
   104 	    int		mb_nd;      // modbus library node used for this client
   105 	    int		init_state; // store how far along the client's initialization has progressed
   105 	    int		init_state; // store how far along the client's initialization has progressed
   106 	    u64		comm_period;// period to use when periodically sending requests to remote server
   106 	    u64		comm_period;// period to use when periodically sending requests to remote server
   107 	    int		prev_error; // error code of the last printed error message (0 when no error) 
   107 	    int		prev_error; // error code of the last printed error message (0 when no error) 
   108 	    pthread_t   thread_id;  // thread handling all communication for this client node
   108 	    pthread_t   thread_id;  // thread handling all communication for this client node
       
   109 	    pthread_t	timer_thread_id;  // thread handling periodical timer for this client node
   109 	    timer_t      timer_id;  // timer used to periodically activate this client node's thread
   110 	    timer_t      timer_id;  // timer used to periodically activate this client node's thread
   110 	    pthread_mutex_t mutex;  // mutex to be used with the following condition variable
   111 	    pthread_mutex_t mutex;  // mutex to be used with the following condition variable
   111         pthread_cond_t  condv;  // used to signal the client thread when to start new modbus transactions
   112         pthread_cond_t  condv;  // used to signal the client thread when to start new modbus transactions
   112         int       execute_req;  /* used, in association with condition variable,  
   113         int       execute_req;  /* used, in association with condition variable,  
   113                                  *   to signal when to send the modbus request to the server
   114                                  *   to signal when to send the modbus request to the server