Package barobo :: Class Dongle
[hide private]
[frames] | no frames]

Class Dongle

source code

The BaroboCtx (BaroboContext) is the entity which manages all of the Linkbots in a computational environment. If loosely represents a ZigBee dongle which can communicate and with and control all Linkbots within its communication range.

Instance Methods [hide private]
 
__init__(self) source code
 
__init_comms(self) source code
 
addLinkbot(self, linkbot) source code
 
autoConnect(self) source code
 
connect(self)
Automatically connect to an attached Barobo Dongle.
source code
 
connectBaroboBrowser(self)
Connect the dongle to BaroboBrowser
source code
 
connectBaroboLink(self)
Connect the BaroboContext to BaroboLink.
source code
 
connectBluetooth(self, macaddr)
Connect the BaroboContext to a Bluetooth LinkPod.
source code
 
connectMobotBluetooth(self, macaddr)
Connect the BaroboContext to a Bluetooth Mobot or legacy Bluetooth Linkbot.
source code
 
connectDongleTTY(self, ttyfilename)
Connect the BaroboCtx to a Linkbot that is connected with a USB cable.
source code
 
connectDongleSFP(self, ttyfilename)
Connect the BaroboCtx to a Linkbot using libsfp that is connected with a USB cable.
source code
 
disconnect(self) source code
 
handlePacket(self, packet) source code
 
scanForRobots(self) source code
 
getScannedRobots(self) source code
 
getLinkbot(self, serialID=None, linkbotClass=None) source code
 
findRobot(self, serialID) source code
 
waitForRobot(self, serialID, timeout=2.0) source code
 
writePacket(self, packet) source code
 
_commsInEngine(self) source code
 
_commsOutEngine(self) source code
 
__checkStatus(self) source code
 
__getDongleID(self) source code
Class Variables [hide private]
  RESP_OK = 16
  RESP_END = 17
  RESP_ERR = 255
  RESP_ALREADY_PAIRED = 254
  EVENT_BUTTON = 32
  EVENT_REPORTADDRESS = 33
  TWI_REGACCESS = 34
  EVENT_DEBUG_MSG = 35
  EVENT_JOINT_MOVED = 36
  EVENT_ACCEL_CHANGED = 37
  CMD_STATUS = 48
  CMD_DEMO = 49
  CMD_SETMOTORDIR = 50
  CMD_GETMOTORDIR = 51
  CMD_SETMOTORSPEED = 52
  CMD_GETMOTORSPEED = 53
  CMD_SETMOTORANGLES = 54
  CMD_SETMOTORANGLESABS = 55
  CMD_SETMOTORANGLESDIRECT = 56
  CMD_SETMOTORANGLESPID = 57
  CMD_GETMOTORANGLES = 58
  CMD_GETMOTORANGLESABS = 59
  CMD_GETMOTORANGLESTIMESTAMP = 60
  CMD_GETMOTORANGLESTIMESTAMPABS = 61
  CMD_SETMOTORANGLE = 62
  CMD_SETMOTORANGLEABS = 63
  CMD_SETMOTORANGLEDIRECT = 64
  CMD_SETMOTORANGLEPID = 65
  CMD_GETMOTORANGLE = 66
  CMD_GETMOTORANGLEABS = 67
  CMD_GETMOTORANGLETIMESTAMP = 68
  CMD_GETMOTORSTATE = 69
  CMD_GETMOTORMAXSPEED = 70
  CMD_GETENCODERVOLTAGE = 71
  CMD_GETBUTTONVOLTAGE = 72
  CMD_GETMOTORSAFETYLIMIT = 73
  CMD_SETMOTORSAFETYLIMIT = 74
  CMD_GETMOTORSAFETYTIMEOUT = 75
  CMD_SETMOTORSAFETYTIMEOUT = 76
  CMD_STOP = 77
  CMD_GETVERSION = 78
  CMD_BLINKLED = 79
  CMD_ENABLEBUTTONHANDLER = 80
  CMD_RESETABSCOUNTER = 81
  CMD_GETHWREV = 82
  CMD_SETHWREV = 83
  CMD_TIMEDACTION = 84
  CMD_GETBIGSTATE = 85
  CMD_SETFOURIERCOEFS = 86
  CMD_STARTFOURIER = 87
  CMD_LOADMELODY = 88
  CMD_PLAYMELODY = 89
  CMD_GETADDRESS = 90
  CMD_QUERYADDRESSES = 91
  CMD_GETQUERIEDADDRESSES = 92
  CMD_CLEARQUERIEDADDRESSES = 93
  CMD_REQUESTADDRESS = 94
  CMD_REPORTADDRESS = 95
  CMD_REBOOT = 96
  CMD_GETSERIALID = 97
  CMD_SETSERIALID = 98
  CMD_SETRFCHANNEL = 99
  CMD_FINDMOBOT = 100
  CMD_PAIRPARENT = 101
  CMD_UNPAIRPARENT = 102
  CMD_RGBLED = 103
  CMD_SETMOTORPOWER = 104
  CMD_GETBATTERYVOLTAGE = 105
  CMD_BUZZERFREQ = 106
  CMD_GETACCEL = 107
  CMD_GETFORMFACTOR = 108
  CMD_GETRGB = 109
  CMD_GETVERSIONS = 110
  CMD_PLACEHOLDER201304121823 = 111
  CMD_PLACEHOLDER201304152311 = 112
  CMD_PLACEHOLDER201304161605 = 113
  CMD_PLACEHOLDER201304181705 = 114
  CMD_PLACEHOLDER201304181425 = 115
  CMD_SET_GRP_MASTER = 116
  CMD_SET_GRP_SLAVE = 117
  CMD_SET_GRP = 118
  CMD_SAVE_POSE = 119
  CMD_MOVE_TO_POSE = 120
  CMD_IS_MOVING = 121
  CMD_GET_MOTOR_ERRORS = 122
  CMD_MOVE_MOTORS = 123
  CMD_TWI_SEND = 124
  CMD_TWI_RECV = 125
  CMD_TWI_SENDRECV = 126
  CMD_SET_ACCEL = 127
  CMD_SMOOTHMOVE = 128
  CMD_SETMOTORSTATES = 129
  CMD_SETGLOBALACCEL = 130
  CMD_PING = 137
  CMD_GET_HW_REV = 138
  CMD_SET_HW_REV = 139
  CMD_SET_JOINT_EVENT_THRESHOLD = 140
  CMD_SET_ENABLE_JOINT_EVENT = 141
  CMD_SET_ACCEL_EVENT_THRESHOLD = 142
  CMD_SET_ENABLE_ACCEL_EVENT = 143
  MOTOR_FORWARD = 1
  MOTOR_BACKWARD = 2
  TWIMSG_HEADER = 34
  TWIMSG_REGACCESS = 1
  TWIMSG_SETPINMODE = 2
  TWIMSG_DIGITALWRITEPIN = 3
  TWIMSG_DIGITALREADPIN = 4
  TWIMSG_ANALOGWRITEPIN = 5
  TWIMSG_ANALOGREADPIN = 6
  TWIMSG_ANALOGREF = 7
Method Details [hide private]

connect(self)

source code 

Automatically connect to an attached Barobo Dongle. Throw an exception if no dongle is found.