예제 #1
0
 def getAnalogOutMimic(self, idx):
     """
     Retrieve the mimic output channel number for an analog output channel, 
     or -1 if no mimic is defined for the specified channel.
     """
     WbDefs.checkRange(idx, 0, WbDefs.AOCOUNT)
     ams = getNamedNodeAttrText(self.dom, "MM", "an")
     if ams:
         am = int(ams)
         av = am >> (idx*4) & 0xF
         if av < 8: return av
     return -1
예제 #2
0
 def getDigOutMimic(self, idx):
     """
     Retrieve the mimic output channel number for an analog output channel, 
     or -1 if no mimic is defined for the specified channel.
     """
     WbDefs.checkRange(idx, 0, WbDefs.DOCOUNT)
     dms = getNamedNodeAttrText(self.dom, "MM", "dig")
     if dms:
         dm = int(dms)
         dv = dm >> (idx*4) & 0xF
         if dv < 8: return dv
     return -1
예제 #3
0
 def getMacAddress(self):
     """
     Retrieve the webbrick Ethernet MAC address
     """
     return getNamedNodeAttrText(self.dom, "SI", "mac")
예제 #4
0
 def getIpAddress(self):
     """
     Retrieve the webbrick IP address
     """
     return getNamedNodeAttrText(self.dom, "SI", "ip")
예제 #5
0
 def getVersion(self):
     """
     Retrieve the webbrick software version
     """
     return getNamedNodeAttrText(self.dom, "WebbrickConfig", "Ver")
예제 #6
0
 def getMimicFadeRateStr(self):
     """
     Retrieve value controlling the rate at which a mimic changes between 
     low and high brightness levels, as a string.
     """
     return getNamedNodeAttrText(self.dom, "MM", "fr")
예제 #7
0
 def getMimicHiLevelStr(self):
     """
     Retrieve PCM output level for mimic at low-brightness, as a string
     """
     return getNamedNodeAttrText(self.dom, "MM", "hi")