コード例 #1
0
 def update(self, helem):
     for i in [0, 1]:
         if helem == self.volume[i]:
             self.volumearray[i] = HValue(helem).getArray(
                 self.volumeinfo[i].type, self.volumeinfo[i].count)
         elif helem == self.switch[i]:
             self.switcharray[i] = HValue(helem).getArray(
                 self.switchinfo[i].type, self.switchinfo[i].count)
     self.eventValue()
コード例 #2
0
 def attachVolume(self, helem, dir):
     self.volume[dir] = helem
     self.volumeinfo[dir] = HInfo(helem)
     self.min[dir] = self.volumeinfo[dir].min
     self.max[dir] = self.volumeinfo[dir].max
     self.volumearray[dir] = HValue(helem).getArray(
         self.volumeinfo[dir].type, self.volumeinfo[dir].count)
コード例 #3
0
 def opsSetVolume(self, dir, chn, value):
     val = self.volumeFromUser(self.volumeinfo[dir], dir, value)
     if self.volumearray[dir][chn] == val:
         return
     self.volumearray[dir][chn] = val
     hv = HValue(self.volume[dir])
     hv.setArray(self.volumeinfo[dir].type, self.volumearray[dir])
     hv.write()
コード例 #4
0
 def opsSetEnumItem(self, chn, value):
     if chn >= self.channels:
         return -1
     if self.enumarray[chn] == value:
         return
     self.enumarray[chn] = int(value)
     hv = HValue(self.enum)
     hv.setArray(self.enuminfo.type, self.enumarray)
     hv.write()
コード例 #5
0
 def attach(self, helem):
     BaseElement.attach(self, helem)
     self.enum = helem
     self.enuminfo = HInfo(helem)
     self.enumarray = HValue(helem).getArray(self.enuminfo.type,
                                             self.enuminfo.count)
     self.channels = self.enuminfo.count
     self.texts = self.enuminfo.itemNames
     self.caps |= self.mycaps
コード例 #6
0
 def opsSetSwitch(self, dir, chn, value):
     if self.switcharray[dir][chn] and value:
         return
     if not self.switcharray[dir][chn] and not value:
         return
     self.switcharray[dir] = int(value)
     hv = HValue(self.switch[dir])
     hv.setArray(self.switchinfo[dir].type, self.switcharray[dir])
     hv.write()
コード例 #7
0
 def attachSwitch(self, helem, dir):
     self.switch[dir] = helem
     self.switchinfo[dir] = HInfo(helem)
     self.switcharray[dir] = HValue(helem).getArray(
         self.switchinfo[dir].type, self.switchinfo[dir].count)
コード例 #8
0
 def update(self, helem):
     self.enumarray = HValue(helem).getArray(self.enuminfo.type,
                                             self.enuminfo.count)
     self.eventValue()