code: def SetValue(
          self,
          Channel,
          Parameter,
          Buffer):
  
          
          try:
              if Parameter == PCAN_LOG_LOCATION or Parameter == PCAN_LOG_TEXT or Parameter == PCAN_TRACE_LOCATION:
                  mybuffer = create_string_buffer(256)
              else:
                  mybuffer = c_int(0)
  
              mybuffer.value = Buffer
              res = self.__m_dllBasic.CAN_SetValue(Channel,Parameter,byref(mybuffer),sizeof(mybuffer))
              return TPCANStatus(res)
          except:
              logger.error("Exception on PCANBasic.SetValue")
              raise
docs: Returns a descriptive text of a given TPCANStatus error
            code, in any desired language
  
          Remarks:
            Parameters can be present or not according with the kind
            of Hardware (PCAN Channel) being used. If a parameter is not available,
            a PCAN_ERROR_ILLPARAMTYPE error will be returned.
  
          Parameters:
            Channel      : A TPCANHandle representing a PCAN Channel
            Parameter    : The TPCANParameter parameter to set
            Buffer       : Buffer with the value to be set
            BufferLength : Size in bytes of the buffer
  
          Returns:
            A TPCANStatus error code