SSID_t StoreSet::create_set(AddrType PC) /* create_set {{{1 */ { SSID_t SSID = create_id(); ID(SSID_t oldSSID = get_SSID(PC)); //I(LFST[SSID]==0); set_SSID(PC, SSID); LFST[SSID] = NULL; I(SSID < StoreSetSize); IS(if(isValidSSID(oldSSID)) { LFST[oldSSID] = NULL; }); //debug only
/* * Initializes UART and XBee network parameters * Returns 0 on success, non-zero on failure * ip is string of lowest 8 bits of IP address, represented * as a decimal string */ uint8_t xbee_init( char* ip ) { uint8_t ret = 0; // Set the frame receive handler frame_recv_handler( frame_rx_handler ); set_IP_addr_mode(); if( !(ret = cts) ) // Yes, it's supposed to be a single '=', cts is set everytime we transmit data { set_SSID(); if( !(ret = cts) ) { set_encryption_type(); if( !(ret = cts) ) { set_encryption_password(); #if USE_DHCP == 1 if( !(ret = cts) ) { set_IP_address( ip ); #if USE_GM == 1 if( !(ret = cts) ) { set_mask(); if( !(ret = cts) ) { set_gateway(); } } #endif /* USE_GM == 1 */ } #endif /* USE_DHCP = 1 */ } } } return ret; }