multiple rigid body hinges

Hey im trying to rig this so that the cylinder hinges rotate with the piece and basically hinge it as you would imagine. Im awful at hinging so detail is appreciated.