?? node_init.m
字號:
function node_init(args)% Global variables used for the renderingglobal xPos yPos pingPeriod visitPoints% Name of the nodenodeID = args;% Initialize TrueTime kernelttInitKernel(2, 2, 'prioFP'); % nbrOfInputs, nbrOfOutputs, fixed prioritydata.nodeID = nodeID;data.x = xPos(nodeID);data.y = yPos(nodeID);data.visit = visitPoints; % Local data list of locations to visitdata.ref = []; % Empty matrix means that we have not yet chosen destinationdata.done = [data.x; data.y];% Local data list of visited locationsoffset = pingPeriod*rand; % An offset smaller than the periodttCreatePeriodicTask('Task', offset, pingPeriod, 10, 'code', data);% Initialize networkdata_hdl.nodeID = nodeID;ttCreateInterruptHandler('nw_handler', nodeID, 'msgRcv', data_hdl);ttInitNetwork(nodeID, 'nw_handler');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -