def buildGetInterface(self, uebertragung=None):
     if uebertragung is None:
         return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetInterface'), [0x00])
     elif uebertragung:
         return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetInterface'), [0x02])
     else:
         return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetInterface'), [0x01])
Exemple #2
0
 def buildGetInterface(self, uebertragung=None):
     if uebertragung is None:
         return self.encode_anfrage_frame(
             anfrage_code_to_shortcut.get('GetInterface'), [0x00])
     elif uebertragung:
         return self.encode_anfrage_frame(
             anfrage_code_to_shortcut.get('GetInterface'), [0x02])
     else:
         return self.encode_anfrage_frame(
             anfrage_code_to_shortcut.get('GetInterface'), [0x01])
Exemple #3
0
 def buildWriteDIOthreshold(self, IOPin, upper_or_lower_trigger,
                            threshold_value):
     #data = bytearray([self.convertUInt8ToBytes(IOPin), self.convertUInt8ToBytes(upper_or_lower_trigger)])
     data = bytearray([IOPin, upper_or_lower_trigger])
     data.extend(self.convertFloatToBytes(threshold_value))
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('WriteDIOthreshold'), data)
 def buildSetUnitText(self, text, slot=0):
     if slot <= 0 or slot > 1:
         data = bytearray([0x00, 0x00])
     else:
         data = bytearray([0x01, 0x00])
     data.extend(bytearray(text.encode('ascii', 'replace')))
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetUnitText'), data)
 def buildWriteInputType(self, channelNo, sensIndex, inputType, isGSV_6=True):
     if isGSV_6:
         channelNo = 0
     data = bytearray([channelNo])
     data.append(sensIndex)
     data.extend(inputType)
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get("MEwriteInputRange"), data)
 def buildSetDIOtype(self, IOPin, DIOtype, assignedDMSchannel):
     data = bytearray([self.convertUInt8ToBytes(IOPin)])
     if(type(DIOtype) is bytearray):
         data.extend(DIOtype)
     else:
         data.extend(self.convertUInt32ToBytes(DIOtype)[1:])
     data.append(self.convertUInt8ToBytes(assignedDMSchannel))
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetDIOtype'), data)
Exemple #7
0
 def buildSetUnitText(self, text, slot=0):
     if slot <= 0 or slot > 1:
         data = bytearray([0x00, 0x00])
     else:
         data = bytearray([0x01, 0x00])
     data.extend(bytearray(text.encode('ascii', 'replace')))
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetUnitText'), data)
Exemple #8
0
 def buildSetDIOdirection(self, gruppe, direction):
     # level umwandeln
     #data = bytearray([self.convertUInt8ToBytes(gruppe)])
     data = bytearray([gruppe])
     #data.append(self.convertUInt8ToBytes(direction))
     data.append(direction)
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetDIOdirection'), data)
Exemple #9
0
 def buildSetDIOtype(self, IOPin, DIOtype, assignedDMSchannel):
     #data = bytearray([self.convertUInt8ToBytes(IOPin)])
     data = bytearray([IOPin])
     if (type(DIOtype) is bytearray):
         data.extend(DIOtype)
     else:
         data.extend(self.convertUInt32ToBytes(DIOtype)[1:])
     #data.append(self.convertUInt8ToBytes(assignedDMSchannel))
     data.append(assignedDMSchannel)
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetDIOtype'), data)
Exemple #10
0
 def buildWriteInputType(self,
                         channelNo,
                         sensIndex,
                         inputType,
                         isGSV_6=True):
     if isGSV_6:
         channelNo = 0
     data = bytearray([channelNo])
     data.append(sensIndex)
     data.extend(inputType)
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('MEwriteInputRange'), data)
 def buildGetDataRate(self):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('ReadDataRate'))
 def buildGetSerialNo(self):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetSerialNo'))
 def buildGetUnitNo(self, channelNo):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetUnitNo'), [channelNo])
 def buildWriteDIOthreshold(self, IOPin, upper_or_lower_trigger, threshold_value):
     data = bytearray([self.convertUInt8ToBytes(IOPin), self.convertUInt8ToBytes(upper_or_lower_trigger)])
     data.extend(self.convertFloatToBytes(threshold_value))
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('WriteDIOthreshold'), data)
 def buildSetDIOinitialLevel(self, IOPin, newlevel):
     data = bytearray([self.convertUInt8ToBytes(IOPin)])
     data.extend(self.convertUInt16ToBytes(newlevel))
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetDIOinitialLevel'), data)
 def buildGetTXMode(self, index):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetTXMode'), [index])
 def buildWriteUserOffset(self, channelNo, userOffset):
     data = bytearray([channelNo])
     data.extend(userOffset)
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('WriteUserOffset'), data)
Exemple #18
0
 def buildReadInputType(self, channelNo, sensindex=0x00):
     #data = bytearray([self.convertUInt8ToBytes(channelNo), self.convertUInt8ToBytes(sensindex)])
     data = bytearray([channelNo, sensindex])
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetInputType'), data)
Exemple #19
0
 def buildWriteUserOffset(self, channelNo, userOffset):
     data = bytearray([channelNo])
     data.extend(userOffset)
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('WriteUserOffset'), data)
Exemple #20
0
 def buildReadUserOffset(self, channelNo):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('ReadUserOffset'), [channelNo])
Exemple #21
0
 def buildgetFirmwareVersion(self):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetFirmwareVersion'))
Exemple #22
0
 def buildWriteSetZero(self, channelNo):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetZero'), [channelNo])
Exemple #23
0
 def buildWriteSaveAll(self, slot=0):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SaveAll'), [slot])
 def buildWriteSaveAll(self, slot=0):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SaveAll'), [slot])
 def buildgetFirmwareVersion(self):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetFirmwareVersion'))
Exemple #26
0
 def buildSetInputTypeGSV8(self, channelNo, inputType):
     data = bytearray([channelNo, inputType])
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetInputType'), data)
 def buildSetInputTypeGSV8(self, channelNo, sensIndex, inputType):
     data = bytearray([channelNo, inputType])
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetInputType'), data)
Exemple #28
0
 def buildSetMEid(self, minor):
     magicCode = bytearray([0x4D, 0x45, 0x69, minor])
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('MEsetID'), magicCode)
 def buildGetDIOdirection(self, gruppe):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetDIOdirection'),[gruppe])
Exemple #30
0
 def buildGetTXMode(self, index):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetTXMode'), [index])
 def buildSetMode(self, ModeFlags_32Bit):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetMode'), ModeFlags_32Bit)
Exemple #32
0
 def buildSetTXMode(self, index, mode):
     data = bytearray([index])
     data.extend(mode)
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetTXMode'), data)
Exemple #33
0
 def buildWriteDataRate(self, dataRate):
     #dataRate = str(dataRate)
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('WriteDataRate'), dataRate)
Exemple #34
0
 def buildGetDIOdirection(self, gruppe):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetDIOdirection'), [gruppe])
 def buildWriteUnitNo(self, channelNo, unitNo):
     data = bytearray([channelNo])
     data.append(unitNo)
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetUnitNo'), data)
Exemple #36
0
 def buildGetDeviceHours(self, slot=0):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetDeviceHours'), [slot])
 def buildGetDeviceHours(self, slot=0):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetDeviceHours'), [slot])
Exemple #38
0
 def buildSetDIOinitialLevel(self, IOPin, newlevel):
     #data = bytearray([self.convertUInt8ToBytes(IOPin)])
     data = bytearray([IOPin])
     data.extend(self.convertUInt16ToBytes(newlevel))
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetDIOinitialLevel'), data)
 def buildWriteDataRate(self, dataRate):
     dataRate = str(dataRate)
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('WriteDataRate'), dataRate)
Exemple #40
0
 def buildGetMode(self):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetMode'))
 def buildWriteSetZero(self, channelNo):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetZero'), [channelNo])
Exemple #42
0
 def buildSetMode(self, ModeFlags_32Bit):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetMode'), ModeFlags_32Bit)
 def buildReadUserOffset(self, channelNo):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('ReadUserOffset'), [channelNo])
Exemple #44
0
 def buildReadDIOthreshold(self, IOPin, upper_or_lower_trigger):
     #data = bytearray([self.convertUInt8ToBytes(IOPin), self.convertUInt8ToBytes(upper_or_lower_trigger)])
     data = bytearray([IOPin, upper_or_lower_trigger])
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('ReadDIOthreshold'), data)
 def buildReadInputType(self, channelNo, sensindex=0x00):
     data = bytearray([self.convertUInt8ToBytes(channelNo), sensindex])
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetInputType'), data)
Exemple #46
0
 def buildGetSerialNo(self):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetSerialNo'))
 def buildSetMEid(self, minor):
     magicCode = bytearray([0x4D, 0x45, 0x69, minor])
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('MEsetID'), magicCode)
Exemple #48
0
 def buildGetDIOtype(self, IOPin):
     #data = bytearray([self.convertUInt8ToBytes(IOPin)])
     data = bytearray([IOPin])
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetDIOtype'), data)
 def buildSetTXMode(self, index, mode):
     data = bytearray([index])
     data.extend(mode)
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetTXMode'), data)
Exemple #50
0
 def buildWriteUnitNo(self, channelNo, unitNo):
     data = bytearray([channelNo])
     data.append(unitNo)
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('SetUnitNo'), data)
 def buildSetDIOdirection(self, gruppe, direction):
     # level umwandeln
     data = bytearray([self.convertUInt8ToBytes(gruppe)])
     data.append(self.convertUInt8ToBytes(direction))
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('SetDIOdirection'), data)
Exemple #52
0
 def buildGetUnitNo(self, channelNo):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetUnitNo'), [channelNo])
 def buildGetMode(self):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetMode'))
 def buildGetUnitText(self, slot):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetUnitText'), [
         slot])
 def buildReadDIOthreshold(self, IOPin,upper_or_lower_trigger):
     data = bytearray([self.convertUInt8ToBytes(IOPin), self.convertUInt8ToBytes(upper_or_lower_trigger)])
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('ReadDIOthreshold'),data)
Exemple #56
0
 def buildGetUnitText(self, slot):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('GetUnitText'), [slot])
 def buildGetDIOtype(self, IOPin):
     data = bytearray([self.convertUInt8ToBytes(IOPin)])
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('GetDIOtype'),data)
Exemple #58
0
 def buildGetDataRate(self):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('ReadDataRate'))
 def buildGet1WireTempValue(self):
     return self.encode_anfrage_frame(anfrage_code_to_shortcut.get('Get1WireTempValue'), [])
Exemple #60
0
 def buildGet1WireTempValue(self):
     return self.encode_anfrage_frame(
         anfrage_code_to_shortcut.get('Get1WireTempValue'), [])