#NEWLINE# def __get_init_value( self ) : #NEWLINE# #INDENT# '\n        Return the init value of a C implementation, according to the selected\n        algorithm and to the given options.\n        If no default option is given for a given parameter, value in the cfg_t\n        structure must be used.\n        ' #NEWLINE# if ( self . opt . algorithm == self . opt . algo_bit_by_bit ) : #NEWLINE# #INDENT# if ( ( self . opt . xor_in == None ) or ( self . opt . width == None ) or ( self . opt . poly == None ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# crc = Crc ( width = self . opt . width , poly = self . opt . poly , reflect_in = self . opt . reflect_in , xor_in = self . opt . xor_in , reflect_out = self . opt . reflect_out , xor_out = self . opt . xor_out , table_idx_width = self . opt . tbl_idx_width ) #NEWLINE# init = crc . nondirect_init #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . opt . algorithm == self . opt . algo_bit_by_bit_fast ) : #NEWLINE# #INDENT# if ( self . opt . xor_in == None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# init = self . opt . xor_in #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . opt . algorithm == self . opt . algo_table_driven ) : #NEWLINE# #INDENT# if ( ( self . opt . reflect_in == None ) or ( self . opt . xor_in == None ) or ( self . opt . width == None ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if ( self . opt . poly == None ) : #NEWLINE# #INDENT# poly = 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# poly = self . opt . poly #NEWLINE# #UNINDENT# crc = Crc ( width = self . opt . width , poly = poly , reflect_in = self . opt . reflect_in , xor_in = self . opt . xor_in , reflect_out = self . opt . reflect_out , xor_out = self . opt . xor_out , table_idx_width = self . opt . tbl_idx_width ) #NEWLINE# if self . opt . reflect_in : #NEWLINE# #INDENT# init = crc . reflect ( crc . direct_init , self . opt . width ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# init = crc . direct_init #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# init = 0 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return self . __pretty_hex ( init , self . opt . width )