def _default_pad(self, data_type, numElems):
        '''
        Determines the default pad data for a "data_type"
        '''
        order = self._convert_option()
        if (data_type == 1) or (data_type == 41):
            pad_value = struct.pack(order+'b', -127)
        elif data_type == 2:
            pad_value = struct.pack(order+'h', -32767)
        elif data_type == 4:
            pad_value = struct.pack(order+'i', -2147483647)
        elif (data_type == 8) or (data_type == 33):
            pad_value = struct.pack(order+'q', -9223372036854775807)
        elif data_type == 11:
            pad_value = struct.pack(order+'B', 254)
        elif data_type == 12:
            pad_value = struct.pack(order+'H', 65534)
        elif data_type == 14:
            pad_value = struct.pack(order+'I', 4294967294)
        elif (data_type == 21) or (data_type == 44):
            pad_value = struct.pack(order+'f', -1.0E30)
        elif (data_type == 22) or (data_type == 45):
            pad_value = struct.pack(order+'d', -1.0E30)
        elif (data_type == 31):
            pad_value = struct.pack(order+'d', 0.0)
        elif (data_type == 32):
            pad_value = struct.pack(order+'2d', *[0.0, 0.0])
        elif (data_type == 51) or (data_type == 52):
            tmpPad = str(' '*numElems).encode()
            form = str(numElems)
            pad_value = struct.pack(form+'b', *tmpPad)
        return pad_value
def _default_pad ( self , data_type , numElems ) : order = self . _convert_option ( ) if ( data_type == 1 ) or ( data_type == 41 ) : pad_value = struct . pack ( order + 'b' , - 127 ) elif data_type == 2 : pad_value = struct . pack ( order + 'h' , - 32767 ) elif data_type == 4 : pad_value = struct . pack ( order + 'i' , - 2147483647 ) elif ( data_type == 8 ) or ( data_type == 33 ) : pad_value = struct . pack ( order + 'q' , - 9223372036854775807 ) elif data_type == 11 : pad_value = struct . pack ( order + 'B' , 254 ) elif data_type == 12 : pad_value = struct . pack ( order + 'H' , 65534 ) elif data_type == 14 : pad_value = struct . pack ( order + 'I' , 4294967294 ) elif ( data_type == 21 ) or ( data_type == 44 ) : pad_value = struct . pack ( order + 'f' , - 1.0E30 ) elif ( data_type == 22 ) or ( data_type == 45 ) : pad_value = struct . pack ( order + 'd' , - 1.0E30 ) elif ( data_type == 31 ) : pad_value = struct . pack ( order + 'd' , 0.0 ) elif ( data_type == 32 ) : pad_value = struct . pack ( order + '2d' , * [ 0.0 , 0.0 ] ) elif ( data_type == 51 ) or ( data_type == 52 ) : tmpPad = str ( ' ' * numElems ) . encode ( ) form = str ( numElems ) pad_value = struct . pack ( form + 'b' , * tmpPad ) return pad_value
Determines the default pad data for a "data_type"