📄 test_aplm.nc
字号:
beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0020: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xF0; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0021: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0028: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x78; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x003F: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x01; beacon_scheduling_ptr->transmission_offset[1] = 0xE0; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0040: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0047: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x78; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x005e: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x02; beacon_scheduling_ptr->transmission_offset[1] = 0xDC; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x005f: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0066: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x78; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; */ /*******************************************************************/ /* case 0x0001: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0002: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0009: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x78; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x00010: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xB4; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0017: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xF0; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0020: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x01; beacon_scheduling_ptr->transmission_offset[1] = 0x68; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0021: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0028: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x78; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0002F: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xB4; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0036: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xF0; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x003F: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x02; beacon_scheduling_ptr->transmission_offset[1] = 0xD0; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0040: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0047: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x78; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0004E: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xB4; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0055: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xF0; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x005e: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x04; beacon_scheduling_ptr->transmission_offset[1] = 0x38; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x005F: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x3C; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0066: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x78; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0006D: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xB4; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; case 0x0074: beacon_scheduling_ptr->request_type = SCHEDULING_ACCEPT; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0xF0; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; */ default: beacon_scheduling_ptr->request_type = SCHEDULING_DENY; beacon_scheduling_ptr->beacon_order = beacon_order; beacon_scheduling_ptr->superframe_order = superframe_order; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x00; beacon_scheduling_ptr->transmission_offset[2] = 0x00; break; } call NLDE_DATA.request(source_address,0x06, nsdu_pay, 1, 1, 0x00, 0); return; } task void start_sending_beacons_request() { uint8_t nsdu_pay[6]; beacon_scheduling *beacon_scheduling_ptr; beacon_scheduling_ptr = (beacon_scheduling *)&nsdu_pay[0]; beacon_scheduling_ptr->request_type = SCHEDULING_REQUEST; beacon_scheduling_ptr->beacon_order = BEACON_ORDER; beacon_scheduling_ptr->superframe_order = SUPERFRAME_ORDER; beacon_scheduling_ptr->transmission_offset[0] = 0x00; beacon_scheduling_ptr->transmission_offset[1] = 0x00; beacon_scheduling_ptr->transmission_offset[2] = 0x00; requested_scheduling = 0x01; //command result_t NLDE_DATA.request(uint16_t DstAddr, uint8_t NsduLength, uint8_t Nsdu[], uint8_t NsduHandle, uint8_t Radius, uint8_t DiscoverRoute, bool SecurityEnable) call NLDE_DATA.request(0x0000,0x06, nsdu_pay, 0x01, 0x01, 0x00, 0x00); call T_schedule.startOneShot(20000); //call Schedule_timer.start(TIMER_ONE_SHOT,20000); return; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -