[Trying drawing a sinelike shape on a cylinder][1]

I am trying to draw the picture below. I tried using boolean modifier on the cylinder but, I couldn't create an object that would like on the picture below. 

Any tips on how I can remove a shape from my cylinder that looks like on the picture below?

[![my try on Barrel cam mechanism bt2a][1]][1]


  
  [1]: https://i.sstatic.net/CkmaA.png

 
[![Barrel cam mechanism bt2a][2]][2]


  
  [2]: https://i.sstatic.net/CdSCQ.png