Fun with PWM  0.32
SRPC.Exposed Class Reference

public methods of the Exposed class become endpoints for the RPC server More...

Public Member Functions

def __init__ (self, specification, motionScheduler)
 
def listMethods (self)
 
def add (self, x, y)
 
def mult (self, x, y)
 
def div (self, x, y)
 
def relax (self)
 
def liveCommand (self, s)
 
def listMotions (self)
 
def listChains (self)
 
def triggerMotion (self, id, slow=False)
 
def triggerChain (self, id)
 
def getServoConfig (self)
 
def uploadMotion (self, name, meta)
 

Public Attributes

 python_string
 
 specification
 
 channelindex
 
 motionScheduler
 

Detailed Description

public methods of the Exposed class become endpoints for the RPC server

Constructor & Destructor Documentation

§ __init__()

def SRPC.Exposed.__init__ (   self,
  specification,
  motionScheduler 
)
Initiializes the Exposed object
The public methods of this class are automatically made available
as endpoints of the RPC service

Member Function Documentation

§ add()

def SRPC.Exposed.add (   self,
  x,
  y 
)
adds two numbers

§ div()

def SRPC.Exposed.div (   self,
  x,
  y 
)
divides two numbers

§ getServoConfig()

def SRPC.Exposed.getServoConfig (   self)
gets the current servo configuration

§ listChains()

def SRPC.Exposed.listChains (   self)
get a list of all chains

§ listMethods()

def SRPC.Exposed.listMethods (   self)
gets a list of exposed functions

§ listMotions()

def SRPC.Exposed.listMotions (   self)
get a list of all existing motions

§ liveCommand()

def SRPC.Exposed.liveCommand (   self,
  s 
)
sync servos with this live command
s is a json string containing a dict of channels and angles. these instructions are applied immediately.

@param s

§ mult()

def SRPC.Exposed.mult (   self,
  x,
  y 
)
multiplies two numbers

§ relax()

def SRPC.Exposed.relax (   self)
relax all servos

§ triggerChain()

def SRPC.Exposed.triggerChain (   self,
  id 
)
id - index of a chain. queues this chain for execution. resubmit while looping or the chain will stop.

@param id

§ triggerMotion()

def SRPC.Exposed.triggerMotion (   self,
  id,
  slow = False 
)
trigger a motion
id - index of a motion. queues this motion for execution
slow - enable slow motion

@param id str a 
@param slow bool

§ uploadMotion()

def SRPC.Exposed.uploadMotion (   self,
  name,
  meta 
)
receives motion data

The documentation for this class was generated from the following file: