[Tinyos-commits] CVS: tinyos-1.x/tos/lib/VM/languages/motlle/examples motlle-float.vmsf, 1.2, 1.3 motlle.vmsf, 1.2, 1.3 oscilloscope.mt, 1.2, 1.3 oscilloscope.ts, 1.1, 1.2 scheme-float.vmsf, 1.3, 1.4 scheme.vmsf, 1.3, 1.4

David Gay idgay at users.sourceforge.net
Wed Nov 23 15:38:35 PST 2005


Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/examples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28768/examples

Modified Files:
	motlle-float.vmsf motlle.vmsf oscilloscope.mt oscilloscope.ts 
	scheme-float.vmsf scheme.vmsf 
Log Message:
update vmsf examples and docs


Index: motlle-float.vmsf
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/examples/motlle-float.vmsf,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** motlle-float.vmsf	22 Nov 2005 23:54:56 -0000	1.2
--- motlle-float.vmsf	23 Nov 2005 23:38:33 -0000	1.3
***************
*** 1,4 ****
--- 1,12 ----
+ // Declare the VM. You will want to specify a separate name (NAME)
+ // and directory (DIR) for each VM.
  <VM NAME="FMotlleVM" DESC="A basic motlle VM with single-hop communication and floating-point numbers." DIR="../../../../../../apps/FMotlleVM">
+ // 1024 is the amount of RAM available for motlle programs. You can
+ // increase while there is RAM available... On telosb motes, you should
+ // probably set this to something larger.
  <OPTION CAPSULE_SIZE=1024>
+ // The following lines should always be present (the paths are
+ // relative to the .vmsf file, so you may need to adjust them
+ // depending on where your file is)
  <SEARCH PATH="../../../opcodes">
  <SEARCH PATH="../../../contexts">
***************
*** 11,17 ****
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="motlle">
! <LOAD FILE="../mate/runtime/gen/floatfns.vmsf">
  
  <FUNCTION NAME="led">
  <FUNCTION name="id">
--- 19,29 ----
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="motlle"> // Use the motlle language
! <LOAD FILE="../mate/runtime/gen/floatfns.vmsf"> // Load basic motlle functions
  
+ // Here is where you add VM-specific contexts and functions, either
+ // from Mate's library (led, id, the mica sensorboard) or from motlle's
+ // (the commfns.vmsf file, which contains single-hop communication
+ // primitives)
  <FUNCTION NAME="led">
  <FUNCTION name="id">
***************
*** 19,20 ****
--- 31,38 ----
  <CONTEXT NAME="Timer0">
  <LOAD FILE="../matelib/gen/commfns.vmsf">
+ // This VM does not have any sensor board access. You should add a line like
+ //   <LOAD FILE="../../../sensorboards/micasb.vmsf"> // micasb sensor board
+ // or
+ //   <LOAD FILE="../../../sensorboards/telosb.vmsf"> // built-in telosb sensors
+ // to get access to sensors from your favourite sensorboard.
+ 

Index: motlle.vmsf
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/examples/motlle.vmsf,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** motlle.vmsf	22 Nov 2005 23:54:56 -0000	1.2
--- motlle.vmsf	23 Nov 2005 23:38:33 -0000	1.3
***************
*** 1,4 ****
--- 1,12 ----
+ // Declare the VM. You will want to specify a separate name (NAME)
+ // and directory (DIR) for each VM.
  <VM NAME="MotlleVM" DESC="A basic motlle VM with single-hop communication." DIR="../../../../../../apps/MotlleVM">
+ // 1024 is the amount of RAM available for motlle programs. You can
+ // increase while there is RAM available... On telosb motes, you should
+ // probably set this to something larger.
  <OPTION CAPSULE_SIZE=1024>
+ // The following lines should always be present (the paths are
+ // relative to the .vmsf file, so you may need to adjust them
+ // depending on where your file is)
  <SEARCH PATH="../../../opcodes">
  <SEARCH PATH="../../../contexts">
***************
*** 11,17 ****
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="motlle">
! <LOAD FILE="../mate/runtime/gen/intfns.vmsf">
  
  <FUNCTION NAME="led">
  <FUNCTION name="id">
--- 19,29 ----
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="motlle"> // Use the motlle language
! <LOAD FILE="../mate/runtime/gen/intfns.vmsf"> // Load basic motlle functions
  
+ // Here is where you add VM-specific contexts and functions, either
+ // from Mate's library (led, id, the mica sensorboard) or from motlle's
+ // (the commfns.vmsf file, which contains single-hop communication
+ // primitives)
  <FUNCTION NAME="led">
  <FUNCTION name="id">
***************
*** 19,20 ****
--- 31,37 ----
  <CONTEXT NAME="Timer0">
  <LOAD FILE="../matelib/gen/commfns.vmsf">
+ // This VM does not have any sensor board access. You should add a line like
+ //   <LOAD FILE="../../../sensorboards/micasb.vmsf"> // micasb sensor board
+ // or
+ //   <LOAD FILE="../../../sensorboards/telosb.vmsf"> // built-in telosb sensors
+ // to get access to sensors from your favourite sensorboard.

Index: oscilloscope.mt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/examples/oscilloscope.mt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** oscilloscope.mt	30 Nov 2004 18:52:42 -0000	1.2
--- oscilloscope.mt	23 Nov 2005 23:38:33 -0000	1.3
***************
*** 8,11 ****
--- 8,14 ----
  // display these readings if you apply the patch at the end of this file.
  
+ // NOTE: you will want to change the call to light() below to a sensor
+ // included in your VM.
+ 
  ////// CODE STARTS HERE //////
  
***************
*** 60,62 ****
       int sm_filter;
  END OF PATCH
! */
\ No newline at end of file
--- 63,65 ----
       int sm_filter;
  END OF PATCH
! */

Index: oscilloscope.ts
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/examples/oscilloscope.ts,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** oscilloscope.ts	29 Oct 2005 17:34:07 -0000	1.1
--- oscilloscope.ts	23 Nov 2005 23:38:33 -0000	1.2
***************
*** 10,13 ****
--- 10,16 ----
  ;; file)
  
+ ;; NOTE: you will want to change the call to (light) below to a sensor
+ ;; included in your VM.
+ 
  ;;;;;; CODE STARTS HERE ;;;;;;
  

Index: scheme-float.vmsf
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/examples/scheme-float.vmsf,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** scheme-float.vmsf	22 Nov 2005 23:54:56 -0000	1.3
--- scheme-float.vmsf	23 Nov 2005 23:38:33 -0000	1.4
***************
*** 1,4 ****
--- 1,12 ----
+ // Declare the VM. You will want to specify a separate name (NAME)
+ // and directory (DIR) for each VM.
  <VM NAME="FTinySchemeVM" DESC="A basic tinyscheme VM with single-hop communication and floating-point numbers." DIR="../../../../../../apps/FTinySchemeVM">
+ // 1024 is the amount of RAM available for motlle programs. You can
+ // increase while there is RAM available... On telosb motes, you should
+ // probably set this to something larger.
  <OPTION CAPSULE_SIZE=1024>
+ // The following lines should always be present (the paths are
+ // relative to the .vmsf file, so you may need to adjust them
+ // depending on where your file is)
  <SEARCH PATH="../../../opcodes">
  <SEARCH PATH="../../../contexts">
***************
*** 11,17 ****
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="tinyscheme">
! <LOAD FILE="../mate/runtime/sgen/floatfns.vmsf">
  
  <FUNCTION NAME="led">
  <FUNCTION name="id">
--- 19,29 ----
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="tinyscheme"> // Use the scheme language
! <LOAD FILE="../mate/runtime/sgen/floatfns.vmsf"> // Load basic scheme functions
  
+ // Here is where you add VM-specific contexts and functions, either
+ // from Mate's library (led, id, the mica sensorboard) or from motlle's
+ // (the commfns.vmsf file, which contains single-hop communication
+ // primitives)
  <FUNCTION NAME="led">
  <FUNCTION name="id">
***************
*** 19,20 ****
--- 31,37 ----
  <CONTEXT NAME="Timer0">
  <LOAD FILE="../matelib/sgen/commfns.vmsf">
+ // This VM does not have any sensor board access. You should add a line like
+ //   <LOAD FILE="../../../sensorboards/micasb.vmsf"> // micasb sensor board
+ // or
+ //   <LOAD FILE="../../../sensorboards/telosb.vmsf"> // built-in telosb sensors
+ // to get access to sensors from your favourite sensorboard.

Index: scheme.vmsf
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/VM/languages/motlle/examples/scheme.vmsf,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** scheme.vmsf	22 Nov 2005 23:54:56 -0000	1.3
--- scheme.vmsf	23 Nov 2005 23:38:33 -0000	1.4
***************
*** 1,4 ****
--- 1,12 ----
+ // Declare the VM. You will want to specify a separate name (NAME)
+ // and directory (DIR) for each VM.
  <VM NAME="TinySchemeVM" DESC="A basic tinyscheme VM with single-hop communication." DIR="../../../../../../apps/TinySchemeVM">
+ // 1024 is the amount of RAM available for motlle programs. You can
+ // increase while there is RAM available... On telosb motes, you should
+ // probably set this to something larger.
  <OPTION CAPSULE_SIZE=1024>
+ // The following lines should always be present (the paths are
+ // relative to the .vmsf file, so you may need to adjust them
+ // depending on where your file is)
  <SEARCH PATH="../../../opcodes">
  <SEARCH PATH="../../../contexts">
***************
*** 11,17 ****
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="tinyscheme">
! <LOAD FILE="../mate/runtime/sgen/intfns.vmsf">
  
  <FUNCTION NAME="led">
  <FUNCTION name="id">
--- 19,29 ----
  <SEARCH PATH="../../../../Util">
  
! <LANGUAGE NAME="tinyscheme"> // Use the scheme language
! <LOAD FILE="../mate/runtime/sgen/intfns.vmsf"> // Load basic scheme functions
  
+ // Here is where you add VM-specific contexts and functions, either
+ // from Mate's library (led, id, the mica sensorboard) or from motlle's
+ // (the commfns.vmsf file, which contains single-hop communication
+ // primitives)
  <FUNCTION NAME="led">
  <FUNCTION name="id">
***************
*** 19,20 ****
--- 31,37 ----
  <CONTEXT NAME="Timer0">
  <LOAD FILE="../matelib/sgen/commfns.vmsf">
+ // This VM does not have any sensor board access. You should add a line like
+ //   <LOAD FILE="../../../sensorboards/micasb.vmsf"> // micasb sensor board
+ // or
+ //   <LOAD FILE="../../../sensorboards/telosb.vmsf"> // built-in telosb sensors
+ // to get access to sensors from your favourite sensorboard.



More information about the Tinyos-commits mailing list