def getSignalID(frameOrName, signalName, db):
    """Get the int ID of a signal by giving the message name and signal name.

    frameOrName is the ID str or int for the message. signalName is the name of the signal that you want the ID for.
    """
    myNum = None
    if type(frameOrName) is int:
        try:
            num = db.get_message_by_frame_id(frameOrName).signals
            for i in range(len(num)):
                if num[i].name == signalName:
                    myNum = i
                i += 1
        except:
            print('warning: str addr not in DBC')
            myNum = 'not in DBC'
    elif type(frameOrName) is str:
        try:
            num = db.get_message_by_name(frameOrName).signals
            for i in range(len(num)):
                if num[i].name == signalName:
                    myNum = i
                i += 1
        except:
            print('warning: str addr not in DBC')
            myNum = 'not in DBC'
    return myNum
