Question

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

Homework Answers

Answer #1

What are the usage of the following API's/Macros in contiki?
a) PROCESS :-
A process in Contiki consists of a single protothread(Protothreads are a type of lightweight stackless threads designed for severly memory constrained systems such as deeply embedded systems or sensor network nodes).

Declare a process.
   This macro declares a process. The process has two names: the variable of the process structure, which is used by the C program, and a human readable string name, which is used when debugging. A configuration option allows removal of the readable name to save RAM.

e.i., #define PROCESS ( name, strname)
   name:   The variable name of the process structure.
   strname: The string representation of the process' name.

b) AUTOSTART_PROCESSES :-
   Contiki provides a mechanism where processes can be automatically started either when the system is booted, or when a module that contains the processes is loaded. Autostarted processes are kept on a list, that is used by the autostart module to start the processes. The processes are started in the order they appear on the list.

i.e., AUTOSTART_PROCESSES(&name1, &name2, ...)
   name1, name2, ... - The name of processes to be autostarted.

c) PROCESS_THREAD :-
   This macro is used to define the body (protothread) of a process. The process is called whenever an event occurs in the system, A process always start with the PROCESS_BEGIN() macro and end with the PROCESS_END() macro.

i.e.,#define PROCESS_THREAD( name, ev, data)
  
d) PROCESS_WAIT_EVENT_UNTIL :-
   Wait for an event to be posted to the process, with an extra condition. It blocks the currently running process until the process receives an event.

i.e., #define PROCESS_WAIT_EVENT_UNTIL(c)   
   c: The condition that must be true for the process to continue.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Complete the following table. Transcription Translation What are the products of the process? What molecular components...
Complete the following table. Transcription Translation What are the products of the process? What molecular components are required for the process to occur? Which molecular component catalyzes the reaction?
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
Please TYPE 300 words discussing the following as related to microcontrollers: A. List and describe various...
Please TYPE 300 words discussing the following as related to microcontrollers: A. List and describe various binary codes. B. List and describe the advantages and disadvantages of macros.
1) What is the purpose of Macros? In your opinion, do you believe a Macro function...
1) What is the purpose of Macros? In your opinion, do you believe a Macro function has any weaknesses?
What are the micros? Macros? Be able to describe food sources, functions/benefits, how they can impact...
What are the micros? Macros? Be able to describe food sources, functions/benefits, how they can impact metabolism/relevance in fitness routine.
Discuss the process of interview transcript analysis. What are the strengths of this process and what...
Discuss the process of interview transcript analysis. What are the strengths of this process and what are the perceived struggles of the process.
Your process exhibits the following capabilities; Cp upper = 1.67 Cp lower = 0.48 What proportion...
Your process exhibits the following capabilities; Cp upper = 1.67 Cp lower = 0.48 What proportion of product will not meet specifications in this process?
What is the process of reconstruction of memories? What happens to memories during this process? What...
What is the process of reconstruction of memories? What happens to memories during this process? What does this say about the accuracy and reliability of our memories?
What is the process involved in fermentation of sauerkraut? what does the process involve? What types...
What is the process involved in fermentation of sauerkraut? what does the process involve? What types of other foods can be prepared using the same method? What type of organism is used for this product of fermentation?
In construction practice Answer the following : 1- Briefly describe the process of reshoring 2- What...
In construction practice Answer the following : 1- Briefly describe the process of reshoring 2- What is the main advantage of snap ties over other form ties 3- What is the difference between a control joint, isolation joint and a construction joint
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT