# 上乘controller，下接preference和clocam
import json
import clocam
import preference
if __name__ == '__main__':
    import sys
    sys.path.append('../')
    from goldenarmada_mdcproj import controller

def QueryInHandler(json):
    if json['func'] == 'pre_update':
        result = preference.pre_update(json['param'])
        return result
    elif json['func'] == 'shot_and_get':
        result = clocam.shot_and_get(json['param'])
        return result

def QueryOutHandler(json):
    if json['lib'] == 'feedback':
        return QueryInHandler(json)
    else:
        # return controller.queryInHandler(json)
        return