Example #1
0
    def create_objects(self):
        ## DEFINE PARAMETERS ###########
        self.CharSet = 'lowerCaseLiterals'
        self.CharactersPerMessage = 5
        self.SourceEncodeMethod = 'basic'
        self.errorCorrection = 'HardHamming'

        # NOTE: Only use frequencies From the following Set:
        # [23.26, 23.81, 24.39, 25, 25.64, 26.36, 27.03, 27.78, 28.57, 29.41, 30.30, 31.25, 32.26, 33.33,
        #  34.48, 35.71, 37.04, 38.46 ]
        self.TransmissionFrequenciesIdeal = [
            23.26, 25, 26.36, 27.78, 28.57, 30.30, 31.25, 33.33
        ]

        self.TimePerSymbolSeconds = 4

        self.ValidDictionary = IL.loadCharacterSet(self.CharSet)
        self.InputValidationObject = IL.InputValidation(
            self.ValidDictionary, self.CharactersPerMessage)
        self.SrcEncoder = IL.SrcEncoder(self.ValidDictionary,
                                        self.SourceEncodeMethod)
        self.FEC = IL.ChannelEncoder(self.errorCorrection, 7, 4)
        self.Chan = IL.Channel('FixedFrequencyAndDuty',
                               self.TransmissionFrequenciesIdeal,
                               self.TimePerSymbolSeconds, True, 28.57, 30.30)
Example #2
0
	def create_objects(self):
		self.CharSet = 'lowerCaseLiterals'
		self.CharactersPerMessage = 7
		self.SourceEncodeMethod = 'basic'
		self.errorCorrection = 'HardHamming'
		self.FEC_blockSize = 15
		self.FEC_msgSize = 11
###########################
		self.ValidDictionary = IL.loadCharacterSet(self.CharSet)
		self.InputValidationObject = IL.InputValidation(self.ValidDictionary,self.CharactersPerMessage)
		self.SrcEncoder  = IL.SrcEncoder(self.ValidDictionary , self.SourceEncodeMethod)
		self.FEC = IL.ChannelEncoder(self.errorCorrection, self.FEC_blockSize , self.FEC_msgSize)
################################
		self.CharSet = RL.loadCharacterSet(self.CharSet)
		self.CD = RL.ChannelDecoder(self.errorCorrection,'HARD', self.FEC_blockSize, self.FEC_msgSize)
		self.SD = RL.sourceDecoder(self.CharSet, self.SourceEncodeMethod)