Shoot pictures with raspicam and raspberry pi

Hi, currently I’m using AP connected to a raspberry pi 3 and a raspicam (8 MPx model). I write a python script to take pictures and grab exif data from mavros.
But I would like to test another option and it’s mapping using survey flight plan. In order to do that I will need to shoot raspicam with pixhawk command. can someone point me out on how to achieve that? Is AP changing some pixhawk output on every shoot?

Thank!