Question

In: Computer Science

What are the usages of the following API's/ Macros in contiki ? PROCESS uip_debug_ipaddr_print AUTOSTART_PROCESSES PROCESS_THREAD...

What are the usages of the following API's/ Macros in contiki ?

  1. PROCESS
  2. uip_debug_ipaddr_print
  3. AUTOSTART_PROCESSES
  4. PROCESS_THREAD
  5. PROCESS_WAIT_EVENT_UNTIL
  6. PROCESS_END
  7. simple_udp_register
  8. simple_udp_sendto
  9. uip_create_linklocal_allnodes_mcast
  10. servreg_hack_register

Solutions

Expert Solution

PROCESS: In contiki every process contains a process control block and a process thread.Information about each process, such as the state of the process, a pointer to the process_thread, and name of the process is present in process control block.

Declaration of a process control block is done by using the following macro:

PROCESS(name , strname);

PROCESS_THREAD:process thread contains the code of the process.each process in Contiki can only have one thread of execution. These threads are not real threads as we learn in Operating Systems.

Process_thread is declared using the following macro:

PROCESS_THREAD(name, ev, data);

PROCESS_WAIT_EVENT_UNTIL: waits for an event with a condition.

PROCESS_END: used to declare the end of a process.

AUTOSTART_PROCESSES: Contiki, provides a mechanism where any process can be automatically started either when the system is booted, or the processes is loaded when a module contains it.It is a common way where user start the processes automatically.

AUTOSTART_PROCESSES(&name1, &name2, ...)

simple_udp_sendto: This function is used to send a UDP packet to the IP address and with the UDP ports that were specified when the connection was registered.


Related Solutions

PLEASE put your answer in a table What are the usages of the following API's/ Macros...
PLEASE put your answer in a table What are the usages of the following API's/ Macros in contiki ? PROCESS uip_debug_ipaddr_print AUTOSTART_PROCESSES PROCESS_THREAD PROCESS_WAIT_EVENT_UNTIL PROCESS_END simple_udp_register simple_udp_sendto uip_create_linklocal_allnodes_mcast servreg_hack_register
Excel allows one to automate routine tasks by recording/writing macros. Please discuss how to create macros...
Excel allows one to automate routine tasks by recording/writing macros. Please discuss how to create macros and discuss their relevance/usefulness in the accounting world. Can you provide a chart/graph and explanation?
discuss the purpose of using macros in an Excel worksheet. Include the following: 1) An example...
discuss the purpose of using macros in an Excel worksheet. Include the following: 1) An example of an instance where a user would find the creation of a macro useful. 2) An example of an instance where a user would not find the creation of a macro useful.
This LinkedListUtil class tests various usages of the LinkedList class. The single param is an array...
This LinkedListUtil class tests various usages of the LinkedList class. The single param is an array of string. You will create a linked list with the string elements and return the linked list with all but the 1st two elements removed. Java code Complete the following file: LinkedListUtil.java import java.util.LinkedList; import java.util.ListIterator; /** This LinkedListUtil class tests various usages of the LinkedList class */ public class LinkedListUtil { /** Constructs a LinkedListUtil. @param list is the initialized list */ public...
This LinkedListUtil class tests various usages of the LinkedList class. The single param is an array...
This LinkedListUtil class tests various usages of the LinkedList class. The single param is an array of string. You will create a linked list with the string elements and return the linked list with all but the 1st two elements removed. Note: In this question use a for or while loop instead of the suggested iterator. You should also ignore CodeCheck’s error message about a missing class (LinkedListUtil.class). Your code still needs to pass all test cases. EDIT: For clarifcation...
Home Loan Amortization; Goal Seeking, Creating Macros, and Creating Summary Information for Management. Goals of this...
Home Loan Amortization; Goal Seeking, Creating Macros, and Creating Summary Information for Management. Goals of this Project: 1. Freeze Panes to consistently display titles of Loan Amortization Table 2. Learn how to perform Goal Seeking. You will put in three different monthly payment amounts and see the effect on the number of periods. For example, for an 8 percent, 2 point loan, 360 periods, do not pay the points up front, and borrow $400,000, answer the following questions: How many...
You have a process with the following parameters. What is the EUAW (EUAB-EUAC) for the process,...
You have a process with the following parameters. What is the EUAW (EUAB-EUAC) for the process, given a 15% interest rate? First cost: $1.7M O&M costs for Year 1: $29,000 Cost gradient: +$750/year (Year 2 is 29,750; year 3 is 30,500, and so forth) Annual benefit: $303,000 Salvage value: $210,000 Useful life, in years: 20
What type of the combinational circuit is described by the following VHDL process? process (A,B)   ...
What type of the combinational circuit is described by the following VHDL process? process (A,B)    begin    if (A = '0' and B = '1') OR (A='1' AND B='0') then    Y <= '1';    else    Y <= '0';    end if;    end process; 1. XOR gate 2. XNOR gate 3. 2-to-1 MUX 4. half adder
1- Out of all the potential therapeutic usages of pluripotent stem cells (ESCs and iPSCs only),...
1- Out of all the potential therapeutic usages of pluripotent stem cells (ESCs and iPSCs only), which one do you think are they MOST promising for? Explain your answer. 2- Both embryonic germ cells and embryonic stem cells are pluripotent cells. They also both express SSEA-1 and TNAP. If you had two culture flasks with cells, one cell type in each and you had forgotten to label your culture flask with the name of the cell line, what could you...
Please explain the potential usages for cloud computing and how this might affect an organization’s long-term...
Please explain the potential usages for cloud computing and how this might affect an organization’s long-term IT strategy in a paragraph or two.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT