FACT++  1.0
BROWSER* create_browser ( int  id)

Definition at line 663 of file webDid.c.

References check_browser(), bitem::curr_command, bitem::curr_smidomain, dtq_start_timer(), bitem::id, id, bitem::JSONBuffer, bitem::JSONBufferSize, bitem::JSONSmiBuffer, bitem::JSONSmiBufferSize, bitem::last_changed, bitem::last_polled, bitem::last_subscribed, bitem::last_updated, Memory::malloc(), bitem::n_nodes, bitem::n_servers, bitem::n_services, bitem::pattern, bitem::service_format_ptr, bitem::servicep, sll_init(), sll_insert_queue(), and bitem::smidomainp.

Referenced by check_browser_changes(), find_services(), getJSONSmiBuffer(), update_service_data(), update_services(), and update_smi_objects().

664 {
665  BROWSER *browserp;
666 
667  if(!Browser_head)
668  {
669  Browser_head = (BROWSER *)malloc(sizeof(BROWSER));
671  }
672  browserp = (BROWSER *)malloc(sizeof(BROWSER));
673  browserp->id = id;
674  browserp->last_subscribed = 0;
675  browserp->last_updated = 0;
676  browserp->last_polled = 0;
677  browserp->last_changed = 0;
678  browserp->n_nodes = 0;
679  browserp->n_servers = 0;
680  browserp->n_services = 0;
681  browserp->servicep = 0;
682  browserp->JSONBuffer = 0;
683  browserp->JSONBufferSize = 0;
684  browserp->JSONSmiBuffer = 0;
685  browserp->JSONSmiBufferSize = 0;
686  browserp->pattern[0] = '\0';
687  browserp->service_format_ptr = 0;
688  browserp->curr_command[0] = '\0';
689  browserp->curr_smidomain[0] = '\0';
690  browserp->smidomainp = 0;
691  sll_insert_queue((SLL *)Browser_head,(SLL *)browserp);
692  dtq_start_timer(10, check_browser, browserp);
693  return browserp;
694 }
int n_services
Definition: webDid.c:70
CURR_SERVICE * servicep
Definition: webDid.c:73
int JSONSmiBufferSize
Definition: webDid.c:77
time_t last_changed
Definition: webDid.c:68
BROWSER * Browser_head
Definition: webDid.c:88
void * malloc()
Definition: EventBuilder.cc:99
char id[4]
Definition: FITS.h:71
time_t last_updated
Definition: webDid.c:66
char * JSONBuffer
Definition: webDid.c:74
char * service_format_ptr
Definition: webDid.c:80
Definition: dim.h:536
int n_servers
Definition: webDid.c:71
void dtq_start_timer(int time, void(*user_routine)(), dim_long tag)
Definition: dtq.c:790
void sll_init(SLL *head)
Definition: sll.c:14
int sll_insert_queue(SLL *head, SLL *item)
Definition: sll.c:20
void check_browser(BROWSER *tag)
Definition: webDid.c:644
time_t last_polled
Definition: webDid.c:67
int id
Definition: webDid.c:63
char * JSONSmiBuffer
Definition: webDid.c:76
int n_nodes
Definition: webDid.c:72
int JSONBufferSize
Definition: webDid.c:75
time_t last_subscribed
Definition: webDid.c:65
char curr_command[MAX_NAME]
Definition: webDid.c:79
OBJSTATE * smidomainp
Definition: webDid.c:86
char pattern[256]
Definition: webDid.c:78
Definition: webDid.c:61
char curr_smidomain[MAX_NAME]
Definition: webDid.c:83

+ Here is the call graph for this function:

+ Here is the caller graph for this function: