~sjdv1982/hivesystem/trunk

« back to all changes in this revision

Viewing changes to sparta/actuators/stop.py

  • Committer: Sjoerd de Vries
  • Date: 2014-06-09 10:19:38 UTC
  • mfrom: (182.1.43 hive-view)
  • Revision ID: sjdv1982@gmail.com-20140609101938-7ji5g0buo09r0se6
merged with hive-view branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import libcontext, bee
 
2
from bee.segments import *
 
3
from libcontext.socketclasses import *
 
4
from libcontext.pluginclasses import *
 
5
 
 
6
class stop(bee.worker):
 
7
    """
 
8
Stops the current hive. If "delobj" is True, delete any object bound to the hive.
 
9
In case of the top-level hive, this quits the game    
 
10
    """
 
11
    #Inputs and outputs
 
12
    trig = antenna("push", "trigger")
 
13
    delobj = variable("bool")
 
14
    parameter(delobj, True)
 
15
    
 
16
    # Define the I/O names
 
17
    guiparams = {
 
18
      "trig" : {"name": "Trigger"},
 
19
    }
 
20
    
 
21
    @classmethod
 
22
    def form(self, f):
 
23
      f.delobj.name = "Delete object"
 
24
        
 
25
    def place(self):
 
26
        raise NotImplementedError("sparta.actuators.stop has not been implemented yet") 
 
27
      
 
28